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

All Superinterfaces:
AccessControlList, AccessControlPolicy

public interface JackrabbitAccessControlList
extends AccessControlList

JackrabbitAccessControlList is an extension of the AccessControlList. Similar to the latter any modifications made will not take effect, until it is written back and saved.


Method Summary
 boolean addEntry(Principal principal, Privilege[] privileges, boolean isAllow)
          Same as addEntry(Principal, Privilege[], boolean, Map) using some implementation specific restrictions.
 boolean addEntry(Principal principal, Privilege[] privileges, boolean isAllow, Map restrictions)
          Adds an access control entry to this policy consisting of the specified principal, the specified privileges, the isAllow flag and an optional map containing additional restrictions.
 String getPath()
          Returns the path of the node this policy has been created for.
 boolean isEmpty()
          Returns true if this policy does not yet define any entries.
 int size()
          Returns the number of entries or 0 if the policy is empty.
 
Methods inherited from interface org.apache.jackrabbit.api.jsr283.security.AccessControlList
addAccessControlEntry, getAccessControlEntries, removeAccessControlEntry
 

Method Detail

getPath

String getPath()
Returns the path of the node this policy has been created for.

Returns:
the path of the node this policy has been created for.

isEmpty

boolean isEmpty()
Returns true if this policy does not yet define any entries.

Returns:
If no entries are present.

size

int size()
Returns the number of entries or 0 if the policy is empty.

Returns:
The number of entries present or 0 if the policy is empty.

addEntry

boolean addEntry(Principal principal,
                 Privilege[] privileges,
                 boolean isAllow)
                 throws AccessControlException,
                        RepositoryException
Same as addEntry(Principal, Privilege[], boolean, Map) using some implementation specific restrictions.

Parameters:
principal -
privileges -
isAllow -
Returns:
true if this policy has changed by incorporating the given entry; false otherwise.
Throws:
AccessControlException - If any of the given parameter is invalid or cannot be handled by the implementation.
RepositoryException - If another error occurs.
See Also:
AccessControlList.addAccessControlEntry(Principal, Privilege[])

addEntry

boolean addEntry(Principal principal,
                 Privilege[] privileges,
                 boolean isAllow,
                 Map restrictions)
                 throws AccessControlException,
                        RepositoryException
Adds an access control entry to this policy consisting of the specified principal, the specified privileges, the isAllow flag and an optional map containing additional restrictions.

This method returns true if this policy was modified, false otherwise.

An AccessControlException is thrown if any of the specified parameters is invalid or if some other access control related exception occurs.

Parameters:
principal -
privileges -
isAllow -
restrictions - A map of additional restrictions used to narrow the effect of the entry to be created. The map must map JCR names to a single Value object.
Returns:
true if this policy has changed by incorporating the given entry; false otherwise.
Throws:
AccessControlException - If any of the given parameter is invalid or cannot be handled by the implementation.
RepositoryException - If another error occurs.
See Also:
AccessControlList.addAccessControlEntry(Principal, Privilege[])


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