java.lang.Object | |
↳ | com.microstrategy.web.blocks.BlockContext |
This class holds context information used for any Block interactions. This includes a reference to a Renderer that is used to render a Block tree as well as default assignment modes. It is also used to hold data structures that are used by BlockPropertyMacro instances.
Resolution of the Renderer. If a specific object instance is supplied for the renderer, it is used directly. If not supplied, then renderer to use is based on the evaluation of several properties of this object. Here is the order that BlockContext properties are evaluated in selecting the renderer.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BlockContext()
No args constructor.
| |||||||||||
BlockContext(BeanContext beanContext)
Constructor which takes a
BeanContext instance. | |||||||||||
BlockContext(WebBean webBean)
Constructor which takes a
WebBean instance. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ContainerServices |
getContainerServices()
Returns the ContainerServices instance to use for any macro expansion.
| ||||||||||
String |
getDefaultContentType()
Returns the default content type to use if no other properties select the renderer.
| ||||||||||
ContentEncoderChain |
getEncoderChain()
Returns the chain of encoders.
| ||||||||||
Messages |
getMessages()
Returns the Messages to be used with Blocks.
| ||||||||||
String |
getMode()
Returns the default mode to use for any Block creations.
| ||||||||||
Preferences |
getPreferences()
Returns the Preferences associated with this BlockContext.
| ||||||||||
Renderer |
getRenderer()
Returns the Renderer instance to use with Blocks.
| ||||||||||
String |
getRendererFQCN()
Returns the Renderer fully qualified class name to use with
Blocks.
| ||||||||||
RequestKeys |
getRequestKeys()
Returns the RequestKeys instance that may be used to determine desired content type to use.
| ||||||||||
String |
getUnconditionalContentType()
Returns the unconditional content type to use for determining the renderer to use.
| ||||||||||
WebIServerSession |
getWebIServerSession()
Returns the WebIServerSession object associated with this BlockContext.
| ||||||||||
void |
setContainerServices(ContainerServices cs)
Sets the ContainerServices instance to use for any macro expansion.
| ||||||||||
void |
setDefaultContentType(String defaultContentType)
Sets the default content type to use if no other properties select the renderer.
| ||||||||||
void |
setEncoderChain(String encoders)
Specify the list of encoders to be used.
| ||||||||||
void |
setMessages(Messages messages)
Sets the Messages to be used with Blocks.
| ||||||||||
void |
setMode(String mode)
Sets the default mode to use for any Block creations.
| ||||||||||
void |
setPreferences(Preferences preferences)
Sets the Preferences object to associate with this BlockContext.
| ||||||||||
void |
setRenderer(Renderer renderer)
Sets the Renderer instance to use with Blocks.
| ||||||||||
void |
setRendererFQCN(String fqcn)
Sets the Renderer fully qualified class name to use with Blocks.
| ||||||||||
void |
setRequestKeys(RequestKeys requestKeys)
Sets the RequestKeys instance that may be used to determine desired content type to use.
| ||||||||||
void |
setUnconditionalContentType(String unconditionalContentType)
Sets the unconditional content type to use for determining the renderer to use.
| ||||||||||
void |
setWebIServerSession(WebIServerSession wiss)
Sets the WebIServerSession object associated with this BlockContext.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
No args constructor.
Constructor which takes a BeanContext
instance. It retrieves values from
the supplied BeanContext object to associate with this context. They include:
beanContext | An existing BeanContext object. |
---|
Constructor which takes a WebBean
instance. In addition to retrieving
context from the WebBean's BeanContext, it also tries to retrieve the following
value:
webBean | An existing WebBean object. |
---|
Returns the ContainerServices instance to use for any macro expansion.
ContainerServices
instance to use for any macro expansion.
Returns the default content type to use if no other properties select the renderer.
Returns the chain of encoders. It will be null
if no encoder has been set on this context.
null
may be returned if no encoders has been set on it.
Returns the Messages to be used with Blocks.
Messages
instance.
Returns the default mode to use for any Block creations.
Returns the Preferences associated with this BlockContext.
Preferences
object associated with this BlockContext. If none
was supplied explicitly, and a WebIServerSession was supplied, a Preferences
instance is created.Returns the Renderer instance to use with Blocks. It returns the
instance specified with setRenderer(Renderer)
or an instance
which can be created from one of the other properties set in this context
object
Renderer
instance to use.
Returns the Renderer fully qualified class name to use with Blocks.
Returns the RequestKeys instance that may be used to determine desired content type to use.
RequestKeys
instance that may be used to determine desired content type to use.
Returns the unconditional content type to use for determining the renderer to use.
Returns the WebIServerSession object associated with this BlockContext.
WebIServerSession
object associated with this BlockContext.
Sets the ContainerServices instance to use for any macro expansion.
cs | The ContainerServices instance to use for any macro expansion.
|
---|
Sets the default content type to use if no other properties select the renderer.
defaultContentType | The default content type to use if no other properties select the renderer. |
---|
Specify the list of encoders to be used.
encoders | - comma delimited string of encoder names. For e.g. "JSON,HTML". |
---|
Sets the Messages to be used with Blocks.
messages | The Messages instance.
|
---|
Sets the default mode to use for any Block creations.
mode | The default mode to use for any Block creations. |
---|
Sets the Preferences object to associate with this BlockContext.
preferences | The Preferences object to associate with this BlockContext.
|
---|
Sets the Renderer instance to use with Blocks.
renderer | The Renderer instance to use.
|
---|
Sets the Renderer fully qualified class name to use with Blocks.
fqcn | The fully qualified class name of the Renderer
instance to use.
|
---|
Sets the RequestKeys instance that may be used to determine desired content type to use.
requestKeys | The RequestKeys instance that may be used to determine desired content type to use.
|
---|
Sets the unconditional content type to use for determining the renderer to use.
unconditionalContentType | The content type to use for selecting the renderer |
---|
Sets the WebIServerSession object associated with this BlockContext.
wiss | The WebIServerSession object to associate with this context.
|
---|