Interface IServiceInterface

    • Method Detail

      • register

        void register​(SessionConfig sessionConfig,
                      org.w3c.dom.Node serviceInterfaceXmlNode,
                      ITransaction transaction)
               throws PortalException
        Called by the service interface manager when a service interface definition is registered. This method allows the Service Interface implementation to set its default values into the service interface definition xml.
        Parameters:
        sessionConfig - TODO
        serviceInterfaceXmlNode -
        transaction - TODO
        Throws:
        PortalException
      • load

        void load​(ServiceInterfaceConfig config)
           throws ServiceInterfaceException,
                  PortalException
        Called by the service interface container to indicate to a service interface that the service interface is being placed into service.

        The service interface container calls the init method exactly once after instantiating the service interface. The init method must complete successfully before the service interface can receive any requests.

        The service interface container cannot place the service interface into service if the init method

        1. Throws a ServiceInterfaceException
        2. Does not return within a time period defined by the service interface container.
        Parameters:
        config - a ServiceInterfaceConfig object containing the service interface's configuration and initialization parameters
        Throws:
        ServiceInterfaceException - if an exception has occurred that interferes with the service interface's normal operation.
        PortalException - if the service interface cannot perform the initialization at this time.
      • unload

        void unload()
             throws ServiceInterfaceException,
                    PortalException
        Called by the service interface container to indicate to a service interface that the service interface is being taken out of service.

        Before the service interface container calls the destroy method, it should allow any threads that are currently processing requests within the service interface object to complete execution. To avoid waiting forever, the service interface container can optionally wait for a predefined time before destroying the service interface object.

        This method enables the service interface to do the following:

        • clean up any resources that it holds (for example, memory, file handles, threads)
        • make sure that any persistent state is synchronized with the service interface current state in memory.
        Throws:
        ServiceInterfaceException - if the service interface has problems fulfilling the request
        PortalException - if the service interface is unavailable to process the action at this time
      • instanceUnLoaded

        void instanceUnLoaded​(ServiceInterfaceInstanceConfig config)
                       throws ServiceInterfaceException,
                              PortalException
        Called by the service container to indicate that a service interface instance is about to be destroyed
        Parameters:
        config - a ServiceInterfaceInstanceConfig object containing the service interface instance's configuration and initialization parameters
        Throws:
        ServiceInterfaceException - if the service interface has problems fulfilling the request
        PortalException - if the service interface is unavailable to process the action at this time
      • instanceDeleted

        void instanceDeleted​(ServiceInterfaceInstanceConfig config)
                      throws ServiceInterfaceException,
                             PortalException
        Called by the service container to indicate that a service interface instance has been deleted
        Parameters:
        config - a ServiceInterfaceInstanceConfig object containing the service interface instance's configuration and initialization parameters
        Throws:
        ServiceInterfaceException - if the service interface has problems fulfilling the request
        PortalException - if the service interface is unavailable to process the action at this time
      • processAction

        void processAction​(IServiceInterfaceActionRequest request,
                           IServiceInterfaceActionResponse response)
                    throws ServiceInterfaceException,
                           PortalException
        Called by the service interface container to allow the service interface to process an action request. This method is called if the client request was originated by a URL created (by the service interface) with the RenderResponse.createActionURL() method.

        Typically, in response to an action request, a service interface updates state based on the information sent in the action request parameters. In an action the service interface may:

        • issue a redirect
        • change its window state
        • change its service interface mode
        • modify its persistent state
        • set render parameters

        A client request triggered by an action URL translates into one action request and many render requests, one per service interface in the portal page. The action processing must be finished before the render requests can be issued.

        Parameters:
        request - the action request
        response - the action response
        Throws:
        ServiceInterfaceException - if the service interface has problems fulfilling the request
        PortalException - if the service interface is unavailable to process the action at this time
      • isRequestInitializerSupported

        default boolean isRequestInitializerSupported​(ServiceInterfaceConfig serviceInterface)
                                               throws PortalException
        Returns whether the given service interface supports request initialization.
        Parameters:
        serviceInterface - the service interface
        Returns:
        whether the given service interface supports request initialization.
        Throws:
        PortalException
        Since:
        15.0.0