Class AbstractPersistableAppComponent

    • 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
    • Constructor Detail

      • AbstractPersistableAppComponent

        public AbstractPersistableAppComponent()
        Since:
        MicroStrategy Web 9.0.0
      • AbstractPersistableAppComponent

        protected AbstractPersistableAppComponent​(boolean needEventHandler)
        Since:
        MicroStrategy Web 9.0.0
    • Method Detail

      • saveState

        public java.lang.String saveState()
        Description copied from interface: Persistable
        Returns a java.lang.String representation of a component. The returned state should be HTML friendly. This method call is equivalent to call saveState(EnumWebPersistableState.TYPICAL_STATE_INFO).
        Specified by:
        saveState in interface Persistable
        Overrides:
        saveState in class AbstractPersistable
        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
      • saveState

        public java.lang.String saveState​(int howMuchState)
        Description copied from interface: Persistable
        Returns a java.lang.String representation of a component. The returned state should be HTML friendly. This method call is equivalent to call saveState(new StringBuffer(), howMuchState).
        Specified by:
        saveState in interface Persistable
        Overrides:
        saveState in class AbstractPersistable
        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 a StringBuffer. 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 interface Persistable
        Overrides:
        saveState in class AbstractPersistable
        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 certain howMuchState 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 a StringBuffer. 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 interface Persistable
        Overrides:
        saveState in class AbstractPersistable
        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 certain howMuchState level.
        Since:
        MicroStrategy Web 9.0.0
      • 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