Class LockOwnerDynamicAuthority
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.repo.security.permissions.dynamic.LockOwnerDynamicAuthority
-
- All Implemented Interfaces:
java.util.EventListener,DynamicAuthority,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class LockOwnerDynamicAuthority extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements DynamicAuthority
LockOwnerDynamicAuthority
-
-
Constructor Summary
Constructors Constructor Description LockOwnerDynamicAuthority()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAuthority()If this authority is granted this method provides the string representation of the granted authority.booleanhasAuthority(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String userName)Is this authority granted to the given user for this node ref?protected voidonBootstrap(org.springframework.context.ApplicationEvent event)protected voidonShutdown(org.springframework.context.ApplicationEvent event)No-opjava.util.Set<PermissionReference>requiredFor()For what permission checks is this dynamic authority required? If null, it is required for all checks.voidsetCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)Service to get the check-in details.voidsetLockService(LockService lockService)Set the lock servicevoidsetModelDAO(ModelDAO modelDAO)Set the permissions model daovoidsetRequiredFor(java.util.List<java.lang.String> requiredFor)Set the permissions for which this dynamic authority is required
-
-
-
Method Detail
-
hasAuthority
public boolean hasAuthority(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String userName)Description copied from interface:DynamicAuthorityIs this authority granted to the given user for this node ref?- Specified by:
hasAuthorityin interfaceDynamicAuthority- Parameters:
nodeRef- NodeRefuserName- String- Returns:
- true if the current user has the authority
-
getAuthority
public java.lang.String getAuthority()
Description copied from interface:DynamicAuthorityIf this authority is granted this method provides the string representation of the granted authority.- Specified by:
getAuthorityin interfaceDynamicAuthority- Returns:
- the authority taht may be assigned
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
- Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
No-op- Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
setLockService
public void setLockService(LockService lockService)
Set the lock service
-
setCheckOutCheckInService
public void setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
Service to get the check-in details. This is not used for Spring configuration because it requires a permission-wrapped public service that in turn depends on this component.
-
setModelDAO
public void setModelDAO(ModelDAO modelDAO)
Set the permissions model dao
-
setRequiredFor
public void setRequiredFor(java.util.List<java.lang.String> requiredFor)
Set the permissions for which this dynamic authority is required
-
requiredFor
public java.util.Set<PermissionReference> requiredFor()
Description copied from interface:DynamicAuthorityFor what permission checks is this dynamic authority required? If null, it is required for all checks.- Specified by:
requiredForin interfaceDynamicAuthority- Returns:
- the set of permissions for which this dynamic authority should be evaluated
-
-