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
_containerServices
protected 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 ContainerServices
getContainerServices()
This method gets the Container Services object associated with this application context.EventHandlersCatalog
getEventHandlersCatalog()
Returns theEventHandlersCatalog
instance associated with this bean context.protected java.lang.String
getEventHandlersCatalogPath()
Returns the path to use for the EventHandlersCatalog file.WebFeatures
getFeatures()
This method gets the WebFeatures object associated with this application context.Messages
getMessages()
Returns theMessages
instance from this BeanContext.MessagesManager
getMessagesManager()
Returns theMessagesManager
instance associated with this bean context.protected java.lang.String
getMessagesManagerPath()
Returns the path to use for the MessagesManager (locales) file.RequestKeys
getRequestKeys()
This method gets the Request Keys object associated with this application context.java.lang.String
getServletPath()
Get the full application path to the Servlet.StyleCatalog
getStyleCatalog()
Returns theStyleCatalog
instance associated with this bean context.protected java.lang.String
getStyleCatalogPath()
Returns the path to use for the StyleCatalog file.WebSessionManager
getWebSessionManager()
This method returns the Application Session Manager associated with this application context.void
setContainerServices(ContainerServices cs)
This method sets the Container Services object associated with this application context.void
setEventHandlersCatalog(EventHandlersCatalog catalog)
Sets theEventHandlersCatalog
instances associated with the current BeanContext.void
setFeatures(WebFeatures features)
This method sets the WebFeatures object associated with this application context.void
setMessages(Messages msgs)
Sets aMessages
instance to this BeanContext.void
setMessagesManager(MessagesManager msgsMgr)
Sets an instance ofMessagesManager
on the current BeanContext.void
setRequestKeys(RequestKeys requestKeys)
This method sets the Request Keys object to be associated with this application context.void
setStyleCatalog(StyleCatalog sc)
Sets an instance ofStyleCatalog
on 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 theStyleCatalog
instance associated with this bean context. If no StyleCatalog has been explicitly associated, it will automatically used the one specified by thegetStyleCatalogPath()
method.- Specified by:
getStyleCatalog
in interfaceBeanContext
- Returns:
- an instance of
StyleCatalog
.
-
setStyleCatalog
public void setStyleCatalog(StyleCatalog sc)
Sets an instance ofStyleCatalog
on the current BeanContext.- Specified by:
setStyleCatalog
in interfaceBeanContext
- Parameters:
sc
- an instance ofStyleCatalog
to 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 theMessages
instance from this BeanContext. This method does not contact theMessagesManager
object associated with thisBeanContext
.- Specified by:
getMessages
in interfaceBeanContext
- Returns:
- the Messages instance.
-
setMessages
public void setMessages(Messages msgs)
Sets aMessages
instance to this BeanContext. This method does not contact theMessagesManager
object associated with thisBeanContext
.- Specified by:
setMessages
in interfaceBeanContext
- Parameters:
msgs
- the Messages instance to set.
-
getMessagesManager
public MessagesManager getMessagesManager()
Returns theMessagesManager
instance associated with this bean context. If no MessagesManager has been explicitly associated, it will automatically used the one specified by thegetMessagesManagerPath()
method.- Specified by:
getMessagesManager
in interfaceBeanContext
- Returns:
- an instance of
MessagesManager
.
-
setMessagesManager
public void setMessagesManager(MessagesManager msgsMgr)
Sets an instance ofMessagesManager
on the current BeanContext.- Specified by:
setMessagesManager
in interfaceBeanContext
- Parameters:
msgsMgr
- an instance ofMessagesManager
to 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:
getFeatures
in interfaceBeanContext
- Returns:
WebFeatures
-
setFeatures
public void setFeatures(WebFeatures features)
This method sets the WebFeatures object associated with this application context.- Specified by:
setFeatures
in interfaceBeanContext
- Parameters:
features
- AWebFeatures
object.
-
getEventHandlersCatalog
public EventHandlersCatalog getEventHandlersCatalog()
Returns theEventHandlersCatalog
instance associated with this bean context. If no EventHandlersCatalog has been explicitly associated, it will automatically used the one specified by thegetEventHandlersCatalogPath()
method.- Specified by:
getEventHandlersCatalog
in 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:BeanContext
Sets theEventHandlersCatalog
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. ThisEventHandlersCatalog
is typically configured through the "/WEB-INF/xml/config/events.xml" file.- Specified by:
setEventHandlersCatalog
in 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:
setContainerServices
in interfaceBeanContext
- Parameters:
cs
- AContainerServices
object.- Since:
- MicroStrategy Web 9.0.0
-
getContainerServices
public ContainerServices getContainerServices()
This method gets the Container Services object associated with this application context.- Specified by:
getContainerServices
in 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:
getRequestKeys
in 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:
setRequestKeys
in interfaceBeanContext
- Parameters:
requestKeys
- An instance of anRequestKeys
object.- Since:
- MicroStrategy Web 9.0.0
-
getWebSessionManager
public WebSessionManager getWebSessionManager()
Description copied from interface:BeanContext
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.- Specified by:
getWebSessionManager
in interfaceBeanContext
- Returns:
WebSessionManager
-
getServletPath
public java.lang.String getServletPath()
Description copied from interface:BeanContext
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.- Specified by:
getServletPath
in interfaceBeanContext
- Returns:
- a
String
with the servlet path
-
-