Package org.nuxeo.ecm.core.versioning
Class CompatVersioningService
- java.lang.Object
-
- org.nuxeo.ecm.core.versioning.StandardVersioningService
-
- org.nuxeo.ecm.core.versioning.CompatVersioningService
-
- All Implemented Interfaces:
VersioningService
,ExtendableVersioningService
,VersioningService
@Deprecated public class CompatVersioningService extends StandardVersioningService
Deprecated.since 9.3, seems not needed anymoreCompatibility implementation of the versioning service in Nuxeo.
-
-
Field Summary
-
Fields inherited from class org.nuxeo.ecm.core.versioning.StandardVersioningService
APPROVED_STATE, AUTO_CHECKED_OUT, BACK_TO_PROJECT_TRANSITION, CATEGORY, COMMENT, COMPAT_DEFAULT_ID, COMPAT_ID_PREFIX, DEFAULT_FORMER_RULE_ORDER, FILE_TYPE, MAJOR_VERSION, MINOR_VERSION, NOTE_TYPE, OBSOLETE_STATE, PROJECT_STATE
-
Fields inherited from interface org.nuxeo.ecm.core.api.versioning.VersioningService
CHECKIN_COMMENT, DISABLE_AUTO_CHECKOUT, DISABLE_AUTOMATIC_VERSIONING, MAJOR_VERSION_PROP, MINOR_VERSION_PROP, SKIP_VERSIONING, VERSIONING_OPTION
-
-
Constructor Summary
Constructors Constructor Description CompatVersioningService()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Document
doCheckIn(Document doc, VersioningOption option, String checkinComment)
Deprecated.Applies version increment option and does a checkin.void
doCheckOut(Document doc)
Deprecated.Apply modifications after doing a checkout.Document
doPostSave(CoreSession session, Document doc, VersioningOption option, String checkinComment, Map<String,Serializable> options)
Deprecated.Applies versioning options after document save.VersioningOption
doPreSave(CoreSession session, Document doc, boolean isDirty, VersioningOption option, String checkinComment, Map<String,Serializable> options)
Deprecated.Applies versioning options before document save.String
getVersionLabel(DocumentModel doc)
Deprecated.Gets the version label to display for a given document.boolean
isPreSaveDoingCheckOut(Document doc, boolean isDirty, VersioningOption option, Map<String,Serializable> options)
Deprecated.Checks ifVersioningService.doPreSave(org.nuxeo.ecm.core.api.CoreSession, 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)
Deprecated.Sets the initial version on a document.-
Methods inherited from class org.nuxeo.ecm.core.versioning.StandardVersioningService
computeRestrictionOptions, doAutomaticVersioning, doPostCreate, followTransitionByOption, getMajor, getMajor, getMinor, getMinor, getSaveOptions, getSaveOptions, getSaveOptions, getVersion, getVersion, getVersioningRules, incrementByOption, incrementMajor, incrementMinor, isPolicyMatch, isPostSaveDoingCheckIn, retrieveMatchingVersioningPolicy, sendEvent, setDefaultVersioningRule, setVersion, setVersioningFilters, setVersioningPolicies, setVersioningRestrictions, setVersioningRules, validateOption
-
-
-
-
Method Detail
-
getVersionLabel
public String getVersionLabel(DocumentModel doc)
Deprecated.Description copied from interface:VersioningService
Gets the version label to display for a given document.- Specified by:
getVersionLabel
in interfaceVersioningService
- Overrides:
getVersionLabel
in classStandardVersioningService
- Parameters:
doc
- the document- Returns:
- the version label, like
"2.1"
-
setInitialVersion
protected void setInitialVersion(Document doc)
Deprecated.Description copied from class:StandardVersioningService
Sets the initial version on a document. Can be overridden.- Overrides:
setInitialVersion
in classStandardVersioningService
-
isPreSaveDoingCheckOut
public boolean isPreSaveDoingCheckOut(Document doc, boolean isDirty, VersioningOption option, Map<String,Serializable> options)
Deprecated.Description copied from interface:VersioningService
Checks ifVersioningService.doPreSave(org.nuxeo.ecm.core.api.CoreSession, 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.
- Specified by:
isPreSaveDoingCheckOut
in interfaceVersioningService
- Overrides:
isPreSaveDoingCheckOut
in classStandardVersioningService
- Parameters:
doc
- the documentisDirty
-true
if there is actual data to saveoption
- an option chosen by the user or frameworkoptions
- map event info and options- Returns:
true
ifVersioningService.doPreSave(org.nuxeo.ecm.core.api.CoreSession, 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
-
doPreSave
public VersioningOption doPreSave(CoreSession session, Document doc, boolean isDirty, VersioningOption option, String checkinComment, Map<String,Serializable> options)
Deprecated.Description copied from interface:VersioningService
Applies versioning options before document save.- Specified by:
doPreSave
in interfaceVersioningService
- Overrides:
doPreSave
in classStandardVersioningService
- Parameters:
session
- the core sessiondoc
- the documentisDirty
-true
if there is actual data to saveoption
- an option chosen by the user or frameworkcheckinComment
- a checkin commentoptions
- map event info- Returns:
- the validated option (to use in doPostSave)
-
doPostSave
public Document doPostSave(CoreSession session, Document doc, VersioningOption option, String checkinComment, Map<String,Serializable> options)
Deprecated.Description copied from interface:VersioningService
Applies versioning options after document save. If a new version is checked in during the operation, the document for this version is returned to the caller.- Specified by:
doPostSave
in interfaceVersioningService
- Overrides:
doPostSave
in classStandardVersioningService
- Parameters:
session
- the core sessiondoc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin commentoptions
- map event info- Returns:
- checkedInDocument or null
-
doCheckIn
public Document doCheckIn(Document doc, VersioningOption option, String checkinComment)
Deprecated.Description copied from interface:VersioningService
Applies version increment option and does a checkin.- Specified by:
doCheckIn
in interfaceVersioningService
- Overrides:
doCheckIn
in classStandardVersioningService
- Parameters:
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin comment- Returns:
- the version
-
doCheckOut
public void doCheckOut(Document doc)
Deprecated.Description copied from interface:VersioningService
Apply modifications after doing a checkout.- Specified by:
doCheckOut
in interfaceVersioningService
- Overrides:
doCheckOut
in classStandardVersioningService
- Parameters:
doc
- the document
-
-