|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.runtime.model.DefaultComponent org.nuxeo.ecm.core.versioning.VersioningComponent
public class VersioningComponent
Versioning service component and implementation.
Field Summary | |
---|---|
VersioningService |
service
|
static java.lang.String |
XP
|
Fields inherited from interface org.nuxeo.ecm.core.versioning.VersioningService |
---|
CHECKIN_COMMENT, MAJOR_VERSION_PROP, MINOR_VERSION_PROP, SKIP_VERSIONING, VERSIONING_OPTION |
Constructor Summary | |
---|---|
VersioningComponent()
|
Method Summary | |
---|---|
void |
activate(ComponentContext context)
Activates the component. |
void |
deactivate(ComponentContext context)
Deactivates the component. |
Document |
doCheckIn(Document doc,
VersioningOption option,
java.lang.String checkinComment)
Applies version increment option and does a checkin. |
void |
doCheckOut(Document doc)
Apply modifications after doing a checkout. |
void |
doPostCreate(Document doc)
Applies versioning after document creation. |
void |
doPostSave(Document doc,
VersioningOption option,
java.lang.String checkinComment)
Applies versioning options after document save. |
VersioningOption |
doPreSave(Document doc,
boolean isDirty,
VersioningOption option,
java.lang.String checkinComment)
Applies versioning options before document save. |
java.util.List<VersioningOption> |
getSaveOptions(DocumentModel docModel)
Checks what options are available on a document at save time. |
VersioningService |
getService()
|
java.lang.String |
getVersionLabel(DocumentModel doc)
Gets the version label to display for a given document. |
void |
registerContribution(java.lang.Object contrib,
java.lang.String xp,
ComponentInstance contributor)
|
void |
unregisterContribution(java.lang.Object contrib,
java.lang.String xp,
ComponentInstance contributor)
|
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent |
---|
getAdapter, registerExtension, unregisterExtension |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XP
public VersioningService service
Constructor Detail |
---|
public VersioningComponent()
Method Detail |
---|
public void activate(ComponentContext context) throws java.lang.Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime context
java.lang.Exception
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws java.lang.Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime context
java.lang.Exception
- if an error occurs during activationpublic void registerContribution(java.lang.Object contrib, java.lang.String xp, ComponentInstance contributor) throws java.lang.Exception
registerContribution
in class DefaultComponent
java.lang.Exception
public void unregisterContribution(java.lang.Object contrib, java.lang.String xp, ComponentInstance contributor) throws java.lang.Exception
unregisterContribution
in class DefaultComponent
java.lang.Exception
public VersioningService getService()
public java.lang.String getVersionLabel(DocumentModel doc)
VersioningService
getVersionLabel
in interface VersioningService
doc
- the document
"2.1"
public void doPostCreate(Document doc) throws DocumentException
VersioningService
doPostCreate
in interface VersioningService
doc
- the document
DocumentException
public java.util.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, java.lang.String checkinComment) 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 void doPostSave(Document doc, VersioningOption option, java.lang.String checkinComment) 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, java.lang.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
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |