org.rhq.core.domain.authz
Class Role

java.lang.Object
  extended by org.rhq.core.domain.authz.Role
All Implemented Interfaces:
Serializable

public class Role
extends Object
implements Serializable

A role has zero or more ResourceGroups assigned to it. You can assign a role to zero or more Subjects. A role defines a set of Permissions that the assigned Subjects are authorized for in order to operate on the Resources in the assigned ResourceGroups.

See Also:
Serialized Form

Field Summary
static String QUERY_DYNAMIC_CONFIG_VALUES
           
static String QUERY_FIND_ALL
           
static String QUERY_FIND_AVAILABLE_ROLES
           
static String QUERY_FIND_AVAILABLE_ROLES_WITH_EXCLUDES
           
static String QUERY_FIND_BY_IDS
           
 
Constructor Summary
Role()
           
Role(String name)
           
 
Method Summary
 void addLdapGroup(LdapGroup ldapGroup)
           
 void addLdapSubject(Subject subject)
           
 void addPermission(Permission permission)
           
 void addResourceGroup(ResourceGroup resourceGroup)
           
 void addSubject(Subject subject)
           
 boolean equals(Object o)
           
 String getDescription()
           
 Boolean getFsystem()
           
 int getId()
           
 Set<LdapGroup> getLdapGroups()
           
 Set<Subject> getLdapSubjects()
           
 int getMemberCount()
           
 String getName()
           
 Set<Permission> getPermissions()
           
 Set<ResourceGroup> getResourceGroups()
           
 Set<Subject> getSubjects()
           
 int hashCode()
           
 boolean removeLdapGroup(LdapGroup ldapGroup)
           
 void removeLdapSubject(Subject subject)
           
 boolean removePermission(Permission permission)
           
 void removeResourceGroup(ResourceGroup resourceGroup)
           
 void removeSubject(Subject subject)
           
 void setDescription(String description)
           
 void setFsystem(Boolean fsystem)
           
 void setId(int id)
           
 void setLdapGroups(Set<LdapGroup> groups)
           
 void setLdapSubjects(Set<Subject> subjects)
           
 void setName(String name)
           
 void setPermissions(Set<Permission> permissions)
           
 void setResourceGroups(Set<ResourceGroup> resourceGroups)
           
 void setSubjects(Set<Subject> subjects)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_ALL

public static final String QUERY_FIND_ALL
See Also:
Constant Field Values

QUERY_FIND_BY_IDS

public static final String QUERY_FIND_BY_IDS
See Also:
Constant Field Values

QUERY_FIND_AVAILABLE_ROLES_WITH_EXCLUDES

public static final String QUERY_FIND_AVAILABLE_ROLES_WITH_EXCLUDES
See Also:
Constant Field Values

QUERY_FIND_AVAILABLE_ROLES

public static final String QUERY_FIND_AVAILABLE_ROLES
See Also:
Constant Field Values

QUERY_DYNAMIC_CONFIG_VALUES

public static final String QUERY_DYNAMIC_CONFIG_VALUES
See Also:
Constant Field Values
Constructor Detail

Role

public Role()

Role

public Role(@NotNull
            String name)
Method Detail

getId

public int getId()

setId

public void setId(int id)

getName

@NotNull
public String getName()

setName

public void setName(@NotNull
                    String name)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getFsystem

public Boolean getFsystem()

setFsystem

public void setFsystem(Boolean fsystem)

getPermissions

public Set<Permission> getPermissions()

setPermissions

public void setPermissions(Set<Permission> permissions)

addPermission

public void addPermission(Permission permission)

removePermission

public boolean removePermission(Permission permission)

getLdapGroups

public Set<LdapGroup> getLdapGroups()

setLdapGroups

public void setLdapGroups(Set<LdapGroup> groups)

addLdapGroup

public void addLdapGroup(LdapGroup ldapGroup)

removeLdapGroup

public boolean removeLdapGroup(LdapGroup ldapGroup)

getSubjects

public Set<Subject> getSubjects()

setSubjects

public void setSubjects(Set<Subject> subjects)

addSubject

public void addSubject(Subject subject)

removeSubject

public void removeSubject(Subject subject)

getLdapSubjects

public Set<Subject> getLdapSubjects()

setLdapSubjects

public void setLdapSubjects(Set<Subject> subjects)

addLdapSubject

public void addLdapSubject(Subject subject)

removeLdapSubject

public void removeLdapSubject(Subject subject)

getResourceGroups

public Set<ResourceGroup> getResourceGroups()

setResourceGroups

public void setResourceGroups(Set<ResourceGroup> resourceGroups)

addResourceGroup

public void addResourceGroup(ResourceGroup resourceGroup)

removeResourceGroup

public void removeResourceGroup(ResourceGroup resourceGroup)

getMemberCount

public int getMemberCount()

toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.