|
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.webapp.versioning.VersionedActionsBean
@Name(value="versionedActions") @Scope(value=CONVERSATION) @Install(precedence=10) public class VersionedActionsBean
Deals with versioning actions.
Constructor Summary | |
---|---|
VersionedActionsBean()
|
Method Summary | |
---|---|
boolean |
canRemoveArchivedVersion(VersionModel selectedVersion)
Check if a version can be removed. |
String |
checkIn()
Checks the selected document in, with the selected version. |
String |
checkOut()
Checks the document out. |
boolean |
getCanRestore()
Security check to enable or disable the restore button. |
String |
getCheckedOut()
Tells if the current selected document is checked out or not. |
DocumentModel |
getSourceDocument()
|
DocumentModel |
getSourceDocument(DocumentModel document)
|
List<VersionModel> |
getVersionList()
Factory accessor for currentDocument versionList. |
void |
initialize()
|
String |
removeArchivedVersion(VersionModel selectedVersion)
Remove an archived version. |
void |
resetVersions()
When the user selects/changes other documents then we nullify the list of versions associated with the document so that the factory method gets called when the list is used. |
String |
restoreToVersion(VersionModel selectedVersion)
Restores the document to the selected version. |
void |
retrieveVersions()
Retrieves the versions for the current document. |
void |
setCheckedOut(String checkedOut)
Changes the checked-out string. |
String |
viewArchivedVersion(VersionModel selectedVersion)
View an older version of the document. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionedActionsBean()
Method Detail |
---|
@Create public void initialize()
initialize
in interface VersionedActions
@Observer(value={"documentSelectionChanged","documentChanged","documentSubmitedForPublication","documentPublished"}, create=false) @BypassInterceptors public void resetVersions()
VersionedActions
This way we achieve lazy loading of data from backend - only when its needed and not loading it when the event is fired.
resetVersions
in interface VersionedActions
@Factory(value="versionList", scope=EVENT) public List<VersionModel> getVersionList() throws ClientException
VersionedActions
getVersionList
in interface VersionedActions
ClientException
public void retrieveVersions() throws ClientException
VersionedActions
retrieveVersions
in interface VersionedActions
ClientException
public String restoreToVersion(VersionModel selectedVersion) throws ClientException
restoreToVersion
in interface VersionedActions
ClientException
public String viewArchivedVersion(VersionModel selectedVersion) throws ClientException
VersionedActions
viewArchivedVersion
in interface VersionedActions
ClientException
public boolean getCanRestore() throws ClientException
VersionedActions
getCanRestore
in interface VersionedActions
ClientException
public String getCheckedOut() throws ClientException
getCheckedOut
in interface VersionedActions
ClientException
public void setCheckedOut(String checkedOut)
VersionedActions
setCheckedOut
in interface VersionedActions
public String checkOut() throws ClientException
checkOut
in interface VersionedActions
ClientException
public String checkIn() throws ClientException
checkIn
in interface VersionedActions
ClientException
public DocumentModel getSourceDocument() throws ClientException
getSourceDocument
in interface VersionedActions
ClientException
public DocumentModel getSourceDocument(DocumentModel document) throws ClientException
getSourceDocument
in interface VersionedActions
ClientException
public boolean canRemoveArchivedVersion(VersionModel selectedVersion)
VersionedActions
canRemoveArchivedVersion
in interface VersionedActions
public String removeArchivedVersion(VersionModel selectedVersion) throws ClientException
VersionedActions
removeArchivedVersion
in interface VersionedActions
selectedVersion
- the version model to remove
ClientException
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |