ModeShape Distribution 3.5.0.Final

org.modeshape.jcr.security.acl
Class PrivilegeImpl

java.lang.Object
  extended by org.modeshape.jcr.security.acl.PrivilegeImpl
All Implemented Interfaces:
Privilege

@Immutable
public class PrivilegeImpl
extends Object
implements Privilege

Implements JCR privilege object. Privilege object represents one or more permission.


Field Summary
 
Fields inherited from interface javax.jcr.security.Privilege
JCR_ADD_CHILD_NODES, JCR_ALL, JCR_LIFECYCLE_MANAGEMENT, JCR_LOCK_MANAGEMENT, JCR_MODIFY_ACCESS_CONTROL, JCR_MODIFY_PROPERTIES, JCR_NODE_TYPE_MANAGEMENT, JCR_READ, JCR_READ_ACCESS_CONTROL, JCR_REMOVE_CHILD_NODES, JCR_REMOVE_NODE, JCR_RETENTION_MANAGEMENT, JCR_VERSION_MANAGEMENT, JCR_WRITE
 
Constructor Summary
PrivilegeImpl(Session session, String name, Privilege[] declaredPrivileges)
          Creates new instance of the privilege object.
PrivilegeImpl(Session session, String name, Privilege[] declaredPrivileges, boolean isAbstract)
          Creates new instance of the privilege object.
 
Method Summary
 boolean contains(Privilege p)
          Tests given privilege.
 boolean equals(Object other)
           
 Privilege[] getAggregatePrivileges()
           
 Privilege[] getDeclaredAggregatePrivileges()
           
 String getName()
           
 int hashCode()
           
 boolean isAbstract()
           
 boolean isAggregate()
           
 String localName()
          The name without prefix.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrivilegeImpl

public PrivilegeImpl(Session session,
                     String name,
                     Privilege[] declaredPrivileges)
Creates new instance of the privilege object.

Parameters:
session - session under access control
name - the name of privilege.
declaredPrivileges - list of privileges aggregated by this object.

PrivilegeImpl

public PrivilegeImpl(Session session,
                     String name,
                     Privilege[] declaredPrivileges,
                     boolean isAbstract)
Creates new instance of the privilege object.

Parameters:
session - the session under control
name - the name of privilege.
declaredPrivileges - list of privileges aggregated by this object.
isAbstract - true if this is abstract privilege.
Method Detail

localName

public String localName()
The name without prefix.

Returns:
name of privilege without prefix

getName

public String getName()
Specified by:
getName in interface Privilege

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface Privilege

isAggregate

public boolean isAggregate()
Specified by:
isAggregate in interface Privilege

getDeclaredAggregatePrivileges

public Privilege[] getDeclaredAggregatePrivileges()
Specified by:
getDeclaredAggregatePrivileges in interface Privilege

getAggregatePrivileges

public Privilege[] getAggregatePrivileges()
Specified by:
getAggregatePrivileges in interface Privilege

contains

public boolean contains(Privilege p)
Tests given privilege.

Parameters:
p - the given privilege.
Returns:
true if this privilege equals or aggregates given privilege.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

ModeShape Distribution 3.5.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.