org.modeshape.jcr.security.acl

## Class Privileges

- java.lang.Object
- - org.modeshape.jcr.security.acl.Privileges

-     public class Privileges
      extends Object

  Collection of supported privileges. Internal helper class that groups privileges objects declared by JCR 2.0 spec and provides several utility methods.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Privileges(JcrSession session)` Creates privileges related to the given session.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PrivilegeImpl` | `forAction(String action)` Searches JCR defined privilege object which belongs to the given modeshape action.
    `PrivilegeImpl` | `forName(String name)` Searches privilege object for the privilege with the given name.
    `Privilege[]` | `listOfSupported()` Supported privileges.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Privileges

          public Privileges(JcrSession session)

      Creates privileges related to the given session.
      Parameters:
        `session` - the jcr session.

  - ### Method Detail

    - #### listOfSupported

          public Privilege[] listOfSupported()

      Supported privileges.
      Returns:
        list of implemented privilege objects.

    - #### forName

          public PrivilegeImpl forName(String name)

      Searches privilege object for the privilege with the given name.
      Parameters:
        `name` - the name of privilege to find.
      Returns:
        the privilege object or null if not found.

    - #### forAction

          public PrivilegeImpl forAction(String action)

      Searches JCR defined privilege object which belongs to the given modeshape action.
      Parameters:
        `action` - the name of the modeshape action
      Returns:
        privilege object for the given action

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