|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.versioning.StandardVersioningService
public class StandardVersioningService
Implementation of the versioning service that follows standard checkout / checkin semantics.
Field Summary | |
---|---|
static String |
APPROVED_STATE
|
static String |
BACK_TO_PROJECT_TRANSITION
|
static String |
FILE_TYPE
|
static String |
NOTE_TYPE
|
static String |
OBSOLETE_STATE
|
static String |
PROJECT_STATE
|
Fields inherited from interface org.nuxeo.ecm.core.versioning.VersioningService |
---|
CHECKIN_COMMENT, MAJOR_VERSION_PROP, MINOR_VERSION_PROP, SKIP_VERSIONING, VERSIONING_OPTION |
Constructor Summary | |
---|---|
StandardVersioningService()
|
Method Summary | |
---|---|
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. |
void |
doPostCreate(Document doc,
Map<String,Serializable> options)
Applies versioning after document creation. |
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. |
List<VersioningOption> |
getSaveOptions(DocumentModel docModel)
Checks what options are available on a document at save time. |
Map<String,VersioningRuleDescriptor> |
getVersioningRules()
|
String |
getVersionLabel(DocumentModel docModel)
Gets the version label to display for a given document. |
void |
setDefaultVersioningRule(DefaultVersioningRuleDescriptor defaultVersioningRule)
Set the default versioning rule for all document type. |
void |
setVersioningRules(Map<String,VersioningRuleDescriptor> versioningRules)
Add versioning rules for specific types. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FILE_TYPE
public static final String NOTE_TYPE
public static final String PROJECT_STATE
public static final String APPROVED_STATE
public static final String OBSOLETE_STATE
public static final String BACK_TO_PROJECT_TRANSITION
Constructor Detail |
---|
public StandardVersioningService()
Method Detail |
---|
public String getVersionLabel(DocumentModel docModel)
VersioningService
getVersionLabel
in interface VersioningService
docModel
- the document
"2.1"
public void doPostCreate(Document doc, Map<String,Serializable> options)
VersioningService
doPostCreate
in interface VersioningService
doc
- the documentpublic List<VersioningOption> getSaveOptions(DocumentModel docModel) throws ClientException
VersioningService
getSaveOptions
in interface VersioningService
docModel
- the document
ClientException
public VersioningOption doPreSave(Document doc, boolean isDirty, VersioningOption option, String checkinComment, Map<String,Serializable> options) throws DocumentException
VersioningService
doPreSave
in interface VersioningService
doc
- the documentisDirty
- true
if there is actual data to saveoption
- an option chosen by the user or frameworkcheckinComment
- a checkin comment
DocumentException
public Document doPostSave(Document doc, VersioningOption option, String checkinComment, Map<String,Serializable> options) throws DocumentException
VersioningService
doPostSave
in interface VersioningService
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin comment
DocumentException
public Document doCheckIn(Document doc, VersioningOption option, String checkinComment) throws DocumentException
VersioningService
doCheckIn
in interface VersioningService
doc
- the documentoption
- an option chosen by the user or frameworkcheckinComment
- a checkin comment
DocumentException
public void doCheckOut(Document doc) throws DocumentException
VersioningService
doCheckOut
in interface VersioningService
doc
- the document
DocumentException
public Map<String,VersioningRuleDescriptor> getVersioningRules()
getVersioningRules
in interface ExtendableVersioningService
public void setVersioningRules(Map<String,VersioningRuleDescriptor> versioningRules)
ExtendableVersioningService
setVersioningRules
in interface ExtendableVersioningService
public void setDefaultVersioningRule(DefaultVersioningRuleDescriptor defaultVersioningRule)
ExtendableVersioningService
setDefaultVersioningRule
in interface ExtendableVersioningService
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |