Package com.priint.pubserver.document
Class Document
- java.lang.Object
-
- com.priint.pubserver.document.Document
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
DocumentContent
public class Document extends java.lang.Object implements java.io.SerializableA document is represented by its absolute path in the pubserver repository. A valid path would be e.g. "/pubserver/myplugin/myconfig123.xml". A document contains meta data for the content element of the document.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDocument.DocumentPropertiesMeta data attributes describing a PubServer repository item.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDOCUMENT_NAMESPACE_PREFIXPrefix for pubserver content within repository.
-
Constructor Summary
Constructors Constructor Description Document()Instantiates a new Document.Document(java.lang.String path)Instantiates a new Document.Document(java.lang.String path, java.lang.String version)Instantiates a new Document.Document(java.lang.String path, java.lang.String version, java.lang.String created, java.lang.String createdBy)Instantiates a new Document.Document(java.lang.String path, java.lang.String version, java.util.Date created, java.lang.String createdBy)Instantiates a new Document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCreated()Gets created.java.lang.StringgetCreatedBy()Gets created by.java.util.DategetDateCreated()Retrieves the creation date as Date object, if string can be parsed as XML dateTime otherwise returns null.java.lang.StringgetDescription()Gets description.java.lang.StringgetHash()Gets hash.java.lang.StringgetLockClientId()Gets lock client id.java.lang.StringgetLocked()Gets locked.java.lang.StringgetLockedBy()Gets locked by.java.lang.StringgetLockedOn()Gets locked on.java.lang.StringgetLockRemoteAddr()Gets lock remote addr.java.lang.StringgetLockToken()Gets lock token.java.lang.StringgetName()Gets name.java.lang.StringgetPath()Gets path.java.util.Map<Document.DocumentProperties,java.lang.String>getProperties()Gets properties.java.lang.StringgetRevision()Gets revision.java.lang.StringgetType()Gets type.java.lang.StringgetVersion()Gets version.java.lang.BooleanisActive()Is active boolean.voidsetActive(java.lang.Boolean active)Sets active.voidsetCreated(java.lang.String created)Sets created.voidsetCreatedBy(java.lang.String createdBy)Sets created by.voidsetDateCreated(java.util.Date created)Saves a date into created string field, formatting according to XML dataTime specification.voidsetDescription(java.lang.String description)Sets description.voidsetHash(java.lang.String hash)Sets hash.voidsetLockClientId(java.lang.String lockClientId)Sets lock client id.voidsetLocked(java.lang.String locked)Sets locked.voidsetLockedBy(java.lang.String lockedBy)Sets locked by.voidsetLockedOn(java.lang.String lockedOn)Sets locked on.voidsetLockRemoteAddr(java.lang.String lockRemoteAddr)Sets lock remote addr.voidsetLockToken(java.lang.String lockToken)Sets lock token.voidsetName(java.lang.String name)Sets name.voidsetPath(java.lang.String path)Sets path.voidsetProperties(java.util.Map<Document.DocumentProperties,java.lang.String> properties)Sets properties.voidsetRevision(java.lang.String revision)Sets revision.voidsetType(java.lang.String type)Sets type.voidsetVersion(java.lang.String version)Sets version.
-
-
-
Field Detail
-
DOCUMENT_NAMESPACE_PREFIX
public static final java.lang.String DOCUMENT_NAMESPACE_PREFIX
Prefix for pubserver content within repository.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Document
public Document()
Instantiates a new Document.
-
Document
public Document(java.lang.String path)
Instantiates a new Document.- Parameters:
path- the path
-
Document
public Document(java.lang.String path, java.lang.String version)Instantiates a new Document.- Parameters:
path- the pathversion- the version
-
Document
public Document(java.lang.String path, java.lang.String version, java.lang.String created, java.lang.String createdBy)Instantiates a new Document.- Parameters:
path- the pathversion- the versioncreated- the createdcreatedBy- the created by
-
Document
public Document(java.lang.String path, java.lang.String version, java.util.Date created, java.lang.String createdBy)Instantiates a new Document.- Parameters:
path- the pathversion- the versioncreated- the createdcreatedBy- the created by
-
-
Method Detail
-
getPath
public java.lang.String getPath()
Gets path.- Returns:
- the path
-
setPath
public void setPath(java.lang.String path)
Sets path.- Parameters:
path- the path
-
getVersion
public java.lang.String getVersion()
Gets version.- Returns:
- the version
-
setVersion
public void setVersion(java.lang.String version)
Sets version.- Parameters:
version- the version
-
getCreated
public java.lang.String getCreated()
Gets created.- Returns:
- the created
-
getDateCreated
public java.util.Date getDateCreated()
Retrieves the creation date as Date object, if string can be parsed as XML dateTime otherwise returns null.- Returns:
- newly created Date object or null
-
setCreated
public void setCreated(java.lang.String created)
Sets created.- Parameters:
created- the created
-
setDateCreated
public void setDateCreated(java.util.Date created)
Saves a date into created string field, formatting according to XML dataTime specification.- Parameters:
created- the created
-
getCreatedBy
public java.lang.String getCreatedBy()
Gets created by.- Returns:
- the created by
-
setCreatedBy
public void setCreatedBy(java.lang.String createdBy)
Sets created by.- Parameters:
createdBy- the created by
-
getRevision
public java.lang.String getRevision()
Gets revision.- Returns:
- the revision
-
setRevision
public void setRevision(java.lang.String revision)
Sets revision.- Parameters:
revision- the revision
-
getName
public java.lang.String getName()
Gets name.- Returns:
- the name
-
setName
public void setName(java.lang.String name)
Sets name.- Parameters:
name- the name
-
getType
public java.lang.String getType()
Gets type.- Returns:
- the type
-
setType
public void setType(java.lang.String type)
Sets type.- Parameters:
type- the type
-
getProperties
public java.util.Map<Document.DocumentProperties,java.lang.String> getProperties()
Gets properties.- Returns:
- the properties
-
setProperties
public void setProperties(java.util.Map<Document.DocumentProperties,java.lang.String> properties)
Sets properties.- Parameters:
properties- the properties
-
getDescription
public java.lang.String getDescription()
Gets description.- Returns:
- the description
-
setDescription
public void setDescription(java.lang.String description)
Sets description.- Parameters:
description- the description
-
isActive
public java.lang.Boolean isActive()
Is active boolean.- Returns:
- the boolean
-
setActive
public void setActive(java.lang.Boolean active)
Sets active.- Parameters:
active- the active
-
getLocked
public java.lang.String getLocked()
Gets locked.- Returns:
- the locked
-
setLocked
public void setLocked(java.lang.String locked)
Sets locked.- Parameters:
locked- the locked
-
getLockedOn
public java.lang.String getLockedOn()
Gets locked on.- Returns:
- the locked on
-
setLockedOn
public void setLockedOn(java.lang.String lockedOn)
Sets locked on.- Parameters:
lockedOn- the locked on
-
getLockedBy
public java.lang.String getLockedBy()
Gets locked by.- Returns:
- the locked by
-
setLockedBy
public void setLockedBy(java.lang.String lockedBy)
Sets locked by.- Parameters:
lockedBy- the locked by
-
getLockRemoteAddr
public java.lang.String getLockRemoteAddr()
Gets lock remote addr.- Returns:
- the lock remote addr
-
setLockRemoteAddr
public void setLockRemoteAddr(java.lang.String lockRemoteAddr)
Sets lock remote addr.- Parameters:
lockRemoteAddr- the lock remote addr
-
getLockClientId
public java.lang.String getLockClientId()
Gets lock client id.- Returns:
- the lock client id
-
setLockClientId
public void setLockClientId(java.lang.String lockClientId)
Sets lock client id.- Parameters:
lockClientId- the lock client id
-
getLockToken
public java.lang.String getLockToken()
Gets lock token.- Returns:
- the lock token
-
setLockToken
public void setLockToken(java.lang.String lockToken)
Sets lock token.- Parameters:
lockToken- the lock token
-
getHash
public java.lang.String getHash()
Gets hash.- Returns:
- the hash
-
setHash
public void setHash(java.lang.String hash)
Sets hash.- Parameters:
hash- the hash
-
-