Class AccessControlEntryImpl
- java.lang.Object
- 
- org.apache.jackrabbit.core.security.authorization.AccessControlEntryImpl
 
- 
- All Implemented Interfaces:
- AccessControlEntry,- JackrabbitAccessControlEntry
 
 public abstract class AccessControlEntryImpl extends Object implements JackrabbitAccessControlEntry Simple, immutable implementation of theAccessControlEntryand theJackrabbitAccessControlEntryinterfaces.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedAccessControlEntryImpl(Principal principal, Privilege[] privileges, boolean isAllow, Map<String,Value> restrictions)Construct an access control entry for the given principal and privileges.protectedAccessControlEntryImpl(Principal principal, PrivilegeBits privilegesBits, boolean isAllow, Map<String,Value> restrictions)Construct an access control entry for the given principal and privileges.protectedAccessControlEntryImpl(AccessControlEntryImpl base, Privilege[] privileges, boolean isAllow)protectedAccessControlEntryImpl(AccessControlEntryImpl base, PrivilegeBits privilegeBits, boolean isAllow)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected intbuildHashCode()Build the hash code.booleanequals(Object obj)PrincipalgetPrincipal()PrivilegeBitsgetPrivilegeBits()PrivilegeCollectiongetPrivilegeCollection()protected abstract PrivilegeManagerImplgetPrivilegeManager()Privilege[]getPrivileges()protected abstract NameResolvergetResolver()ValuegetRestriction(String restrictionName)ValuegetRestriction(Name restrictionName)String[]getRestrictionNames()Map<Name,Value>getRestrictions()Returns the restrictions defined for this entry.Value[]getRestrictions(String restrictionName)protected abstract ValueFactorygetValueFactory()inthashCode()booleanhasRestrictions()Returnstrueif this ACE defines any restriction.booleanisAllow()
 
- 
- 
- 
Constructor Detail- 
AccessControlEntryImplprotected AccessControlEntryImpl(Principal principal, Privilege[] privileges, boolean isAllow, Map<String,Value> restrictions) throws AccessControlException, RepositoryException Construct an access control entry for the given principal and privileges.- Parameters:
- principal- Principal for this access control entry.
- privileges- Privileges for this access control entry.
- isAllow-- trueif this ACE grants the specified privileges to the specified principal;- falseotherwise.
- restrictions- A map of restriction name (String) to restriction (Value). See- JackrabbitAccessControlList.getRestrictionNames()and- JackrabbitAccessControlList.getRestrictionType(String).
- Throws:
- AccessControlException- if either principal or privileges are invalid.
- RepositoryException- if another error occurs.
 
 - 
AccessControlEntryImplprotected AccessControlEntryImpl(Principal principal, PrivilegeBits privilegesBits, boolean isAllow, Map<String,Value> restrictions) throws RepositoryException Construct an access control entry for the given principal and privileges.- Parameters:
- principal- Principal for this access control entry.
- privilegesBits- Privileges for this access control entry.
- isAllow-- trueif this ACE grants the specified privileges to the specified principal;- falseotherwise.
- restrictions- A map of restriction name (String) to restriction (Value). See- JackrabbitAccessControlList.getRestrictionNames()and- JackrabbitAccessControlList.getRestrictionType(String).
- Throws:
- RepositoryException- if another error occurs.
 
 - 
AccessControlEntryImplprotected AccessControlEntryImpl(AccessControlEntryImpl base, PrivilegeBits privilegeBits, boolean isAllow) throws AccessControlException, RepositoryException - Parameters:
- base-
- privilegeBits-
- isAllow-
- Throws:
- AccessControlException
- RepositoryException
 
 - 
AccessControlEntryImplprotected AccessControlEntryImpl(AccessControlEntryImpl base, Privilege[] privileges, boolean isAllow) throws AccessControlException, RepositoryException - Parameters:
- base-
- privileges-
- isAllow-
- Throws:
- AccessControlException
- RepositoryException
 
 
- 
 - 
Method Detail- 
getPrivilegeBitspublic PrivilegeBits getPrivilegeBits() - Returns:
- the permission bits that correspond to the privileges defined by this entry.
 
 - 
hasRestrictionspublic boolean hasRestrictions() Returnstrueif this ACE defines any restriction.- Returns:
- trueif this ACE defines any restriction;- falseotherwise.
 
 - 
getRestrictionspublic Map<Name,Value> getRestrictions() Returns the restrictions defined for this entry.- Returns:
- the restrictions defined for this entry.
 
 - 
getRestrictionpublic Value getRestriction(Name restrictionName) - Parameters:
- restrictionName-
- Returns:
- The restriction with the specified name or null.
 
 - 
getResolverprotected abstract NameResolver getResolver() - Returns:
- Returns the name resolver used to convert JCR names to Name and vice versa.
 
 - 
getValueFactoryprotected abstract ValueFactory getValueFactory() - Returns:
- The value factory to be used.
 
 - 
getPrivilegeManagerprotected abstract PrivilegeManagerImpl getPrivilegeManager() - Returns:
- The privilege manager in use.
 
 - 
buildHashCodeprotected int buildHashCode() Build the hash code.- Returns:
- the hash code.
 
 - 
getPrincipalpublic Principal getPrincipal() - Specified by:
- getPrincipalin interface- AccessControlEntry
- See Also:
- AccessControlEntry.getPrincipal()
 
 - 
getPrivilegespublic Privilege[] getPrivileges() - Specified by:
- getPrivilegesin interface- AccessControlEntry
- See Also:
- AccessControlEntry.getPrivileges()
 
 - 
isAllowpublic boolean isAllow() - Specified by:
- isAllowin interface- JackrabbitAccessControlEntry
- See Also:
- JackrabbitAccessControlEntry.isAllow()
 
 - 
getRestrictionNamespublic String[] getRestrictionNames() throws NamespaceException - Specified by:
- getRestrictionNamesin interface- JackrabbitAccessControlEntry
- Throws:
- NamespaceException
- See Also:
- JackrabbitAccessControlEntry.getRestrictionNames()
 
 - 
getRestrictionpublic Value getRestriction(String restrictionName) throws RepositoryException - Specified by:
- getRestrictionin interface- JackrabbitAccessControlEntry
- Throws:
- RepositoryException
- See Also:
- JackrabbitAccessControlEntry.getRestriction(String)
 
 - 
getRestrictionspublic Value[] getRestrictions(String restrictionName) throws RepositoryException - Specified by:
- getRestrictionsin interface- JackrabbitAccessControlEntry
- Throws:
- RepositoryException
- See Also:
- JackrabbitAccessControlEntry.getRestrictions(String)
 
 - 
getPrivilegeCollectionpublic PrivilegeCollection getPrivilegeCollection() - Specified by:
- getPrivilegeCollectionin interface- JackrabbitAccessControlEntry
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- Object
- See Also:
- Object.hashCode()
 
 - 
equalspublic boolean equals(Object obj) - Overrides:
- equalsin class- Object
- See Also:
- Object.equals(Object)
 
 
- 
 
-