public interface VersionAwareAmetysObject extends AmetysObject
AmetysObject
that is versioned and knows about its revisions and labels.Modifier and Type | Method and Description |
---|---|
String[] |
getAllLabels()
List all labels that exist on this object, whatever the revision.
|
String[] |
getAllRevisions()
List all revisions of this object.
|
String[] |
getLabels()
Get the labels for this object, in the current revision (a single revision can hold several labels).
|
String[] |
getLabels(String revision)
Get the labels for this object fot the given revision (a single revision can hold several labels).
|
String |
getRevision()
Get the revision of this object, if any.
|
Date |
getRevisionTimestamp()
Get the creation time of the current revision, if any.
|
Date |
getRevisionTimestamp(String revision)
Get the creation time of the given revision.
|
void |
switchToLabel(String label)
Switch to the revision corresponding to the specified label.
All subsequent method calls on this AmetysObject will concern that version. |
void |
switchToRevision(String revision)
Switch to the revision corresponding to the specified revision.
All subsequent method calls on this AmetysObject will concern that version. |
equals, getId, getName, getParent, getParentPath, getPath, hashCode
String[] getAllRevisions() throws AmetysRepositoryException
null
)AmetysRepositoryException
- if the revisions cannot be known.String[] getAllLabels() throws AmetysRepositoryException
null
).AmetysRepositoryException
- if the labels cannot be known.String getRevision() throws AmetysRepositoryException
AmetysRepositoryException
- if the revision cannot be known.Date getRevisionTimestamp() throws AmetysRepositoryException
AmetysRepositoryException
- if an error occursDate getRevisionTimestamp(String revision) throws AmetysRepositoryException
revision
- the revision.UnknownAmetysObjectException
- if the given revision does not exist for this object.AmetysRepositoryException
- if an error occursString[] getLabels() throws AmetysRepositoryException
null
).AmetysRepositoryException
- if the labels cannot be known.String[] getLabels(String revision) throws UnknownAmetysObjectException, AmetysRepositoryException
revision
- the revisionnull
).UnknownAmetysObjectException
- if the given revision does not exist for this object.AmetysRepositoryException
- if the labels cannot be known.void switchToLabel(String label) throws UnknownAmetysObjectException, AmetysRepositoryException
AmetysObject
will concern that version.label
- the label to switch to, or null to specify the current versionUnknownAmetysObjectException
- if the label does not correspond to any revisionAmetysRepositoryException
- if a problem occursvoid switchToRevision(String revision) throws UnknownAmetysObjectException, AmetysRepositoryException
AmetysObject
will concern that version.revision
- the revision, or null to specify the current versionUnknownAmetysObjectException
- if the revision does not existAmetysRepositoryException
- if a problem occurs