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_STATE
CHECKIN_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, validateOption
public CompatVersioningService()
public String getVersionLabel(DocumentModel doc)
VersioningService
getVersionLabel
in interface VersioningService
getVersionLabel
in class StandardVersioningService
doc
- the document"2.1"
protected void setInitialVersion(Document doc)
StandardVersioningService
setInitialVersion
in class StandardVersioningService
public boolean isPreSaveDoingCheckOut(Document doc, boolean isDirty, VersioningOption option, Map<String,Serializable> options)
VersioningService
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.
Needed to be able to send "about to checkin" events.
isPreSaveDoingCheckOut
in interface VersioningService
isPreSaveDoingCheckOut
in class StandardVersioningService
doc
- 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)
VersioningService
doPreSave
in interface VersioningService
doPreSave
in class StandardVersioningService
doc
- 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)
VersioningService
doPostSave
in interface VersioningService
doPostSave
in class StandardVersioningService
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin commentpublic Document doCheckIn(Document doc, VersioningOption option, String checkinComment)
VersioningService
doCheckIn
in interface VersioningService
doCheckIn
in class StandardVersioningService
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin commentpublic void doCheckOut(Document doc)
VersioningService
doCheckOut
in interface VersioningService
doCheckOut
in class StandardVersioningService
doc
- the documentCopyright © 2015 Nuxeo SA. All rights reserved.