Package com.microstrategy.web.beans
Interface BeanContext
-
- All Known Subinterfaces:
AppContext
- All Known Implementing Classes:
AppContextImpl,BeanContextImpl,MobileChunkedAppContext
public interface BeanContextTheBeanContextinterface provides context information for aWebComponentor aTransformable, such asStyleCatalogandMessagesManageretc. A single instance of aBeanContextobject can be shared with manyWebComponentorTransformableinstances.A
BeanContextobject can be instantiated fromWebBeanFactory. You can also retrieve aBeanContextobject from aTransformableobject or aWebComponentobject.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
AppContextsub-interface to provide applicationWebComponentmore information such asPreferences.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContainerServicesgetContainerServices()This method gets the Container Services object associated with this application context.EventHandlersCataloggetEventHandlersCatalog()Returns the current instance ofEventHandlersCatalogassociated with the current BeanContext.WebFeaturesgetFeatures()This method gets the Features object associated with this application context.MessagesgetMessages()Returns theMessagesinstance from this BeanContext.MessagesManagergetMessagesManager()Returns an instance ofMessagesManagerassociated with the current BeanContext.RequestKeysgetRequestKeys()This method gets the Request Keys object associated with this application context.java.lang.StringgetServletPath()Get the full application path to the Servlet.StyleCataloggetStyleCatalog()Returns an instance ofStyleCatalogassociated with the current BeanContext.WebSessionManagergetWebSessionManager()This method returns the Application Session Manager associated with this application context.voidsetContainerServices(ContainerServices cs)This method sets the Container Services object associated with this application context.voidsetEventHandlersCatalog(EventHandlersCatalog catalog)Sets theEventHandlersCataloginstances associated with the current BeanContext.voidsetFeatures(WebFeatures features)This method sets the Features object associated with this application context.voidsetMessages(Messages msgs)Sets aMessagesinstance to this BeanContext.voidsetMessagesManager(MessagesManager msgsMgr)Sets an instance ofMessagesManageron the current BeanContext.voidsetRequestKeys(RequestKeys hrk)This method sets the Request Keys object to be associated with this application context.voidsetStyleCatalog(StyleCatalog sc)Sets an instance ofStyleCatalogon the current BeanContext.
-
-
-
Method Detail
-
getStyleCatalog
StyleCatalog getStyleCatalog()
Returns an instance ofStyleCatalogassociated with the current BeanContext.- Returns:
- an instance of StyleCatalog.
-
setStyleCatalog
void setStyleCatalog(StyleCatalog sc)
Sets an instance ofStyleCatalogon the current BeanContext.- Parameters:
sc- an instance of StyleCatalog to set.
-
getMessages
Messages getMessages()
Returns theMessagesinstance from this BeanContext.- Returns:
- the Messages instance.
-
setMessages
void setMessages(Messages msgs)
Sets aMessagesinstance 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
WebFeaturesobject
-
setFeatures
void setFeatures(WebFeatures features)
This method sets the Features object associated with this application context.- Parameters:
features- AWebFeaturesobject.
-
getMessagesManager
MessagesManager getMessagesManager()
Returns an instance ofMessagesManagerassociated with the current BeanContext.- Returns:
- an instance of MessagesManager.
-
setEventHandlersCatalog
void setEventHandlersCatalog(EventHandlersCatalog catalog)
Sets theEventHandlersCataloginstances 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. ThisEventHandlersCatalogis 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
-
getEventHandlersCatalog
EventHandlersCatalog getEventHandlersCatalog()
Returns the current instance ofEventHandlersCatalogassociated with the current BeanContext.- Returns:
- an instance of EventHandlersCatalog.
- Since:
- MicroStrategy Web 9.0.0
- See Also:
setEventHandlersCatalog(com.microstrategy.web.beans.EventHandlersCatalog)
-
setMessagesManager
void setMessagesManager(MessagesManager msgsMgr)
Sets an instance ofMessagesManageron 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- AContainerServicesobject.
-
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 anRequestKeysobject.
-
getWebSessionManager
WebSessionManager getWebSessionManager()
This method returns the Application Session Manager associated with this application context. If not explicitly set through the#setAppSessionManagermethod, 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
Stringwith the servlet path
-
-