Class UnmodifiableAccessControlList
- java.lang.Object
-
- org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList
-
- All Implemented Interfaces:
AccessControlList
,AccessControlPolicy
,JackrabbitAccessControlList
,JackrabbitAccessControlPolicy
public class UnmodifiableAccessControlList extends Object implements JackrabbitAccessControlList
An implementation of theAccessControlList
interface that only allows for reading. The write methods (addAccessControlEntry
andremoveAccessControlEntry
) throw anAccessControlException
.
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableAccessControlList(List<? extends AccessControlEntry> accessControlEntries)
Construct a newUnmodifiableAccessControlList
UnmodifiableAccessControlList(List<? extends AccessControlEntry> accessControlEntries, String path, Map<String,Integer> restrictions)
Construct a newUnmodifiableAccessControlList
UnmodifiableAccessControlList(AccessControlList acl)
Construct a newUnmodifiableAccessControlList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAccessControlEntry(Principal principal, Privilege[] privileges)
boolean
addEntry(Principal principal, Privilege[] privileges, boolean isAllow)
boolean
addEntry(Principal principal, Privilege[] privileges, boolean isAllow, Map<String,Value> restrictions)
boolean
addEntry(Principal principal, Privilege[] privileges, boolean isAllow, Map<String,Value> restrictions, Map<String,Value[]> mvRestrictions)
boolean
equals(Object obj)
AccessControlEntry[]
getAccessControlEntries()
String
getPath()
String[]
getRestrictionNames()
int
getRestrictionType(String restrictionName)
int
hashCode()
boolean
isEmpty()
boolean
isMultiValueRestriction(String restrictionName)
void
orderBefore(AccessControlEntry srcEntry, AccessControlEntry destEntry)
void
removeAccessControlEntry(AccessControlEntry ace)
int
size()
-
-
-
Constructor Detail
-
UnmodifiableAccessControlList
public UnmodifiableAccessControlList(AccessControlList acl) throws RepositoryException
Construct a newUnmodifiableAccessControlList
- Parameters:
acl
- The AccessControlList to be wrapped in order to prevent it's modification.- Throws:
RepositoryException
- The the entries cannot be retrieved from the specifiedAccessControlList
.
-
UnmodifiableAccessControlList
public UnmodifiableAccessControlList(List<? extends AccessControlEntry> accessControlEntries)
Construct a newUnmodifiableAccessControlList
- Parameters:
accessControlEntries
- A list ofaccess control entries
.
-
-
Method Detail
-
getAccessControlEntries
public AccessControlEntry[] getAccessControlEntries() throws RepositoryException
- Specified by:
getAccessControlEntries
in interfaceAccessControlList
- Throws:
RepositoryException
- See Also:
AccessControlList.getAccessControlEntries()
-
addAccessControlEntry
public boolean addAccessControlEntry(Principal principal, Privilege[] privileges) throws AccessControlException, RepositoryException
- Specified by:
addAccessControlEntry
in interfaceAccessControlList
- Throws:
AccessControlException
RepositoryException
- See Also:
AccessControlList.addAccessControlEntry(Principal, Privilege[])
-
removeAccessControlEntry
public void removeAccessControlEntry(AccessControlEntry ace) throws AccessControlException, RepositoryException
- Specified by:
removeAccessControlEntry
in interfaceAccessControlList
- Throws:
AccessControlException
RepositoryException
- See Also:
AccessControlList.removeAccessControlEntry(AccessControlEntry)
-
getRestrictionNames
public String[] getRestrictionNames()
- Specified by:
getRestrictionNames
in interfaceJackrabbitAccessControlList
- See Also:
JackrabbitAccessControlList.getRestrictionNames()
-
getRestrictionType
public int getRestrictionType(String restrictionName)
- Specified by:
getRestrictionType
in interfaceJackrabbitAccessControlList
- See Also:
JackrabbitAccessControlList.getRestrictionType(String)
-
isMultiValueRestriction
public boolean isMultiValueRestriction(String restrictionName) throws RepositoryException
- Specified by:
isMultiValueRestriction
in interfaceJackrabbitAccessControlList
- Throws:
RepositoryException
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceJackrabbitAccessControlList
- See Also:
JackrabbitAccessControlList.isEmpty()
-
size
public int size()
- Specified by:
size
in interfaceJackrabbitAccessControlList
- See Also:
JackrabbitAccessControlList.size()
-
addEntry
public boolean addEntry(Principal principal, Privilege[] privileges, boolean isAllow) throws AccessControlException
- Specified by:
addEntry
in interfaceJackrabbitAccessControlList
- Throws:
AccessControlException
- See Also:
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean)
-
addEntry
public boolean addEntry(Principal principal, Privilege[] privileges, boolean isAllow, Map<String,Value> restrictions) throws AccessControlException
- Specified by:
addEntry
in interfaceJackrabbitAccessControlList
- Throws:
AccessControlException
- See Also:
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map)
-
addEntry
public boolean addEntry(Principal principal, Privilege[] privileges, boolean isAllow, Map<String,Value> restrictions, Map<String,Value[]> mvRestrictions) throws AccessControlException, RepositoryException
- Specified by:
addEntry
in interfaceJackrabbitAccessControlList
- Throws:
AccessControlException
RepositoryException
-
orderBefore
public void orderBefore(AccessControlEntry srcEntry, AccessControlEntry destEntry) throws AccessControlException
- Specified by:
orderBefore
in interfaceJackrabbitAccessControlList
- Throws:
AccessControlException
- See Also:
JackrabbitAccessControlList.orderBefore(AccessControlEntry, AccessControlEntry)
-
getPath
public String getPath()
- Specified by:
getPath
in interfaceJackrabbitAccessControlPolicy
- See Also:
JackrabbitAccessControlPolicy.getPath()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
- See Also:
Object.equals(Object)
-
-