Package lumis.portal

Class PortalRequestContext

  • All Implemented Interfaces:
    AutoCloseable, VariableResolver

    public class PortalRequestContext
    extends Object
    implements VariableResolver, AutoCloseable

    Stores all request context on LumisXP.

    The request context can be Devices informations, Session informations, information from External Entities, etc.

    It's possible to plug custom Request Context developed by user. In this case just use the #setEntry(String, IPortalRequestContextEntry).

    Since:
    6.0.0
    Version:
    $Revision: 22420 $ $Date: 2019-02-19 16:21:02 -0300 (Tue, 19 Feb 2019) $
    • Constructor Detail

      • PortalRequestContext

        public PortalRequestContext()
    • Method Detail

      • getEntry

        public Object getEntry​(String key)
        Returns the specific request context based on Key parameter.
        Parameters:
        key - id of the Request context to be find. This information is the entry key of the map.
        Returns:
        the Request Context that match with key parameter.
        Since:
        6.0.0
      • getDeviceEntry

        public Map<String,​String> getDeviceEntry()
        Returns the Device Request Context thats contains all information about the device that is making the current request.
        Returns:
        a map with the device properties.
        Since:
        6.0.0
      • setEntry

        public void setEntry​(String key,
                             Object value)
        Puts a custom request context on the context map to be used in another time.
        Parameters:
        key - name of the Request Context. This information is the entry key of the map.
        value - the custom context.
        Since:
        6.0.0
      • getPortalRequestContext

        public static PortalRequestContext getPortalRequestContext​(HttpServletRequest request)
        Returns the Portal Request Context from a given request.
        Parameters:
        request - request that contains the PortalRequestContext.
        Returns:
        the Portal Request Context.
        Since:
        6.0.0
      • getPortalRequestContext

        public static PortalRequestContext getPortalRequestContext​(IServiceInterfaceRequest request)
        Returns the Portal Request Context from a given request.
        Parameters:
        request - request that contains the PortalRequestContext.
        Returns:
        the Portal Request Context.
        Since:
        6.0.0