@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 | Class and Description | 
|---|---|
protected class  | 
LockActionsBean.UnrestrictedUnlocker  | 
| Modifier and Type | Field and Description | 
|---|---|
protected CoreSession | 
documentManager  | 
protected org.jboss.seam.faces.FacesMessages | 
facesMessages  | 
protected ResourcesAccessor | 
resourcesAccessor  | 
protected WebActions | 
webActions  | 
LOCK_CREATED, 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. 
 | 
protected boolean | 
isManagerOnDocument(DocumentRef ref)  | 
String | 
lockCurrentDocument()
Gets the lock of the current document. 
 | 
String | 
lockDocument(DocumentModel document)
Gets the lock of the document. 
 | 
void | 
resetEventContext()  | 
void | 
resetLockState()  | 
String | 
unlockCurrentDocument()
Releases the lock of the current document. 
 | 
String | 
unlockDocument(DocumentModel document)
Releases the lock of the document. 
 | 
@In(create=true,
    required=false)
protected transient org.jboss.seam.faces.FacesMessages facesMessages
@In(create=true) protected transient ResourcesAccessor resourcesAccessor
@In(create=true) protected transient WebActions webActions
@In(create=true,
    required=false)
protected transient CoreSession documentManager
public LockActionsBean()
public Boolean getCanLockDoc(DocumentModel document)
LockActionsgetCanLockDoc in interface LockActionsprotected boolean isManagerOnDocument(DocumentRef ref)
@Factory(value="currentDocumentCanBeLocked",
         scope=EVENT)
public Boolean getCanLockCurrentDoc()
LockActionsgetCanLockCurrentDoc in interface LockActions@Observer(value="userAllDocumentTypesSelectionChanged",
          create=false)
 @BypassInterceptors
public void resetEventContext()
public Boolean getCanUnlockDoc(DocumentModel document)
LockActionsgetCanUnlockDoc in interface LockActions@Factory(value="currentDocumentCanBeUnlocked",
         scope=EVENT)
public Boolean getCanUnlockCurrentDoc()
LockActionsgetCanUnlockCurrentDoc in interface LockActionspublic String lockCurrentDocument()
LockActionslockCurrentDocument in interface LockActionspublic String lockDocument(DocumentModel document)
LockActionslockDocument in interface LockActionsdocument - the document of which lock is to be takenpublic String unlockCurrentDocument()
LockActionsunlockCurrentDocument in interface LockActionspublic String unlockDocument(DocumentModel document)
LockActionsunlockDocument in interface LockActionsdocument - the document of which lock is to be releasedpublic Action getLockOrUnlockAction()
LockActionsgetLockOrUnlockAction in interface LockActions@Factory(value="currentDocumentLockDetails",
         scope=EVENT)
public Map<String,Serializable> getCurrentDocLockDetails()
LockActionsgetCurrentDocLockDetails in interface LockActionspublic Map<String,Serializable> getLockDetails(DocumentModel document)
LockActionsgetLockDetails in interface LockActionsdocument - the document for which this information is needed@BypassInterceptors public void resetLockState()
resetLockState in interface LockActionsCopyright © 2019 Nuxeo. All rights reserved.