Class AbstractPersistable

    • Field Detail

      • scriptEndTagEncoder

        protected ScriptVariableJSONEncoder scriptEndTagEncoder
        reference to encoder that deals with tag encoding
    • Constructor Detail

      • AbstractPersistable

        public AbstractPersistable()
    • Method Detail

      • isXMLStateZipped

        protected boolean isXMLStateZipped()
        Since:
        MicroStrategy Web 8.1.1
      • 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
        Returns:
        the serialized state of a component.
      • 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
        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
        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
        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
      • restoreState

        public boolean restoreState​(java.lang.String state)
        Description copied from interface: Persistable
        Restores a component based on its saved state.
        Specified by:
        restoreState in interface Persistable
        Parameters:
        state - the state of a component
        Returns:
        true if restoration succeeds.
      • restoreState

        public boolean restoreState​(SAXSupport parser,
                                    java.lang.String uri,
                                    java.lang.String localName,
                                    java.lang.String qName,
                                    org.xml.sax.Attributes attrs)
        Description copied from interface: Persistable
        Restores a component from an embedded XML during a SAX parsing.
        Specified by:
        restoreState in interface Persistable
        Parameters:
        parser - a SAX parser processing the XML representation of a state
        uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed
        localName - The local name (without prefix), or the empty string if Namespace processing is not being performed
        qName - The qualified name (with prefix), or the empty string if qualified names are not available
        attrs - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object
        Returns:
        true to indicate a successful restoration. Otherwise, false will be returned.
      • saveXMLState

        protected void saveXMLState​(java.lang.StringBuffer buf,
                                    int howMuchState)
      • saveXMLState

        protected void saveXMLState​(java.lang.StringBuffer buf,
                                    int howMuchState,
                                    int stateFlag)
        Since:
        MicroStrategy Web 9.0.0
      • restoreXMLState

        protected void restoreXMLState​(java.lang.String state)
                                throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • getStateHandler

        protected AbstractHandler getStateHandler()
                                           throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException