Class ProcessActionHandler<S extends Source>

    • Constructor Detail

      • ProcessActionHandler

        public ProcessActionHandler()
    • Method Detail

      • setParameter

        public void setParameter​(String name,
                                 Object value)
        Description copied from interface: IProcessActionHandler
        All controls pass their values to a process action object via this method.

        The controls call this method before the processAction() method is called.

        Specified by:
        setParameter in interface IProcessActionHandler
      • containsParameter

        public boolean containsParameter​(String name)
        Description copied from interface: IParameters
        Returns whether a parameter is set in this parameters.

        This is useful to differ a null value parameter from a non-existing parameter.

        Specified by:
        containsParameter in interface IParameters
        Parameters:
        name - the parameter name.
        Returns:
        true if the parameter is set, false otherwise.
      • resolveFieldValueNode

        protected Object resolveFieldValueNode​(Node fieldValueNode)
                                        throws PortalException
        Resolves the value for a fieldValue node.
        Parameters:
        id - the id of the fieldValue node.
        Returns:
        the resolved value for the node, or null if none was found.
        Throws:
        PortalException
        Since:
        4.0.10
      • getParameter

        public <T> T getParameter​(String name,
                                  Class<T> expectedClass)
        Description copied from interface: IProcessActionHandler
        Returns the parameter value converted to the expected class.
        Specified by:
        getParameter in interface IProcessActionHandler
        Type Parameters:
        T - the expected class.
        Parameters:
        name - the parameter name.
        expectedClass - the expected class.
        Returns:
        the parameter value, converted to the expected class, or null if there is no such parameter value set.
      • addDefaultResponse

        protected void addDefaultResponse()
                                   throws PortalException
        Sets the default response parameters based on the node specifications.

        Possible response types.

        doui_closeWindow, RESPONSE_TYPE_CLOSE_WINDOW: closes the current window.

        doui_hyperLink, RESPONSE_TYPE_HYPERLINK: Used to redirect the browser to another page / url after the process action. In addition parameters may be passed to the destination page.

        doui_message, RESPONSE_TYPE_MESSAGE: displays a message to the end user. This type requires a message attribute to be specified. This message will be translated to the users current language.

        doui_refreshParen, RESPONSE_TYPE_REFRESH_PARENTt: refreshes the parent window.

        doui_runJavascript, RESPONSE_TYPE_RUN_JAVASCRIPT: runs the javascript specified in the script node within the reponse.

        doui_setRequestParameters, RESPONSE_TYPE_SET_REQUEST_PARAMETERS: sets all the current parameters values to the following render request to the current interface.

        doui_standardPopup, RESPONSE_TYPE_STANDARD_POPUP: Used interfaces that are within popup windows. This internally is converted to two responses. One doui_refreshParent response followed by one doui_closeWindow response.

        doui_standardEmbedded, RESPONSE_TYPE_STANDARD_EMBEDDED: Used in interfaces that are embedded within portal pages. This is equivalent to a doui_setRequestParameters response.

        doui_standardCommit, RESPONSE_TYPE_STANDARD_COMMIT: Used in standard add and edit administration interfaces. This response detects whether the current interface is a popup or an embedded interface. If popup, this response is equivalent to a doui_refreshParent response followed by a doui_closeWindow response. If embedded, this response detects where the administration list interface is located and redirects the portal to the page that contains that interface.

        doui_setResponseParameters, RESPONSE_TYPE_SET_RESPONSE_PARAMETERS: Sets the specified parameters to the following render request to the current interface.

        doui_setRequestAttributes, RESPONSE_TYPE_SET_REQUEST_ATTRIBUTES: Used primarily to share data between different process actions. Sets parameter values in the request attributes. These attributes may be read by subsequent process actions with the same id.

        Throws:
        PortalException
        Since:
        4.0.11
      • addResponseParameter

        public void addResponseParameter​(String name,
                                         String value)
                                  throws PortalException
        Adds the given name and value to the response parameters.
        Parameters:
        name -
        value -
        Throws:
        PortalException
        Since:
        4.0.11
      • localize

        protected String localize​(String stringToLocalize)
                           throws PortalException
        Localizes the string based on the interface resource.
        Parameters:
        stringToLocalize -
        Returns:
        Throws:
        PortalException
        Since:
        4.0.11
      • checkServiceInstancePermission

        protected boolean checkServiceInstancePermission​(String permissionId)
                                                  throws PortalException
        Returns true if the current user has the given permission.
        Parameters:
        permissionId -
        Returns:
        Throws:
        PortalException
        Since:
        4.0.11
      • checkServiceInstancePermission

        protected boolean checkServiceInstancePermission​(String userId,
                                                         String permissionId)
                                                  throws PortalException
        Returns true if the given user has the given permission.
        Parameters:
        userId -
        permissionId -
        Returns:
        Throws:
        PortalException
        Since:
        4.0.11