|
Nuxeo Enterprise Platform 5.4 | |||||||||
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_TIME, LOCKER |
Constructor Summary | |
---|---|
LockActionsBean()
|
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()
Deprecated. use LiveEditBootstrapHelper.isCurrentDocumentLiveEditable() instead |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LockActionsBean()
Method Detail |
---|
public java.lang.Boolean getCanLockDoc(DocumentModel document)
LockActions
getCanLockDoc
in interface LockActions
@Factory(value="currentDocumentCanBeLocked", scope=EVENT) public java.lang.Boolean getCanLockCurrentDoc()
LockActions
getCanLockCurrentDoc
in interface LockActions
public java.lang.Boolean getCanUnlockDoc(DocumentModel document)
LockActions
getCanUnlockDoc
in interface LockActions
@Factory(value="currentDocumentCanBeUnlocked", scope=EVENT) public java.lang.Boolean getCanUnlockCurrentDoc()
LockActions
getCanUnlockCurrentDoc
in interface LockActions
public java.lang.String lockCurrentDocument() throws ClientException
LockActions
lockCurrentDocument
in interface LockActions
ClientException
public java.lang.String lockDocument(DocumentModel document) throws ClientException
LockActions
lockDocument
in interface LockActions
document
- the document of which lock is to be taken
ClientException
public java.lang.String unlockCurrentDocument() throws ClientException
LockActions
unlockCurrentDocument
in interface LockActions
ClientException
public java.lang.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(java.util.List<DocumentModel> documents)
LockActions
lockDocuments
in interface LockActions
documents
- the list with the documents of which locks are to be
takenpublic void unlockDocuments(java.util.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 java.util.Map<java.lang.String,java.lang.String> getCurrentDocLockDetails() throws ClientException
LockActions
getCurrentDocLockDetails
in interface LockActions
ClientException
public java.util.Map<java.lang.String,java.lang.String> getLockDetails(DocumentModel document) throws ClientException
LockActions
getLockDetails
in interface LockActions
document
- the document for which this information is needed
ClientException
@Deprecated public java.lang.Boolean isCurrentDocumentLiveEditable()
LockActions
isCurrentDocumentLiveEditable
in interface LockActions
@BypassInterceptors public void resetLockState()
resetLockState
in interface LockActions
@Destroy public void destroy()
destroy
in interface LockActions
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |