Package org.alfresco.repo.version.common
Class VersionImpl
- java.lang.Object
-
- org.alfresco.repo.version.common.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
-
-
Field Summary
-
Fields inherited from interface org.alfresco.service.cmr.version.Version
PROP_DESCRIPTION
-
-
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.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.util.DategetFrozenModifiedDate()Helper method to get the frozen (original) modified date for this version of the nodejava.lang.StringgetFrozenModifier()Helper method to get the frozen (original) modifier for this version of the nodeorg.alfresco.service.cmr.repository.NodeRefgetFrozenStateNodeRef()Gets the reference to the node that contains the frozen state of the version.org.alfresco.service.cmr.repository.NodeRefgetVersionedNodeRef()Gets a reference to the node that this version was created from.java.lang.StringgetVersionLabel()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 valuesjava.io.SerializablegetVersionProperty(java.lang.String name)Gets the value of a named version property.VersionTypegetVersionType()Helper method to get the version type.java.lang.StringtoString()
-
-
-
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 propertiesnodeRef- the forzen state node reference
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getFrozenModifiedDate
public java.util.Date getFrozenModifiedDate()
Description copied from interface:VersionHelper method to get the frozen (original) modified date for this version of the node- Specified by:
getFrozenModifiedDatein interfaceVersion- Returns:
- the modified date
-
getFrozenModifier
public java.lang.String getFrozenModifier()
Description copied from interface:VersionHelper method to get the frozen (original) modifier for this version of the node- Specified by:
getFrozenModifierin interfaceVersion- Returns:
- the modifier
-
getCreatedDate
public java.util.Date getCreatedDate()
Description copied from interface:VersionHelper method to get the created date from the version property data.- Specified by:
getCreatedDatein interfaceVersion- Returns:
- the date the version was created
-
getCreator
public java.lang.String getCreator()
Description copied from interface:VersionHelper method to get the creator of the version.- Specified by:
getCreatorin interfaceVersion- Returns:
- the creator of the version
-
getVersionLabel
public java.lang.String getVersionLabel()
Description copied from interface:VersionHelper method to get the version label from the version property data.- Specified by:
getVersionLabelin interfaceVersion- Returns:
- the version label
-
getVersionType
public VersionType getVersionType()
Description copied from interface:VersionHelper method to get the version type.- Specified by:
getVersionTypein interfaceVersion- Returns:
- the value of the version type as an enum value
-
getDescription
public java.lang.String getDescription()
Description copied from interface:VersionHelper method to get the version description.- Specified by:
getDescriptionin interfaceVersion- Returns:
- the version description
-
getVersionProperties
public java.util.Map<java.lang.String,java.io.Serializable> getVersionProperties()
Description copied from interface:VersionGet the map containing the version property values- Specified by:
getVersionPropertiesin interfaceVersion- Returns:
- the map containing the version properties
-
getVersionProperty
public java.io.Serializable getVersionProperty(java.lang.String name)
Description copied from interface:VersionGets the value of a named version property.- Specified by:
getVersionPropertyin interfaceVersion- 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:VersionGets 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:
getVersionedNodeRefin interfaceVersion- 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:VersionGets the reference to the node that contains the frozen state of the version.- Specified by:
getFrozenStateNodeRefin interfaceVersion- Returns:
- a node reference (to the version node in the 'version' store)
-
-