Class AbstractPersistableAppComponent
- java.lang.Object
-
- com.microstrategy.utils.serialization.AbstractPersistable
-
- com.microstrategy.web.beans.AbstractTransformable
-
- com.microstrategy.web.beans.AbstractWebComponent
-
- com.microstrategy.web.app.beans.AbstractAppComponent
-
- com.microstrategy.web.app.beans.AbstractPersistableAppComponent
-
- All Implemented Interfaces:
EnumWebPersistableState
,Persistable
,AppComponent
,RequestPersistable
,Transformable
,WebComponent
- Direct Known Subclasses:
AbstractPersistableFrameElement
,CSRFConfirmationPageComponentImpl
,DesktopPageComponentImpl
,EditPromptPageComponentImpl
,ElementPickerBeanImpl
,FilterDetailsFormattingEditorBeanImpl
,FolderPageComponentImpl
,HistoryListPageComponentImpl
,IOSSmartBannerBeanImpl
,MySubscriptionsPageComponentImpl
,NewWindowPageComponentImpl
,PageSubscriptionsEdit
,PathBeanImpl
,PreferencesBeanImpl
,PreferencesPageComponentImpl
,PromptDetailsBeanImpl
,ReportDetailsBeanImpl
,ReportFrameBeanImpl
,ResultSetPageComponentImpl
,RWSaveAsPageComponentImpl
,SearchPageComponentImpl
,SecurityRoleUserEntitiesSelectorBeanImpl
,ServletWebComponent
public abstract class AbstractPersistableAppComponent extends AbstractAppComponent implements RequestPersistable
Title: AbstractPersistableAppComponent.
Description: This class is the base for application components (beans) that needs to be Persistable, that is, their state should be kept between requests.
The state is represented in a string that consists of severals fields of name/value pairs. This class makes sure the beans uses the same delimiter to separate fields and the name/value combination.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
STATE_DELIMITOR
protected static java.lang.String
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
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractPersistableAppComponent()
protected
AbstractPersistableAppComponent(boolean needEventHandler)
-
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 void
doFlatState(FlatStateSerializer ser, int howMuchState, FlatStateTokenizer tok)
Proceses the save/restore state opperation of the AppComponentprotected boolean
isCookieOpen(java.lang.String key)
Checks if the given key is marked as openedprotected boolean
isSaveStateEnabled()
java.lang.String
saveState()
Returns ajava.lang.String
representation of a component.java.lang.String
saveState(int howMuchState)
Returns ajava.lang.String
representation of a component.void
saveState(java.lang.StringBuffer buf, int howMuchState)
Saves and stores a component's state into aStringBuffer
.void
saveState(java.lang.StringBuffer buf, int howMuchState, int stateFlag)
Saves and stores a component's state into aStringBuffer
.-
Methods inherited from class com.microstrategy.web.app.beans.AbstractAppComponent
addChildStateInfo, collectData, collectMinimalData, compareChildsTargetWithCurrent, createTransformInstance, doCollectData, doCollectMinimalData, generateOutput, getAppContext, getContactInfo, getContainerServices, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getFeaturesManager, getLeft, getObjectSource, getResultFilterMode, getSession, getTargetBean, getTop, getType, getWebObjectsFactory, getWebObjectsFactory, getXMLStatus, hasChanged, hasTargetBeanChanged, haveChildrenChanged, initComponent, internalCollectData, isDialog, isForcedChildrenStateSaving, isIFrameRequest, isModal, isModalOpen, isOpen, newDefaultBeanContext, newHiddenInputBuilder, newNamespaceEncoder, newStyleRequestContext, newURIBuilder, setExtraInput, setExtraUrl, setForcedChildrenStateSaving, setHasJustOpened, setIsDialog, setIsModal, setIsOpen, 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, newDefaultEventHandler, prepareForReuse, removeChild, removeChild, restoreState, restoreStateFromRequest, restoreStateFromRequest, saveXMLState, saveXMLState, saveXMLState, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, 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.utils.serialization.Persistable
restoreState, restoreState
-
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, hasTransform, hasTransform, invalidateTransformCache, setBeanContext, transform, transform
-
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, getBeanContext, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, handleRequest, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler
-
-
-
-
Field Detail
-
STATE_DELIMITOR
protected static final java.lang.String STATE_DELIMITOR
- See Also:
- Constant Field Values
-
STATE_ITEM_SEPARATOR
protected static final java.lang.String STATE_ITEM_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
saveState
public java.lang.String saveState()
Description copied from interface:Persistable
Returns ajava.lang.String
representation of a component. The returned state should be HTML friendly. This method call is equivalent to callsaveState(EnumWebPersistableState.TYPICAL_STATE_INFO)
.- Specified by:
saveState
in interfacePersistable
- Overrides:
saveState
in classAbstractPersistable
- Returns:
- the serialized state of a component.
-
isSaveStateEnabled
protected boolean isSaveStateEnabled()
- Returns:
- boolean value indicating if the state should be saved for the current instance or not. By default it checks if the instance is marked as opened.
- Since:
- MicroStrategy Web 8.0.0
-
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. It only adds children information if the bean is open.- Specified by:
addChildStateInfo
in interfaceWebComponent
- Overrides:
addChildStateInfo
in classAbstractWebComponent
- 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.1.1
-
saveState
public java.lang.String saveState(int howMuchState)
Description copied from interface:Persistable
Returns ajava.lang.String
representation of a component. The returned state should be HTML friendly. This method call is equivalent to callsaveState(new StringBuffer(), howMuchState)
.- Specified by:
saveState
in interfacePersistable
- Overrides:
saveState
in classAbstractPersistable
- Parameters:
howMuchState
- how much state information to save (EnumWebPersistableState
).- Returns:
- the serialized state of a component.
-
saveState
public void saveState(java.lang.StringBuffer buf, int howMuchState) throws java.lang.UnsupportedOperationException
Description copied from interface:Persistable
Saves and stores a component's state into aStringBuffer
. The returned state should be HTML friendly.There are generally two formats of the saved state: flat state and XML representation. The minimum state is saved in flat state format, while the typical and maximum states are saved in XML string representation.
- Specified by:
saveState
in interfacePersistable
- Overrides:
saveState
in classAbstractPersistable
- Parameters:
buf
- a StringBuffer to store the saved state.howMuchState
- how much state information to save (EnumWebPersistableState
).- Throws:
java.lang.UnsupportedOperationException
- thrown if the component does not support this method, or does not support certainhowMuchState
level.
-
saveState
public void saveState(java.lang.StringBuffer buf, int howMuchState, int stateFlag) throws java.lang.UnsupportedOperationException
Description copied from interface:Persistable
Saves and stores a component's state into aStringBuffer
. The returned state should be HTML friendly.There are generally two formats of the saved state: flat state and XML representation. The minimum state is saved in flat state format, while the typical and maximum states are saved in XML string representation.
- Specified by:
saveState
in interfacePersistable
- Overrides:
saveState
in classAbstractPersistable
- Parameters:
buf
- a StringBuffer to store the saved state.howMuchState
- how much state information to save (EnumWebPersistableState
).stateFlag
- bit-wise flag to indicate additional information about the state (EnumWebStateFlags
).- Throws:
java.lang.UnsupportedOperationException
- thrown if the component does not support this method, or does not support certainhowMuchState
level.- Since:
- MicroStrategy Web 9.0.0
-
doFlatState
protected void doFlatState(FlatStateSerializer ser, int howMuchState, FlatStateTokenizer tok)
Proceses the save/restore state opperation of the AppComponent- Overrides:
doFlatState
in classAbstractPersistable
- Parameters:
ser
- an instance of theFlatStateSerializer
object to usehowMuchState
- defines how much information needs to be savedtok
- an instance of theFlatStateTokenizer
object to use
-
isCookieOpen
protected boolean isCookieOpen(java.lang.String key)
Checks if the given key is marked as opened- Parameters:
key
-String
value with the key to look for on cookie values- Returns:
- true if the element is open as indicated by cookies.
- Since:
- MicroStrategy Web 9.0.0
-
-