Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.versioning
Interface VersionedActions

All Known Implementing Classes:
VersionedActionsBean

public interface VersionedActions

Exposes the actions that can be taken related to versioning and documents.

Author:
Razvan Caraghin, Florent Guillaume

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)
          Restored 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.
 

Method Detail

getVersionList

List<VersionModel> getVersionList()
                                  throws ClientException
Factory accessor for currentDocument versionList.

Returns:
list of VersionModel
Throws:
ClientException

retrieveVersions

void retrieveVersions()
                      throws ClientException
Retrieves the versions for the current document.

Throws:
ClientException

restoreToVersion

String restoreToVersion(VersionModel selectedVersion)
                        throws ClientException
Restored the document to the selected version. If there is no selected version it does nothing.

Returns:
the page that needs to be displayed next
Throws:
ClientException

getCanRestore

boolean getCanRestore()
                      throws ClientException
Security check to enable or disable the restore button.

Returns:
permission check result
Throws:
ClientException

getCheckedOut

String getCheckedOut()
                     throws ClientException
Tells if the current selected document is checked out or not.

Throws:
ClientException

setCheckedOut

void setCheckedOut(String checkedOut)
Changes the checked-out string.

Parameters:
checkedOut -

checkOut

String checkOut()
                throws ClientException
Checks the document out.

Returns:
the next page
Throws:
ClientException

checkIn

String checkIn()
               throws ClientException
Checks the selected document in, with the selected version.

Throws:
ClientException

initialize

@Create
void initialize()

resetVersions

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.

This way we achieve lazy loading of data from backend - only when its needed and not loading it when the event is fired.


viewArchivedVersion

String viewArchivedVersion(VersionModel selectedVersion)
                           throws ClientException
View an older version of the document.

Throws:
ClientException

getSourceDocument

DocumentModel getSourceDocument()
                                throws ClientException
Throws:
ClientException

getSourceDocument

DocumentModel getSourceDocument(DocumentModel document)
                                throws ClientException
Throws:
ClientException

canRemoveArchivedVersion

boolean canRemoveArchivedVersion(VersionModel selectedVersion)
Check if a version can be removed. It won't be possible if a proxy is pointing to it.


removeArchivedVersion

String removeArchivedVersion(VersionModel selectedVersion)
                             throws ClientException
Remove an archived version.

Parameters:
selectedVersion - the version model to remove
Throws:
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.