public interface Revision
Revision
wraps a Version
,
providing easy access to the contained content (properties) and convenience methods for accessing often used asset
properties, such as e.g. the title.
Revisions of an asset are created via the Asset
interface. Access to existing versions and restoring
versions are handled via the AssetManager
.
Asset.createRevision(String, String)
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComment()
Return the optional comment for this revision.
|
java.util.Calendar |
getCreated()
Return the creation date.
|
java.lang.String |
getDescription()
Returns the description of this resource.
|
java.lang.String |
getId()
Return the unique version id (as provided by
Node.getIdentifier() ). |
java.lang.String |
getLabel()
Return the concatenated labels of the history for this version, as entered by the user during version creation,
or the value of
Item.getName() if no history labels are present. |
ValueMap |
getMetadataProperties()
Returns a
ValueMap containing the asset's metadata properties as frozen in
this revision (formerly the <asset-path>/jcr:content/metadata properties). |
java.lang.String |
getName()
Returns the name of the asset.
|
java.lang.String |
getParentPath()
Return the parent path of the asset.
|
ValueMap |
getProperties()
Returns a
ValueMap containing the asset's main content properties as frozen
in this revision (formerly the <asset-path>/jcr:content properties). |
ValueMap |
getProperties(java.lang.String relPath)
Returns a
ValueMap containing the content properties of the node addressed
via the relPath parameter. |
java.lang.String |
getRenditionPath(java.lang.String renditionName)
Return the path to the rendition
|
java.lang.String |
getTitle()
Returns the
dc:title of the asset or null if none defined. |
Version |
getVersion()
Returns the underlying version.
|
boolean |
isDeleted()
Return a flag indicating whether this revision belongs to a deleted asset.
|
Version getVersion()
ValueMap getProperties()
ValueMap
containing the asset's main content properties as frozen
in this revision (formerly the <asset-path>/jcr:content properties).ValueMap getMetadataProperties()
ValueMap
containing the asset's metadata properties as frozen in
this revision (formerly the <asset-path>/jcr:content/metadata properties).Asset.getMetadata()
,
Asset.getMetadata(String)
,
Asset.getMetadataValue(String)
ValueMap getProperties(java.lang.String relPath)
ValueMap
containing the content properties of the node addressed
via the relPath
parameter. The relPath
parameter must be a relative path (must not
start with a "/").
For example the content properties of one of the renditions contained in the asset's revision would be addressed as follows:
... ValueMap properties = revision.getProperties("renditions/original/jcr:content"); ...
relPath
- relative path to the contentjava.lang.IllegalArgumentException
- Thrown if the given path is not relative.java.lang.String getLabel()
Item.getName()
if no history labels are present.java.lang.String getId()
Node.getIdentifier()
).boolean isDeleted()
true
if the associated asset is deleted; false
otherwisejava.lang.String getName()
java.lang.String getParentPath()
java.lang.String getTitle()
dc:title
of the asset or null
if none defined.java.lang.String getDescription()
null
if not defined.java.util.Calendar getCreated()
java.lang.String getComment()
null
java.lang.String getRenditionPath(java.lang.String renditionName)
renditionName
- name of renditionnull
if path does not existCopyright © 2010 - 2020 Adobe. All Rights Reserved