public abstract class AccessControlEntryImpl extends Object implements JackrabbitAccessControlEntry
AccessControlEntry
and the JackrabbitAccessControlEntry
interfaces.Modifier | Constructor and Description |
---|---|
protected |
AccessControlEntryImpl(AccessControlEntryImpl base,
javax.jcr.security.Privilege[] privileges,
boolean isAllow) |
protected |
AccessControlEntryImpl(AccessControlEntryImpl base,
PrivilegeBits privilegeBits,
boolean isAllow) |
protected |
AccessControlEntryImpl(Principal principal,
javax.jcr.security.Privilege[] privileges,
boolean isAllow,
Map<String,javax.jcr.Value> restrictions)
Construct an access control entry for the given principal and privileges.
|
protected |
AccessControlEntryImpl(Principal principal,
PrivilegeBits privilegesBits,
boolean isAllow,
Map<String,javax.jcr.Value> restrictions)
Construct an access control entry for the given principal and privileges.
|
Modifier and Type | Method and Description |
---|---|
protected int |
buildHashCode()
Build the hash code.
|
boolean |
equals(Object obj) |
Principal |
getPrincipal() |
PrivilegeBits |
getPrivilegeBits() |
protected abstract PrivilegeManagerImpl |
getPrivilegeManager() |
javax.jcr.security.Privilege[] |
getPrivileges() |
protected abstract NameResolver |
getResolver() |
javax.jcr.Value |
getRestriction(Name restrictionName) |
javax.jcr.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,javax.jcr.Value> |
getRestrictions()
Returns the restrictions defined for this entry.
|
javax.jcr.Value[] |
getRestrictions(String restrictionName)
Return the values of the restriction with the specified name or
null if no such restriction exists. |
protected abstract javax.jcr.ValueFactory |
getValueFactory() |
int |
hashCode() |
boolean |
hasRestrictions()
Returns
true if this ACE defines any restriction. |
boolean |
isAllow() |
protected AccessControlEntryImpl(Principal principal, javax.jcr.security.Privilege[] privileges, boolean isAllow, Map<String,javax.jcr.Value> restrictions) throws javax.jcr.security.AccessControlException, javax.jcr.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)
.javax.jcr.security.AccessControlException
- if either principal or privileges are invalid.javax.jcr.RepositoryException
- if another error occurs.protected AccessControlEntryImpl(Principal principal, PrivilegeBits privilegesBits, boolean isAllow, Map<String,javax.jcr.Value> restrictions) throws javax.jcr.RepositoryException
principal
- Principal for this access control entry.privilegesBits
- 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)
.javax.jcr.RepositoryException
- if another error occurs.protected AccessControlEntryImpl(AccessControlEntryImpl base, PrivilegeBits privilegeBits, boolean isAllow) throws javax.jcr.security.AccessControlException, javax.jcr.RepositoryException
base
- privilegeBits
- isAllow
- javax.jcr.security.AccessControlException
javax.jcr.RepositoryException
protected AccessControlEntryImpl(AccessControlEntryImpl base, javax.jcr.security.Privilege[] privileges, boolean isAllow) throws javax.jcr.security.AccessControlException, javax.jcr.RepositoryException
base
- privileges
- isAllow
- javax.jcr.security.AccessControlException
javax.jcr.RepositoryException
public PrivilegeBits getPrivilegeBits()
public boolean hasRestrictions()
true
if this ACE defines any restriction.true
if this ACE defines any restriction;
false
otherwise.public Map<Name,javax.jcr.Value> getRestrictions()
public javax.jcr.Value getRestriction(Name restrictionName)
restrictionName
- null
.protected abstract NameResolver getResolver()
protected abstract javax.jcr.ValueFactory getValueFactory()
protected abstract PrivilegeManagerImpl getPrivilegeManager()
protected int buildHashCode()
public Principal getPrincipal()
getPrincipal
in interface javax.jcr.security.AccessControlEntry
AccessControlEntry.getPrincipal()
public javax.jcr.security.Privilege[] getPrivileges()
getPrivileges
in interface javax.jcr.security.AccessControlEntry
AccessControlEntry.getPrivileges()
public boolean isAllow()
isAllow
in interface JackrabbitAccessControlEntry
Privilege
s for the principal;
false otherwise.JackrabbitAccessControlEntry.isAllow()
public String[] getRestrictionNames() throws javax.jcr.NamespaceException
JackrabbitAccessControlEntry
getRestrictionNames
in interface JackrabbitAccessControlEntry
javax.jcr.NamespaceException
JackrabbitAccessControlEntry.getRestrictionNames()
public javax.jcr.Value getRestriction(String restrictionName) throws javax.jcr.RepositoryException
JackrabbitAccessControlEntry
null
if no such restriction exists. In case the restriction
with the specified name contains multiple value this method will call
ValueFormatException
.getRestriction
in interface JackrabbitAccessControlEntry
restrictionName
- The of the restriction as obtained through
JackrabbitAccessControlEntry.getRestrictionNames()
.null
if no such restriction exists.javax.jcr.ValueFormatException
- If the restriction with the specified name
contains multiple values.javax.jcr.RepositoryException
- if an error occurs.JackrabbitAccessControlEntry.getRestriction(String)
public javax.jcr.Value[] getRestrictions(String restrictionName) throws javax.jcr.RepositoryException
JackrabbitAccessControlEntry
null
if no such restriction exists. For restrictions that
contain just a single value this method is expected to return an array
with a single element even if the underlying implementation stored the
restriction in single-value JCR property.getRestrictions
in interface JackrabbitAccessControlEntry
restrictionName
- The of the restriction as obtained through
JackrabbitAccessControlEntry.getRestrictionNames()
.null
if no such restriction exists. The array may contain
zero, one or multiple values.javax.jcr.RepositoryException
- if an error occurs.JackrabbitAccessControlEntry.getRestrictions(String)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.