public class CompatVersioningService extends StandardVersioningService
APPROVED_STATE, BACK_TO_PROJECT_TRANSITION, FILE_TYPE, 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. |
doPostCreate, getSaveOptions, getVersioningRules, isPostSaveDoingCheckIn, setDefaultVersioningRule, setVersioningRulespublic String getVersionLabel(DocumentModel doc)
VersioningServicegetVersionLabel in interface VersioningServicegetVersionLabel in class StandardVersioningServicedoc - the document"2.1"public boolean isPreSaveDoingCheckOut(Document doc, boolean isDirty, VersioningOption option, Map<String,Serializable> options) throws DocumentException
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 checkoutDocumentExceptionpublic VersioningOption doPreSave(Document doc, boolean isDirty, VersioningOption option, String checkinComment, Map<String,Serializable> options) throws DocumentException
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 commentDocumentExceptionpublic Document doPostSave(Document doc, VersioningOption option, String checkinComment, Map<String,Serializable> options) throws DocumentException
VersioningServicedoPostSave in interface VersioningServicedoPostSave in class StandardVersioningServicedoc - the documentoption - an option chosen by the user or frameworkcheckinComment - a checkin commentDocumentExceptionpublic Document doCheckIn(Document doc, VersioningOption option, String checkinComment) throws DocumentException
VersioningServicedoCheckIn in interface VersioningServicedoCheckIn in class StandardVersioningServicedoc - the documentoption - an option chosen by the user or frameworkcheckinComment - a checkin commentDocumentExceptionpublic void doCheckOut(Document doc) throws DocumentException
VersioningServicedoCheckOut in interface VersioningServicedoCheckOut in class StandardVersioningServicedoc - the documentDocumentExceptionCopyright © 2015 Nuxeo SA. All rights reserved.