- All Superinterfaces:
AmetysObject
- All Known Subinterfaces:
DataAndVersionAwareAmetysObject
, ModifiableDataAwareVersionableAmetysObject
, VersionableAmetysObject
- All Known Implementing Classes:
AbstractProgram
, AbstractProgramPart
, AbstractTraversableProgramPart
, Cart
, Container
, Course
, CourseList
, CoursePart
, DefaultAmetysObject
, DefaultContent
, DefaultLockableAmetysObject
, DefaultSharedContent
, DefaultWebContent
, DefaultWorkflowAwareContent
, JCRCalendarResource
, JCRPost
, JCRProjectMember
, JCRResource
, JCRTask
, JCRThread
, ModifiableDefaultContent
, ModifiableDefaultWebContent
, OrgUnit
, Person
, Program
, Query
, SubProgram
AmetysObject
that is versioned and knows about its revisions and labels.
-
Method Summary
List all labels that exist on this object, whatever the revision.
List all revisions of this object.
Get the labels for this object, in the current revision (a single revision can hold several labels).
Get the labels for this object fot the given revision (a single revision can hold several labels).
Get the revision of this object, if any.
Get the creation time of the current revision, if any.
Get the creation time of the given revision.
void
Switch to the revision corresponding to the specified label.
All subsequent method calls on this
AmetysObject
will concern that version.
void
Switch to the revision corresponding to the specified revision.
All subsequent method calls on this
AmetysObject
will concern that version.
-
Method Details
-
getAllRevisions
List all revisions of this object. Revisions are ordered in chronological order.
- Returns:
- the list of revisions (can be empty, but not
null
)
- Throws:
AmetysRepositoryException
- if the revisions cannot be known.
-
getAllLabels
List all labels that exist on this object, whatever the revision.
- Returns:
- the list of all labels (can be empty, but not
null
).
- Throws:
AmetysRepositoryException
- if the labels cannot be known.
-
getRevision
Get the revision of this object, if any.
- Returns:
- the revision or null if this is the latest.
- Throws:
AmetysRepositoryException
- if the revision cannot be known.
-
getRevisionTimestamp
Get the creation time of the current revision, if any.
- Returns:
- the revision creation time, or null if there's no current revision.
- Throws:
AmetysRepositoryException
- if an error occurs
-
getRevisionTimestamp
Get the creation time of the given revision.
- Parameters:
revision
- the revision.
- Returns:
- the revision creation date.
- Throws:
UnknownAmetysObjectException
- if the given revision does not exist for this object.
AmetysRepositoryException
- if an error occurs
-
getLabels
Get the labels for this object, in the current revision (a single revision can hold several labels).
- Returns:
- the list of labels for this revision (can be empty, but not
null
).
- Throws:
AmetysRepositoryException
- if the labels cannot be known.
-
getLabels
Get the labels for this object fot the given revision (a single revision can hold several labels).
- Parameters:
revision
- the revision
- Returns:
- the list of labels for this revision (can be empty, but not
null
).
- Throws:
UnknownAmetysObjectException
- if the given revision does not exist for this object.
AmetysRepositoryException
- if the labels cannot be known.
-
switchToLabel
Switch to the revision corresponding to the specified label.
All subsequent method calls on this
AmetysObject
will concern that version.
- Parameters:
label
- the label to switch to, or null to specify the current version
- Throws:
UnknownAmetysObjectException
- if the label does not correspond to any revision
AmetysRepositoryException
- if a problem occurs
-
switchToRevision
Switch to the revision corresponding to the specified revision.
All subsequent method calls on this
AmetysObject
will concern that version.
- Parameters:
revision
- the revision, or null to specify the current version
- Throws:
UnknownAmetysObjectException
- if the revision does not exist
AmetysRepositoryException
- if a problem occurs