Package com.microstrategy.web.beans
Class BeanContextImpl
- java.lang.Object
 - 
- com.microstrategy.web.beans.BeanContextImpl
 
 
- 
- All Implemented Interfaces:
 BeanContext
- Direct Known Subclasses:
 AppContextImpl
public class BeanContextImpl extends java.lang.Object implements BeanContext
Theclass provides the default implementation of the interface BeanContext. Web applications are encouraged to extend this class to provide its own application specific context object.- Since:
 - MicroStrategy Web 7.3.1 or earlier
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected ContainerServices_containerServicesprotected WebSessionManager_newSessionMgr 
- 
Constructor Summary
Constructors Constructor Description BeanContextImpl()The default constructor forBeanContextImpl. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerServicesgetContainerServices()This method gets the Container Services object associated with this application context.EventHandlersCataloggetEventHandlersCatalog()Returns theEventHandlersCataloginstance associated with this bean context.protected java.lang.StringgetEventHandlersCatalogPath()Returns the path to use for the EventHandlersCatalog file.WebFeaturesgetFeatures()This method gets the WebFeatures object associated with this application context.MessagesgetMessages()Returns theMessagesinstance from this BeanContext.MessagesManagergetMessagesManager()Returns theMessagesManagerinstance associated with this bean context.protected java.lang.StringgetMessagesManagerPath()Returns the path to use for the MessagesManager (locales) file.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 theStyleCataloginstance associated with this bean context.protected java.lang.StringgetStyleCatalogPath()Returns the path to use for the StyleCatalog file.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 WebFeatures 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 requestKeys)This method sets the Request Keys object to be associated with this application context.voidsetStyleCatalog(StyleCatalog sc)Sets an instance ofStyleCatalogon the current BeanContext. 
 - 
 
- 
- 
Field Detail
- 
_containerServices
protected ContainerServices _containerServices
- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
_newSessionMgr
protected WebSessionManager _newSessionMgr
 
 - 
 
- 
Method Detail
- 
getStyleCatalog
public StyleCatalog getStyleCatalog()
Returns theStyleCataloginstance associated with this bean context. If no StyleCatalog has been explicitly associated, it will automatically used the one specified by thegetStyleCatalogPath()method.- Specified by:
 getStyleCatalogin interfaceBeanContext- Returns:
 - an instance of 
StyleCatalog. 
 
- 
setStyleCatalog
public void setStyleCatalog(StyleCatalog sc)
Sets an instance ofStyleCatalogon the current BeanContext.- Specified by:
 setStyleCatalogin interfaceBeanContext- Parameters:
 sc- an instance ofStyleCatalogto set.
 
- 
getStyleCatalogPath
protected java.lang.String getStyleCatalogPath()
Returns the path to use for the StyleCatalog file. This is only used if a StyleCatalog has not been explicitly set through thesetStyleCatalog(com.microstrategy.web.transform.StyleCatalog).- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getMessages
public Messages getMessages()
Returns theMessagesinstance from this BeanContext. This method does not contact theMessagesManagerobject associated with thisBeanContext.- Specified by:
 getMessagesin interfaceBeanContext- Returns:
 - the Messages instance.
 
 
- 
setMessages
public void setMessages(Messages msgs)
Sets aMessagesinstance to this BeanContext. This method does not contact theMessagesManagerobject associated with thisBeanContext.- Specified by:
 setMessagesin interfaceBeanContext- Parameters:
 msgs- the Messages instance to set.
 
- 
getMessagesManager
public MessagesManager getMessagesManager()
Returns theMessagesManagerinstance associated with this bean context. If no MessagesManager has been explicitly associated, it will automatically used the one specified by thegetMessagesManagerPath()method.- Specified by:
 getMessagesManagerin interfaceBeanContext- Returns:
 - an instance of 
MessagesManager. 
 
- 
setMessagesManager
public void setMessagesManager(MessagesManager msgsMgr)
Sets an instance ofMessagesManageron the current BeanContext.- Specified by:
 setMessagesManagerin interfaceBeanContext- Parameters:
 msgsMgr- an instance ofMessagesManagerto set.
 
- 
getMessagesManagerPath
protected java.lang.String getMessagesManagerPath()
Returns the path to use for the MessagesManager (locales) file. This is only used if a MessagesManager has not been explicitly set through thesetMessagesManager(com.microstrategy.web.beans.MessagesManager).- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getFeatures
public WebFeatures getFeatures()
This method gets the WebFeatures object associated with this application context.- Specified by:
 getFeaturesin interfaceBeanContext- Returns:
 WebFeatures
 
- 
setFeatures
public void setFeatures(WebFeatures features)
This method sets the WebFeatures object associated with this application context.- Specified by:
 setFeaturesin interfaceBeanContext- Parameters:
 features- AWebFeaturesobject.
 
- 
getEventHandlersCatalog
public EventHandlersCatalog getEventHandlersCatalog()
Returns theEventHandlersCataloginstance associated with this bean context. If no EventHandlersCatalog has been explicitly associated, it will automatically used the one specified by thegetEventHandlersCatalogPath()method.- Specified by:
 getEventHandlersCatalogin interfaceBeanContext- Returns:
 - an instance of 
EventHandlersCatalog. - Since:
 - MicroStrategy Web 9.0.0
 - See Also:
 BeanContext.setEventHandlersCatalog(com.microstrategy.web.beans.EventHandlersCatalog)
 
- 
setEventHandlersCatalog
public void setEventHandlersCatalog(EventHandlersCatalog catalog)
Description copied from interface:BeanContextSets 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.- Specified by:
 setEventHandlersCatalogin interfaceBeanContext- Parameters:
 catalog- an instance of EventHandlersCatalog to set.- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getEventHandlersCatalogPath
protected java.lang.String getEventHandlersCatalogPath()
Returns the path to use for the EventHandlersCatalog file. This is only used if a EventHandlersCatalog has not been explicitly set through thesetEventHandlersCatalog(com.microstrategy.web.beans.EventHandlersCatalog). By default it returns an empty string. Other bean context can override this method to provide a different location.- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
setContainerServices
public void setContainerServices(ContainerServices cs)
This method sets the Container Services object associated with this application context.- Specified by:
 setContainerServicesin interfaceBeanContext- Parameters:
 cs- AContainerServicesobject.- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getContainerServices
public ContainerServices getContainerServices()
This method gets the Container Services object associated with this application context.- Specified by:
 getContainerServicesin interfaceBeanContext- Returns:
 ContainerServices- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getRequestKeys
public RequestKeys getRequestKeys()
This method gets the Request Keys object associated with this application context.- Specified by:
 getRequestKeysin interfaceBeanContext- Returns:
 RequestKeys- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
setRequestKeys
public void setRequestKeys(RequestKeys requestKeys)
This method sets the Request Keys object to be associated with this application context.- Specified by:
 setRequestKeysin interfaceBeanContext- Parameters:
 requestKeys- An instance of anRequestKeysobject.- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getWebSessionManager
public WebSessionManager getWebSessionManager()
Description copied from interface:BeanContextThis method returns the Application Session Manager associated with this application context. If not explicitly set through the#setAppSessionManagermethod, a new one is automatically created.- Specified by:
 getWebSessionManagerin interfaceBeanContext- Returns:
 WebSessionManager
 
- 
getServletPath
public java.lang.String getServletPath()
Description copied from interface:BeanContextGet 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.- Specified by:
 getServletPathin interfaceBeanContext- Returns:
 - a 
Stringwith the servlet path 
 
 - 
 
 -