public interface

BeanContext

com.microstrategy.web.beans.BeanContext
Known Indirect Subclasses

Class Overview

The BeanContext interface provides context information for a WebComponent or a Transformable, such as StyleCatalog and MessagesManager etc. A single instance of a BeanContext object can be shared with many WebComponent or Transformable instances.

A BeanContext object can be instantiated from WebBeanFactory. You can also retrieve a BeanContext object from a Transformable object or a WebComponent 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 application WebComponent more information such as Preferences.

Summary

Public Methods
abstract ContainerServices getContainerServices()
This method gets the Container Services object associated with this application context.
abstract EventHandlersCatalog getEventHandlersCatalog()
Returns the current instance of EventHandlersCatalog associated with the current BeanContext.
abstract WebFeatures getFeatures()
This method gets the Features object associated with this application context.
abstract Messages getMessages()
Returns the Messages instance from this BeanContext.
abstract MessagesManager getMessagesManager()
Returns an instance of MessagesManager associated with the current BeanContext.
abstract RequestKeys getRequestKeys()
This method gets the Request Keys object associated with this application context.
abstract String getServletPath()
Get the full application path to the Servlet.
abstract StyleCatalog getStyleCatalog()
Returns an instance of StyleCatalog associated with the current BeanContext.
abstract WebSessionManager getWebSessionManager()
This method returns the Application Session Manager associated with this application context.
abstract void setContainerServices(ContainerServices cs)
This method sets the Container Services object associated with this application context.
abstract void setEventHandlersCatalog(EventHandlersCatalog catalog)
Sets the EventHandlersCatalog instances associated with the current BeanContext.
abstract void setFeatures(WebFeatures features)
This method sets the Features object associated with this application context.
abstract void setMessages(Messages msgs)
Sets a Messages instance to this BeanContext.
abstract void setMessagesManager(MessagesManager msgsMgr)
Sets an instance of MessagesManager on the current BeanContext.
abstract void setRequestKeys(RequestKeys hrk)
This method sets the Request Keys object to be associated with this application context.
abstract void setStyleCatalog(StyleCatalog sc)
Sets an instance of StyleCatalog on the current BeanContext.

Public Methods

public abstract ContainerServices getContainerServices ()

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

public abstract EventHandlersCatalog getEventHandlersCatalog ()

Returns the current instance of EventHandlersCatalog associated with the current BeanContext.

Returns
  • an instance of EventHandlersCatalog.

public abstract WebFeatures getFeatures ()

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

Returns

public abstract Messages getMessages ()

Returns the Messages instance from this BeanContext.

Returns
  • the Messages instance.

public abstract MessagesManager getMessagesManager ()

Returns an instance of MessagesManager associated with the current BeanContext.

Returns
  • an instance of MessagesManager.

public abstract RequestKeys getRequestKeys ()

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

Returns

public abstract 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 abstract StyleCatalog getStyleCatalog ()

Returns an instance of StyleCatalog associated with the current BeanContext.

Returns
  • an instance of StyleCatalog.

public abstract 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 abstract void setContainerServices (ContainerServices cs)

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

Parameters
cs A ContainerServices object.

public abstract 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 abstract void setFeatures (WebFeatures features)

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

Parameters
features A WebFeatures object.

public abstract void setMessages (Messages msgs)

Sets a Messages instance to this BeanContext.

Parameters
msgs the Messages instance to set.

public abstract void setMessagesManager (MessagesManager msgsMgr)

Sets an instance of MessagesManager on the current BeanContext.

Parameters
msgsMgr an instance of MessagesManager to set.

public abstract void setRequestKeys (RequestKeys hrk)

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

Parameters
hrk An instance of an RequestKeys object.

public abstract void setStyleCatalog (StyleCatalog sc)

Sets an instance of StyleCatalog on the current BeanContext.

Parameters
sc an instance of StyleCatalog to set.