Package com.priint.pubserver.document
Class DocumentContent
java.lang.Object
com.priint.pubserver.document.Document
com.priint.pubserver.document.DocumentContent
- All Implemented Interfaces:
Serializable
DocumentContent represents the @Document (metadata referenced by its absolute
path in our repository) together with its content.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.priint.pubserver.document.Document
Document.DocumentProperties -
Field Summary
Fields inherited from class com.priint.pubserver.document.Document
DOCUMENT_NAMESPACE_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new Document content.DocumentContent(String path, InputStream content) Instantiates a new Document content.DocumentContent(String path, InputStream content, Map<Document.DocumentProperties, String> properties) Instantiates a new Document content.DocumentContent(String path, String version, InputStream content) Instantiates a new Document content.DocumentContent(String path, String version, InputStream content, Map<Document.DocumentProperties, String> properties) Instantiates a new Document content. -
Method Summary
Modifier and TypeMethodDescriptionGets content.Read content string.voidsetContent(InputStream content) Sets content.show()Helper method to get a formatted string representation of the document content together with properties.Methods inherited from class com.priint.pubserver.document.Document
getCreated, getCreatedBy, getDateCreated, getDescription, getHash, getLockClientId, getLocked, getLockedBy, getLockedOn, getLockRemoteAddr, getLockToken, getName, getPath, getProperties, getRevision, getType, getVersion, isActive, setActive, setCreated, setCreatedBy, setDateCreated, setDescription, setHash, setLockClientId, setLocked, setLockedBy, setLockedOn, setLockRemoteAddr, setLockToken, setName, setPath, setProperties, setRevision, setType, setVersion
-
Constructor Details
-
DocumentContent
public DocumentContent()Instantiates a new Document content. -
DocumentContent
Instantiates a new Document content.- Parameters:
path- the pathcontent- the content
-
DocumentContent
Instantiates a new Document content.- Parameters:
path- the pathversion- the versioncontent- the content
-
DocumentContent
public DocumentContent(String path, InputStream content, Map<Document.DocumentProperties, String> properties) Instantiates a new Document content.- Parameters:
path- the pathcontent- the contentproperties- the properties
-
DocumentContent
public DocumentContent(String path, String version, InputStream content, Map<Document.DocumentProperties, String> properties) Instantiates a new Document content.- Parameters:
path- the pathversion- the versioncontent- the contentproperties- the properties
-
-
Method Details
-
getContent
Gets content.- Returns:
- the content
-
setContent
Sets content.- Parameters:
content- the content
-
readContent
Read content string.- Returns:
- the string
-
show
Helper method to get a formatted string representation of the document content together with properties.- Returns:
- content with properties as formatted string
-