public class

BeanContextImpl

extends Object
implements BeanContext
java.lang.Object
   ↳ com.microstrategy.web.beans.BeanContextImpl
Known Direct Subclasses

Class Overview

The class provides the default implementation of the interface BeanContext. Web applications are encouraged to extend this class to provide its own application specific context object.

Summary

Fields
protected ContainerServices _containerServices
protected WebSessionManager _newSessionMgr
Public Constructors
BeanContextImpl()
The default constructor for BeanContextImpl.
Public Methods
ContainerServices getContainerServices()
This method gets the Container Services object associated with this application context.
EventHandlersCatalog getEventHandlersCatalog()
Returns the EventHandlersCatalog instance associated with this bean context.
WebFeatures getFeatures()
This method gets the WebFeatures object associated with this application context.
Messages getMessages()
Returns the Messages instance from this BeanContext.
MessagesManager getMessagesManager()
Returns the MessagesManager instance associated with this bean context.
RequestKeys getRequestKeys()
This method gets the Request Keys object associated with this application context.
String getServletPath()
Get the full application path to the Servlet.
StyleCatalog getStyleCatalog()
Returns the StyleCatalog instance associated with this bean context.
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 the EventHandlersCatalog 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 a Messages instance to this BeanContext.
void setMessagesManager(MessagesManager msgsMgr)
Sets an instance of MessagesManager 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 of StyleCatalog on the current BeanContext.
Protected Methods
String getEventHandlersCatalogPath()
Returns the path to use for the EventHandlersCatalog file.
String getMessagesManagerPath()
Returns the path to use for the MessagesManager (locales) file.
String getStyleCatalogPath()
Returns the path to use for the StyleCatalog file.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.beans.BeanContext

Fields

protected ContainerServices _containerServices

protected WebSessionManager _newSessionMgr

Public Constructors

public BeanContextImpl ()

The default constructor for BeanContextImpl.

Public Methods

public ContainerServices getContainerServices ()

This method gets the Container Services object associated with this application context.

public EventHandlersCatalog getEventHandlersCatalog ()

Returns the EventHandlersCatalog instance associated with this bean context. If no EventHandlersCatalog has been explicitly associated, it will automatically used the one specified by the getEventHandlersCatalogPath() method.

Returns

public WebFeatures getFeatures ()

This method gets the WebFeatures object associated with this application context.

Returns

public Messages getMessages ()

Returns the Messages instance from this BeanContext. This method does not contact the MessagesManager object associated with this BeanContext.

Returns
  • the Messages instance.

public MessagesManager getMessagesManager ()

Returns the MessagesManager instance associated with this bean context. If no MessagesManager has been explicitly associated, it will automatically used the one specified by the getMessagesManagerPath() method.

Returns

public RequestKeys getRequestKeys ()

This method gets the Request Keys object associated with this application context.

Returns

public 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

public StyleCatalog getStyleCatalog ()

Returns the StyleCatalog instance associated with this bean context. If no StyleCatalog has been explicitly associated, it will automatically used the one specified by the getStyleCatalogPath() method.

Returns

public 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.

public void setContainerServices (ContainerServices cs)

This method sets the Container Services object associated with this application context.

Parameters
cs A ContainerServices object.

public 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.

public void setFeatures (WebFeatures features)

This method sets the WebFeatures object associated with this application context.

Parameters
features A WebFeatures object.

public void setMessages (Messages msgs)

Sets a Messages instance to this BeanContext. This method does not contact the MessagesManager object associated with this BeanContext.

Parameters
msgs the Messages instance to set.

public void setMessagesManager (MessagesManager msgsMgr)

Sets an instance of MessagesManager on the current BeanContext.

Parameters
msgsMgr an instance of MessagesManager to set.

public void setRequestKeys (RequestKeys requestKeys)

This method sets the Request Keys object to be associated with this application context.

Parameters
requestKeys An instance of an RequestKeys object.

public void setStyleCatalog (StyleCatalog sc)

Sets an instance of StyleCatalog on the current BeanContext.

Parameters
sc an instance of StyleCatalog to set.

Protected Methods

protected String getEventHandlersCatalogPath ()

Returns the path to use for the EventHandlersCatalog file. This is only used if a EventHandlersCatalog has not been explicitly set through the setEventHandlersCatalog(EventHandlersCatalog). By default it returns an empty string. Other bean context can override this method to provide a different location.

protected 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 the setMessagesManager(MessagesManager).

protected String getStyleCatalogPath ()

Returns the path to use for the StyleCatalog file. This is only used if a StyleCatalog has not been explicitly set through the setStyleCatalog(StyleCatalog).