Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.security.drm.model
Class Role

    java.lang.Object
      org.deegree.security.drm.model.SecurableObject
          org.deegree.security.drm.model.Role

    public class Role

extends SecurableObject

Implementation of role-objects. `Role` s define the `Privilege` of `User` s and `Groups` and their `Rights` on `SecurableObjects`.

Version:
  $Revision: 18195 $
Author:
  Markus Schneider

Field Summary
`static int` | `ID_SEC_ADMIN`

Fields inherited from class org.deegree.security.drm.model.SecurableObject
`id, name, registry, title, type`

Constructor Summary
`Role(int id, String name, SecurityRegistry registry)` Creates a new `Role` -instance.

Method Summary
`User[]` | `getAllUsers(SecurityAccess securityAccess)` Returns the `User` s that are associated with this role either directly or via group membership.
`Group[]` | `getGroups(SecurityAccess securityAccess)` Returns the `Group` s that are associated with this role DIRECTLY, i.e. not via membership in other roles.
`Privilege[]` | `getPrivileges(SecurityAccess securityAccess)` Returns the `Privilege` s that this role has.
`RightSet` | `getRights(SecurityAccess securityAccess, SecurableObject object)` Returns the rights that this role defines concerning the given `SecurableObject`.
`User[]` | `getUsers(SecurityAccess securityAccess)` Returns the `User` s that are associated with this role DIRECTLY, i.e. not via group membership.
`boolean` | `hasPrivilege(SecurityAccess securityAccess, Privilege privilege)` Returns whether the `Role` has a certain `Privilege`.
`boolean` | `hasPrivilege(SecurityAccess securityAccess, String s)` Returns whether the `Role` has a certain privilege.
`boolean` | `hasRight(SecurityAccess securityAccess, RightType type, Feature accessParams, SecurableObject object)` Returns whether the `Role` has a certain `Right` on a `SecurableObject` (directly or via group memberships).
`boolean` | `hasRight(SecurityAccess securityAccess, RightType type, SecurableObject object)` Returns whether the `Role` has a certain `Right` on a `SecurableObject`.
`boolean` | `hasRight(SecurityAccess securityAccess, String s, SecurableObject object)` Returns whether the `Role` has a certain right on a `SecurableObject`.
`String` | `toString(SecurityAccess securityAccess)` Returns a `String` representation of this object.

Methods inherited from class org.deegree.security.drm.model.SecurableObject
`equals, getID, getName, getTitle, getType, hashCode, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### ID_SEC_ADMIN

    public static final int ID_SEC_ADMIN

See Also:
  Constant Field Values

Constructor Detail

### Role

    public Role(int id,
                String name,
                SecurityRegistry registry)

  Creates a new `Role` -instance.

  Parameters:
    `id` -
    `name` -
    `registry` -

Method Detail

### getGroups

    public Group[] getGroups(SecurityAccess securityAccess)
                      throws GeneralSecurityException

  Returns the `Group` s that are associated with this role DIRECTLY, i.e. not via membership in other roles.

  Parameters:
    `securityAccess` -
  Throws:
    `GeneralSecurityException`

### getUsers

    public User[] getUsers(SecurityAccess securityAccess)
                    throws GeneralSecurityException

  Returns the `User` s that are associated with this role DIRECTLY, i.e. not via group membership.

  Parameters:
    `securityAccess` -
  Throws:
    `GeneralSecurityException`

### getAllUsers

    public User[] getAllUsers(SecurityAccess securityAccess)
                       throws GeneralSecurityException

  Returns the `User` s that are associated with this role either directly or via group membership.

  Parameters:
    `securityAccess` -
  Throws:
    `GeneralSecurityException`

### getPrivileges

    public Privilege[] getPrivileges(SecurityAccess securityAccess)
                              throws GeneralSecurityException

  Returns the `Privilege` s that this role has.

  Parameters:
    `securityAccess` -
  Throws:
    `GeneralSecurityException`

### getRights

    public RightSet getRights(SecurityAccess securityAccess,
                              SecurableObject object)
                       throws GeneralSecurityException

  Returns the rights that this role defines concerning the given `SecurableObject`.

  Parameters:
    `securityAccess` -
  Throws:
    `GeneralSecurityException`

### hasRight

    public boolean hasRight(SecurityAccess securityAccess,
                            RightType type,
                            Feature accessParams,
                            SecurableObject object)
                     throws GeneralSecurityException

  Returns whether the `Role` has a certain `Right` on a `SecurableObject` (directly or via group memberships).

  Throws:
    `GeneralSecurityException`

### hasRight

    public boolean hasRight(SecurityAccess securityAccess,
                            RightType type,
                            SecurableObject object)
                     throws GeneralSecurityException

  Returns whether the `Role` has a certain `Right` on a `SecurableObject`.

  Throws:
    `GeneralSecurityException`

### hasRight

    public boolean hasRight(SecurityAccess securityAccess,
                            String s,
                            SecurableObject object)
                     throws GeneralSecurityException

  Returns whether the `Role` has a certain right on a `SecurableObject`.

  Throws:
    `GeneralSecurityException`

### hasPrivilege

    public boolean hasPrivilege(SecurityAccess securityAccess,
                                Privilege privilege)
                         throws GeneralSecurityException

  Returns whether the `Role` has a certain `Privilege`.

  Parameters:
    `privilege` -
  Throws:
    `GeneralSecurityException`

### hasPrivilege

    public boolean hasPrivilege(SecurityAccess securityAccess,
                                String s)
                         throws GeneralSecurityException

  Returns whether the `Role` has a certain privilege.

  Parameters:
    `s` -
  Throws:
    `GeneralSecurityException`

### toString

    public String toString(SecurityAccess securityAccess)

  Returns a `String` representation of this object.

  Parameters:
    `securityAccess` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org