Interface PageState

    • Method Detail

      • getId

        String getId()
        Return the identifier of this PageState.
        Returns:
        the identifier of this PageState
      • getName

        String getName()
        Return the (human readable) name of this PageState.
        Returns:
        the (human readable) name of this PageState
      • getPath

        String getPath()
        Return the logical path info of the PageState.

        This path info must be translated into a physical URI or client-side route information by an application. In the definition level, this path info doesn't imply any physical translations by itself.

        Returns:
        the logical path info of the PageState
      • getIndex

        int getIndex()
        Return the internal index, which is the same as definition order in the backend, of the PageState.
        Returns:
        the internal index, which is the same as definition order in the backend, of the PageState
      • getMetadata

        Map<String,​String> getMetadata()
        Return an unmodifiable metadata map of the PageState.
        Returns:
        an unmodifiable metadata map of the PageState
      • isErrorsEmpty

        boolean isErrorsEmpty()
        Return true if there's no application error at runtime in this PageState.

        The application errors can be added, retrieved and removed by applications for an easier application development.

        Returns:
        true if there's no application error at runtime in this PageState
      • addErrors

        Errors addErrors​(String name,
                         Errors errors)
        Add an application specific Errors by the name to this PageState.

        The name can be used by applications to distinguish the sources of errors. e.g, field name.

        Parameters:
        name - application specific source name of the errors.
        errors - Errors object
        Returns:
        the previous Errors value associated with name, or null if there was no mapping for the name
      • addAllErrors

        void addAllErrors​(Map<String,​Errors> errorsMap)
        Add an application specific map of Errors, each entry of which is paired with name and Errors object to this PageState.
        Parameters:
        errorsMap - an application specific map of Errors, each entry of which is paired with name and Errors object
      • removeErrors

        Errors removeErrors​(String name)
        Remove the application specific Errors by the name from this PageState.

        The name can be used by applications to distinguish the sources of errors. e.g, field name.

        Parameters:
        name - application specific source name of the errors.
        Returns:
        the previous Errors value associated with name, or null if there was no mapping for the name
      • getErrorsMap

        Map<String,​Errors> getErrorsMap()
        Return an application specific map of Errors, each entry of which is paired with name and Errors object in this PageState.
        Returns:
        an application specific map of Errors, each entry of which is paired with name and Errors object in this PageState
      • clearAllErrors

        void clearAllErrors()
        Clear all the application specific Errors in this PageState.
      • equals

        boolean equals​(Object o)
        Compares the specified object with this PageState for equality.
        Overrides:
        equals in class Object
        Parameters:
        o - the object to be compared for equality with this PageState
        Returns:
        true if the specified object is equal to this PageState
      • hashCode

        int hashCode()
        Returns the hash code value for this PageState.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code value for this PageState