|
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.edit.lock.LockActionsBean
@Name(value="lockActions") @Scope(value=EVENT) @Install(precedence=10) public class LockActionsBean
This is the action listener that knows to decide if an user has the right to take the lock or release the lock of a document.
Most of the logic of this bean should either be moved into a DocumentModel adapter or directly into the core API.
Field Summary |
---|
Fields inherited from interface org.nuxeo.ecm.webapp.edit.lock.LockActions |
---|
LOCK_CREATED, LOCK_TIME, LOCKER |
Constructor Summary | |
---|---|
LockActionsBean()
|
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()
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LockActionsBean()
Method Detail |
---|
public Boolean getCanLockDoc(DocumentModel document)
LockActions
getCanLockDoc
in interface LockActions
@Factory(value="currentDocumentCanBeLocked", scope=EVENT) public Boolean getCanLockCurrentDoc()
LockActions
getCanLockCurrentDoc
in interface LockActions
public Boolean getCanUnlockDoc(DocumentModel document)
LockActions
getCanUnlockDoc
in interface LockActions
@Factory(value="currentDocumentCanBeUnlocked", scope=EVENT) public Boolean getCanUnlockCurrentDoc()
LockActions
getCanUnlockCurrentDoc
in interface LockActions
public String lockCurrentDocument() throws ClientException
LockActions
lockCurrentDocument
in interface LockActions
ClientException
public String lockDocument(DocumentModel document) throws ClientException
LockActions
lockDocument
in interface LockActions
document
- the document of which lock is to be taken
ClientException
public String unlockCurrentDocument() throws ClientException
LockActions
unlockCurrentDocument
in interface LockActions
ClientException
public String unlockDocument(DocumentModel document) throws ClientException
LockActions
unlockDocument
in interface LockActions
document
- the document of which lock is to be released
ClientException
public void lockDocuments(List<DocumentModel> documents)
LockActions
lockDocuments
in interface LockActions
documents
- the list with the documents of which locks are to be
takenpublic void unlockDocuments(List<DocumentModel> documents)
LockActions
unlockDocuments
in interface LockActions
documents
- the list with the documents of which locks are to be
releasedpublic Action getLockOrUnlockAction()
LockActions
getLockOrUnlockAction
in interface LockActions
@Factory(value="currentDocumentLockDetails", scope=EVENT) public Map<String,Serializable> getCurrentDocLockDetails() throws ClientException
LockActions
getCurrentDocLockDetails
in interface LockActions
ClientException
public Map<String,Serializable> getLockDetails(DocumentModel document) throws ClientException
LockActions
getLockDetails
in interface LockActions
document
- the document for which this information is needed
ClientException
@Deprecated public Boolean isCurrentDocumentLiveEditable()
LockActions
isCurrentDocumentLiveEditable
in interface LockActions
@BypassInterceptors public void resetLockState()
resetLockState
in interface LockActions
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |