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:
        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)
        Returns:
        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
        Overrides:
        extractParametersFromRequest in class BaseActionHandler
        Parameters:
        request - The request
        Returns:
        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
        Overrides:
        extractRequestContent in class BaseActionHandler
        Parameters:
        request - The request
        requestParameters - The map of parameters extracted from the request
        Returns:
        The request content as an String
        Throws:
        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)