Interface VersionableAmetysObject
-
- All Superinterfaces:
AmetysObject
,VersionAwareAmetysObject
- All Known Subinterfaces:
ModifiableDataAwareVersionableAmetysObject
- All Known Implementing Classes:
AbstractProgram
,AbstractProgramPart
,AbstractTraversableProgramPart
,Cart
,Container
,Course
,CourseList
,CoursePart
,DefaultAmetysObject
,DefaultContent
,DefaultLockableAmetysObject
,DefaultSharedContent
,DefaultWebContent
,DefaultWorkflowAwareContent
,JCRPost
,JCRProjectMember
,JCRResource
,JCRTask
,ModifiableDefaultContent
,ModifiableDefaultWebContent
,OrgUnit
,Person
,Program
,Query
,SubProgram
public interface VersionableAmetysObject extends VersionAwareAmetysObject
AmetysObject
with versioning capabilities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLabel(String label, boolean moveIfPresent)
Add a label on this object.void
checkpoint()
Persists the current version of thisAmetysObject
void
removeLabel(String label)
Remove a label from this object.
If the label doesn't exist, it is silently ignored.void
restoreFromLabel(String label)
Restore data from the specified label.void
restoreFromRevision(String revision)
Restore data from the specified revision.-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.version.VersionAwareAmetysObject
getAllLabels, getAllRevisions, getLabels, getLabels, getRevision, getRevisionTimestamp, getRevisionTimestamp, switchToLabel, switchToRevision
-
-
-
-
Method Detail
-
checkpoint
void checkpoint() throws AmetysRepositoryException
Persists the current version of thisAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
restoreFromLabel
void restoreFromLabel(String label) throws UnknownAmetysObjectException, AmetysRepositoryException
Restore data from the specified label.- Parameters:
label
- the label- Throws:
UnknownAmetysObjectException
- if the label does not correspond to any revisionAmetysRepositoryException
- if a problem occurs
-
restoreFromRevision
void restoreFromRevision(String revision) throws UnknownAmetysObjectException, AmetysRepositoryException
Restore data from the specified revision.- Parameters:
revision
- the revision- Throws:
UnknownAmetysObjectException
- if the revision does not existAmetysRepositoryException
- if a problem occurs
-
addLabel
void addLabel(String label, boolean moveIfPresent) throws AmetysRepositoryException
Add a label on this object.- Parameters:
label
- the label to add.moveIfPresent
- what to do if the content already has this label : move it to the current revision iftrue
, keep it unchanged iffalse
.- Throws:
AmetysRepositoryException
- if some problem arises.
-
removeLabel
void removeLabel(String label) throws AmetysRepositoryException
Remove a label from this object.
If the label doesn't exist, it is silently ignored.- Parameters:
label
- the label to remove- Throws:
AmetysRepositoryException
- if some problem arises.
-
-