Class LocalPrivilege
java.lang.Object
org.apache.sling.jcr.jackrabbit.accessmanager.LocalPrivilege
Use to holds details of a privilege
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
boolean
getName()
javax.jcr.security.Privilege
int
hashCode()
boolean
isAllow()
boolean
isDeny()
boolean
isNone()
protected Set<LocalRestriction>
mergeRestrictions
(Set<LocalRestriction> currentRestrictions, Set<LocalRestriction> newRestrictions) boolean
compares if allow and deny restrictions are the sameboolean
sameAllowRestrictions
(Set<LocalRestriction> otherAllowRestrictions) compares if restrictions present is same as specified restrictions in the supplied argumentboolean
sameDenyRestrictions
(Set<LocalRestriction> otherDenyRestrictions) compares if restrictions present is same as specified restrictions in the supplied argumentvoid
setAllow
(boolean allow) void
setAllowRestrictions
(Set<LocalRestriction> restrictions) void
setDeny
(boolean deny) void
setDenyRestrictions
(Set<LocalRestriction> restrictions) toString()
void
unsetAllowRestrictions
(Collection<String> restrictionNames) void
unsetDenyRestrictions
(Collection<String> restrictionNames)
-
Constructor Details
-
LocalPrivilege
public LocalPrivilege(@NotNull @NotNull javax.jcr.security.Privilege privilege)
-
-
Method Details
-
getPrivilege
public javax.jcr.security.Privilege getPrivilege() -
getName
-
isNone
public boolean isNone() -
isAllow
public boolean isAllow() -
isDeny
public boolean isDeny() -
setAllow
public void setAllow(boolean allow) -
setDeny
public void setDeny(boolean deny) -
getAllowRestrictions
-
getDenyRestrictions
-
mergeRestrictions
protected Set<LocalRestriction> mergeRestrictions(Set<LocalRestriction> currentRestrictions, Set<LocalRestriction> newRestrictions) -
setAllowRestrictions
-
setDenyRestrictions
-
unsetAllowRestrictions
-
unsetDenyRestrictions
-
clearAllowRestrictions
public void clearAllowRestrictions() -
clearDenyRestrictions
public void clearDenyRestrictions() -
sameAllowRestrictions
compares if restrictions present is same as specified restrictions in the supplied argument- Parameters:
otherAllowRestrictions
- the other restrictions set to compare to- Returns:
- true or false
-
sameDenyRestrictions
compares if restrictions present is same as specified restrictions in the supplied argument- Parameters:
otherDenyRestrictions
- the other restrictions set to compare to- Returns:
- true or false
-
sameAllowAndDenyRestrictions
public boolean sameAllowAndDenyRestrictions()compares if allow and deny restrictions are the same- Returns:
- true or false
-
toString
-
hashCode
public int hashCode() -
equals
-