Class VersionImpl

  • All Implemented Interfaces:
    java.io.Serializable, Version

    public class VersionImpl
    extends java.lang.Object
    implements Version
    Version class implementation. Used to represent the data about a version stored in a version store.
    Author:
    Roy Wetherall
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      VersionImpl​(java.util.Map<java.lang.String,​java.io.Serializable> versionProperties, org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Constructor that initialises the state of the version object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date getCreatedDate()
      Helper method to get the created date from the version property data.
      java.lang.String getCreator()
      Helper method to get the creator of the version.
      java.lang.String getDescription()
      Helper method to get the version description.
      java.util.Date getFrozenModifiedDate()
      Helper method to get the frozen (original) modified date for this version of the node
      java.lang.String getFrozenModifier()
      Helper method to get the frozen (original) modifier for this version of the node
      org.alfresco.service.cmr.repository.NodeRef getFrozenStateNodeRef()
      Gets the reference to the node that contains the frozen state of the version.
      org.alfresco.service.cmr.repository.NodeRef getVersionedNodeRef()
      Gets a reference to the node that this version was created from.
      java.lang.String getVersionLabel()
      Helper method to get the version label from the version property data.
      java.util.Map<java.lang.String,​java.io.Serializable> getVersionProperties()
      Get the map containing the version property values
      java.io.Serializable getVersionProperty​(java.lang.String name)
      Gets the value of a named version property.
      VersionType getVersionType()
      Helper method to get the version type.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • VersionImpl

        public VersionImpl​(java.util.Map<java.lang.String,​java.io.Serializable> versionProperties,
                           org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Constructor that initialises the state of the version object.
        Parameters:
        versionProperties - the version properties
        nodeRef - the forzen state node reference
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getFrozenModifiedDate

        public java.util.Date getFrozenModifiedDate()
        Description copied from interface: Version
        Helper method to get the frozen (original) modified date for this version of the node
        Specified by:
        getFrozenModifiedDate in interface Version
        Returns:
        the modified date
      • getFrozenModifier

        public java.lang.String getFrozenModifier()
        Description copied from interface: Version
        Helper method to get the frozen (original) modifier for this version of the node
        Specified by:
        getFrozenModifier in interface Version
        Returns:
        the modifier
      • getCreatedDate

        public java.util.Date getCreatedDate()
        Description copied from interface: Version
        Helper method to get the created date from the version property data.
        Specified by:
        getCreatedDate in interface Version
        Returns:
        the date the version was created
      • getCreator

        public java.lang.String getCreator()
        Description copied from interface: Version
        Helper method to get the creator of the version.
        Specified by:
        getCreator in interface Version
        Returns:
        the creator of the version
      • getVersionLabel

        public java.lang.String getVersionLabel()
        Description copied from interface: Version
        Helper method to get the version label from the version property data.
        Specified by:
        getVersionLabel in interface Version
        Returns:
        the version label
      • getVersionType

        public VersionType getVersionType()
        Description copied from interface: Version
        Helper method to get the version type.
        Specified by:
        getVersionType in interface Version
        Returns:
        the value of the version type as an enum value
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Version
        Helper method to get the version description.
        Specified by:
        getDescription in interface Version
        Returns:
        the version description
      • getVersionProperties

        public java.util.Map<java.lang.String,​java.io.Serializable> getVersionProperties()
        Description copied from interface: Version
        Get the map containing the version property values
        Specified by:
        getVersionProperties in interface Version
        Returns:
        the map containing the version properties
      • getVersionProperty

        public java.io.Serializable getVersionProperty​(java.lang.String name)
        Description copied from interface: Version
        Gets the value of a named version property.
        Specified by:
        getVersionProperty in interface Version
        Parameters:
        name - the name of the property
        Returns:
        the value of the property
      • getVersionedNodeRef

        public org.alfresco.service.cmr.repository.NodeRef getVersionedNodeRef()
        Description copied from interface: Version
        Gets a reference to the node that this version was created from.

        Note that this reference will be to the current state of the versioned node which may now correspond to a later version.

        Specified by:
        getVersionedNodeRef in interface Version
        Returns:
        a node reference (to the versioned node in the 'live' store)
      • getFrozenStateNodeRef

        public org.alfresco.service.cmr.repository.NodeRef getFrozenStateNodeRef()
        Description copied from interface: Version
        Gets the reference to the node that contains the frozen state of the version.
        Specified by:
        getFrozenStateNodeRef in interface Version
        Returns:
        a node reference (to the version node in the 'version' store)