Package org.apache.sling.jcr.jackrabbit.accessmanager

# Class LocalPrivilege

java.lang.Object
org.apache.sling.jcr.jackrabbit.accessmanager.LocalPrivilege

public class LocalPrivilege extends Object
Use to holds details of a privilege

## Constructor Summary

Constructors
Constructor
Description
`LocalPrivilege(@NotNull javax.jcr.security.Privilege privilege)`

## Method Summary

Modifier and Type
Method
Description
`void`
`clearAllowRestrictions()`
`void`
`clearDenyRestrictions()`
`boolean`
`equals(Object obj)`
`Set<LocalRestriction>`
`getAllowRestrictions()`
`Set<LocalRestriction>`
`getDenyRestrictions()`
`String`
`getName()`
`javax.jcr.security.Privilege`
`getPrivilege()`
`int`
`hashCode()`
`boolean`
`isAllow()`
`boolean`
`isDeny()`
`boolean`
`isNone()`
`protected Set<LocalRestriction>`
`mergeRestrictions(Set<LocalRestriction> currentRestrictions, Set<LocalRestriction> newRestrictions)`
`boolean`
`sameAllowAndDenyRestrictions()`
compares if allow and deny restrictions are the same
`boolean`
`sameAllowRestrictions(Set<LocalRestriction> otherAllowRestrictions)`
compares if restrictions present is same as specified restrictions in the supplied argument
`boolean`
`sameDenyRestrictions(Set<LocalRestriction> otherDenyRestrictions)`
compares if restrictions present is same as specified restrictions in the supplied argument
`void`
`setAllow(boolean allow)`
`void`
`setAllowRestrictions(Set<LocalRestriction> restrictions)`
`void`
`setDeny(boolean deny)`
`void`
`setDenyRestrictions(Set<LocalRestriction> restrictions)`
`String`
`toString()`
`void`
`unsetAllowRestrictions(Collection<String> restrictionNames)`
`void`
`unsetDenyRestrictions(Collection<String> restrictionNames)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### LocalPrivilege

public LocalPrivilege(@NotNull @NotNull javax.jcr.security.Privilege privilege)

## Method Details

### getPrivilege

public javax.jcr.security.Privilege getPrivilege()

### getName

public String 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

public Set<LocalRestriction> getAllowRestrictions()

### getDenyRestrictions

public Set<LocalRestriction> getDenyRestrictions()

### mergeRestrictions

protected Set<LocalRestriction> mergeRestrictions(Set<LocalRestriction> currentRestrictions, Set<LocalRestriction> newRestrictions)

### setAllowRestrictions

public void setAllowRestrictions(Set<LocalRestriction> restrictions)

### setDenyRestrictions

public void setDenyRestrictions(Set<LocalRestriction> restrictions)

### unsetAllowRestrictions

public void unsetAllowRestrictions(Collection<String> restrictionNames)

### unsetDenyRestrictions

public void unsetDenyRestrictions(Collection<String> restrictionNames)

### clearAllowRestrictions

public void clearAllowRestrictions()

### clearDenyRestrictions

public void clearDenyRestrictions()

### sameAllowRestrictions

public boolean sameAllowRestrictions(Set<LocalRestriction> otherAllowRestrictions)
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

public boolean sameDenyRestrictions(Set<LocalRestriction> otherDenyRestrictions)
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

public String toString()

Overrides:
  `toString` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`