Class VersionImpl

  • All Implemented Interfaces:
    Serializable, Version

    public class VersionImpl
    extends 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 Detail

      • VersionImpl

        public VersionImpl​(Map<String,​Serializable> versionProperties,
                           NodeRef nodeRef)
        Constructor that initialises the state of the version object.
        Parameters:
        versionProperties - the version properties
        nodeRef - the forzen state node reference
    • Method Detail

      • getFrozenModifiedDate

        public 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 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 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 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 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 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 Map<String,​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 Serializable getVersionProperty​(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 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 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)