Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
Back to Main Page > Specification > Versioning
Design Considerations
A plugable storage architecture
- Our own version storage.
- A third party version storage product, such as SubVersion.
- This is achieved through the internal version store API
Consideration of different approches
- Check Out -> Edit -> Check In. No support for branches.
- Check Out -> Edit -> Check In. Support for branches.
- Read -> Edit -> Check-In/Merge.
Data
version_id - the id of the version currently associated with this object
Methods
isVersionable
boolean isVersionable(wsid, uuid);
Description:
Indicates whether an object can be made versionable (if it not already)
Parameters:
wsid - the workspace id
uuid - the object id
Result:
Returns true if the object can be made versionable (or it already is), false otherwise.
Exception cases:
checkOut
void checkOut(wsid, uuid);
void checkOut(wsid, uuid, checkOutChildren);
void checkOut(wsid, uuidList);
Description:
Marks the specified object(s) ready for editing. This ensures that the object(s) are locked.
Parameters:
wsid - the workspace id
uuid - the id of the object that is to be checked out.
uuidList - list of object id's
checkOutChildren - indicates whether the children of the specified object should be checked out too.
Result:
void
Exception cases:
- An object cannot be locked.
checkIn
void checkIn(wsid, uuid, versionProperties);
void checkIn(wsid, uuid, versionProperties, checkInChildren);
void checkIn(wsid, uuid, versionProperties, checkInChildren, keepCheckedOut);
void checkIn(wsid, uuidList, versionProperties);
void checkIn(wsid, uuidList, versionProperties, keepCheckedOut);
Decription:
Unlocks and versions the referenced checked out object(s).
Parameters:
wsid - workspace id
uuid - object id
uuidList - list of object ids
versionProperties - a map of properties that will be set as the meta data for the created version.
checkInChildren - indicates whether the children of the object should also be checked in.
keepCheckedOut - indicates that the object(s) should be kept checked out once checkin had completed.
Result:
void
Exception cases:
- The lock can not be released.
- A lock was required for checkin
- There is a unresolvable conflict.
cancelCheckOut
void cancelCheckOut(wsid, uuid)
void cancelCheckOut(wsid, uuidList);
Description:
Removes the lock and does not version the referenced checked out document.
Parameters:
wsid - workspace id
uuid - object id
uuidList - list of object ids
Result:
void
Exception cases:
- Do not have permission to unlock.
isCheckedOut
boolean isCheckedOut(wsid, uuid);
Description:
Indicates whether the referenced object is currently checked out or not.
Parameters:
wsid - the workspace id
uuid - the id of the object to check.
Result:
boolean indicating whether the object is checked out or not.
Exception cases:
getVersionHistory
VersionHistoryData getVersionHistory(wsid, uuid);
Description:
Gets the version history information associated with the specified object.
Parameters:
wsid - the workspace id
uuid - the id of the object
Result:
The result is a data structure containing the version history data, this will include information about the structure of the version tree and meta-data about each version and the reference to the frozen state of each version. A null representation of the data will be returned if the object has not yet been versioned.
Exception cases:
getStatus
StatusEnum getStatus(wsid, uuid)
Description:
Gets the status of the object identified. The status will indicate whether the object is current, modified, out of date, in conflict, etc.
Parameters:
wsid - workspace id
uuid - object id
Result:
Returns an enumerated value indicating that the object is one of the following states:
- Current - the version in hand relates to the current version.
- Out of date - the version in hand is behind the current version.
- Modified - the version in hand is current and has been modified.
- In conflict - the version in hand is behind the current version and has been modified (causing a potential conflict)
Exception cases:
Versioning
Aspects