Class ProcessActionHandler<S extends Source>

    • Field Detail

      • RESPONSE_TYPE_MESSAGE

        public static final java.lang.String RESPONSE_TYPE_MESSAGE
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_REFRESH_PARENT

        public static final java.lang.String RESPONSE_TYPE_REFRESH_PARENT
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_CLOSE_WINDOW

        public static final java.lang.String RESPONSE_TYPE_CLOSE_WINDOW
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_RUN_JAVASCRIPT

        public static final java.lang.String RESPONSE_TYPE_RUN_JAVASCRIPT
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_SET_REQUEST_PARAMETERS

        public static final java.lang.String RESPONSE_TYPE_SET_REQUEST_PARAMETERS
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_SET_RESPONSE_PARAMETERS

        public static final java.lang.String RESPONSE_TYPE_SET_RESPONSE_PARAMETERS
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_SET_REQUEST_ATTRIBUTES

        public static final java.lang.String RESPONSE_TYPE_SET_REQUEST_ATTRIBUTES
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_MESSAGE

        public static final java.lang.String RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_MESSAGE
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_PROCESS_ACTION_ID

        public static final java.lang.String RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_PROCESS_ACTION_ID
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_VALIDATE_PROCESS_ACTION_ON_RENDER

        public static final java.lang.String RESPONSE_TYPE_VALIDATE_PROCESS_ACTION_ON_RENDER
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_STANDARD_POPUP

        public static final java.lang.String RESPONSE_TYPE_STANDARD_POPUP
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_STANDARD_EMBEDDED

        public static final java.lang.String RESPONSE_TYPE_STANDARD_EMBEDDED
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_STANDARD_COMMIT

        public static final java.lang.String RESPONSE_TYPE_STANDARD_COMMIT
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_HYPERLINK

        public static final java.lang.String RESPONSE_TYPE_HYPERLINK
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_POPUP_INTERFACE

        public static final java.lang.String RESPONSE_TYPE_POPUP_INTERFACE
        See Also:
        Constant Field Values
      • RESPONSE_TYPE_PREVIEW

        public static final java.lang.String RESPONSE_TYPE_PREVIEW
        See Also:
        Constant Field Values
      • processActionNode

        protected org.w3c.dom.Node processActionNode
      • source

        protected S extends Source source
      • parameters

        protected java.util.Map<java.lang.String,​java.lang.Object> parameters
      • id

        protected java.lang.String id
    • Constructor Detail

      • ProcessActionHandler

        public ProcessActionHandler()
    • Method Detail

      • setParameter

        public void setParameter​(java.lang.String name,
                                 java.lang.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​(java.lang.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 java.lang.Object resolveFieldValueNode​(org.w3c.dom.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​(java.lang.String name,
                                  java.lang.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
      • processPopupInterfaceResponse

        protected void processPopupInterfaceResponse​(org.w3c.dom.Node actionResponseNode,
                                                     java.lang.String destInterfaceId)
                                              throws PortalException
        Throws:
        PortalException
      • processHyperLinkResponse

        protected void processHyperLinkResponse​(org.w3c.dom.Node actionResponseNode,
                                                java.lang.String destInterfaceId)
                                         throws PortalException
        Throws:
        PortalException
      • addResponseParameter

        public void addResponseParameter​(java.lang.String name,
                                         java.lang.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 java.lang.String localize​(java.lang.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​(java.lang.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​(java.lang.String userId,
                                                         java.lang.String permissionId)
                                                  throws PortalException
        Returns true if the given user has the given permission.
        Parameters:
        userId -
        permissionId -
        Returns:
        Throws:
        PortalException
        Since:
        4.0.11