|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.security.authorization.AccessControlEntryImpl
public abstract class AccessControlEntryImpl
Simple, immutable implementation of the
AccessControlEntry
and the JackrabbitAccessControlEntry
interfaces.
Constructor Summary | |
---|---|
protected |
AccessControlEntryImpl(AccessControlEntryImpl base,
Privilege[] privileges,
boolean isAllow)
|
protected |
AccessControlEntryImpl(Principal principal,
Privilege[] privileges)
Construct an access control entry for the given principal and privileges. |
protected |
AccessControlEntryImpl(Principal principal,
Privilege[] privileges,
boolean isAllow,
Map<String,Value> restrictions)
Construct an access control entry for the given principal and privileges. |
Method Summary | |
---|---|
protected int |
buildHashCode()
Build the hash code. |
boolean |
equals(Object obj)
|
Principal |
getPrincipal()
|
int |
getPrivilegeBits()
|
Privilege[] |
getPrivileges()
|
protected abstract NameResolver |
getResolver()
|
Value |
getRestriction(Name restrictionName)
|
Value |
getRestriction(String restrictionName)
Return the value of the restriction with the specified name or null if no such restriction exists. |
String[] |
getRestrictionNames()
Return the names of the restrictions present with this access control entry. |
Map<Name,Value> |
getRestrictions()
Returns the restrictions defined for this entry. |
protected abstract ValueFactory |
getValueFactory()
|
int |
hashCode()
|
boolean |
isAllow()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AccessControlEntryImpl(Principal principal, Privilege[] privileges) throws AccessControlException, RepositoryException
principal
- Principal for this access control entry.privileges
- Privileges for this access control entry.
AccessControlException
- if either principal or privileges are invalid.
RepositoryException
- if another error occurs.protected AccessControlEntryImpl(Principal principal, Privilege[] privileges, boolean isAllow, Map<String,Value> restrictions) throws AccessControlException, RepositoryException
principal
- Principal for this access control entry.privileges
- Privileges for this access control entry.isAllow
- true
if this ACE grants the specified
privileges to the specified principal; false
otherwise.restrictions
- A map of restriction name (String) to restriction
(Value). See JackrabbitAccessControlList.getRestrictionNames()
and JackrabbitAccessControlList.getRestrictionType(String)
.
AccessControlException
- if either principal or privileges are invalid.
RepositoryException
- if another error occurs.protected AccessControlEntryImpl(AccessControlEntryImpl base, Privilege[] privileges, boolean isAllow) throws AccessControlException
base
- privileges
- isAllow
-
AccessControlException
Method Detail |
---|
public int getPrivilegeBits()
public Map<Name,Value> getRestrictions()
public Value getRestriction(Name restrictionName)
restrictionName
-
null
.protected abstract NameResolver getResolver()
protected abstract ValueFactory getValueFactory()
protected int buildHashCode()
public Principal getPrincipal()
getPrincipal
in interface AccessControlEntry
AccessControlEntry.getPrincipal()
public Privilege[] getPrivileges()
getPrivileges
in interface AccessControlEntry
AccessControlEntry.getPrivileges()
public boolean isAllow()
isAllow
in interface JackrabbitAccessControlEntry
Privilege
s for the principal;
false otherwise.JackrabbitAccessControlEntry.isAllow()
public String[] getRestrictionNames() throws NamespaceException
JackrabbitAccessControlEntry
getRestrictionNames
in interface JackrabbitAccessControlEntry
NamespaceException
JackrabbitAccessControlEntry.getRestrictionNames()
public Value getRestriction(String restrictionName) throws RepositoryException
JackrabbitAccessControlEntry
null
if no such restriction exists.
getRestriction
in interface JackrabbitAccessControlEntry
restrictionName
- The of the restriction as obtained through
JackrabbitAccessControlEntry.getRestrictionNames()
.
null
if no such restriction exists
RepositoryException
- if an error occurs.JackrabbitAccessControlEntry.getRestriction(String)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |