org.alfresco.repo.security.permissions.noop
Class PermissionServiceNOOPImpl

java.lang.Object
  extended by org.alfresco.repo.security.permissions.noop.PermissionServiceNOOPImpl
All Implemented Interfaces:
PermissionServiceSPI, PermissionService

public class PermissionServiceNOOPImpl
extends java.lang.Object
implements PermissionServiceSPI

Dummy implementation of Permissions Service


Field Summary
 
Fields inherited from interface org.alfresco.service.cmr.security.PermissionService
ADD_CHILDREN, ADMINISTRATOR_AUTHORITY, ALL_AUTHORITIES, ALL_PERMISSIONS, ASPECTS, CANCEL_CHECK_OUT, CHANGE_PERMISSIONS, CHECK_IN, CHECK_OUT, CONSUMER, CONTRIBUTOR, COORDINATOR, CREATE_ASSOCIATIONS, CREATE_CHILDREN, DELETE, DELETE_ASSOCIATIONS, DELETE_CHILDREN, DELETE_NODE, EDITOR, EXECUTE, EXECUTE_CONTENT, FLATTEN, FULL_CONTROL, GROUP_PREFIX, GUEST_AUTHORITY, LINK_CHILDREN, LOCK, LOCK_OWNER_AUTHORITY, OWNER_AUTHORITY, PROPERTIES, READ, READ_ASSOCIATIONS, READ_CHILDREN, READ_CONTENT, READ_PERMISSIONS, READ_PROPERTIES, ROLE_PREFIX, SET_OWNER, TAKE_OWNERSHIP, UNLOCK, WCM_CONTENT_CONTRIBUTOR, WCM_CONTENT_MANAGER, WCM_CONTENT_PUBLISHER, WCM_CONTENT_REVIEWER, WCM_STORE_OWNER_AUTHORITY, WRITE, WRITE_CONTENT, WRITE_PROPERTIES
 
Constructor Summary
PermissionServiceNOOPImpl()
           
 
Method Summary
 void clearPermission(NodeRef nodeRef, java.lang.String authority)
          Delete all permission for the given authority.
 void clearPermission(StoreRef storeRef, java.lang.String authority)
          Clear all permission masks for an authority on a store
 void deletePermission(NodeRef nodeRef, java.lang.String authority, java.lang.String perm)
          Find and delete a access control entry by node, authentication and permission.
 void deletePermission(PermissionEntry permissionEntry)
          Delete a single permission entry
 void deletePermission(StoreRef storeRef, java.lang.String authority, java.lang.String permission)
          Remove part of a permission mask on a store
 void deletePermissions(NodePermissionEntry nodePermissionEntry)
          Delete the permissions defined by the nodePermissionEntry
 void deletePermissions(NodeRef nodeRef)
          Delete all the permission assigned to the node
 void deletePermissions(StoreRef storeRef)
          Remove all permission mask on a store
 void deletePermissions(java.lang.String recipient)
          Delete permissions for the given recipient.
 NodePermissionEntry explainPermission(NodeRef nodeRef, PermissionReference perm)
          Where is the permission set that controls the behaviour for the given permission for the given authentication to access the specified name.
 java.util.Set findNodesByAssignedPermission(java.lang.String authority, java.lang.String permission, boolean allow, boolean includeContainingAuthorities, boolean exactPermissionMatch)
           
 java.util.Set findNodesByAssignedPermissionForCurrentUser(java.lang.String permission, boolean allow, boolean includeContainingAuthorities, boolean exactPermissionMatch)
           
 java.lang.String getAllAuthorities()
          Get the All Authorities
 java.lang.String getAllPermission()
          Get the All Permission
 PermissionReference getAllPermissionReference()
          Get the All Permission
 java.util.Set getAllSetPermissions(NodeRef nodeRef)
          Get all the AccessPermissions that are set for anyone for the given node
 java.util.Set getAllSetPermissions(StoreRef storeRef)
          Get all the AccessPermissions that are set for anyone for the given node
 java.util.Map getAllSetPermissionsForAuthority(java.lang.String authority)
           
 java.util.Map getAllSetPermissionsForCurrentUser()
           
 boolean getInheritParentPermissions(NodeRef nodeRef)
          Return the global inheritance behaviour for permissions on a node.
 java.lang.String getOwnerAuthority()
          Get the Owner Authority
 java.lang.String getPermission(PermissionReference permissionReference)
          Get the string that can be used to identify the given permission reference.
 PermissionReference getPermissionReference(QName qname, java.lang.String permissionName)
          Get the permission reference for the given data type and permission name.
 PermissionReference getPermissionReference(java.lang.String permissionName)
          Get the permission reference by permission name.
 java.util.Set getPermissions(NodeRef nodeRef)
          Get all the AccessPermissions that are granted/denied to the current authentication for the given node
 NodePermissionEntry getSetPermissions(NodeRef nodeRef)
          Get the permissions that have been set on the given node (it knows nothing of the parent permissions)
 NodePermissionEntry getSetPermissions(StoreRef storeRef)
          Get the permissions set for the store
 java.util.Set getSettablePermissionReferences(NodeRef nodeRef)
          Get the permissions that can be set for a given type
 java.util.Set getSettablePermissionReferences(QName type)
          Get the permissions that can be set for a given type
 java.util.Set getSettablePermissions(NodeRef nodeRef)
          Get the permissions that can be set for a given node
 java.util.Set getSettablePermissions(QName type)
          Get the permissions that can be set for a given type
 AccessStatus hasPermission(java.lang.Long aclID, PermissionContext context, java.lang.String permission)
          Check if a permission is allowed on an acl.
 AccessStatus hasPermission(NodeRef nodeRef, PermissionReference perm)
          Check that the given authentication has a particular permission for the given node.
 AccessStatus hasPermission(NodeRef nodeRef, java.lang.String perm)
          Check that the given authentication has a particular permission for the given node.
 void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions)
          Set the global inheritance behaviour for permissions on a node.
 void setPermission(NodePermissionEntry nodePermissionEntry)
          Set the permissions on a node.
 void setPermission(NodeRef nodeRef, java.lang.String authority, java.lang.String perm, boolean allow)
          Set a specific permission on a node.
 void setPermission(PermissionEntry permissionEntry)
          Add or set a permission entry on a node.
 void setPermission(StoreRef storeRef, java.lang.String authority, java.lang.String permission, boolean allow)
          Add a permission mask to a store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionServiceNOOPImpl

public PermissionServiceNOOPImpl()
Method Detail

getOwnerAuthority

public java.lang.String getOwnerAuthority()
Description copied from interface: PermissionService
Get the Owner Authority

Specified by:
getOwnerAuthority in interface PermissionService
Returns:
the owner authority

getAllAuthorities

public java.lang.String getAllAuthorities()
Description copied from interface: PermissionService
Get the All Authorities

Specified by:
getAllAuthorities in interface PermissionService
Returns:
the All authorities

getAllPermission

public java.lang.String getAllPermission()
Description copied from interface: PermissionService
Get the All Permission

Specified by:
getAllPermission in interface PermissionService
Returns:
the All permission

getPermissions

public java.util.Set getPermissions(NodeRef nodeRef)
Description copied from interface: PermissionService
Get all the AccessPermissions that are granted/denied to the current authentication for the given node

Specified by:
getPermissions in interface PermissionService
Parameters:
nodeRef - - the reference to the node
Returns:
the set of allowed permissions

getAllSetPermissions

public java.util.Set getAllSetPermissions(NodeRef nodeRef)
Description copied from interface: PermissionService
Get all the AccessPermissions that are set for anyone for the given node

Specified by:
getAllSetPermissions in interface PermissionService
Parameters:
nodeRef - - the reference to the node
Returns:
the set of allowed permissions

getSettablePermissions

public java.util.Set getSettablePermissions(NodeRef nodeRef)
Description copied from interface: PermissionService
Get the permissions that can be set for a given node

Specified by:
getSettablePermissions in interface PermissionService
Returns:

getSettablePermissions

public java.util.Set getSettablePermissions(QName type)
Description copied from interface: PermissionService
Get the permissions that can be set for a given type

Specified by:
getSettablePermissions in interface PermissionService
Returns:
- set of permissions

hasPermission

public AccessStatus hasPermission(NodeRef nodeRef,
                                  java.lang.String perm)
Description copied from interface: PermissionService
Check that the given authentication has a particular permission for the given node. (The default behaviour is to inherit permissions)

Specified by:
hasPermission in interface PermissionService
Returns:
- access status

deletePermissions

public void deletePermissions(NodeRef nodeRef)
Description copied from interface: PermissionService
Delete all the permission assigned to the node

Specified by:
deletePermissions in interface PermissionService

deletePermission

public void deletePermission(NodeRef nodeRef,
                             java.lang.String authority,
                             java.lang.String perm)
Description copied from interface: PermissionService
Find and delete a access control entry by node, authentication and permission. It is possible to delete
  1. a specific permission;
  2. all permissions for an authority (if the permission is null);
  3. entries for all authorities that have a specific permission (if the authority is null); and
  4. all permissions set for the node (if both the permission and authority are null).

Specified by:
deletePermission in interface PermissionService
Parameters:
nodeRef - the node that the entry applies to
authority - the authority recipient (if null then this will match all authorities)
perm - the entry permission (if null then this will match all permissions)

setPermission

public void setPermission(NodeRef nodeRef,
                          java.lang.String authority,
                          java.lang.String perm,
                          boolean allow)
Description copied from interface: PermissionService
Set a specific permission on a node.

Specified by:
setPermission in interface PermissionService

setInheritParentPermissions

public void setInheritParentPermissions(NodeRef nodeRef,
                                        boolean inheritParentPermissions)
Description copied from interface: PermissionService
Set the global inheritance behaviour for permissions on a node.

Specified by:
setInheritParentPermissions in interface PermissionService

getInheritParentPermissions

public boolean getInheritParentPermissions(NodeRef nodeRef)
Description copied from interface: PermissionService
Return the global inheritance behaviour for permissions on a node.

Specified by:
getInheritParentPermissions in interface PermissionService
Returns:
inheritParentPermissions

clearPermission

public void clearPermission(NodeRef nodeRef,
                            java.lang.String authority)
Description copied from interface: PermissionService
Delete all permission for the given authority.

Specified by:
clearPermission in interface PermissionService
authority - (if null then this will match all authorities)

deletePermission

public void deletePermission(PermissionEntry permissionEntry)
Description copied from interface: PermissionServiceSPI
Delete a single permission entry

Specified by:
deletePermission in interface PermissionServiceSPI

deletePermissions

public void deletePermissions(NodePermissionEntry nodePermissionEntry)
Description copied from interface: PermissionServiceSPI
Delete the permissions defined by the nodePermissionEntry

Specified by:
deletePermissions in interface PermissionServiceSPI

deletePermissions

public void deletePermissions(java.lang.String recipient)
Description copied from interface: PermissionServiceSPI
Delete permissions for the given recipient.

Specified by:
deletePermissions in interface PermissionServiceSPI

explainPermission

public NodePermissionEntry explainPermission(NodeRef nodeRef,
                                             PermissionReference perm)
Description copied from interface: PermissionServiceSPI
Where is the permission set that controls the behaviour for the given permission for the given authentication to access the specified name.

Specified by:
explainPermission in interface PermissionServiceSPI
Returns:
the node permission entry

getAllPermissionReference

public PermissionReference getAllPermissionReference()
Description copied from interface: PermissionServiceSPI
Get the All Permission

Specified by:
getAllPermissionReference in interface PermissionServiceSPI
Returns:
the All permission

getPermission

public java.lang.String getPermission(PermissionReference permissionReference)
Description copied from interface: PermissionServiceSPI
Get the string that can be used to identify the given permission reference.

Specified by:
getPermission in interface PermissionServiceSPI
Returns:
the permission short name

getPermissionReference

public PermissionReference getPermissionReference(QName qname,
                                                  java.lang.String permissionName)
Description copied from interface: PermissionServiceSPI
Get the permission reference for the given data type and permission name.

Specified by:
getPermissionReference in interface PermissionServiceSPI
Parameters:
qname - - may be null if the permission name is unique
Returns:
the permission reference

getPermissionReference

public PermissionReference getPermissionReference(java.lang.String permissionName)
Description copied from interface: PermissionServiceSPI
Get the permission reference by permission name.

Specified by:
getPermissionReference in interface PermissionServiceSPI
Returns:
the permission reference

getSetPermissions

public NodePermissionEntry getSetPermissions(NodeRef nodeRef)
Description copied from interface: PermissionServiceSPI
Get the permissions that have been set on the given node (it knows nothing of the parent permissions)

Specified by:
getSetPermissions in interface PermissionServiceSPI
Returns:
the node permission entry

getSettablePermissionReferences

public java.util.Set getSettablePermissionReferences(NodeRef nodeRef)
Description copied from interface: PermissionServiceSPI
Get the permissions that can be set for a given type

Specified by:
getSettablePermissionReferences in interface PermissionServiceSPI
Returns:
the set of permissions

getSettablePermissionReferences

public java.util.Set getSettablePermissionReferences(QName type)
Description copied from interface: PermissionServiceSPI
Get the permissions that can be set for a given type

Specified by:
getSettablePermissionReferences in interface PermissionServiceSPI
Returns:
the set of permissions

hasPermission

public AccessStatus hasPermission(NodeRef nodeRef,
                                  PermissionReference perm)
Description copied from interface: PermissionServiceSPI
Check that the given authentication has a particular permission for the given node. (The default behaviour is to inherit permissions)

Specified by:
hasPermission in interface PermissionServiceSPI
Returns:
the access status

hasPermission

public AccessStatus hasPermission(java.lang.Long aclID,
                                  PermissionContext context,
                                  java.lang.String permission)
Description copied from interface: PermissionService
Check if a permission is allowed on an acl.

Specified by:
hasPermission in interface PermissionService
Returns:
the access status

setPermission

public void setPermission(NodePermissionEntry nodePermissionEntry)
Description copied from interface: PermissionServiceSPI
Set the permissions on a node.

Specified by:
setPermission in interface PermissionServiceSPI

setPermission

public void setPermission(PermissionEntry permissionEntry)
Description copied from interface: PermissionServiceSPI
Add or set a permission entry on a node.

Specified by:
setPermission in interface PermissionServiceSPI

getAllSetPermissionsForCurrentUser

public java.util.Map getAllSetPermissionsForCurrentUser()

getAllSetPermissionsForAuthority

public java.util.Map getAllSetPermissionsForAuthority(java.lang.String authority)

findNodesByAssignedPermissionForCurrentUser

public java.util.Set findNodesByAssignedPermissionForCurrentUser(java.lang.String permission,
                                                                 boolean allow,
                                                                 boolean includeContainingAuthorities,
                                                                 boolean exactPermissionMatch)

findNodesByAssignedPermission

public java.util.Set findNodesByAssignedPermission(java.lang.String authority,
                                                   java.lang.String permission,
                                                   boolean allow,
                                                   boolean includeContainingAuthorities,
                                                   boolean exactPermissionMatch)

clearPermission

public void clearPermission(StoreRef storeRef,
                            java.lang.String authority)
Description copied from interface: PermissionService
Clear all permission masks for an authority on a store

Specified by:
clearPermission in interface PermissionService

deletePermission

public void deletePermission(StoreRef storeRef,
                             java.lang.String authority,
                             java.lang.String permission)
Description copied from interface: PermissionService
Remove part of a permission mask on a store

Specified by:
deletePermission in interface PermissionService

deletePermissions

public void deletePermissions(StoreRef storeRef)
Description copied from interface: PermissionService
Remove all permission mask on a store

Specified by:
deletePermissions in interface PermissionService

setPermission

public void setPermission(StoreRef storeRef,
                          java.lang.String authority,
                          java.lang.String permission,
                          boolean allow)
Description copied from interface: PermissionService
Add a permission mask to a store

Specified by:
setPermission in interface PermissionService

getAllSetPermissions

public java.util.Set getAllSetPermissions(StoreRef storeRef)
Description copied from interface: PermissionService
Get all the AccessPermissions that are set for anyone for the given node

Specified by:
getAllSetPermissions in interface PermissionService
Parameters:
storeRef - - the reference to the store
Returns:
the set of allowed permissions

getSetPermissions

public NodePermissionEntry getSetPermissions(StoreRef storeRef)
Description copied from interface: PermissionServiceSPI
Get the permissions set for the store

Specified by:
getSetPermissions in interface PermissionServiceSPI
Returns:
- the node permission entry


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.