Package com.microstrategy.web.app.beans
Class OptimizedTabBeanImpl
- java.lang.Object
-
- All Implemented Interfaces:
EnumWebPersistableState
,Persistable
,AppComponent
,TabBean
,ViewBeanParserBean
,RequestPersistable
,Transformable
,WebComponent
public class OptimizedTabBeanImpl extends AbstractViewBeanParserBean
- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.beans.AbstractPersistableAppComponent
STATE_DELIMITOR, STATE_ITEM_SEPARATOR
-
Fields inherited from class com.microstrategy.web.beans.AbstractWebComponent
_features, _hasJustOpened
-
Fields inherited from class com.microstrategy.web.beans.AbstractTransformable
_beanContext
-
Fields inherited from class com.microstrategy.utils.serialization.AbstractPersistable
scriptEndTagEncoder
-
Fields inherited from interface com.microstrategy.web.app.beans.AppComponent
COMPONENT_POSITION_NOT_INITIALIZED
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
Fields inherited from interface com.microstrategy.web.app.beans.TabBean
CACHED, FETCH, TAB_REPRESENTED_NOT_SPECIFIED
-
-
Constructor Summary
Constructors Constructor Description OptimizedTabBeanImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChildStateInfo(ParameterBuilder paramBldr, int howMuchState)
Adds children state information into an existingParameterBuilder
instance.protected boolean
compareChildsTargetWithCurrent()
The implementing class should implement this method to return true if it wants to always call the current object's targetBean#hasChanged method in #hasTargetBeanChanged method.protected void
doFlatState(FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)
Speciefies which bean's properties are persisted.java.lang.String
getEnabledCmdId()
Get the command id to be queried on the clioent site.java.lang.String
getFeatures()
Gets a list of feature ids that are required to enable the tabjava.lang.String
getHelpTopic()
get the help topic of this tabjava.lang.String
getHelpType()
get the type of the help fileboolean
getRequireSingleSelector()
Each instance of this class represents a tab in theTabManagerBean
.java.lang.String
getSupportedTypes()
Get the list of objects this tab can be associated with.int
getSwitchMode()
the switching mode can be: CACHED - use the cached tab content on the client side FETCH - go back to the webserver to fetch the tab contentjava.lang.String
getTabId()
Returns a string can be used as the identifier of the tab.java.lang.String
getTabLabel()
Get the description text to be used as title for the display of the tab.java.lang.String
getTabLabelId()
Get the identifier of the descriptor to be used as title for the display of the tab.TabManagerBean
getTabManager()
Utility method for obtaining the parent tabe manager associated to this tabjava.lang.String
getTabName()
Each instance of this class represents a tab in theTabManagerBean
.int
getTabRepresented()
Each instance of this class represents a tab in theTabManagerBean
.int
getXMLStatus()
Returns theEnumRequestStatus
status of the component.boolean
isAvailable()
This method specifies if in the current scenario, the bean instance can be displayed as possible tab option, based on granted privileges, etc.boolean
isEditor()
Indicates whether the instance most be considered editor.boolean
isPartialUpdate()
protected WebEventHandler
newDefaultEventHandler()
void
setEnabledCmdId(java.lang.String value)
Set the command id to be queried on the client site.void
setFeatures(java.lang.String featureIds)
Sets a list of feature ids that are required to enable the tabvoid
setHelpTopic(java.lang.String topic)
Set the help topic of the editorvoid
setHelpType(java.lang.String type)
set the help type for the editorvoid
setName(java.lang.String name)
Sets the name for the current component.void
setPartialUpdate(boolean partialUpdate)
void
setRequireSingleSelector(boolean requireSingleSelector)
Each instance of this class represents a tab in theTabManagerBean
.void
setSupportedTypes(java.lang.String supportedTYpes)
Set the list of objects this tab can be associated with.void
setSwitchMode(int switchMode)
the switching mode can be: CACHED - use the cached tab content on the client side FETCH - go back to the webserver to fetch the tab contentvoid
setTabLabel(java.lang.String description)
Set the description text to be used as title for the display of the tab.void
setTabLabelId(java.lang.String descriptionId)
Set the identifier of the descriptor to be used as title for the display of the tab.void
setTabName(java.lang.String tabName)
Each instance of this class represents a tab in theTabManagerBean
.void
setTabRepresented(int tabRepresented)
Each instance of this class represents a tab in theTabManagerBean
.-
Methods inherited from class com.microstrategy.web.app.beans.AbstractViewBeanParserBean
getActiveElementIndex, getActiveViewKey, getTemplateElementList, getViewBean, getViewBean, setActiveElementIndex, setActiveViewKey
-
Methods inherited from class com.microstrategy.web.app.beans.AbstractPersistableFrameElement
doCollectData, getDocumentFrameBean, getFeaturesManager, getFrameBean, getReportFrameBean, getRWFrameBean, getUseIFrame, isGridDataNecessary, isIFrameEnabled, isOpen, setIsOpen, setUseIFrame
-
Methods inherited from class com.microstrategy.web.app.beans.AbstractPersistableAppComponent
isCookieOpen, isSaveStateEnabled, saveState, saveState, saveState, saveState
-
Methods inherited from class com.microstrategy.web.app.beans.AbstractAppComponent
addChildStateInfo, collectData, collectMinimalData, createTransformInstance, doCollectMinimalData, generateOutput, getAppContext, getContactInfo, getContainerServices, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getLeft, getObjectSource, getResultFilterMode, getSession, getTargetBean, getTop, getType, getWebObjectsFactory, getWebObjectsFactory, hasChanged, hasTargetBeanChanged, haveChildrenChanged, initComponent, internalCollectData, isDialog, isForcedChildrenStateSaving, isIFrameRequest, isModal, isModalOpen, newDefaultBeanContext, newHiddenInputBuilder, newNamespaceEncoder, newStyleRequestContext, newURIBuilder, setExtraInput, setExtraUrl, setForcedChildrenStateSaving, setHasJustOpened, setIsDialog, setIsModal, setLeft, setOutputFormat, setTop
-
Methods inherited from class com.microstrategy.web.beans.AbstractWebComponent
addChild, addChildStateInfo, addChildStateInfo, addChildStateInfo, addStateInfo, childValues, clearChildren, clearStateCache, getCachedState, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, handleRequest, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isChangeComparisonFlagSet, isFeatureAvailable, prepareForReuse, removeChild, removeChild, restoreState, restoreStateFromRequest, restoreStateFromRequest, saveXMLState, saveXMLState, saveXMLState, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setParent, setPersistMode, setRenderingFilter, setStateCache, setTargetBean, setTargetBeanPath, setWebEventHandler
-
Methods inherited from class com.microstrategy.web.beans.AbstractTransformable
addTransform, addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, createTransformInstance, getBeanContext, getDefaultTransform, getMessageString, getMyTransformInstances, getTransformInstance, getTransformInstance, getTransformInstances, hasTransform, hasTransform, internalCollectData, internalCollectData, invalidateTransformCache, isTransformSuitable, transform, transform, transform, transform
-
Methods inherited from class com.microstrategy.utils.serialization.AbstractPersistable
doFlatState, getStateHandler, isXMLStateZipped, restoreState, restoreXMLState, saveXMLState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.app.beans.AppComponent
getAppContext, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getLeft, getResultFilterMode, getTop, isDialog, isForcedChildrenStateSaving, isModal, isModalOpen, isOpen, setExtraInput, setExtraUrl, setForcedChildrenStateSaving, setHasJustOpened, setIsDialog, setIsModal, setIsOpen, setLeft, setTop
-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState
-
Methods inherited from interface com.microstrategy.web.beans.RequestPersistable
restoreStateFromRequest, restoreStateFromRequest
-
Methods inherited from interface com.microstrategy.web.app.beans.TabBean
getViewBean
-
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.app.beans.ViewBeanParserBean
getActiveElementIndex, getActiveViewKey, getTemplateElementList, getViewBean, setActiveElementIndex, setActiveViewKey
-
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, 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, handleRequest, hasChanged, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler
-
-
-
-
Method Detail
-
compareChildsTargetWithCurrent
protected boolean compareChildsTargetWithCurrent()
Description copied from class:AbstractAppComponent
The implementing class should implement this method to return true if it wants to always call the current object's targetBean#hasChanged method in #hasTargetBeanChanged method.- Overrides:
compareChildsTargetWithCurrent
in classAbstractAppComponent
- Returns:
- a boolean to compare the children's target with the current target.
-
setTabRepresented
public void setTabRepresented(int tabRepresented)
Each instance of this class represents a tab in theTabManagerBean
. This method allows to specify which tab this instance will represent, so theTabManagerBean
manager knows how to transfer render control to the child, depending on which tab the user requested.- Specified by:
setTabRepresented
in interfaceTabBean
- Parameters:
tabRepresented
- an identifier of the tab this instance represents.
-
setRequireSingleSelector
public void setRequireSingleSelector(boolean requireSingleSelector)
Each instance of this class represents a tab in theTabManagerBean
. This method allows to specify whether this tab instance's availability relies on the selection of exactly one selector control among all the units the user has selected.- Specified by:
setRequireSingleSelector
in interfaceTabBean
- Parameters:
requireSingleSelector
- boolean indicating whether a single selection on selector control is required for the tab to be available or not.
-
getTabRepresented
public int getTabRepresented()
Each instance of this class represents a tab in theTabManagerBean
. This method allows to get which tab this instance will represent, so theTabManagerBean
manager knows how to transfer render control to the child, depending on which tab the user requested.- Specified by:
getTabRepresented
in interfaceTabBean
- Returns:
- the identifier of the tab this instance represents
-
getRequireSingleSelector
public boolean getRequireSingleSelector()
Each instance of this class represents a tab in theTabManagerBean
. This method inidicates whether this tab instance's availability relies on the selection of exactly one selector control among all the units the user has selected.- Specified by:
getRequireSingleSelector
in interfaceTabBean
- Returns:
- indicates whether a single selection on selector control is required for the tab to be available or not.
-
setTabName
public void setTabName(java.lang.String tabName)
Each instance of this class represents a tab in theTabManagerBean
. This method allows an alternative other than getTabRepresented() to get which tab this instance presents , so theTabManagerBean
manager knows how to transfer render control to the child, depending on which tab name the user requested.- Specified by:
setTabName
in interfaceTabBean
- Parameters:
tabName
- the name identifier of the tab this instance represents
-
getTabName
public java.lang.String getTabName()
Each instance of this class represents a tab in theTabManagerBean
. This method allows an alternative other than getTabRepresented() to get which tab this instance presents , so theTabManagerBean
manager knows how to transfer render control to the child, depending on which tab name the user requested.- Specified by:
getTabName
in interfaceTabBean
- Returns:
- the name identifier of the tab this instance represents
-
setSwitchMode
public void setSwitchMode(int switchMode)
the switching mode can be: CACHED - use the cached tab content on the client side FETCH - go back to the webserver to fetch the tab content- Specified by:
setSwitchMode
in interfaceTabBean
- Parameters:
switchMode
- the switching mode to set for this tab instance
-
getSwitchMode
public int getSwitchMode()
the switching mode can be: CACHED - use the cached tab content on the client side FETCH - go back to the webserver to fetch the tab content- Specified by:
getSwitchMode
in interfaceTabBean
- Returns:
- the switching mode of this tab instance uses
-
setTabLabel
public void setTabLabel(java.lang.String description)
Set the description text to be used as title for the display of the tab.- Specified by:
setTabLabel
in interfaceTabBean
- Parameters:
description
-String
with the text to be used as title of the tab.
-
setTabLabelId
public void setTabLabelId(java.lang.String descriptionId)
Set the identifier of the descriptor to be used as title for the display of the tab.- Specified by:
setTabLabelId
in interfaceTabBean
- Parameters:
descriptionId
-String
with the identifier of the descriptor to be used as title of the tab.
-
getTabLabel
public java.lang.String getTabLabel()
Get the description text to be used as title for the display of the tab.- Specified by:
getTabLabel
in interfaceTabBean
- Returns:
String
with the text to be used as title of the tab.
-
getTabLabelId
public java.lang.String getTabLabelId()
Get the identifier of the descriptor to be used as title for the display of the tab.- Specified by:
getTabLabelId
in interfaceTabBean
- Returns:
String
with the identifier of the descriptor to be used as title of the tab.
-
getTabId
public java.lang.String getTabId()
Description copied from interface:TabBean
Returns a string can be used as the identifier of the tab.- Specified by:
getTabId
in interfaceTabBean
- Returns:
String
with the text to be used as the id of the tab.- Since:
- MicroStrategy Web 8.1.0
- See Also:
TabBean.getTabId()
-
setName
public void setName(java.lang.String name)
Description copied from class:AbstractWebComponent
Sets the name for the current component.- Specified by:
setName
in interfaceWebComponent
- Overrides:
setName
in classAbstractWebComponent
- Parameters:
name
- the name of the current component.- Since:
- MicroStrategy Web 8.1.0
- See Also:
WebComponent.setName(String)
-
isAvailable
public boolean isAvailable()
This method specifies if in the current scenario, the bean instance can be displayed as possible tab option, based on granted privileges, etc.- Specified by:
isAvailable
in interfaceTabBean
- Returns:
True
if the instance is available for being displayed, if the user were to request it. ReturnsFalse
otherwise.
-
setSupportedTypes
public void setSupportedTypes(java.lang.String supportedTYpes)
Set the list of objects this tab can be associated with.- Specified by:
setSupportedTypes
in interfaceTabBean
- Parameters:
supportedTYpes
-String
list of the associated objectys i.e. obj.103, obj.102
-
getSupportedTypes
public java.lang.String getSupportedTypes()
Get the list of objects this tab can be associated with.- Specified by:
getSupportedTypes
in interfaceTabBean
- Returns:
String
with the a list of supported objects.
-
setFeatures
public void setFeatures(java.lang.String featureIds)
Sets a list of feature ids that are required to enable the tab- Specified by:
setFeatures
in interfaceTabBean
- Parameters:
featureIds
-String
featureIds separated by ","
-
getFeatures
public java.lang.String getFeatures()
Gets a list of feature ids that are required to enable the tab- Specified by:
getFeatures
in interfaceTabBean
- Returns:
String
-
setEnabledCmdId
public void setEnabledCmdId(java.lang.String value)
Description copied from interface:TabBean
Set the command id to be queried on the client site. This determines the availability of the tab.- Specified by:
setEnabledCmdId
in interfaceTabBean
- See Also:
TabBean.setEnabledCmdId(java.lang.String)
-
getEnabledCmdId
public java.lang.String getEnabledCmdId()
Get the command id to be queried on the clioent site. This determines the availability of the tab.- Specified by:
getEnabledCmdId
in interfaceTabBean
- Returns:
String
with the tab's command id.
-
getTabManager
public TabManagerBean getTabManager()
Utility method for obtaining the parent tabe manager associated to this tab- Specified by:
getTabManager
in interfaceTabBean
- Returns:
- the
TabManagerBean
parent
-
getXMLStatus
public int getXMLStatus()
Description copied from class:AbstractAppComponent
Returns theEnumRequestStatus
status of the component. The status determined by by the status of its children with the following precedence.EnumRequestStatus.WebBeanRequestEndsInError
EnumRequestStatus.WebBeanRequestCanceled
EnumRequestStatus.WebBeanRequestProcessing
EnumRequestStatus.WebBeanRequestNotInitiated
EnumRequestStatus.WebBeanRequestWaitingForUserInput
EnumRequestStatus.WebBeanRequestSuccessful
- Specified by:
getXMLStatus
in interfaceWebComponent
- Overrides:
getXMLStatus
in classAbstractAppComponent
- Returns:
- an
EnumRequestStatus
enumeration value for the component. - See Also:
WebComponent.getXMLStatus()
-
doFlatState
protected void doFlatState(FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)
Description copied from class:AbstractViewBeanParserBean
Speciefies which bean's properties are persisted.- Overrides:
doFlatState
in classAbstractViewBeanParserBean
- Parameters:
serializer
-FlatStateSerializer
initialized instance where the state of the instance is handledhowMuchState
-int
value fromEnumWebPersistableState
indicating how much state should be handled by this instancetokenizer
-FlatStateTokenizer
initialized instance where the state of the instance is handled.- See Also:
AbstractPersistableAppComponent.doFlatState(FlatStateSerializer, int, FlatStateTokenizer)
-
isEditor
public boolean isEditor()
Indicates whether the instance most be considered editor.- Overrides:
isEditor
in classAbstractPersistableFrameElement
- Returns:
True
.
-
addChildStateInfo
public void addChildStateInfo(ParameterBuilder paramBldr, int howMuchState)
Adds children state information into an existingParameterBuilder
instance. It is up to the suppliedParameterBuilder
to determine how this information is serialized.- Specified by:
addChildStateInfo
in interfaceWebComponent
- Overrides:
addChildStateInfo
in classAbstractPersistableAppComponent
- Parameters:
paramBldr
- TheParameterBuilder
instance which has child state information added to it.howMuchState
- How much state is added. (seeEnumWebPersistableState
for details).- Since:
- MicroStrategy Web 8.0.1
-
newDefaultEventHandler
protected WebEventHandler newDefaultEventHandler()
- Overrides:
newDefaultEventHandler
in classAbstractWebComponent
-
setPartialUpdate
public void setPartialUpdate(boolean partialUpdate)
- Specified by:
setPartialUpdate
in interfaceTabBean
-
isPartialUpdate
public boolean isPartialUpdate()
- Specified by:
isPartialUpdate
in interfaceTabBean
-
setHelpType
public void setHelpType(java.lang.String type)
Description copied from interface:TabBean
set the help type for the editor- Specified by:
setHelpType
in interfaceTabBean
- Parameters:
type
- String is one ofHelpHelper.HELP_TYPE_ADMIN
,HelpHelper.HELP_TYPE_USER
,HelpHelper.HELP_TYPE_CUSTOM
-
getHelpType
public java.lang.String getHelpType()
Description copied from interface:TabBean
get the type of the help file- Specified by:
getHelpType
in interfaceTabBean
- Returns:
- the type is one of
HelpHelper.HELP_TYPE_ADMIN
,HelpHelper.HELP_TYPE_USER
,HelpHelper.HELP_TYPE_CUSTOM
-
setHelpTopic
public void setHelpTopic(java.lang.String topic)
Set the help topic of the editor- Specified by:
setHelpTopic
in interfaceTabBean
- Parameters:
topic
- the help topic
-
getHelpTopic
public java.lang.String getHelpTopic()
Description copied from interface:TabBean
get the help topic of this tab- Specified by:
getHelpTopic
in interfaceTabBean
- Returns:
- the help topic of this tab needs to point to
-
-