Nuxeo Enterprise Platform 5.4

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

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
LockActionsBean

public interface LockActions
extends java.io.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 java.lang.String LOCK_TIME
           
static java.lang.String LOCKER
           
 
Method Summary
 void destroy()
           
 java.lang.Boolean getCanLockCurrentDoc()
          Tests if the user can get the lock of the current document.
 java.lang.Boolean getCanLockDoc(DocumentModel document)
          Tests if the user can get the lock of a document.
 java.lang.Boolean getCanUnlockCurrentDoc()
          Tests if the user can unlock the current document.
 java.lang.Boolean getCanUnlockDoc(DocumentModel document)
          Tests if the user can unlock a document.
 java.util.Map<java.lang.String,java.lang.String> getCurrentDocLockDetails()
          Gets the details about the lock of the current document, who did the lock and when the lock took place.
 java.util.Map<java.lang.String,java.lang.String> 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.
 java.lang.Boolean isCurrentDocumentLiveEditable()
          This method is used to test whether the live-edit link should appear on a document.
 java.lang.String lockCurrentDocument()
          Gets the lock of the current document.
 java.lang.String lockDocument(DocumentModel document)
          Gets the lock of the document.
 void lockDocuments(java.util.List<DocumentModel> documents)
          Gets the locks of the documents from the list.
 void resetLockState()
           
 java.lang.String unlockCurrentDocument()
          Releases the lock of the current document.
 java.lang.String unlockDocument(DocumentModel document)
          Releases the lock of the document.
 void unlockDocuments(java.util.List<DocumentModel> documents)
          Releases the locks of the documents from the list.
 

Field Detail

LOCKER

static final java.lang.String LOCKER
See Also:
Constant Field Values

LOCK_TIME

static final java.lang.String LOCK_TIME
See Also:
Constant Field Values
Method Detail

lockCurrentDocument

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

Throws:
ClientException

unlockCurrentDocument

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

Throws:
ClientException

lockDocument

java.lang.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

java.lang.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(java.util.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(java.util.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

java.lang.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

java.lang.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

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

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

getCanUnlockCurrentDoc

java.lang.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

java.util.Map<java.lang.String,java.lang.String> 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

java.util.Map<java.lang.String,java.lang.String> 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

java.lang.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()

destroy

void destroy()

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.