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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddownloadDocument(@NotNull File target)This is a shortcut forDocumentManager.downloadDocument(RestDocument, OutputStream)and Attempts to download and write theRestDocumentto the givenFile.voiddownloadDocument(@NotNull OutputStream target)This is a shortcut forDocumentManager.downloadDocument(RestDocument, OutputStream)and Attempts to download and write theRestDocumentto the givenOutputStream.@NotNull DocumentFilegetDocumentFile()Returns theDocumentFileof the managedRestDocument.@NotNull StringgetDocumentId()Returns the document ID of the managedRestDocument.@NotNull List<HistoryEntry>getHistory()Returns theHistoryEntrys of the managedRestDocument.@NotNull HistoryEntrygetHistoryEntry(int historyId)Returns aHistoryEntryfrom the internal history map, by given history ID.-
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.
-
-