| Modifier | Constructor and Description |
|---|---|
protected |
DocumentViewPresenter()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDownload(int maskRights,
DocumentId documentId)
Checks if downloading an item is allowed in this mask.
|
boolean |
canEditAnnotations(OpenDocumentBean bean)
Checks if the user can edit the annotations.
|
boolean |
canEditDocument(DocumentId id)
Checks if the document can be edited.
|
boolean |
canView(DocumentId documentId)
Checks if the document can be opened in viewer.
|
void |
checkConnection()
Checks if the connection to the backend is still alive.
|
void |
downloadAsZip(List<Content> content)
Triggers a download of a ZIP containing the specified content.
|
void |
downloadSingle(DocumentId docId,
String filename,
int element)
Triggers the download of a single document.
|
DocumentArchiveMetaInfo |
getArchiveMetaInfo(DocumentId documentId,
boolean currentRevision,
boolean previewMode)
Gets the archive meta info.
|
List<Content> |
getContentListForLink(DocumentId id,
DocumentArchiveMetaInfo linkMetaInfo)
Returns a list of
Content of a linked document. |
ResultProperties |
getDocumentInfo(DocumentId id)
Returns the database meta-info of the document with the specified ID.
|
long |
getElementSize(DocumentId id,
int element)
Determines the size of the element.
|
Map<Integer,Long> |
getElementSizes(DocumentId id,
List<Integer> elementsWithoutSize)
Determines the sizes of the list of elements.
|
String |
getLinkFilename(DocumentArchiveMetaInfo archiveMetaInfo)
Returns the file name for a linked element.
|
long |
getLinkFileSize(DocumentArchiveMetaInfo linkInfo)
Returns the file size of a linked document.
|
String |
getNotes(String hDoc)
Reads the notes element for the given document id.
|
InputStream |
getStream(DocumentId id,
int element)
Gets the document's content as stream.
|
String |
resolveLatestRevision(String originalHdoc)
Resolves the latest revision of the document with the specified HDOC.
|
void |
writeNotes(DocumentId documentId,
String text)
Writes the text to the notes element or creates a new one.
|
public DocumentArchiveMetaInfo getArchiveMetaInfo(DocumentId documentId, boolean currentRevision, boolean previewMode) throws NgcUiException, AuthenticationException
documentId - the document idcurrentRevision - if true, the latest revision of the document will be retrievedpreviewMode - used to decide if the document will be opened in the preview viewer or notNgcUiException - exception to be handled by viewAuthenticationException - re-logon requiredpublic boolean canEditDocument(DocumentId id) throws AuthenticationException, NgcUiException
id - document idAuthenticationException - authentication exceptionNgcUiException - exception that causes an error windowpublic String getNotes(String hDoc) throws AuthenticationException, NgcUiException
hDoc - Document idAuthenticationException - authentication exceptionNgcUiException - exception that causes an error windowpublic void writeNotes(DocumentId documentId, String text) throws AuthenticationException, NgcUiException
documentId - Document IDtext - TextAuthenticationException - authentication exceptionNgcUiException - exception that causes an error windowpublic void checkConnection()
throws AuthenticationException,
NgcUiException
AuthenticationException - if re-logon is requiredNgcUiException - if checking the connection failedpublic Map<Integer,Long> getElementSizes(DocumentId id, List<Integer> elementsWithoutSize) throws NgcUiException, AuthenticationException
id - document idelementsWithoutSize - List of elements that have no file size.NgcUiException - exception to be handled by viewAuthenticationException - Authentication exceptionpublic long getElementSize(DocumentId id, int element) throws NgcUiException, AuthenticationException
id - document idelement - element numberNgcUiException - exception to be handled by viewAuthenticationException - Authentication exceptionpublic InputStream getStream(DocumentId id, int element) throws NgcUiException, AuthenticationException
id - the id of the documentelement - the element to retrieveNgcUiException - exception to be handled by viewAuthenticationException - authentication exceptionpublic boolean canEditAnnotations(OpenDocumentBean bean) throws NgcUiException, AuthenticationException
bean - the open-document-beanNgcUiException - exception to be handled by viewAuthenticationException - re-logon requiredpublic boolean canView(DocumentId documentId) throws NgcUiException
documentId - id of the documentNgcUiException - exception to be handled by viewpublic boolean canDownload(int maskRights,
DocumentId documentId)
throws NgcUiException
maskRights - rights on this maskdocumentId - id of the current documentNgcUiException - exception to be handled by viewpublic long getLinkFileSize(DocumentArchiveMetaInfo linkInfo)
linkInfo - archive info of the linked elementpublic String getLinkFilename(DocumentArchiveMetaInfo archiveMetaInfo)
archiveMetaInfo - archive info of the linked elementpublic List<Content> getContentListForLink(DocumentId id, DocumentArchiveMetaInfo linkMetaInfo) throws NgcUiException, AuthenticationException
Content of a linked document.id - id of the linked documentlinkMetaInfo - archive info of the linkContentNgcUiException - exception to be handled by viewAuthenticationException - re-logon requiredpublic void downloadAsZip(List<Content> content) throws AuthenticationException, NgcUiException
content - content to downloadAuthenticationException - re-logon requiredNgcUiException - exception to be handled by viewpublic void downloadSingle(DocumentId docId, String filename, int element) throws AuthenticationException, NgcUiException
docId - id of the document to downloadfilename - name of the fileelement - element to downloadAuthenticationException - re-logon requiredNgcUiException - exception to be handled by viewpublic String resolveLatestRevision(String originalHdoc) throws NgcUiException, AuthenticationException
originalHdoc - HDOC to resolveNgcUiException - system error when resolving revisionAuthenticationException - re-logon requiredpublic ResultProperties getDocumentInfo(DocumentId id) throws NgcUiException, AuthenticationException
id - document's IDNgcUiException - exception to be handled by viewAuthenticationException - re-logon requiredCopyright © 2016 Lexmark Enterprise Software Deutschland GmbH. All rights reserved.