org.apache.jackrabbit.core.security.authorization
Interface AccessControlUtils

All Known Implementing Classes:
AbstractAccessControlProvider, ACLProvider, ACLProvider, CombinedProvider, UserAccessControlProvider

public interface AccessControlUtils

AccessControlUtils...


Method Summary
 boolean isAcItem(ItemImpl item)
          Test if the specified path points to an item that defines AC information and consequently should be considered protected.
 boolean isAcItem(Path absPath)
          Test if the specified path points to an item that defines AC information.
 boolean isAdminOrSystem(Set<Principal> principals)
          Test if the specified set of principals contains an admin or system principal.
 boolean isReadOnly(Set<Principal> principals)
          Test if if the specified set of principals will have read-only permissions only.
 

Method Detail

isAcItem

boolean isAcItem(Path absPath)
                 throws RepositoryException
Test if the specified path points to an item that defines AC information.

Parameters:
absPath - Path to an item.
Returns:
true if the item at the specified absPath contains access control information.
Throws:
RepositoryException - If an error occurs.

isAcItem

boolean isAcItem(ItemImpl item)
                 throws RepositoryException
Test if the specified path points to an item that defines AC information and consequently should be considered protected.

Parameters:
item - An item.
Returns:
true if the item at the specified item defines access control related information is should therefore be considered protected.
Throws:
RepositoryException - If an error occurs.

isAdminOrSystem

boolean isAdminOrSystem(Set<Principal> principals)
Test if the specified set of principals contains an admin or system principal.

Parameters:
principals - A set of principals.
Returns:
true if the specified set of principals contains an AdminPrincipal or a SystemPrincipal.

isReadOnly

boolean isReadOnly(Set<Principal> principals)
Test if if the specified set of principals will have read-only permissions only. False otherwise (or if it cannot be determined from the principal set only).

Parameters:
principals - A set of principals.
Returns:
true if the specified set of principals will only be granted read permission on all items.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.