Class VersionHistoryNode

  • All Implemented Interfaces:
    java.io.Serializable, TemplateContent, TemplateNodeRef, TemplateProperties, org.alfresco.service.namespace.NamespacePrefixResolverProvider

    public class VersionHistoryNode
    extends BaseContentNode
    implements org.alfresco.service.namespace.NamespacePrefixResolverProvider
    Template Node wrapper representing a record in the version history of a node. Provides access to basic properties and version information for the frozen state record.
    Author:
    Kevin Roast
    See Also:
    Serialized Form
    • Constructor Detail

      • VersionHistoryNode

        public VersionHistoryNode​(Version version,
                                  TemplateNode parent,
                                  ServiceRegistry services)
        Constructor
        Parameters:
        version - Descriptor of the node version information
    • Method Detail

      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface TemplateNodeRef
        Returns:
        The GUID for the frozen state NodeRef
      • getNodeRef

        public org.alfresco.service.cmr.repository.NodeRef getNodeRef()
        Specified by:
        getNodeRef in interface TemplateNodeRef
        Returns:
        Returns the frozen state NodeRef this record represents
      • getType

        public org.alfresco.service.namespace.QName getType()
        Specified by:
        getType in interface TemplateNodeRef
        Returns:
        Returns the type.
      • getName

        public java.lang.String getName()
        Helper method to get the item name.
        Specified by:
        getName in interface TemplateNodeRef
        Returns:
        the item name
      • getTitle

        public java.lang.String getTitle()
        Helper method to get the item title.
        Returns:
        the item name
      • getCreatedDate

        public java.util.Date getCreatedDate()
        Helper method to get the created date from the version property data.
        Returns:
        the date the version was created
      • getCreator

        public java.lang.String getCreator()
        Helper method to get the creator of the version.
        Returns:
        the creator of the version
      • getVersionLabel

        public java.lang.String getVersionLabel()
        Helper method to get the version label from the version property data.
        Returns:
        the version label
      • getIsMajorVersion

        public boolean getIsMajorVersion()
        Helper method to get the version type.
        Returns:
        true if this is a major version, false otherwise.
      • getDescription

        public java.lang.String getDescription()
        Helper method to get the version description.
        Returns:
        the version description
      • getProperties

        public java.util.Map<java.lang.String,​java.io.Serializable> getProperties()
        Get the map containing the version property values.
        Specified by:
        getProperties in interface TemplateProperties
        Returns:
        the map containing the version properties
      • hasAspect

        public boolean hasAspect​(java.lang.String aspect)
        Specified by:
        hasAspect in interface TemplateProperties
        Overrides:
        hasAspect in class BaseContentNode
        Parameters:
        aspect - The aspect name to test for
        Returns:
        true if the node has the aspect false otherwise
      • getNamespacePrefixResolver

        public org.alfresco.service.namespace.NamespacePrefixResolver getNamespacePrefixResolver()
        Specified by:
        getNamespacePrefixResolver in interface org.alfresco.service.namespace.NamespacePrefixResolverProvider
      • getUrl

        public java.lang.String getUrl()
        Specified by:
        getUrl in interface TemplateContent
        Overrides:
        getUrl in class BaseContentNode
        Returns:
        Returns the URL to the content stream for the frozen state of the node from the default content property (@see ContentModel.PROP_CONTENT)