Package org.alfresco.repo.template
Class VersionHistoryNode
java.lang.Object
org.alfresco.repo.template.BaseContentNode
org.alfresco.repo.template.VersionHistoryNode
- All Implemented Interfaces:
Serializable,TemplateContent,TemplateNodeRef,TemplateProperties,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:
-
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
ConstructorsConstructorDescriptionVersionHistoryNode(Version version, TemplateNode parent, ServiceRegistry services) Constructor -
Method Summary
Modifier and TypeMethodDescriptionHelper method to get the created date from the version property data.Helper method to get the creator of the version.Helper method to get the version description.getId()booleanHelper method to get the version type.getName()Helper method to get the item name.Get the map containing the version property values.getTitle()Helper method to get the item title.getType()getUrl()Helper method to get the version label from the version property data.booleanMethods 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 Details
-
VersionHistoryNode
Constructor- Parameters:
version- Descriptor of the node version information
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceTemplateNodeRef- Returns:
- The GUID for the frozen state NodeRef
-
getNodeRef
- Specified by:
getNodeRefin interfaceTemplateNodeRef- Returns:
- Returns the frozen state NodeRef this record represents
-
getType
- Specified by:
getTypein interfaceTemplateNodeRef- Returns:
- Returns the type.
-
getName
Helper method to get the item name.- Specified by:
getNamein interfaceTemplateNodeRef- Returns:
- the item name
-
getTitle
Helper method to get the item title.- Returns:
- the item name
-
getCreatedDate
Helper method to get the created date from the version property data.- Returns:
- the date the version was created
-
getCreator
Helper method to get the creator of the version.- Returns:
- the creator of the version
-
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
Helper method to get the version description.- Returns:
- the version description
-
getProperties
Get the map containing the version property values.- Specified by:
getPropertiesin interfaceTemplateProperties- Returns:
- the map containing the version properties
-
getAspects
- Specified by:
getAspectsin interfaceTemplateProperties- Overrides:
getAspectsin classBaseContentNode- Returns:
- The list of aspects applied to this node
-
hasAspect
- 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
- Specified by:
getChildrenin interfaceTemplateProperties- Overrides:
getChildrenin classBaseContentNode- Returns:
- The children of this Node as objects that support the TemplateProperties contract.
- See Also:
-
getParent
- Specified by:
getParentin interfaceTemplateProperties- Returns:
- the primary parent of this node
- See Also:
-
getNamespacePrefixResolver
- Specified by:
getNamespacePrefixResolverin interfaceNamespacePrefixResolverProvider
-
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)
-