java.lang.Object | |
↳ | com.microstrategy.web.tasks.BaseTaskRequestContext |
![]() |
![]() |
This class implements the TaskRequestContext
interface by managing a
reference to a ContainerServices
, a
RequestKeys
and a WebIServerSession
object.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | BLK_MESSAGE_RESULT | ||||||||||
String | BLP_MESSAGE_RESULT_MESSAGE_ID | ||||||||||
String | BLP_MESSAGE_RESULT_MESSAGE_STATE_ID | ||||||||||
String | BLP_MESSAGE_RESULT_MESSAGE_STATUS | ||||||||||
String | BLP_MESSAGE_RESULT_PARTIAL_MANIPULATIONS |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected WebPrivilegesExpression | mPrivileges |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BaseTaskRequestContext() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Block |
createMessageResultBlock(WebResultSetInstance wrsi)
This method creates a Block of type "MessageResult" and populates it with the
properties of the supplied
WebResultSetInstance object. | ||||||||||
BeanContext | getBeanContext() | ||||||||||
Block |
getBlock(String blockName)
Gets a Block from the Block Library.
| ||||||||||
Block |
getBlock(String blockName, int blockMode)
This method is deprecated.
Please use
getBlock(String) instead
| ||||||||||
String |
getBlockAssignmentMode()
Returns the default block assignment mode used for all Block creation.
| ||||||||||
ContainerServices |
getContainerServices()
Returns the ContainerServices object associated with this
request.
| ||||||||||
String |
getContentType()
Gets the desired Content Type specified by the caller for this
Task invocation.
| ||||||||||
boolean |
getIsPolling()
Returns the isPolling flag
| ||||||||||
String |
getMimeType()
Gets the desired MIME Type specified by the caller for this Task
invocation.
| ||||||||||
RequestKeys |
getRequestKeys()
Returns the RequestKeys object associated with this request.
| ||||||||||
Block |
getRootBlock(String blockName, int blockMode)
This method is deprecated.
Please use
getRootBlock(String, MarkupOutput) instead
| ||||||||||
Block |
getRootBlock(String blockName, MarkupOutput markupOutput)
If a Task uses a Block to construct output content, then this
method gets the "root" Block associated with a MarkupOutput object.
| ||||||||||
WebIServerSession | getWebIServerSession(String sessionStateParamName, String sessionIDParamName, boolean checkSessionAliveness) | ||||||||||
WebIServerSession |
getWebIServerSession(String sessionStateParamName, String sessionIDParamName)
Returns the WebIServerSession object associated with this
request.
| ||||||||||
boolean |
isParameterEmpty(TaskParameterMetadata tpm)
This method checks if the the Task Parameter (identified by the TaskParameterMetadata) in a request is empty or not.
| ||||||||||
void |
setBlockAssignmentMode(String blockMode)
Sets the default block assignment mode used for all Block creation.
| ||||||||||
void |
setContainerServices(ContainerServices cntrSvcs)
Sets the ContainerServices object associated with this request.
| ||||||||||
void |
setContentType(String contentType)
Sets the desired Content Type specified by the caller for this
Task invocation.
| ||||||||||
void |
setIsPolling(boolean value)
Sets the isPolling flag indicating whether this task is in polling state (waiting for server response while polling with the client)
Useful to set the response to client accordingly
| ||||||||||
void |
setMimeType(String mimeType)
Sets the desired MIME Type specified by the caller for this
Task invocation.
| ||||||||||
void |
setPrivileges(WebPrivilegesExpression privileges)
Stores the task privileges to check them when we get a session
| ||||||||||
void |
setRequestKeys(RequestKeys requestKeys)
Sets the RequestKeys object associated with this request.
| ||||||||||
void |
setRootBlock(Block rootBlock, MarkupOutput markupOutput)
This method sets the root Block of the markupOutput to the supplied Block.
| ||||||||||
void |
setWebIServerSession(WebIServerSession wiss)
Sets the WebIServerSession object associated with this request.
| ||||||||||
Block |
transformBlock(Block rootBlock, String blockScript)
Transform a Block into another form using a Block Transform "script".
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | checkPrivileges() | ||||||||||
void |
checkSessionAliveness(WebIServerSession wiss)
Checks whether the supplied WebIServerSession instance is alive or not.
| ||||||||||
BlockContext |
getBlockContext(MarkupOutput markupOutput)
Returns the BlockContext object associated with this MarkupOutput.
| ||||||||||
WebIServerSession |
getWebIServerSession()
Returns the held WebIServerSession instance.
| ||||||||||
WebIServerSession | restoreSessionFromStateOrId(String sessionStateParamName, String sessionIDParamName) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
This method creates a Block of type "MessageResult" and populates it with the
properties of the supplied WebResultSetInstance
object.
wrsi | The WebResultSetInstance object |
---|
TaskException |
---|
Gets a Block from the Block Library. This is merely a helper function that throws an exception if a block is not present in the library. The default block assignment mode is consulted when creating this Block.
blockName | The name of the Block. If null or an empty string, then an "anonymous" block is created. |
---|
Block
to be used by this task.TaskException |
---|
This method is deprecated.
Please use getBlock(String)
instead
Gets a Block from the Block Library.
blockName | The name of the Block. |
---|---|
blockMode | The mode used to instantiate the Block. |
Block
to be used by this task.TaskConfigurationException | If the Block cannot be created. |
---|
Returns the default block assignment mode used for all Block creation.
Returns the ContainerServices object associated with this request.
ContainerServices
object associated with this
request.
Gets the desired Content Type specified by the caller for this Task invocation.
Returns the isPolling flag
Gets the desired MIME Type specified by the caller for this Task invocation.
Returns the RequestKeys object associated with this request.
RequestKeys
object associated with this request.
This method is deprecated.
Please use getRootBlock(String, MarkupOutput)
instead
Gets the Root Block associated with this Task. If the root Block has already been requested, it is returned. Otherwise, the Block is instantiated using the information supplied.
blockName | The name of the Block. |
---|---|
blockMode | The mode used to instantiate the Block. |
Block
to be used by this task.TaskConfigurationException | If the Block cannot be created. |
---|
If a Task uses a Block to construct output content, then this
method gets the "root" Block associated with a MarkupOutput object.
If the root Block has already been constructed, it is returned. Otherwise,
the Block is instantiated using the information supplied.
In addition to creating the root block, the BlockContext
is constructed
and associated with the MarkupOutput
object. This enables the constructed
Block tree to automatically serialized according the specified content type.
The default block assignment mode is consulted when creating this Block.
blockName | The name of the Block to create. If null or an empty string, then an "anonymous" block is created. |
---|---|
markupOutput | The MarkupOutput that should contain the root block. |
Block
which can then by further populated by the Task.TaskException |
---|
TaskException |
---|
Returns the WebIServerSession object associated with this request. Session information may be serialized in many forms. It may be in the form of a "session state" or it may be as just the "session ID". This method can inspect the incoming request for either of these forms (based on how the caller wants to identify the names of these parameters) and if present, constructs a WebIServerSession object. It is held in this context object for later retrieval in this request. Here is the order in which a WebIServerSession object is provided:
sessionStateParamName | The name of the incoming request key ("parameter name") that contains a session state. |
---|---|
sessionIDParamName | The name of the incoming request key ("parameter name") that contains a session ID. |
WebIServerSession
object associated with this
request.TaskException |
---|
This method checks if the the Task Parameter (identified by the TaskParameterMetadata) in a request is empty or not.
tpm | the TaskParameterMetadata object. |
---|
Sets the default block assignment mode used for all Block creation.
blockMode | The block assignment mode to use for all Block creation. |
---|
Sets the ContainerServices object associated with this request.
cntrSvcs | The ContainerServices object associated with
this request.
|
---|
Sets the desired Content Type specified by the caller for this Task invocation. The value should correspond to an entry in the ContentTypes properties file (e.g., "JSON" or "XML"). This method also overrides the MIME type if the supplied content type corresponds to an entry in the ContentTypes property file. The ConentTypes property file defines a MIME type for each entry.
contentType | The desired content type. |
---|
Sets the isPolling flag indicating whether this task is in polling state (waiting for server response while polling with the client) Useful to set the response to client accordingly
Sets the desired MIME Type specified by the caller for this Task invocation. The value should be a standard MIME type (e.g., "application/json" or "text/xml").
mimeType | The desired MIME type. |
---|
Stores the task privileges to check them when we get a session
privileges | The privilege expression |
---|
Sets the RequestKeys object associated with this request.
requestKeys | The RequestKeys object associated with this
request.
|
---|
This method sets the root Block of the markupOutput to the supplied Block.
The BlockContext
is constructed and associated with the MarkupOutput
object.
This enables the constructed Block tree to automatically serialized according the specified content type.
rootBlock | the Block object. |
---|---|
markupOutput | The MarkupOutput that should contain the root block. |
Sets the WebIServerSession object associated with this request.
wiss | The WebIServerSession object to associate with this
request. |
---|
Transform a Block into another form using a Block Transform "script".
rootBlock | The root Block to perform the transformation on. |
---|---|
blockScript | The script to perform on the root Block. |
Checks whether the supplied WebIServerSession instance is alive or not.
wiss | The WebIServerSession instance to check for. |
---|
TaskException | If the WebIServerSession instance is not alive (that is, there is no longer a "live" session on the Intelligence Server open). |
---|
Returns the BlockContext object associated with this MarkupOutput. If none exists, then one is created. It is automatically populated with the following fields:
markupOutput | The MarkupOutput object that hosts the BlockContext . |
---|
BlockContext
object associated with this MarkupOutput.Returns the held WebIServerSession instance.