Interface RestDocument
-
- All Superinterfaces:
Document
- All Known Implementing Classes:
RestWebServiceDocument
public interface RestDocument extends Document
A class implementing
RestDocumentrepresents a document, that has been uploaded to a webPDF server.
-
-
Method Summary
-
Methods inherited from interface net.webpdf.wsclient.session.documents.Document
getSource, isFileSource
-
-
-
-
Method Detail
-
getDocumentId
@NotNull @NotNull String getDocumentId()
Returns the document ID of the managedRestDocument.- Returns:
- The document ID of the managed
RestDocument.
-
getDocumentFile
@NotNull @NotNull DocumentFile getDocumentFile()
Returns theDocumentFileof the managedRestDocument.- Returns:
- The
DocumentFileof the managedRestDocument.
-
getHistory
@NotNull @NotNull List<HistoryEntry> getHistory()
Returns theHistoryEntrys of the managedRestDocument.- Returns:
- The
HistoryEntrys of the managedRestDocument.
-
getHistoryEntry
@NotNull @NotNull HistoryEntry getHistoryEntry(int historyId) throws ResultException
Returns aHistoryEntryfrom the internal history map, by given history ID.- Parameters:
historyId- The history ID of theHistoryEntrythat shall be returned.- Returns:
- A
HistoryEntryrepresenting a historic state of the uploaded resource. - Throws:
ResultException- Shall be thrown, should accessing the document history fail.
-
downloadDocument
void downloadDocument(@NotNull @NotNull OutputStream target) throws ResultExceptionThis is a shortcut forDocumentManager.downloadDocument(RestDocument, OutputStream)and Attempts to download and write theRestDocumentto the givenOutputStream.- Parameters:
target- The targetOutputStreamtheRestDocumentshall be written to.- Throws:
ResultException- Shall be thrown, should writing the result document fail.
-
downloadDocument
void downloadDocument(@NotNull @NotNull File target) throws ResultExceptionThis is a shortcut forDocumentManager.downloadDocument(RestDocument, OutputStream)and Attempts to download and write theRestDocumentto the givenFile.- Parameters:
target- The targetFiletheRestDocumentshall be written to.- Throws:
ResultException- Shall be thrown, should writing the result document fail.
-
deleteDocument
void deleteDocument() throws ResultExceptionThis is a shortcut forDocumentManager.deleteDocument(java.lang.String)and deletes theRestDocument.- Throws:
ResultException- Shall be thrown, should deleting the document fail.
-
renameDocument
@NotNull @NotNull RestDocument renameDocument(@NotNull @NotNull String fileName) throws ResultException
This is a shortcut forDocumentManager.renameDocument(java.lang.String, java.lang.String)and renames theRestDocument.- Parameters:
fileName- The new name for theRestDocument.- Returns:
- The resulting
RestDocumenthandle. - Throws:
ResultException- Shall be thrown, should renaming the document have failed.
-
updateDocumentSecurity
RestDocument updateDocumentSecurity(@NotNull @NotNull PdfPasswordType passwordType) throws ResultException
This is a shortcut forDocumentManager.renameDocument(java.lang.String, java.lang.String)and updates the security information theRestDocument.- Parameters:
passwordType- The security information to update the document with- Returns:
- The updated
RestDocument. - Throws:
ResultException- Shall be thrown, should updating the document security have failed.
-
getDocumentInfo
DocumentInfo getDocumentInfo(@NotNull @NotNull DocumentInfoType infoType) throws ResultException
This is a shortcut forDocumentManager.renameDocument(java.lang.String, java.lang.String)and returnsDocumentInfoabout theRestDocument.- Parameters:
infoType- Detailed information for the document referenced by the unique documentId in the server“s document storage.- Returns:
- The requested document
DocumentInfo - Throws:
ResultException- Shall be thrown, should fetching the document info have failed.
-
extractDocument
List<? extends RestDocument> extractDocument(@NotNull @NotNull DocumentFileExtract fileExtract) throws ResultException
This is a shortcut forDocumentManager.extractDocument(java.lang.String, net.webpdf.wsclient.openapi.DocumentFileExtract)and extracts theRestDocument.- Parameters:
fileExtract-DocumentFileExtractsettings for unpacking the archive document.- Returns:
- A list of the extracted
RestDocuments. - Throws:
ResultException- Shall be thrown, should the extraction have failed.
-
-