|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VersioningService
The versioning service holds the versioning policy used to define what happens to a document's version when it is created, saved, checked in, checked out or restored, and what version increment options (none, minor, major) are made available to the user.
Field Summary | |
---|---|
static String |
CHECKIN_COMMENT
Context data to provide a checkin comment for operations that potentially check in (save, publish, checkin). |
static String |
MAJOR_VERSION_PROP
Document property in which the major version is stored. |
static String |
MINOR_VERSION_PROP
Document property in which the minor version is stored. |
static String |
SKIP_VERSIONING
Context data that can be used to skip versioning on document creation, in case the supplied version is enough. |
static String |
VERSIONING_OPTION
Context data to provide a user-level choice to the versioning policy. |
Method Summary | |
---|---|
Document |
doCheckIn(Document doc,
VersioningOption option,
String checkinComment)
Applies version increment option and does a checkin. |
void |
doCheckOut(Document doc)
Apply modifications after doing a checkout. |
void |
doPostCreate(Document doc,
Map<String,Serializable> options)
Applies versioning after document creation. |
Document |
doPostSave(Document doc,
VersioningOption option,
String checkinComment,
Map<String,Serializable> options)
Applies versioning options after document save. |
VersioningOption |
doPreSave(Document doc,
boolean isDirty,
VersioningOption option,
String checkinComment,
Map<String,Serializable> options)
Applies versioning options before document save. |
List<VersioningOption> |
getSaveOptions(DocumentModel doc)
Checks what options are available on a document at save time. |
String |
getVersionLabel(DocumentModel doc)
Gets the version label to display for a given document. |
Field Detail |
---|
static final String MAJOR_VERSION_PROP
static final String MINOR_VERSION_PROP
static final String SKIP_VERSIONING
static final String VERSIONING_OPTION
VersioningOption
.
static final String CHECKIN_COMMENT
Method Detail |
---|
String getVersionLabel(DocumentModel doc)
doc
- the document
"2.1"
List<VersioningOption> getSaveOptions(DocumentModel doc) throws ClientException
doc
- the document
ClientException
void doPostCreate(Document doc, Map<String,Serializable> options) throws DocumentException
doc
- the documentcontext
- map event info
DocumentException
VersioningOption doPreSave(Document doc, boolean isDirty, VersioningOption option, String checkinComment, Map<String,Serializable> options) throws DocumentException
doc
- the documentisDirty
- true
if there is actual data to saveoption
- an option chosen by the user or frameworkcheckinComment
- a checkin commentcontext
- map event info
DocumentException
Document doPostSave(Document doc, VersioningOption option, String checkinComment, Map<String,Serializable> options) throws DocumentException
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin commentcontext
- map event info
DocumentException
Document doCheckIn(Document doc, VersioningOption option, String checkinComment) throws DocumentException
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin comment
DocumentException
void doCheckOut(Document doc) throws DocumentException
doc
- the document
DocumentException
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |