Class BaseProcessActionHandler

    • Constructor Detail

      • BaseProcessActionHandler

        public BaseProcessActionHandler()
    • Method Detail

      • execute

        protected final org.codehaus.jettison.json.JSONObject execute​(Map<String,​Object> parameters,
                                                                      String content)
        Description copied from class: BaseActionHandler
        Needs to be implemented by a subclass.
        Specified by:
        execute in class BaseActionHandler
        parameters - the parameters obtained from the request. Note that the request object and the session object are also present in this map, resp. as the constants KernelConstants.HTTP_REQUEST and KernelConstants.HTTP_SESSION.
        content - the request content (if any)
        the return should be a JSONObject, this is passed back to the caller on the client.
      • extractParametersFromRequest

        protected Map<String,​Object> extractParametersFromRequest​(javax.servlet.http.HttpServletRequest request)
        Overrides the base implementation to support extracting the parameters from a multipart request
        extractParametersFromRequest in class BaseActionHandler
        request - The request
        A map with key the name of the parameter and an Object as the value
      • extractRequestContent

        protected String extractRequestContent​(javax.servlet.http.HttpServletRequest request,
                                               Map<String,​Object> requestParameters)
                                        throws IOException
        Overrides the base implementation to support extracting the content object in a multipart request, that is stored in the PARAM_MULTIPART_VALUES parameter
        extractRequestContent in class BaseActionHandler
        request - The request
        requestParameters - The map of parameters extracted from the request
        The request content as an String
        IOException - when there is an error reading the request InputStream
      • hasAccess

        public static boolean hasAccess​(Process processDefinition,
                                        Map<String,​Object> parameters)
        Permissions to processes can be given in 2 ways:

        Explicit grant to process definition access:

        • whenever the process is directly executed from menu
        • in case the process is marked as "Requires Explicit Access Permission"
        • in case there is a "Secured Process" preference for current window

        Inherited from window access in case it is invoked from a window button and none of the previous conditions is satisfied.

      • doExecute

        protected abstract org.codehaus.jettison.json.JSONObject doExecute​(Map<String,​Object> parameters,
                                                                           String content)