Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.edit.lock
Interface LockActions

All Superinterfaces:
Serializable
All Known Implementing Classes:
LockActionsBean

public interface LockActions
extends Serializable

Interface for an action listener that will provide methods to lock/unlock a document, to lock/unlock the current document and to lock/unlock a list of documents (based on DocumentsListManager).

Author:
Bogdan Tatar

Field Summary
static String LOCK_CREATED
           
static String LOCK_TIME
          Deprecated. since 5.4.2, use LOCK_CREATED instead
static String LOCKER
           
 
Method Summary
 Boolean getCanLockCurrentDoc()
          Tests if the user can get the lock of the current document.
 Boolean getCanLockDoc(DocumentModel document)
          Tests if the user can get the lock of a document.
 Boolean getCanUnlockCurrentDoc()
          Tests if the user can unlock the current document.
 Boolean getCanUnlockDoc(DocumentModel document)
          Tests if the user can unlock a document.
 Map<String,Serializable> getCurrentDocLockDetails()
          Gets the details about the lock of the current document, who did the lock and when the lock took place.
 Map<String,Serializable> getLockDetails(DocumentModel document)
          Gets the details about the lock of a document,who did the lock and when the lock took place.
 Action getLockOrUnlockAction()
          Returns the action of lock or unlock for a document.
 Boolean isCurrentDocumentLiveEditable()
          This method is used to test whether the live-edit link should appear on a document.
 String lockCurrentDocument()
          Gets the lock of the current document.
 String lockDocument(DocumentModel document)
          Gets the lock of the document.
 void lockDocuments(List<DocumentModel> documents)
          Gets the locks of the documents from the list.
 void resetLockState()
           
 String unlockCurrentDocument()
          Releases the lock of the current document.
 String unlockDocument(DocumentModel document)
          Releases the lock of the document.
 void unlockDocuments(List<DocumentModel> documents)
          Releases the locks of the documents from the list.
 

Field Detail

LOCKER

static final String LOCKER
See Also:
Constant Field Values

LOCK_TIME

@Deprecated
static final String LOCK_TIME
Deprecated. since 5.4.2, use LOCK_CREATED instead
See Also:
Constant Field Values

LOCK_CREATED

static final String LOCK_CREATED
Since:
5.4.2
See Also:
Constant Field Values
Method Detail

lockCurrentDocument

String lockCurrentDocument()
                           throws ClientException
Gets the lock of the current document.

Throws:
ClientException

unlockCurrentDocument

String unlockCurrentDocument()
                             throws ClientException
Releases the lock of the current document.

Throws:
ClientException

lockDocument

String lockDocument(DocumentModel document)
                    throws ClientException
Gets the lock of the document.

Parameters:
document - the document of which lock is to be taken
Throws:
ClientException

unlockDocument

String unlockDocument(DocumentModel document)
                      throws ClientException
Releases the lock of the document.

Parameters:
document - the document of which lock is to be released
Throws:
ClientException

lockDocuments

void lockDocuments(List<DocumentModel> documents)
                   throws ClientException
Gets the locks of the documents from the list.

Parameters:
documents - the list with the documents of which locks are to be taken
Throws:
ClientException

unlockDocuments

void unlockDocuments(List<DocumentModel> documents)
                     throws ClientException
Releases the locks of the documents from the list.

Parameters:
documents - the list with the documents of which locks are to be released
Throws:
ClientException

getCanLockDoc

Boolean getCanLockDoc(DocumentModel document)
Tests if the user can get the lock of a document.

Returns:
true if the user has this right, false otherwise

getCanLockCurrentDoc

Boolean getCanLockCurrentDoc()
Tests if the user can get the lock of the current document.

Returns:
true if the user has this right, false otherwise

getCanUnlockDoc

Boolean getCanUnlockDoc(DocumentModel document)
Tests if the user can unlock a document.

Returns:
true if the user has this right, false otherwise

getCanUnlockCurrentDoc

Boolean getCanUnlockCurrentDoc()
Tests if the user can unlock the current document.

Returns:
true if the user has this right, false otherwise

getLockOrUnlockAction

Action getLockOrUnlockAction()
Returns the action of lock or unlock for a document.

Returns:
the action of lock or unlock for a document

getLockDetails

Map<String,Serializable> getLockDetails(DocumentModel document)
                                        throws ClientException
Gets the details about the lock of a document,who did the lock and when the lock took place.

Parameters:
document - the document for which this information is needed
Returns:
the user who took the look and the time when he/she did this in a map
Throws:
ClientException

getCurrentDocLockDetails

Map<String,Serializable> getCurrentDocLockDetails()
                                                  throws ClientException
Gets the details about the lock of the current document, who did the lock and when the lock took place.

Returns:
the user who took the look and the time when he/she did this in a map
Throws:
ClientException

isCurrentDocumentLiveEditable

Boolean isCurrentDocumentLiveEditable()
This method is used to test whether the live-edit link should appear on a document.

Returns:
true if the link can appear, false otherwise

resetLockState

void resetLockState()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.