Class HylandViewerUtil

  • All Implemented Interfaces:
    java.io.Serializable

    public final class HylandViewerUtil
    extends java.lang.Object
    implements java.io.Serializable
    Utility class for the Hyland Viewer.
    Author:
    schowdhury
    See Also:
    Serialized Form
    • Constructor Detail

      • HylandViewerUtil

        public HylandViewerUtil​(javax.servlet.http.HttpServletRequest httpRequest,
                                javax.servlet.http.HttpSession session)
    • Method Detail

      • constructViewerDocumentUrl

        public java.lang.String constructViewerDocumentUrl​(javax.servlet.http.HttpServletRequest httpRequest,
                                                           java.lang.String sessionId)
        Construct the url to retrieve the document with the given sessionId
        Parameters:
        sessionId - the id of the document from hyland rendering and conversion service
        Returns:
        url as string
      • constructViewerDocumentUrl

        public java.lang.String constructViewerDocumentUrl​(javax.servlet.http.HttpServletRequest httpRequest,
                                                           java.lang.String sessionId,
                                                           java.lang.String revisionId,
                                                           int elementNumber,
                                                           java.lang.String name)
        Construct the url to retrieve the document with the given sessionId
        Parameters:
        sessionId - the id of the document from hyland rendering and conversion service
        revisionId - the revisionId of the document
        elementNumber - the elementNumber of the document
        name - the name of the document
        Returns:
        url as string
      • constructViewerTempDocumentUrl

        public java.lang.String constructViewerTempDocumentUrl​(javax.servlet.http.HttpServletRequest httpRequest,
                                                               java.lang.String sessionId)
        Construct the temporary document url with the given session id of the document
        Parameters:
        sessionId - the id of the document from hyland rendering and conversion service
        Returns:
        url as string
      • uploadDocument

        public java.lang.String uploadDocument​(java.lang.String revisionId,
                                               int elementNumber,
                                               java.lang.String name,
                                               boolean editMode)
        Get the session id of a document
        Parameters:
        revisionId - hdoc of a structure
        elementNumber - element ID. Used only for structured documents to identify the page
        name - name of an element in a structured document
        Returns:
        the session id of a document
      • uploadTemporaryDocument

        public java.lang.String uploadTemporaryDocument​(TemporaryDocumentId id)
        Get the session id of a temporary document
        Parameters:
        id - a reference to the temporary document
        Returns:
        the session id of a temporary document
      • getStructureInfo

        public DocumentStructureInfo getStructureInfo​(java.lang.String revisionId)
        Get the structure information of a document
        Parameters:
        revisionId - hdoc of a structure
        Returns:
        DocumentStructureInfo the structure information of a document