@Name(value="lockActions") @Scope(value=EVENT) @Install(precedence=10) public class LockActionsBean extends Object implements LockActions
Most of the logic of this bean should either be moved into a DocumentModel adapter or directly into the core API.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_VIEW_ID |
LOCK_CREATED, LOCK_TIME, LOCKER| Constructor and Description |
|---|
LockActionsBean() |
| Modifier and Type | Method and Description |
|---|---|
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()
Deprecated.
use LiveEditBootstrapHelper.isCurrentDocumentLiveEditable()
instead
|
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.
|
public static final String DEFAULT_VIEW_ID
public Boolean getCanLockDoc(DocumentModel document)
LockActionsgetCanLockDoc in interface LockActions@Factory(value="currentDocumentCanBeLocked", scope=EVENT) public Boolean getCanLockCurrentDoc()
LockActionsgetCanLockCurrentDoc in interface LockActionspublic Boolean getCanUnlockDoc(DocumentModel document)
LockActionsgetCanUnlockDoc in interface LockActions@Factory(value="currentDocumentCanBeUnlocked", scope=EVENT) public Boolean getCanUnlockCurrentDoc()
LockActionsgetCanUnlockCurrentDoc in interface LockActionspublic String lockCurrentDocument() throws ClientException
LockActionslockCurrentDocument in interface LockActionsClientExceptionpublic String lockDocument(DocumentModel document) throws ClientException
LockActionslockDocument in interface LockActionsdocument - the document of which lock is to be takenClientExceptionpublic String unlockCurrentDocument() throws ClientException
LockActionsunlockCurrentDocument in interface LockActionsClientExceptionpublic String unlockDocument(DocumentModel document) throws ClientException
LockActionsunlockDocument in interface LockActionsdocument - the document of which lock is to be releasedClientExceptionpublic void lockDocuments(List<DocumentModel> documents)
LockActionslockDocuments in interface LockActionsdocuments - the list with the documents of which locks are to be
takenpublic void unlockDocuments(List<DocumentModel> documents)
LockActionsunlockDocuments in interface LockActionsdocuments - the list with the documents of which locks are to be
releasedpublic Action getLockOrUnlockAction()
LockActionsgetLockOrUnlockAction in interface LockActions@Factory(value="currentDocumentLockDetails", scope=EVENT) public Map<String,Serializable> getCurrentDocLockDetails() throws ClientException
LockActionsgetCurrentDocLockDetails in interface LockActionsClientExceptionpublic Map<String,Serializable> getLockDetails(DocumentModel document) throws ClientException
LockActionsgetLockDetails in interface LockActionsdocument - the document for which this information is neededClientException@Deprecated public Boolean isCurrentDocumentLiveEditable()
LockActionsisCurrentDocumentLiveEditable in interface LockActions@BypassInterceptors public void resetLockState()
resetLockState in interface LockActionsCopyright © 2013 Nuxeo SA. All Rights Reserved.