Class Document

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    DocumentContent

    public class Document
    extends java.lang.Object
    implements java.io.Serializable
    A 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 class  Document.DocumentProperties
      Meta data attributes describing a PubServer repository item.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DOCUMENT_NAMESPACE_PREFIX
      Prefix 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.String getCreated()
      Gets created.
      java.lang.String getCreatedBy()
      Gets created by.
      java.util.Date getDateCreated()
      Retrieves the creation date as Date object, if string can be parsed as XML dateTime otherwise returns null.
      java.lang.String getDescription()
      Gets description.
      java.lang.String getHash()
      Gets hash.
      java.lang.String getLockClientId()
      Gets lock client id.
      java.lang.String getLocked()
      Gets locked.
      java.lang.String getLockedBy()
      Gets locked by.
      java.lang.String getLockedOn()
      Gets locked on.
      java.lang.String getLockRemoteAddr()
      Gets lock remote addr.
      java.lang.String getLockToken()
      Gets lock token.
      java.lang.String getName()
      Gets name.
      java.lang.String getPath()
      Gets path.
      java.util.Map<Document.DocumentProperties,​java.lang.String> getProperties()
      Gets properties.
      java.lang.String getRevision()
      Gets revision.
      java.lang.String getType()
      Gets type.
      java.lang.String getVersion()
      Gets version.
      java.lang.Boolean isActive()
      Is active boolean.
      void setActive​(java.lang.Boolean active)
      Sets active.
      void setCreated​(java.lang.String created)
      Sets created.
      void setCreatedBy​(java.lang.String createdBy)
      Sets created by.
      void setDateCreated​(java.util.Date created)
      Saves a date into created string field, formatting according to XML dataTime specification.
      void setDescription​(java.lang.String description)
      Sets description.
      void setHash​(java.lang.String hash)
      Sets hash.
      void setLockClientId​(java.lang.String lockClientId)
      Sets lock client id.
      void setLocked​(java.lang.String locked)
      Sets locked.
      void setLockedBy​(java.lang.String lockedBy)
      Sets locked by.
      void setLockedOn​(java.lang.String lockedOn)
      Sets locked on.
      void setLockRemoteAddr​(java.lang.String lockRemoteAddr)
      Sets lock remote addr.
      void setLockToken​(java.lang.String lockToken)
      Sets lock token.
      void setName​(java.lang.String name)
      Sets name.
      void setPath​(java.lang.String path)
      Sets path.
      void setProperties​(java.util.Map<Document.DocumentProperties,​java.lang.String> properties)
      Sets properties.
      void setRevision​(java.lang.String revision)
      Sets revision.
      void setType​(java.lang.String type)
      Sets type.
      void setVersion​(java.lang.String version)
      Sets version.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 path
        version - 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 path
        version - the version
        created - the created
        createdBy - 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 path
        version - the version
        created - the created
        createdBy - 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