public class CompatVersioningService extends StandardVersioningService
APPROVED_STATE, BACK_TO_PROJECT_TRANSITION, FILE_TYPE, NOTE_TYPE, OBSOLETE_STATE, PROJECT_STATE
CHECKIN_COMMENT, 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.
|
doPostCreate, getSaveOptions, getVersioningRules, setDefaultVersioningRule, setVersioningRules
public String getVersionLabel(DocumentModel doc)
VersioningService
getVersionLabel
in interface VersioningService
getVersionLabel
in class StandardVersioningService
doc
- the document"2.1"
public VersioningOption doPreSave(Document doc, boolean isDirty, VersioningOption option, String checkinComment, Map<String,Serializable> options) throws DocumentException
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 commentDocumentException
public Document doPostSave(Document doc, VersioningOption option, String checkinComment, Map<String,Serializable> options) throws DocumentException
VersioningService
doPostSave
in interface VersioningService
doPostSave
in class StandardVersioningService
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin commentDocumentException
public Document doCheckIn(Document doc, VersioningOption option, String checkinComment) throws DocumentException
VersioningService
doCheckIn
in interface VersioningService
doCheckIn
in class StandardVersioningService
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin commentDocumentException
public void doCheckOut(Document doc) throws DocumentException
VersioningService
doCheckOut
in interface VersioningService
doCheckOut
in class StandardVersioningService
doc
- the documentDocumentException
Copyright © 2011 Nuxeo SA. All Rights Reserved.