Class BasePermissionsNode

java.lang.Object
org.alfresco.repo.template.BaseContentNode
org.alfresco.repo.template.BasePermissionsNode
All Implemented Interfaces:
Serializable, TemplateContent, TemplateNodeRef, TemplatePermissions, TemplateProperties
Direct Known Subclasses:
TemplateNode

public abstract class BasePermissionsNode extends BaseContentNode implements TemplatePermissions
Base class for Template API objects that support permissions.
Author:
Kevin Roast
See Also:
  • Constructor Details

    • BasePermissionsNode

      public BasePermissionsNode()
  • Method Details

    • getPermissions

      public List<String> getPermissions()
      Specified by:
      getPermissions in interface TemplatePermissions
      Returns:
      List of permissions applied to this Node, including inherited. Strings returned are of the format [ALLOWED|DENIED];[USERNAME|GROUPNAME];PERMISSION for example ALLOWED;kevinr;Consumer so can be easily tokenized on the ';' character.
    • getDirectPermissions

      public List<String> getDirectPermissions()
      Returns:
      List of permissions applied to this Node (does not include inherited). Strings returned are of the format [ALLOWED|DENIED];[USERNAME|GROUPNAME];PERMISSION for example ALLOWED;kevinr;Consumer so can be easily tokenized on the ';' character.
    • getFullPermissions

      public List<String> getFullPermissions()
      Returns:
      List of permissions applied to this Node, including inherited. Strings returned are of the format [ALLOWED|DENIED];[USERNAME|GROUPNAME];PERMISSION;[INHERITED|DIRECT] for example ALLOWED;kevinr;Consumer so can be easily tokenized on the ';' character.
    • getInheritsPermissions

      public boolean getInheritsPermissions()
      Specified by:
      getInheritsPermissions in interface TemplatePermissions
      Returns:
      true if this node inherits permissions from its parent node, false otherwise.
    • hasPermission

      public boolean hasPermission(String permission)
      Specified by:
      hasPermission in interface TemplatePermissions
      Parameters:
      permission - Permission name to test
      Returns:
      true if the current user is granted the specified permission on the node