Package com.microstrategy.web.beans
Interface BeanContext
-
- All Known Subinterfaces:
AppContext
- All Known Implementing Classes:
AppContextImpl
,BeanContextImpl
,MobileChunkedAppContext
public interface BeanContext
TheBeanContext
interface provides context information for aWebComponent
or aTransformable
, such asStyleCatalog
andMessagesManager
etc. A single instance of aBeanContext
object can be shared with manyWebComponent
orTransformable
instances.A
BeanContext
object can be instantiated fromWebBeanFactory
. You can also retrieve aBeanContext
object from aTransformable
object or aWebComponent
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 applicationWebComponent
more information such asPreferences
.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContainerServices
getContainerServices()
This method gets the Container Services object associated with this application context.EventHandlersCatalog
getEventHandlersCatalog()
Returns the current instance ofEventHandlersCatalog
associated with the current BeanContext.WebFeatures
getFeatures()
This method gets the Features object associated with this application context.Messages
getMessages()
Returns theMessages
instance from this BeanContext.MessagesManager
getMessagesManager()
Returns an instance ofMessagesManager
associated with the current BeanContext.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 an instance ofStyleCatalog
associated with the current BeanContext.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 Features 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 hrk)
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.
-
-
-
Method Detail
-
getStyleCatalog
StyleCatalog getStyleCatalog()
Returns an instance ofStyleCatalog
associated with the current BeanContext.- Returns:
- an instance of StyleCatalog.
-
setStyleCatalog
void setStyleCatalog(StyleCatalog sc)
Sets an instance ofStyleCatalog
on the current BeanContext.- Parameters:
sc
- an instance of StyleCatalog to set.
-
getMessages
Messages getMessages()
Returns theMessages
instance from this BeanContext.- Returns:
- the Messages instance.
-
setMessages
void setMessages(Messages msgs)
Sets aMessages
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
- AWebFeatures
object.
-
getMessagesManager
MessagesManager getMessagesManager()
Returns an instance ofMessagesManager
associated with the current BeanContext.- Returns:
- an instance of MessagesManager.
-
setEventHandlersCatalog
void setEventHandlersCatalog(EventHandlersCatalog catalog)
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.- Parameters:
catalog
- an instance of EventHandlersCatalog to set.- Since:
- MicroStrategy Web 9.0.0
-
getEventHandlersCatalog
EventHandlersCatalog getEventHandlersCatalog()
Returns the current instance ofEventHandlersCatalog
associated 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 ofMessagesManager
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
- AContainerServices
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 anRequestKeys
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
-
-