Class OwnerDynamicAuthority

  • All Implemented Interfaces:
    DynamicAuthority, org.springframework.beans.factory.InitializingBean

    public class OwnerDynamicAuthority
    extends java.lang.Object
    implements DynamicAuthority, org.springframework.beans.factory.InitializingBean
    The owner dynamic authority
    Author:
    andyh
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      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?
      java.util.Set<PermissionReference> requiredFor()
      For what permission checks is this dynamic authority required? If null, it is required for all checks.
      void setOwnableService​(OwnableService ownableService)
      Set the ownable service
      • Methods inherited from class java.lang.Object

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

      • OwnerDynamicAuthority

        public OwnerDynamicAuthority()
        Standard construction
    • Method Detail

      • setOwnableService

        public void setOwnableService​(OwnableService ownableService)
        Set the ownable service
        Parameters:
        ownableService - OwnableService
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • 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
      • 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