Interface ViewBean
-
- All Superinterfaces:
EnumWebPersistableState,Persistable,RequestPersistable,Transformable,WebBean,WebComponent
- All Known Subinterfaces:
RWViewBean
public interface ViewBean extends WebBean
This interface provides a unified concept of the
WebTemplateencapsulated by correspondingWebViewInstancealong with its associated events for both the report, and report writing document. CustomViewBeantransforms and event handlers will work with traditional reports and the newer report writing document.It is used to manage and render grid data defined by the underlying template in the
WebViewInstance, and graph data encapsulated by theGraphBean. It also provides methods to track user states (e.g. view mode).The
ViewBeancannot exist on its own accord - only as part of the following:ReportBean.getViewBean(). TheReportBeanalways encapsulates a template.RWBean.getDataWebBeans(String)(tentative, and subject to changes). EmbeddedViewBeanin report writing documents may be rendered as grid, graphs or both.RWBean.getDefinitionWebBean(String)(tentative, and subject to changes). The correspondingWebViewInstanceinstances here only contain template information, but no data. Useful representation in design mode.
The ViewBean cannot be saved and restored on its own. It cannot be instantiated from the
WebBeanFactory.- Since:
- MicroStrategy Web 8.0.0
- See Also:
ReportBean.getViewBean(),RWBean.getDataWebBeans(String),RWBean.getDefinitionWebBean(String)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ThreadLocal<WebHeaders>expandedRow-
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 Modifier and Type Method Description WebDerivedElementsgetDerivedElements(WebAttribute attr)Returns the derived elements associated with the specified attribute.WebFormatgetFormat(int formatType)Returns a format object for the given format type.GraphBeangetGraphBean()Returns aGraphBeanfor retrieving graph data.intgetSliceID()Returns the sliced window ID of the grid graph object.WebViewInstancegetViewInstance()Returns the underlingWebViewInstancecontaining the grid data.intgetViewMode()Returns whether whether the bean is currently displaying a grid, graph or both.java.lang.StringgetViewName()Returns the view name.intgetVisualizationViewMode()Returns visualization view modebooleanisTemplateEmpty()Returns true if template is emptyvoidpopulateObject(WebObjectInfo oi)Populates objectvoidsetPartialUpdate()Indicates that the grid and all related units must be partial updated.voidsetRedisplay()Indicates that the grid must be redisplayed.voidsetViewMode(int viewMode)The view mode is a state variable indicating what the bean is currently displaying (i.e. grid, graph or both).voidsetVisualizationViewMode(int mode)Sets visualization view modebooleanusePageAxisForGrandTotal()Whether to use Page axis for Grand Total in Percent to Total.-
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.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
-
-
-
-
Field Detail
-
expandedRow
static final java.lang.ThreadLocal<WebHeaders> expandedRow
-
-
Method Detail
-
getViewInstance
WebViewInstance getViewInstance() throws WebBeanException
Returns the underling
WebViewInstancecontaining the grid data.- Returns:
- the underlying
WebViewInstance - Throws:
WebBeanException- if there is a problem obtaining the data from the Intelligence Server, or a problem with the data itself
-
getGraphBean
GraphBean getGraphBean()
Returns a
GraphBeanfor retrieving graph data. Note that this functions independently of the view mode. Although it's possible to obtain aGraphObjectfrom theWebViewInstance, aGraphBeanmay be saved and restored unlike the former.- Returns:
- the associated
GraphBean
-
getViewMode
int getViewMode()
Returns whether whether the bean is currently displaying a grid, graph or both.
- Returns:
- the view mode in the definition
- See Also:
EnumWebReportViewMode
-
setViewMode
void setViewMode(int viewMode)
The view mode is a state variable indicating what the bean is currently displaying (i.e. grid, graph or both). It is intended for book-keeping purposes, and does not actually affect data retrieval.
- Parameters:
viewMode- the new view mode- See Also:
EnumWebReportViewMode
-
populateObject
void populateObject(WebObjectInfo oi) throws WebBeanException
Populates object- Parameters:
oi- web object- Throws:
WebBeanException- Since:
- MicroStrategy Web 8.0.2
-
setVisualizationViewMode
void setVisualizationViewMode(int mode) throws WebBeanExceptionSets visualization view mode- Parameters:
mode- visualization view mode- Throws:
WebBeanException- Since:
- MicroStrategy Web 8.0.2
-
getVisualizationViewMode
int getVisualizationViewMode() throws WebBeanExceptionReturns visualization view mode- Returns:
- visualization view mode (see
EnumWebVisualizationViewModes) - Throws:
WebBeanException- Since:
- MicroStrategy Web 8.0.2
-
getViewName
java.lang.String getViewName() throws WebBeanExceptionReturns the view name.- Returns:
- the name of the View. It returns the display name for the view bean in case of RW documents or the report name for the case for reports.
- Throws:
WebBeanException- thrown if the object name can be retrieved.- Since:
- MicroStrategy Web 8.0.2
-
isTemplateEmpty
boolean isTemplateEmpty()
Returns true if template is empty- Returns:
- true if template is empty
- Since:
- MicroStrategy Web 8.1.0
-
getFormat
WebFormat getFormat(int formatType)
Returns a format object for the given format type. Note: returns null for reports- Parameters:
formatType- format type (a value from @link com.microstrategy.web.objects.rw.EnumRWFormatTypes)- Returns:
- WebFormat
- Since:
- MicroStrategy Web 8.1.1
-
getSliceID
int getSliceID()
Returns the sliced window ID of the grid graph object.- Returns:
- the sliced window ID.
- Since:
- MicroStrategy Web 8.1.1
-
setRedisplay
void setRedisplay()
Indicates that the grid must be redisplayed. This method is meant to be used for grids iside RS documents.
-
setPartialUpdate
void setPartialUpdate()
Indicates that the grid and all related units must be partial updated.
-
getDerivedElements
WebDerivedElements getDerivedElements(WebAttribute attr) throws WebObjectsException, WebBeanException
Returns the derived elements associated with the specified attribute. For view report and RWGridGraph the Derived Elements are defined in view template, while for other type report the Derived Elements are defined in Data template.- Parameters:
attr- the attribute with Derived Elements- Returns:
WebDerivedElements- Throws:
WebObjectsExceptionWebBeanException
-
usePageAxisForGrandTotal
boolean usePageAxisForGrandTotal()
Whether to use Page axis for Grand Total in Percent to Total.- Returns:
- boolean
-
-