public interface

RWBean

implements ResultSetBean
com.microstrategy.web.beans.RWBean

Class Overview

This interface is used to manage the collection of report writing document data and enable it to be rendered. It leverages many of the features of the WebBean and ObjectBean interfaces.

The main methods it provides in this interface are:

  • RW Document execution settings: Users can set the message ID, state ID and synchronous nature of the request.
  • Retrieve the report writing document instance.
  • Execute a report writing document by specifying execution mode.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Public Methods
abstract void addPartialDisplayUnit(String key)
abstract void addPartialDisplayUnit(RWUnitDef unit)
Adds a unit to partial display collection using its key
abstract void addPartialDisplayUnitFilterProps(String key, String defnFilters, String dataFilters)
Helps add partial display unit filters for the resulting JSON per key.
abstract void addPartialDisplayUnitKeys(Enumeration keys)
Adds units to partial display collection using there keys
abstract void addPartialDisplayUnits(Enumeration units)
Adds units to partial display collection
abstract void addUpdatedControlUnit(String key)
Add a unit into the updated control key collection by Key
abstract void addUpdatedNode(String key)
abstract void addUpdatedObjects(String objectID, int type, int flag)
Partial update on object feature.
abstract void addUpdatedUnits(String key)
abstract void disablePartialDisplay()
Disables partial display mode for rendering this bean
abstract void discardState()
Clears the RWInstance state and any errors on the bean.
abstract void freezeState()
After this call any changes to the bean will not mark it stale.
abstract int getAvailableViewMedia()
abstract int getAvailableViewModes()
Return available view modes for this documents.
abstract String getCurrentLayoutKey()
Returns the current layout key.
abstract WebBean getDataWebBean(RWUnit unit)
Returns a web bean assosiated with the given data unit
abstract List getDataWebBeans(String definitionKey)
Returns a list of embedded data WebBean instances for the specified RWObject key.
abstract int getDefaultViewMode()
Return default view mode when execute this document.
abstract int getDefaultViewMode(boolean lookupDefnIfFails)
Return default view mode when execute this document.
abstract RWViewBean getDefinitionViewBean(String key)
abstract WebBean getDefinitionWebBean(String definitionKey)

Returns the embedded definition WebBean associated with the given key.

abstract int getExecutionMode()
Returns the execution mode.
abstract RWExportSettings getExportSettings()
Returns export settings object that corresponds to the current execution mode (getExecutionMode()).
abstract String getGraphBeanName()
Returns the name associated with all its GraphBean instances.
abstract boolean getNewAnalysis()
This method is deprecated. See setNewAnalysis(boolean).
abstract Map getPartialDisplayUnitDataFilterProps()
A Map of all the data filters for all the node keys.
abstract Map getPartialDisplayUnitDefnFilterProps()
A Map of all the definition filters for all the node keys.
abstract Set getPartialDisplayUnits()
Returns a collection of partial display unit keys
abstract int getPreviousExecutionMode()
Returns the previous execution mode for any messages for which only a message ID is passed in.
abstract RWInstance getRWInstance()
Returns the report writing document instance.
abstract WebProperty getRWProperty(String propertySetName, String propertyName)
Gets document property
abstract RWSettings getRWSettings()
return rwSettings object associated with the current execution mode (getExecutionMode()).
abstract ViewBean getRelatedViewBean(ViewBean base, String key)
abstract Report2RWSettings getReport2RWSettings()
abstract String getSaveFolderId()
abstract boolean getSupportsUndo()
Indicate that the application using this bean supports undo/redo
abstract Set<String> getUpdatedControlUnits()
Returns a collection of updated control keys
abstract Set<String> getUpdatedUnits()
abstract ViewBean getViewBean(RWGridGraphObject obj)
abstract WebEventHandler getViewBeanEventHandler()
Returns the event handler used embedded ViewBean instances.
abstract ExpressionBean getViewFilterBean(String key)
Returns the ExpressionBean referring to the view filter of the given node.
abstract ExpressionBean getViewLimitBean(String key)
abstract WebViewMediaSettings getViewMedia()
abstract int getVisualizationViewMode()
Returns the visualization view mode for the RW document.
abstract boolean isJsonMode()
abstract boolean isPartialDisplayEnabled()
Returns true if partial display is enabled for rendering this bean
abstract boolean isRWReadonly()
abstract void iterate(RWBeanVisitor visitor, boolean designMode, MarkupOutput markupOutput)
This method is deprecated. replaced by iterate(RWBeanVisitor, RWIterateSettings, MarkupOutput)
abstract void iterate(RWBeanVisitor visitor, RWIterateSettings settings, MarkupOutput markupOutput)
Iteration method for visiting the underlying object model.
abstract void refresh(boolean reprompt, boolean rerun)
Refreshes the underlying objects encapsulated by this bean with the option to reopen the prompt, and whether to rerun against the backend (or use whatever is cached).
abstract void setAvailableViewModes(int viewModes)
Sets available view mode for the document
abstract void setCurrentLayoutKey(String value)
Sets the current layout key.
abstract void setDefaultViewMode(int viewMode)
Sets default document view mode
abstract void setExecutionMode(int mode)
Sets the execution mode.
abstract void setGraphBeanName(String name)
Sets the name for all GraphBean associated with any of its embedded ViewBean instances.
abstract void setHasCollectedData(boolean hasCollectedData)
abstract void setJsonMode(boolean value)
abstract void setNewAnalysis(boolean isNew)
This method is deprecated. This method is only used by GUI to workaround some issue in IVE. Shall be removed once IVE finds its own fix. It shall not be used for any other purpose.
abstract void setPreviousExecutionMode(int mode)
Sets the previous execution mode for any messages for which only a message ID is passed in.
abstract void setRWInstance(RWInstance rwInstance)
abstract void setSaveFolderId(String folderId)
abstract void setSupportsUndo(boolean value)
Sets flag indication that application using this bean supports undo/redo
abstract void setViewBeanEventHandler(WebEventHandler handler)
Sets the event handler for its embedded ViewBean instances.
abstract void setVisualizationViewMode(int mode)
Changes the visualization view mode for the document.
abstract void unfreezeState()
After this call the changes to the bean will mark it as stale
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.beans.ObjectBean
From interface com.microstrategy.web.beans.RequestPersistable
From interface com.microstrategy.web.beans.ResultSetBean
From interface com.microstrategy.web.beans.Transformable
From interface com.microstrategy.web.beans.WebBean
From interface com.microstrategy.web.beans.WebComponent

Public Methods

public abstract void addPartialDisplayUnit (String key)

public abstract void addPartialDisplayUnit (RWUnitDef unit)

Adds a unit to partial display collection using its key

public abstract void addPartialDisplayUnitFilterProps (String key, String defnFilters, String dataFilters)

Helps add partial display unit filters for the resulting JSON per key.

Parameters
key The node key.
defnFilters Delimited string of all the definition properties that need to be filtered in the response.
dataFilters Delimited string of all the data properties that need to be filtered in the response.

public abstract void addPartialDisplayUnitKeys (Enumeration keys)

Adds units to partial display collection using there keys

Parameters
keys enumeration of unit keys

public abstract void addPartialDisplayUnits (Enumeration units)

Adds units to partial display collection

Parameters
units enumeration of units

public abstract void addUpdatedControlUnit (String key)

Add a unit into the updated control key collection by Key

public abstract void addUpdatedNode (String key)

public abstract void addUpdatedObjects (String objectID, int type, int flag)

Partial update on object feature.

public abstract void addUpdatedUnits (String key)

public abstract void disablePartialDisplay ()

Disables partial display mode for rendering this bean

public abstract void discardState ()

Clears the RWInstance state and any errors on the bean.

Throws
WebBeanException if an error occurs while attempting to discard the state.
See Also

public abstract void freezeState ()

After this call any changes to the bean will not mark it stale. The freeze will continue until unfreezeBean is called.

public abstract int getAvailableViewMedia ()

public abstract int getAvailableViewModes ()

Return available view modes for this documents. Each bit of this integer represents one view mode. First bit is for static view mode, second one is for interactive view mode, the third one for editable view mode, and the forth one is for flash view mode.

Returns
  • Integer.

public abstract String getCurrentLayoutKey ()

Returns the current layout key.

Returns
  • String

public abstract WebBean getDataWebBean (RWUnit unit)

Returns a web bean assosiated with the given data unit

Parameters
unit data unit
Returns
  • bean
Throws
WebBeanException
WebBeanException

public abstract List getDataWebBeans (String definitionKey)

Returns a list of embedded data WebBean instances for the specified RWObject key.

Several embedded beans may share the same key - this occurs in view mode when a given WebBean is grouped by an attribute (e.g. year) that contains several values (e.g. 2000, 2001) each of which will be mapped to a separate embedded WebBean. This method is used to retrieve these instances. Null returned if no template exists with definition key.

Parameters
definitionKey the RWObject key.
Returns
  • list of embedded data WebBean instances.
Throws
WebBeanException if there is a problem retrieving the list.

public abstract int getDefaultViewMode ()

Return default view mode when execute this document.

public abstract int getDefaultViewMode (boolean lookupDefnIfFails)

Return default view mode when execute this document.

Parameters
lookupDefnIfFails If it fails to get the default view mode from the RWInstance's document properties, should we look in the metadata definition?

public abstract RWViewBean getDefinitionViewBean (String key)

public abstract WebBean getDefinitionWebBean (String definitionKey)

Returns the embedded definition WebBean associated with the given key. Null if it doesn't exist.

Parameters
definitionKey WebBean identifier
Returns
  • WebBean
Throws
WebBeanException thrown if a problem occurs while searching for the WebBean

public abstract int getExecutionMode ()

Returns the execution mode.

Returns
  • the execution mode.

public abstract RWExportSettings getExportSettings ()

Returns export settings object that corresponds to the current execution mode (getExecutionMode()).
If the execution mode is not a known export mode, RW_MODE_PDF is assumed.
The following describes the execution mode associations, and the export settings subclass, which RWExportSettings may be cast into (if any):


It can be used as follows:

getRWBean().setExecutionMode(EnumRWExecutionModes.RW_MODE_EXCEL);
getRWBean().getExportSettings().setMode(EnumRWExportModes.RW_EXPORT_ALL);
byte[] data = getRWBean().getRWInstance().getExportData();
String stringData = new String(data, "UnicodeLittle"); // optional (this should be avoided if possible)

Returns
  • export settings object associated with the current execution mode.

public abstract String getGraphBeanName ()

Returns the name associated with all its GraphBean instances.

Returns
  • the name associated with all its GraphBean instances.

public abstract boolean getNewAnalysis ()

This method is deprecated.
See setNewAnalysis(boolean).

public abstract Map getPartialDisplayUnitDataFilterProps ()

A Map of all the data filters for all the node keys.

public abstract Map getPartialDisplayUnitDefnFilterProps ()

A Map of all the definition filters for all the node keys.

public abstract Set getPartialDisplayUnits ()

Returns a collection of partial display unit keys

Returns
  • Set

public abstract int getPreviousExecutionMode ()

Returns the previous execution mode for any messages for which only a message ID is passed in. By setting this, the initial state of the execution mode of the message will be left as-is.

Returns
  • The previous execution mode, or -1 if not set.

public abstract RWInstance getRWInstance ()

Returns the report writing document instance.

Returns
  • the report writing document instance.
Throws
WebBeanException if there is a problem retrieving the report writing document instance.

public abstract WebProperty getRWProperty (String propertySetName, String propertyName)

Gets document property

Parameters
propertySetName property set name
propertyName property name
Returns
  • property object

public abstract RWSettings getRWSettings ()

return rwSettings object associated with the current execution mode (getExecutionMode()).
It can be used as followings:

String objectID = ""; String executionDelta = ""; getRWBean().setObjectID(objectID) getRWBean().setExecutionMode(EnumRWExecutionModes.RW_MODE_DATA);
RWSettings settings = getRWBean().getRWSettings();
settings.setExcutionFlags(settings.getExecutionFlag()|EnumDSSXMLDocExecutionFlags.DssXmlDocExecutionUseRWDCache);
settings.setExecutionDelta(executionDelta);
getRWBean().getInstance(); // this call will invoke the the document execution with the new executionFlags and exeucitonDelta and other settings on the RWSettings against IServer

Returns
  • rwSettings object associated with the current execution mode.

public abstract ViewBean getRelatedViewBean (ViewBean base, String key)

public abstract Report2RWSettings getReport2RWSettings ()

public abstract String getSaveFolderId ()

public abstract boolean getSupportsUndo ()

Indicate that the application using this bean supports undo/redo

public abstract Set<String> getUpdatedControlUnits ()

Returns a collection of updated control keys

Returns
  • Set

public abstract Set<String> getUpdatedUnits ()

public abstract ViewBean getViewBean (RWGridGraphObject obj)

public abstract WebEventHandler getViewBeanEventHandler ()

Returns the event handler used embedded ViewBean instances.

Returns
  • the event handler used embedded ViewBean instances.

public abstract ExpressionBean getViewFilterBean (String key)

Returns the ExpressionBean referring to the view filter of the given node. This call will fail if the key does not refer to a grid/graph node, as that is currently the only node type that view filters are supported on.

Parameters
key The key of the node whose view filter is being retrieved.
Returns
Throws
WebBeanException Thrown if an error occurs when getting the view filter.

public abstract ExpressionBean getViewLimitBean (String key)

public abstract WebViewMediaSettings getViewMedia ()

public abstract int getVisualizationViewMode ()

Returns the visualization view mode for the RW document. This will tell which visualization view mode the document is expected to be in.

Returns
  • The current visualization view mode.

public abstract boolean isJsonMode ()

public abstract boolean isPartialDisplayEnabled ()

Returns true if partial display is enabled for rendering this bean

Returns
  • boolean

public abstract boolean isRWReadonly ()

public abstract void iterate (RWBeanVisitor visitor, boolean designMode, MarkupOutput markupOutput)

This method is deprecated.
replaced by iterate(RWBeanVisitor, RWIterateSettings, MarkupOutput)

Visitor entry point for iterating the report writing document object model.

Parameters
visitor the visitor implementation
designMode whether this is design mode
markupOutput object to output the results
Throws
WebBeanException if a problem is encountered during the iteration.

public abstract void iterate (RWBeanVisitor visitor, RWIterateSettings settings, MarkupOutput markupOutput)

Iteration method for visiting the underlying object model. RWIterateSettings may be obtained from createIterateSettings().

Parameters
visitor the visitor implementation
settings settings governing the behavior of the iteration
markupOutput object to output the results
Throws
WebBeanException if an error is encountered during the iteration.

public abstract void refresh (boolean reprompt, boolean rerun)

Refreshes the underlying objects encapsulated by this bean with the option to reopen the prompt, and whether to rerun against the backend (or use whatever is cached).

Parameters
reprompt reopen prompts (if any).
rerun whether to use the cache in the backend, or re-execute.
Throws
WebBeanException
WebBeanException

public abstract void setAvailableViewModes (int viewModes)

Sets available view mode for the document

Parameters
viewModes available view modes

public abstract void setCurrentLayoutKey (String value)

Sets the current layout key.

Parameters
value String

public abstract void setDefaultViewMode (int viewMode)

Sets default document view mode

Parameters
viewMode view mode

public abstract void setExecutionMode (int mode)

Sets the execution mode.

Parameters
mode the execution mode.

public abstract void setGraphBeanName (String name)

Sets the name for all GraphBean associated with any of its embedded ViewBean instances.

Parameters
name the name for all GraphBean associated with any of its embedded ViewBean instances.

public abstract void setHasCollectedData (boolean hasCollectedData)

public abstract void setJsonMode (boolean value)

public abstract void setNewAnalysis (boolean isNew)

This method is deprecated.
This method is only used by GUI to workaround some issue in IVE. Shall be removed once IVE finds its own fix. It shall not be used for any other purpose.

public abstract void setPreviousExecutionMode (int mode)

Sets the previous execution mode for any messages for which only a message ID is passed in. By doing this, the initial state of the execution mode of the message will be left as-is.

Parameters
mode The original execution mode of the message.

public abstract void setRWInstance (RWInstance rwInstance)

public abstract void setSaveFolderId (String folderId)

public abstract void setSupportsUndo (boolean value)

Sets flag indication that application using this bean supports undo/redo

public abstract void setViewBeanEventHandler (WebEventHandler handler)

Sets the event handler for its embedded ViewBean instances.

Parameters
handler event handler for embedded ViewBean instances.

public abstract void setVisualizationViewMode (int mode)

Changes the visualization view mode for the document. This will generally cause an applyChanges with the next collect data call.

Parameters
mode The new visualization view mode for the document instance.

public abstract void unfreezeState ()

After this call the changes to the bean will mark it as stale