Class 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
    • Field Summary

      • Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean

        log
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAuthority()
      If this authority is granted this method provides the string representation of the granted authority.
      boolean hasAuthority​(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String userName)
      Is this authority granted to the given user for this node ref?
      protected void onBootstrap​(org.springframework.context.ApplicationEvent event)  
      protected void onShutdown​(org.springframework.context.ApplicationEvent event)
      No-op
      java.util.Set<PermissionReference> requiredFor()
      For what permission checks is this dynamic authority required? If null, it is required for all checks.
      void setCheckOutCheckInService​(CheckOutCheckInService checkOutCheckInService)
      Service to get the check-in details.
      void setLockService​(LockService lockService)
      Set the lock service
      void setModelDAO​(ModelDAO modelDAO)
      Set the permissions model dao
      void setRequiredFor​(java.util.List<java.lang.String> requiredFor)
      Set the permissions for which this dynamic authority is required
      • Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean

        getApplicationContext, onApplicationEvent, setApplicationContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LockOwnerDynamicAuthority

        public LockOwnerDynamicAuthority()
    • Method Detail

      • hasAuthority

        public boolean hasAuthority​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                    java.lang.String userName)
        Description copied from interface: DynamicAuthority
        Is this authority granted to the given user for this node ref?
        Specified by:
        hasAuthority in interface DynamicAuthority
        Parameters:
        nodeRef - NodeRef
        userName - String
        Returns:
        true if the current user has the authority
      • getAuthority

        public java.lang.String getAuthority()
        Description copied from interface: DynamicAuthority
        If this authority is granted this method provides the string representation of the granted authority.
        Specified by:
        getAuthority in interface DynamicAuthority
        Returns:
        the authority taht may be assigned
      • onBootstrap

        protected void onBootstrap​(org.springframework.context.ApplicationEvent event)
        Specified by:
        onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean
      • onShutdown

        protected void onShutdown​(org.springframework.context.ApplicationEvent event)
        No-op
        Specified by:
        onShutdown in class org.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: DynamicAuthority
        For what permission checks is this dynamic authority required? If null, it is required for all checks.
        Specified by:
        requiredFor in interface DynamicAuthority
        Returns:
        the set of permissions for which this dynamic authority should be evaluated