public class CompatVersioningService extends StandardVersioningService
APPROVED_STATE, AUTO_CHECKED_OUT, BACK_TO_PROJECT_TRANSITION, FILE_TYPE, MAJOR_VERSION, MINOR_VERSION, NOTE_TYPE, OBSOLETE_STATE, PROJECT_STATECHECKIN_COMMENT, DISABLE_AUTO_CHECKOUT, MAJOR_VERSION_PROP, MINOR_VERSION_PROP, SKIP_VERSIONING, VERSIONING_OPTION| Constructor and Description |
|---|
CompatVersioningService() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
String |
getVersionLabel(DocumentModel doc)
Gets the version label to display for a given document.
|
boolean |
isPreSaveDoingCheckOut(Document doc,
boolean isDirty,
VersioningOption option,
Map<String,Serializable> options)
Checks if
VersioningService.doPreSave(org.nuxeo.ecm.core.model.Document, boolean, org.nuxeo.ecm.core.api.VersioningOption, java.lang.String, java.util.Map<java.lang.String, java.io.Serializable>) will do a checkout when called with the same arguments. |
protected void |
setInitialVersion(Document doc)
Sets the initial version on a document.
|
doPostCreate, followTransitionByOption, getMajor, getMajor, getMinor, getMinor, getSaveOptions, getSaveOptions, getSaveOptions, getVersion, getVersion, getVersioningRules, incrementByOption, incrementMajor, incrementMinor, isPostSaveDoingCheckIn, setDefaultVersioningRule, setVersion, setVersioningRules, validateOptionpublic CompatVersioningService()
public String getVersionLabel(DocumentModel doc)
VersioningServicegetVersionLabel in interface VersioningServicegetVersionLabel in class StandardVersioningServicedoc - the document"2.1"protected void setInitialVersion(Document doc)
StandardVersioningServicesetInitialVersion in class StandardVersioningServicepublic boolean isPreSaveDoingCheckOut(Document doc, boolean isDirty, VersioningOption option, Map<String,Serializable> options)
VersioningServiceVersioningService.doPreSave(org.nuxeo.ecm.core.model.Document, boolean, org.nuxeo.ecm.core.api.VersioningOption, java.lang.String, java.util.Map<java.lang.String, java.io.Serializable>) will do a checkout when called with the same arguments.
Needed to be able to send "about to checkin" events.
isPreSaveDoingCheckOut in interface VersioningServiceisPreSaveDoingCheckOut in class StandardVersioningServicedoc - the documentisDirty - true if there is actual data to saveoption - an option chosen by the user or frameworkoptions - map event info and optionstrue if VersioningService.doPreSave(org.nuxeo.ecm.core.model.Document, boolean, org.nuxeo.ecm.core.api.VersioningOption, java.lang.String, java.util.Map<java.lang.String, java.io.Serializable>) will do a checkoutpublic VersioningOption doPreSave(Document doc, boolean isDirty, VersioningOption option, String checkinComment, Map<String,Serializable> options)
VersioningServicedoPreSave in interface VersioningServicedoPreSave in class StandardVersioningServicedoc - the documentisDirty - true if there is actual data to saveoption - an option chosen by the user or frameworkcheckinComment - a checkin commentpublic Document doPostSave(Document doc, VersioningOption option, String checkinComment, Map<String,Serializable> options)
VersioningServicedoPostSave in interface VersioningServicedoPostSave in class StandardVersioningServicedoc - the documentoption - an option chosen by the user or frameworkcheckinComment - a checkin commentpublic Document doCheckIn(Document doc, VersioningOption option, String checkinComment)
VersioningServicedoCheckIn in interface VersioningServicedoCheckIn in class StandardVersioningServicedoc - the documentoption - an option chosen by the user or frameworkcheckinComment - a checkin commentpublic void doCheckOut(Document doc)
VersioningServicedoCheckOut in interface VersioningServicedoCheckOut in class StandardVersioningServicedoc - the documentCopyright © 2016 Nuxeo SA. All rights reserved.