Package com.microstrategy.web.beans
Interface RWBean
-
- All Superinterfaces:
EnumWebPersistableState,ObjectBean,Persistable,RequestPersistable,ResultSetBean,Transformable,WebBean,WebComponent
public interface RWBean extends ResultSetBean
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 theWebBeanandObjectBeaninterfaces.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.
- Since:
- MicroStrategy Web 8.0.0
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddCurrentPageKey(java.lang.String pageKey)Sets the current page key.voidaddPartialDisplayUnit(RWUnitDef unit)Adds a unit to partial display collection using its keyvoidaddPartialDisplayUnit(java.lang.String key)voidaddPartialDisplayUnitFilterProps(java.lang.String key, java.lang.String defnFilters, java.lang.String dataFilters)Helps add partial display unit filters for the resulting JSON per key.voidaddPartialDisplayUnitKeys(java.util.Enumeration keys)Adds units to partial display collection using there keysvoidaddPartialDisplayUnits(java.util.Enumeration units)Adds units to partial display collectionvoidaddUpdatedControlUnit(java.lang.String key)Add a unit into the updated control key collection by KeyvoidaddUpdatedNode(java.lang.String key)voidaddUpdatedObjects(java.lang.String objectID, int type, int flag)Partial update on object feature.voidaddUpdatedUnits(java.lang.String key)voiddisablePartialDisplay()Disables partial display mode for rendering this beanvoiddiscardState()Clears theRWInstancestate and any errors on the bean.voidfreezeState()After this call any changes to the bean will not mark it stale.intgetAvailableViewMedia()intgetAvailableViewModes()Return available view modes for this documents.java.lang.StringgetCurrentLayoutKey()Returns the current layout key.WebBeangetDataWebBean(RWUnit unit)Returns a web bean assosiated with the given data unitjava.util.ListgetDataWebBeans(java.lang.String definitionKey)Returns a list of embedded dataWebBeaninstances for the specifiedRWObjectkey.intgetDefaultViewMode()Return default view mode when execute this document.intgetDefaultViewMode(boolean lookupDefnIfFails)Return default view mode when execute this document.RWViewBeangetDefinitionViewBean(java.lang.String key)WebBeangetDefinitionWebBean(java.lang.String definitionKey)Returns the embedded definitionWebBeanassociated with the given key.intgetExecutionMode()Returns the execution mode.RWExportSettingsgetExportSettings()Returns export settings object that corresponds to the current execution mode (getExecutionMode()).java.lang.StringgetGraphBeanName()Returns the name associated with all itsGraphBeaninstances.intgetInnerHeight()intgetInnerWidth()booleangetIsDossier()return a boolean if this bean comes from Dossier shortcutbooleangetIsFromTemplate()Indicate whether this bean is created from template.booleangetIsPVPartialExecution()booleangetNewAnalysis()Deprecated.java.util.MapgetPartialDisplayUnitDataFilterProps()A Map of all the data filters for all the node keys.java.util.MapgetPartialDisplayUnitDefnFilterProps()A Map of all the definition filters for all the node keys.java.util.SetgetPartialDisplayUnits()Returns a collection of partial display unit keysintgetPreviousExecutionMode()Returns the previous execution mode for any messages for which only a message ID is passed in.ViewBeangetRelatedViewBean(ViewBean base, java.lang.String key)Report2RWSettingsgetReport2RWSettings()RWInstancegetRWInstance()Returns the report writing document instance.WebPropertygetRWProperty(java.lang.String propertySetName, java.lang.String propertyName)Gets document propertyRWSettingsgetRWSettings()return rwSettings object associated with the current execution mode (getExecutionMode()).java.lang.StringgetSaveFolderId()booleangetSupportsUndo()Indicate that the application using this bean supports undo/redojava.util.Set<java.lang.String>getUpdatedControlUnits()Returns a collection of updated control keysjava.util.Set<java.lang.String>getUpdatedUnits()ViewBeangetViewBean(RWGridGraphObject obj)WebEventHandlergetViewBeanEventHandler()Returns the event handler used embeddedViewBeaninstances.ExpressionBeangetViewFilterBean(java.lang.String key)Returns theExpressionBeanreferring to the view filter of the given node.ExpressionBeangetViewLimitBean(java.lang.String key)WebViewMediaSettingsgetViewMedia()intgetVisualizationViewMode()Returns the visualization view mode for the RW document.booleanisJsonMode()booleanisPartialDisplayEnabled()Returns true if partial display is enabled for rendering this beanbooleanisRWReadonly()voiditerate(RWBeanVisitor visitor, boolean designMode, MarkupOutput markupOutput)Deprecated.voiditerate(RWBeanVisitor visitor, RWIterateSettings settings, MarkupOutput markupOutput)Iteration method for visiting the underlying object model.voidrefresh(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).voidsetAvailableViewModes(int viewModes)Sets available view mode for the documentvoidsetCurrentLayoutKey(java.lang.String value)Sets the current layout key.voidsetDefaultViewMode(int viewMode)Sets default document view modevoidsetExecutionMode(int mode)Sets the execution mode.voidsetGraphBeanName(java.lang.String name)Sets the name for allGraphBeanassociated with any of its embeddedViewBeaninstances.voidsetHasCollectedData(boolean hasCollectedData)voidsetInnerHeight(int height)voidsetInnerWidth(int width)voidsetIsDossier(boolean isDossier)Set a boolean flag to support dossier to run RSD from Dossier shortcutvoidsetJsonMode(boolean value)voidsetNewAnalysis(boolean isNew)Deprecated.This method is only used by GUI to workaround some issue in IVE.voidsetNoDelatXML(boolean noDelatXML)voidsetPreviousExecutionMode(int mode)Sets the previous execution mode for any messages for which only a message ID is passed in.voidsetRWInstance(RWInstance rwInstance)voidsetSaveFolderId(java.lang.String folderId)voidsetSupportsUndo(boolean value)Sets flag indication that application using this bean supports undo/redovoidsetViewBeanEventHandler(WebEventHandler handler)Sets the event handler for its embeddedViewBeaninstances.voidsetVisualizationViewMode(int mode)Changes the visualization view mode for the document.voidunfreezeState()After this call the changes to the bean will mark it as stale-
Methods inherited from interface com.microstrategy.web.beans.ObjectBean
getBlockBegin, getBlockCount, getDisplayName, getFlags, getLevel, getObjectID, getObjectInfo, getObjectName, getObjectType, getParentFolderBean, getParentFolderBean, getParentID, setBlockBegin, setBlockCount, setFlags, setLevel, setObjectID, setObjectInfo, setObjectName, setObjectType
-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
Methods inherited from interface com.microstrategy.web.beans.RequestPersistable
restoreStateFromRequest, restoreStateFromRequest
-
Methods inherited from interface com.microstrategy.web.beans.ResultSetBean
cancelRequest, getExpiration, getLastPromptMessageID, getMaxWait, getMessageID, getPollingFrequency, getPromptsBean, getPromptsEventHandler, getResultSetInstance, getSaveToInbox, getStateID, initializeFromSchedule, initializeFromSubscription, isPrompted, isReady, refresh, refresh, setDisplayName, setExpiration, setMaxWait, setMessageID, setPollingFrequency, setPromptsEventHandler, setSaveToInbox, setStateID
-
Methods inherited from interface com.microstrategy.web.beans.Transformable
addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, getBeanContext, getMessageString, getMyTransformInstances, getTransformInstance, getTransformInstance, getTransformInstances, getType, hasTransform, hasTransform, invalidateTransformCache, setBeanContext, transform, transform
-
Methods inherited from interface com.microstrategy.web.beans.WebBean
getDocument, getErrorInfo, getSessionInfo, isStale, setSessionInfo, setStale
-
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, addChildStateInfo, addChildStateInfo, collectData, collectMinimalData, generateOutput, getBeanContext, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getFeaturesManager, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBean, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, getXMLStatus, handleRequest, hasChanged, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler
-
-
-
-
Method Detail
-
getRWInstance
RWInstance getRWInstance() throws WebBeanException
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.
-
setViewBeanEventHandler
void setViewBeanEventHandler(WebEventHandler handler)
Sets the event handler for its embeddedViewBeaninstances.- Parameters:
handler- event handler for embeddedViewBeaninstances.
-
getViewBeanEventHandler
WebEventHandler getViewBeanEventHandler()
Returns the event handler used embeddedViewBeaninstances.- Returns:
- the event handler used embedded
ViewBeaninstances.
-
iterate
void iterate(RWBeanVisitor visitor, boolean designMode, MarkupOutput markupOutput) throws WebBeanException
Deprecated.Visitor entry point for iterating the report writing document object model.- Parameters:
visitor- the visitor implementationdesignMode- whether this is design modemarkupOutput- object to output the results- Throws:
WebBeanException- if a problem is encountered during the iteration.
-
iterate
void iterate(RWBeanVisitor visitor, RWIterateSettings settings, MarkupOutput markupOutput) throws WebBeanException
Iteration method for visiting the underlying object model.RWIterateSettingsmay be obtained fromRWSource.createIterateSettings().- Parameters:
visitor- the visitor implementationsettings- settings governing the behavior of the iterationmarkupOutput- object to output the results- Throws:
WebBeanException- if an error is encountered during the iteration.- Since:
- MicroStrategy Web 8.1.0
-
setGraphBeanName
void setGraphBeanName(java.lang.String name)
Sets the name for allGraphBeanassociated with any of its embeddedViewBeaninstances.- Parameters:
name- the name for allGraphBeanassociated with any of its embeddedViewBeaninstances.
-
getGraphBeanName
java.lang.String getGraphBeanName()
Returns the name associated with all itsGraphBeaninstances.- Returns:
- the name associated with all its
GraphBeaninstances.
-
getDefinitionWebBean
WebBean getDefinitionWebBean(java.lang.String definitionKey) throws WebBeanException
Returns the embedded definition
WebBeanassociated 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 theWebBean
-
getDataWebBeans
java.util.List getDataWebBeans(java.lang.String definitionKey) throws WebBeanExceptionReturns a list of embedded dataWebBeaninstances for the specifiedRWObjectkey.Several embedded beans may share the same key - this occurs in view mode when a given
WebBeanis grouped by an attribute (e.g. year) that contains several values (e.g. 2000, 2001) each of which will be mapped to a separate embeddedWebBean. This method is used to retrieve these instances. Null returned if no template exists with definition key.- Parameters:
definitionKey- theRWObjectkey.- Returns:
- list of embedded data
WebBeaninstances. - Throws:
WebBeanException- if there is a problem retrieving the list.
-
getExecutionMode
int getExecutionMode()
Returns the execution mode.- Returns:
- the execution mode.
- See Also:
EnumRWExecutionModes
-
setExecutionMode
void setExecutionMode(int mode)
Sets the execution mode.- Parameters:
mode- the execution mode.- See Also:
EnumRWExecutionModes
-
getExportSettings
RWExportSettings getExportSettings()
Returns export settings object that corresponds to the current execution mode (getExecutionMode()).
If the execution mode is not a known export mode,EnumRWExecutionModes.RW_MODE_PDFis assumed.
The following describes the execution mode associations, and the export settings subclass, whichRWExportSettingsmay be cast into (if any):EnumRWExecutionModes.RW_MODE_EXCEL:RWExcelExportSettingsEnumRWExecutionModes.RW_MODE_PDF:RWExportSettings(no subclass)EnumRWExecutionModes.RW_MODE_FLASH_EXPORT:RWExportSettings(no subclass)
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.
-
getRWSettings
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.
-
discardState
void discardState() throws WebBeanExceptionClears theRWInstancestate and any errors on the bean.- Throws:
WebBeanException- if an error occurs while attempting to discard the state.- See Also:
RWInstance.discardState()
-
getViewFilterBean
ExpressionBean getViewFilterBean(java.lang.String key) throws WebBeanException
Returns theExpressionBeanreferring 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:
- An
ExpressionBeanreferring to the view filter of the given node. - Throws:
WebBeanException- Thrown if an error occurs when getting the view filter.- Since:
- MicroStrategy Web 8.0.1
-
refresh
void refresh(boolean reprompt, boolean rerun) throws WebBeanExceptionRefreshes 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- Since:
- MicroStrategy Web 8.0.1
-
setNoDelatXML
void setNoDelatXML(boolean noDelatXML)
-
getVisualizationViewMode
int getVisualizationViewMode() throws WebBeanExceptionReturns 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.
- Throws:
WebBeanException- Since:
- MicroStrategy Web 8.0.2
-
setVisualizationViewMode
void setVisualizationViewMode(int mode) throws WebBeanExceptionChanges 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.- Throws:
WebBeanException- Since:
- MicroStrategy Web 8.0.2
-
isPartialDisplayEnabled
boolean isPartialDisplayEnabled()
Returns true if partial display is enabled for rendering this bean- Returns:
- boolean
- Since:
- MicroStrategy Web 8.1.0
-
disablePartialDisplay
void disablePartialDisplay()
Disables partial display mode for rendering this bean- Since:
- MicroStrategy Web 8.1.0
-
addPartialDisplayUnits
void addPartialDisplayUnits(java.util.Enumeration units)
Adds units to partial display collection- Parameters:
units- enumeration of units- Since:
- MicroStrategy Web 8.1.0
-
addPartialDisplayUnitKeys
void addPartialDisplayUnitKeys(java.util.Enumeration keys)
Adds units to partial display collection using there keys- Parameters:
keys- enumeration of unit keys- Since:
- MicroStrategy Web 8.1.0
-
addCurrentPageKey
void addCurrentPageKey(java.lang.String pageKey)
Sets the current page key.- Parameters:
pageKey- It should be the valid current page key. Pass other page's pageKey or other node key could cause unexpected errors.- Since:
- MicroStrategy Web 11.3.2
-
addPartialDisplayUnit
void addPartialDisplayUnit(RWUnitDef unit)
Adds a unit to partial display collection using its key- Parameters:
unit-
-
addPartialDisplayUnit
void addPartialDisplayUnit(java.lang.String key)
- Parameters:
key-
-
getPartialDisplayUnits
java.util.Set getPartialDisplayUnits()
Returns a collection of partial display unit keys- Returns:
- Set
- Since:
- MicroStrategy Web 8.1.0
-
addPartialDisplayUnitFilterProps
void addPartialDisplayUnitFilterProps(java.lang.String key, java.lang.String defnFilters, java.lang.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.
-
getPartialDisplayUnitDefnFilterProps
java.util.Map getPartialDisplayUnitDefnFilterProps()
A Map of all the definition filters for all the node keys.- Returns:
-
getPartialDisplayUnitDataFilterProps
java.util.Map getPartialDisplayUnitDataFilterProps()
A Map of all the data filters for all the node keys.- Returns:
-
getDataWebBean
WebBean getDataWebBean(RWUnit unit) throws WebBeanException
Returns a web bean assosiated with the given data unit- Parameters:
unit- data unit- Returns:
- bean
- Throws:
WebBeanException- Since:
- MicroStrategy Web 8.1.0
-
getRWProperty
WebProperty getRWProperty(java.lang.String propertySetName, java.lang.String propertyName)
Gets document property- Parameters:
propertySetName- property set namepropertyName- property name- Returns:
- property object
- Since:
- MicroStrategy Web 8.1.0
-
getDefaultViewMode
int getDefaultViewMode()
Return default view mode when execute this document.- Since:
- MicroStrategy Web 8.1.0
-
getDefaultViewMode
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?
-
setDefaultViewMode
void setDefaultViewMode(int viewMode)
Sets default document view mode- Parameters:
viewMode- view mode- Since:
- MicroStrategy Web 8.1.0
-
getAvailableViewModes
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.
- Since:
- MicroStrategy Web 8.1.0
-
setAvailableViewModes
void setAvailableViewModes(int viewModes)
Sets available view mode for the document- Parameters:
viewModes- available view modes- Since:
- MicroStrategy Web 8.1.0
-
getRelatedViewBean
ViewBean getRelatedViewBean(ViewBean base, java.lang.String key) throws WebBeanException
- Throws:
WebBeanException- Since:
- MicroStrategy Web 8.1.1
-
getCurrentLayoutKey
java.lang.String getCurrentLayoutKey()
Returns the current layout key.- Returns:
- String
- Since:
- MicroStrategy Web 9.0.0
-
setCurrentLayoutKey
void setCurrentLayoutKey(java.lang.String value)
Sets the current layout key.- Parameters:
value- String- Since:
- MicroStrategy Web 9.0.0
-
getReport2RWSettings
Report2RWSettings getReport2RWSettings()
- Since:
- MicroStrategy Web 9.0.0
-
setPreviousExecutionMode
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.- Since:
- MicroStrategy Web 9.0.0
-
getPreviousExecutionMode
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.
- Since:
- MicroStrategy Web 9.0.0
-
getViewLimitBean
ExpressionBean getViewLimitBean(java.lang.String key) throws WebBeanException
- Throws:
WebBeanException
-
getViewBean
ViewBean getViewBean(RWGridGraphObject obj)
-
setRWInstance
void setRWInstance(RWInstance rwInstance)
-
getViewMedia
WebViewMediaSettings getViewMedia()
-
getAvailableViewMedia
int getAvailableViewMedia()
-
setNewAnalysis
void setNewAnalysis(boolean isNew)
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.
-
getNewAnalysis
boolean getNewAnalysis()
Deprecated.
-
addUpdatedControlUnit
void addUpdatedControlUnit(java.lang.String key)
Add a unit into the updated control key collection by Key- Parameters:
key-
-
getUpdatedControlUnits
java.util.Set<java.lang.String> getUpdatedControlUnits()
Returns a collection of updated control keys- Returns:
- Set
- Since:
- MicroStrategy Web 9.0.3
-
isRWReadonly
boolean isRWReadonly()
-
getDefinitionViewBean
RWViewBean getDefinitionViewBean(java.lang.String key)
-
isJsonMode
boolean isJsonMode()
-
setJsonMode
void setJsonMode(boolean value)
-
addUpdatedNode
void addUpdatedNode(java.lang.String key)
-
addUpdatedUnits
void addUpdatedUnits(java.lang.String key)
-
addUpdatedObjects
void addUpdatedObjects(java.lang.String objectID, int type, int flag)Partial update on object feature.- Parameters:
objectID-type-flag-
-
getUpdatedUnits
java.util.Set<java.lang.String> getUpdatedUnits()
-
freezeState
void freezeState()
After this call any changes to the bean will not mark it stale. The freeze will continue until unfreezeBean is called.
-
unfreezeState
void unfreezeState()
After this call the changes to the bean will mark it as stale
-
setSupportsUndo
void setSupportsUndo(boolean value)
Sets flag indication that application using this bean supports undo/redo- Parameters:
value-
-
getSupportsUndo
boolean getSupportsUndo()
Indicate that the application using this bean supports undo/redo- Returns:
-
setHasCollectedData
void setHasCollectedData(boolean hasCollectedData)
- Parameters:
hasCollectedData-
-
getSaveFolderId
java.lang.String getSaveFolderId()
-
setSaveFolderId
void setSaveFolderId(java.lang.String folderId)
-
getIsPVPartialExecution
boolean getIsPVPartialExecution()
-
setIsDossier
void setIsDossier(boolean isDossier)
Set a boolean flag to support dossier to run RSD from Dossier shortcut- Parameters:
isDossier-
-
getIsDossier
boolean getIsDossier()
return a boolean if this bean comes from Dossier shortcut- Returns:
- boolean
-
getIsFromTemplate
boolean getIsFromTemplate()
Indicate whether this bean is created from template.
-
setInnerWidth
void setInnerWidth(int width)
-
getInnerWidth
int getInnerWidth()
-
setInnerHeight
void setInnerHeight(int height)
-
getInnerHeight
int getInnerHeight()
-
-