Interface BeanContext

  • All Known Subinterfaces:
    AppContext
    All Known Implementing Classes:
    AppContextImpl, BeanContextImpl, MobileChunkedAppContext

    public interface BeanContext
    The BeanContext interface provides context information for a WebComponent or a Transformable, such as StyleCatalog and MessagesManager etc. A single instance of a BeanContext object can be shared with many WebComponent or Transformable instances.

    A BeanContext object can be instantiated from WebBeanFactory. You can also retrieve a BeanContext object from a Transformable object or a WebComponent object.

    If a web application needs more context information, try to extend this interface to provide the functionalities required by the web application. For example, MicroStrategy Web has a AppContext sub-interface to provide application WebComponent more information such as Preferences.

    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Detail

      • getStyleCatalog

        StyleCatalog getStyleCatalog()
        Returns an instance of StyleCatalog associated with the current BeanContext.
        Returns:
        an instance of StyleCatalog.
      • setStyleCatalog

        void setStyleCatalog​(StyleCatalog sc)
        Sets an instance of StyleCatalog on the current BeanContext.
        Parameters:
        sc - an instance of StyleCatalog to set.
      • getMessages

        Messages getMessages()
        Returns the Messages instance from this BeanContext.
        Returns:
        the Messages instance.
      • setMessages

        void setMessages​(Messages msgs)
        Sets a Messages instance to this BeanContext.
        Parameters:
        msgs - the Messages instance to set.
      • getFeatures

        WebFeatures getFeatures()
        This method gets the Features object associated with this application context.
        Returns:
        a WebFeatures object
      • setFeatures

        void setFeatures​(WebFeatures features)
        This method sets the Features object associated with this application context.
        Parameters:
        features - A WebFeatures object.
      • getMessagesManager

        MessagesManager getMessagesManager()
        Returns an instance of MessagesManager associated with the current BeanContext.
        Returns:
        an instance of MessagesManager.
      • setEventHandlersCatalog

        void setEventHandlersCatalog​(EventHandlersCatalog catalog)
        Sets the EventHandlersCatalog instances associated with the current BeanContext. This catalog is then used by event-handlers to populate their events list and arguments. It includes for each event-handler, what are the events, and for each event, what are the argument and the name of the arguments used. This EventHandlersCatalog is typically configured through the "/WEB-INF/xml/config/events.xml" file.
        Parameters:
        catalog - an instance of EventHandlersCatalog to set.
        Since:
        MicroStrategy Web 9.0.0
      • setMessagesManager

        void setMessagesManager​(MessagesManager msgsMgr)
        Sets an instance of MessagesManager on the current BeanContext.
        Parameters:
        msgsMgr - an instance of MessagesManager to set.
      • getContainerServices

        ContainerServices getContainerServices()
        This method gets the Container Services object associated with this application context.
        Returns:
        ContainerServices
        Since:
        MicroStrategy Web 9.0.0
      • setContainerServices

        void setContainerServices​(ContainerServices cs)
        This method sets the Container Services object associated with this application context.
        Parameters:
        cs - A ContainerServices object.
      • getRequestKeys

        RequestKeys getRequestKeys()
        This method gets the Request Keys object associated with this application context.
        Returns:
        RequestKeys
        Since:
        MicroStrategy Web 9.0.0
      • setRequestKeys

        void setRequestKeys​(RequestKeys hrk)
        This method sets the Request Keys object to be associated with this application context.
        Parameters:
        hrk - An instance of an RequestKeys object.
      • getWebSessionManager

        WebSessionManager getWebSessionManager()
        This method returns the Application Session Manager associated with this application context. If not explicitly set through the #setAppSessionManager method, a new one is automatically created.
        Returns:
        WebSessionManager
      • getServletPath

        java.lang.String getServletPath()
        Get the full application path to the Servlet. This value is read form the configuration file and if is not set it will be automatically generated from the request.
        Returns:
        a String with the servlet path