deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.security.drm.model
Class Role

java.lang.Object
  extended by org.deegree.security.drm.model.SecurableObject
      extended by 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 -

deegree 2.3 (2010/04/09 10:10 build-4-official)

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