Class DefaultPageState

    • Method Detail

      • getId

        public String getId()
        Description copied from interface: PageState
        Return the identifier of this PageState.
        Specified by:
        getId in interface PageState
        Returns:
        the identifier of this PageState
      • getName

        public String getName()
        Description copied from interface: PageState
        Return the (human readable) name of this PageState.
        Specified by:
        getName in interface PageState
        Returns:
        the (human readable) name of this PageState
      • getPath

        public String getPath()
        Description copied from interface: PageState
        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.

        Specified by:
        getPath in interface PageState
        Returns:
        the logical path info of the PageState
      • getIndex

        public int getIndex()
        Description copied from interface: PageState
        Return the internal index, which is the same as definition order in the backend, of the PageState.
        Specified by:
        getIndex in interface PageState
        Returns:
        the internal index, which is the same as definition order in the backend, of the PageState
      • getMetadata

        public Map<String,​String> getMetadata()
        Description copied from interface: PageState
        Return an unmodifiable metadata map of the PageState.
        Specified by:
        getMetadata in interface PageState
        Returns:
        an unmodifiable metadata map of the PageState
      • isErrorsEmpty

        public boolean isErrorsEmpty()
        Description copied from interface: PageState
        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.

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

        public Errors addErrors​(String name,
                                Errors errors)
        Description copied from interface: PageState
        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.

        Specified by:
        addErrors in interface PageState
        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

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

        public Errors removeErrors​(String name)
        Description copied from interface: PageState
        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.

        Specified by:
        removeErrors in interface PageState
        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

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

        public void clearAllErrors()
        Description copied from interface: PageState
        Clear all the application specific Errors in this PageState.
        Specified by:
        clearAllErrors in interface PageState
      • equals

        public boolean equals​(Object o)
        Description copied from interface: PageState
        Compares the specified object with this PageState for equality.
        Specified by:
        equals in interface PageState
        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

        public int hashCode()
        Description copied from interface: PageState
        Returns the hash code value for this PageState.
        Specified by:
        hashCode in interface PageState
        Overrides:
        hashCode in class Object
        Returns:
        the hash code value for this PageState