Class HylandViewerUtil
- java.lang.Object
-
- com.saperion.ngc.viewer.hylandviewer.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 Summary
Constructors Constructor Description HylandViewerUtil(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
constructViewerDocumentUrl(javax.servlet.http.HttpServletRequest httpRequest, java.lang.String sessionId)
Construct the url to retrieve the document with the given sessionIdjava.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 sessionIdjava.lang.String
constructViewerTempDocumentUrl(javax.servlet.http.HttpServletRequest httpRequest, java.lang.String sessionId)
Construct the temporary document url with the given session id of the documentDocumentArchiveMetaInfo
getDocumentArchiveMetaInfo(DocumentId docId, boolean currentRevision)
Get the document archive meta information of a specific document.AnnotationDocInfo
getIniAnnotation(java.lang.String revisionId)
Get the annotation of a documentOpenDocumentBean
getOpenDocumentBean(DocumentId docId, boolean currentRevision, boolean editMode)
Get a OpenDocumentBean for a specific document id.DocumentStructureInfo
getStructureInfo(java.lang.String revisionId)
Get the structure information of a documentDocumentId
getUpdatedDocumentId(DocumentId docId)
Get the updated document id.boolean
isEditable(javax.servlet.http.HttpServletRequest request, ResultProperties documentInfo)
Check whether a document is editable.java.lang.String
uploadDocument(java.lang.String revisionId, int elementNumber, java.lang.String name, boolean editMode)
Get the session id of a documentjava.lang.String
uploadTemporaryDocument(TemporaryDocumentId id)
Get the session id of a temporary document
-
-
-
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 servicerevisionId
- the revisionId of the documentelementNumber
- the elementNumber of the documentname
- 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 structureelementNumber
- element ID. Used only for structured documents to identify the pagename
- 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
-
getIniAnnotation
public AnnotationDocInfo getIniAnnotation(java.lang.String revisionId) throws AuthenticationException, SystemException
Get the annotation of a document- Parameters:
revisionId
- hdoc of a structure- Returns:
- AnnotationDocInfo the annotation information comprising of ini string and document dimension
- Throws:
AuthenticationException
SystemException
-
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
-
getDocumentArchiveMetaInfo
public DocumentArchiveMetaInfo getDocumentArchiveMetaInfo(DocumentId docId, boolean currentRevision) throws SystemException, AuthenticationException
Get the document archive meta information of a specific document.- Parameters:
docId
-- Returns:
- Throws:
SystemException
AuthenticationException
-
getUpdatedDocumentId
public DocumentId getUpdatedDocumentId(DocumentId docId) throws SystemException, AuthenticationException, DocumentIdentificationException
Get the updated document id.- Parameters:
docId
-- Returns:
- Throws:
SystemException
AuthenticationException
DocumentIdentificationException
-
getOpenDocumentBean
public OpenDocumentBean getOpenDocumentBean(DocumentId docId, boolean currentRevision, boolean editMode) throws SystemException, AuthenticationException
Get a OpenDocumentBean for a specific document id.- Parameters:
docId
-currentRevision
-editMode
-- Returns:
- Throws:
SystemException
AuthenticationException
-
isEditable
public boolean isEditable(javax.servlet.http.HttpServletRequest request, ResultProperties documentInfo) throws SystemException, AuthenticationException, DocumentIdentificationException
Check whether a document is editable.- Parameters:
request
-documentInfo
-- Returns:
- Throws:
SystemException
AuthenticationException
DocumentIdentificationException
-
-