Class StandaloneHandler

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LinkBuilder element​(int element)
      Option to specify the document element to view.
      LinkBuilder firstElement()
      Option to specify the first document element to view.
      java.lang.String toLink​(java.lang.String baseURL)
      Builds the weblink url with given baseURL.
      java.lang.String toSecureLink​(java.lang.String baseURL)
      Builds a secure weblink url with given baseURL.
      boolean validate​(java.lang.String secure)
      Validates the build link with the given secure hash.
      static ElementBuilder with​(ResultProperties document)
      Creates a builder enclosed by the given document.
      static ElementBuilder with​(java.lang.String versionId)
      Creates a builder with the given versionId (the XHDOC) of the document to view.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • with

        public static ElementBuilder with​(ResultProperties document)
                                   throws com.saperion.util.LinkCreationException
        Creates a builder enclosed by the given document. The resulting link can be used to view the given document in the viewer.zul.
        Parameters:
        document - The document to view.
        Returns:
        an ElementBuilder to enclose the document element to view.
        Throws:
        com.saperion.util.LinkCreationException - if an error occurs.
      • with

        public static ElementBuilder with​(java.lang.String versionId)
        Creates a builder with the given versionId (the XHDOC) of the document to view. The resulting link can be used to view the given document in the viewer.zul.
        Parameters:
        versionId - The versionId (the XHDOC) of the document to view.
        Returns:
        an ElementBuilder to enclose the document element to view.
      • element

        public LinkBuilder element​(int element)
        Description copied from interface: ElementBuilder
        Option to specify the document element to view.
        Specified by:
        element in interface ElementBuilder
        Parameters:
        element - the element
        Returns:
        the LinkBuilder
      • toLink

        public java.lang.String toLink​(java.lang.String baseURL)
        Description copied from interface: LinkBuilder
        Builds the weblink url with given baseURL.
        Specified by:
        toLink in interface LinkBuilder
        Parameters:
        baseURL - the base url
        Returns:
        the string
      • toSecureLink

        public java.lang.String toSecureLink​(java.lang.String baseURL)
                                      throws com.saperion.util.LinkCreationException
        Description copied from interface: LinkBuilder
        Builds a secure weblink url with given baseURL.
        Specified by:
        toSecureLink in interface LinkBuilder
        Parameters:
        baseURL - the base url
        Returns:
        the secure link.
        Throws:
        com.saperion.util.LinkCreationException - when the link could not be created
      • validate

        public boolean validate​(java.lang.String secure)
        Description copied from interface: LinkValidator
        Validates the build link with the given secure hash.
        Specified by:
        validate in interface LinkValidator
        Parameters:
        secure - the hash to validate the link with.
        Returns:
        true, if the link is valid, false otherwise.