Package org.alfresco.repo.template
Class VersionHistoryNode
- java.lang.Object
-
- org.alfresco.repo.template.BaseContentNode
-
- org.alfresco.repo.template.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.alfresco.repo.template.BaseContentNode
BaseContentNode.TemplateContentData
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.template.BaseContentNode
children, CONTENT_DOWNLOAD_PROP_URL, CONTENT_DOWNLOAD_URL, CONTENT_GET_PROP_URL, CONTENT_GET_URL, CONTENT_SERVICE_GET_PROP_URL, CONTENT_SERVICE_GET_URL, FOLDER_BROWSE_URL, imageResolver, NAMESPACE_BEGIN, services
-
-
Constructor Summary
Constructors Constructor Description VersionHistoryNode(Version version, TemplateNode parent, ServiceRegistry services)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<org.alfresco.service.namespace.QName>getAspects()java.util.List<TemplateProperties>getChildren()java.util.DategetCreatedDate()Helper method to get the created date from the version property data.java.lang.StringgetCreator()Helper method to get the creator of the version.java.lang.StringgetDescription()Helper method to get the version description.java.lang.StringgetId()booleangetIsMajorVersion()Helper method to get the version type.java.lang.StringgetName()Helper method to get the item name.org.alfresco.service.namespace.NamespacePrefixResolvergetNamespacePrefixResolver()org.alfresco.service.cmr.repository.NodeRefgetNodeRef()TemplatePropertiesgetParent()java.util.Map<java.lang.String,java.io.Serializable>getProperties()Get the map containing the version property values.java.lang.StringgetTitle()Helper method to get the item title.org.alfresco.service.namespace.QNamegetType()java.lang.StringgetUrl()java.lang.StringgetVersionLabel()Helper method to get the version label from the version property data.booleanhasAspect(java.lang.String aspect)-
Methods inherited from class org.alfresco.repo.template.BaseContentNode
getContent, getDisplayMimetype, getDisplayPath, getDownloadUrl, getEncoding, getHasChildren, getIcon16, getIcon32, getIcon64, getIsContainer, getIsDocument, getIsLinkToContainer, getIsLinkToDocument, getMimetype, getQnamePath, getServiceUrl, getSiteShortName, getSize, getWebdavUrl, isTemplateContent, isTemplateNodeRef, toString
-
-
-
-
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:
getIdin interfaceTemplateNodeRef- Returns:
- The GUID for the frozen state NodeRef
-
getNodeRef
public org.alfresco.service.cmr.repository.NodeRef getNodeRef()
- Specified by:
getNodeRefin interfaceTemplateNodeRef- Returns:
- Returns the frozen state NodeRef this record represents
-
getType
public org.alfresco.service.namespace.QName getType()
- Specified by:
getTypein interfaceTemplateNodeRef- Returns:
- Returns the type.
-
getName
public java.lang.String getName()
Helper method to get the item name.- Specified by:
getNamein interfaceTemplateNodeRef- 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:
getPropertiesin interfaceTemplateProperties- Returns:
- the map containing the version properties
-
getAspects
public java.util.Set<org.alfresco.service.namespace.QName> getAspects()
- Specified by:
getAspectsin interfaceTemplateProperties- Overrides:
getAspectsin classBaseContentNode- Returns:
- The list of aspects applied to this node
-
hasAspect
public boolean hasAspect(java.lang.String aspect)
- Specified by:
hasAspectin interfaceTemplateProperties- Overrides:
hasAspectin classBaseContentNode- Parameters:
aspect- The aspect name to test for- Returns:
- true if the node has the aspect false otherwise
-
getChildren
public java.util.List<TemplateProperties> getChildren()
- Specified by:
getChildrenin interfaceTemplateProperties- Overrides:
getChildrenin classBaseContentNode- Returns:
- The children of this Node as objects that support the TemplateProperties contract.
- See Also:
TemplateProperties.getChildren()
-
getParent
public TemplateProperties getParent()
- Specified by:
getParentin interfaceTemplateProperties- Returns:
- the primary parent of this node
- See Also:
TemplateProperties.getParent()
-
getNamespacePrefixResolver
public org.alfresco.service.namespace.NamespacePrefixResolver getNamespacePrefixResolver()
- Specified by:
getNamespacePrefixResolverin interfaceorg.alfresco.service.namespace.NamespacePrefixResolverProvider
-
getUrl
public java.lang.String getUrl()
- Specified by:
getUrlin interfaceTemplateContent- Overrides:
getUrlin classBaseContentNode- Returns:
- Returns the URL to the content stream for the frozen state of the node from the default content property (@see ContentModel.PROP_CONTENT)
-
-