Class RestWebServiceDocument
- java.lang.Object
-
- net.webpdf.wsclient.session.documents.AbstractDocument
-
- net.webpdf.wsclient.session.rest.documents.RestWebServiceDocument
-
- All Implemented Interfaces:
Document,RestDocument
public class RestWebServiceDocument extends AbstractDocument implements RestDocument
An instance of
RestWebServiceDocumentrepresents a document, that has been uploaded to a webPDF server.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddownloadDocument(@NotNull File target)This is a shortcut forDocumentManager.downloadDocument(RestDocument, OutputStream)and Attempts to download 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 class net.webpdf.wsclient.session.documents.AbstractDocument
getSource, isFileSource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.webpdf.wsclient.session.documents.Document
getSource, isFileSource
-
-
-
-
Method Detail
-
getDocumentId
@NotNull public @NotNull String getDocumentId()
Returns the document ID of the managedRestDocument.- Specified by:
getDocumentIdin interfaceRestDocument- Returns:
- The document ID of the managed
RestDocument.
-
getDocumentFile
@NotNull public @NotNull DocumentFile getDocumentFile()
Returns theDocumentFileof the managedRestDocument.- Specified by:
getDocumentFilein interfaceRestDocument- Returns:
- The
DocumentFileof the managedRestDocument.
-
getHistory
@NotNull public @NotNull List<HistoryEntry> getHistory()
Returns theHistoryEntrys of the managedRestDocument.- Specified by:
getHistoryin interfaceRestDocument- Returns:
- The
HistoryEntrys of the managedRestDocument.
-
getHistoryEntry
@NotNull public @NotNull HistoryEntry getHistoryEntry(int historyId) throws ResultException
Returns aHistoryEntryfrom the internal history map, by given history ID.- Specified by:
getHistoryEntryin interfaceRestDocument- 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
public void downloadDocument(@NotNull @NotNull OutputStream target) throws ResultExceptionThis is a shortcut forDocumentManager.downloadDocument(RestDocument, OutputStream)and Attempts to download and write theRestDocumentto the givenOutputStream.- Specified by:
downloadDocumentin interfaceRestDocument- Parameters:
target- The targetOutputStreamtheRestDocumentshall be written to.- Throws:
ResultException- Shall be thrown, should writing the result document fail.
-
downloadDocument
public void downloadDocument(@NotNull @NotNull File target) throws ResultExceptionThis is a shortcut forDocumentManager.downloadDocument(RestDocument, OutputStream)and Attempts to download write theRestDocumentto the givenFile.- Specified by:
downloadDocumentin interfaceRestDocument- Parameters:
target- The targetFiletheRestDocumentshall be written to.- Throws:
ResultException- Shall be thrown, should writing the result document fail.
-
-