org.rhq.core.domain.auth
Class Subject

java.lang.Object
  extended by org.rhq.core.domain.auth.Subject
All Implemented Interfaces:
Serializable

public class Subject
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static String QUERY_CAN_VIEW_AUTO_GROUP
           
static String QUERY_CAN_VIEW_GROUP
           
static String QUERY_CAN_VIEW_RESOURCE
          This query can return more than 1 if the resource is accessible via separate groups
static String QUERY_CAN_VIEW_RESOURCES
           
static String QUERY_DYNAMIC_CONFIG_VALUES
           
static String QUERY_FIND_AVAILABLE_SUBJECTS_FOR_ROLE
           
static String QUERY_FIND_AVAILABLE_SUBJECTS_FOR_ROLE_WITH_EXCLUDES
           
static String QUERY_GET_GLOBAL_PERMISSIONS
           
static String QUERY_GET_PERMISSIONS_BY_GROUP_ID
           
static String QUERY_GET_PERMISSIONS_BY_PRIVATE_GROUP_ID
           
static String QUERY_GET_PERMISSIONS_BY_RESOURCE_ID
           
static String QUERY_GET_RESOURCES_BY_PERMISSION
           
static String QUERY_GET_SUBJECTS_ASSIGNED_TO_ROLE
           
static String QUERY_HAS_AUTO_GROUP_PERMISSION
           
static String QUERY_HAS_GLOBAL_PERMISSION
           
static String QUERY_HAS_GROUP_PERMISSION
           
static String QUERY_HAS_PRIVATE_GROUP_PERMISSION
           
static String QUERY_HAS_RESOURCE_PERMISSION
           
static String QUERY_ROLES_BY_RESOURCE_IDS
           
 
Constructor Summary
Subject()
          Creates a new instance of Subject
Subject(String name, boolean factive, boolean fsystem)
           
 
Method Summary
 void addLdapRole(Role role)
           
 void addRole(Role role)
           
 void addRole(Role role, boolean isLdap)
           
 boolean equals(Object obj)
           
 String getDepartment()
           
 String getEmailAddress()
           
 boolean getFactive()
           
 String getFirstName()
           
 boolean getFsystem()
           
 int getId()
           
 String getLastName()
           
 Set<Role> getLdapRoles()
           
 String getName()
           
protected  List<Dashboard> getOwnedDashboards()
           
 List<ResourceGroup> getOwnedGroups()
           
protected  Set<Repo> getOwnedrepos()
           
 String getPhoneNumber()
           
 Set<Role> getRoles()
           
 Integer getSessionId()
          If not null, you can assume the user associated with this Subject has been authenticated.
 String getSmsAddress()
           
 Configuration getUserConfiguration()
           
 int hashCode()
           
 void removeLdapRole(Role role)
           
 void removeRole(Role role)
           
 void setDepartment(String department)
           
 void setEmailAddress(String emailAddress)
           
 void setFactive(boolean factive)
           
 void setFirstName(String firstName)
           
 void setFsystem(boolean fsystem)
           
 void setId(int id)
           
 void setLastName(String lastName)
           
 void setLdapRoles(Set<Role> roles)
           
 void setName(String name)
           
protected  void setOwnedDashboards(List<Dashboard> ownedDashboards)
           
 void setOwnedGroups(List<ResourceGroup> ownedGroups)
           
protected  void setOwnedRepos(Set<Repo> repos)
           
 void setPhoneNumber(String phoneNumber)
           
 void setRoles(Set<Role> roles)
           
 void setSessionId(Integer sessionId)
          When a user successfully logs in, the user will be assigned a session ID.
 void setSmsAddress(String smsAddress)
           
 void setUserConfiguration(Configuration configuration)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_GET_SUBJECTS_ASSIGNED_TO_ROLE

public static final String QUERY_GET_SUBJECTS_ASSIGNED_TO_ROLE
See Also:
Constant Field Values

QUERY_GET_GLOBAL_PERMISSIONS

public static final String QUERY_GET_GLOBAL_PERMISSIONS
See Also:
Constant Field Values

QUERY_GET_PERMISSIONS_BY_GROUP_ID

public static final String QUERY_GET_PERMISSIONS_BY_GROUP_ID
See Also:
Constant Field Values

QUERY_GET_PERMISSIONS_BY_PRIVATE_GROUP_ID

public static final String QUERY_GET_PERMISSIONS_BY_PRIVATE_GROUP_ID
See Also:
Constant Field Values

QUERY_GET_PERMISSIONS_BY_RESOURCE_ID

public static final String QUERY_GET_PERMISSIONS_BY_RESOURCE_ID
See Also:
Constant Field Values

QUERY_ROLES_BY_RESOURCE_IDS

public static final String QUERY_ROLES_BY_RESOURCE_IDS
See Also:
Constant Field Values

QUERY_HAS_GLOBAL_PERMISSION

public static final String QUERY_HAS_GLOBAL_PERMISSION
See Also:
Constant Field Values

QUERY_HAS_GROUP_PERMISSION

public static final String QUERY_HAS_GROUP_PERMISSION
See Also:
Constant Field Values

QUERY_HAS_PRIVATE_GROUP_PERMISSION

public static final String QUERY_HAS_PRIVATE_GROUP_PERMISSION
See Also:
Constant Field Values

QUERY_HAS_RESOURCE_PERMISSION

public static final String QUERY_HAS_RESOURCE_PERMISSION
See Also:
Constant Field Values

QUERY_HAS_AUTO_GROUP_PERMISSION

public static final String QUERY_HAS_AUTO_GROUP_PERMISSION
See Also:
Constant Field Values

QUERY_CAN_VIEW_RESOURCE

public static final String QUERY_CAN_VIEW_RESOURCE
This query can return more than 1 if the resource is accessible via separate groups

See Also:
Constant Field Values

QUERY_CAN_VIEW_RESOURCES

public static final String QUERY_CAN_VIEW_RESOURCES
See Also:
Constant Field Values

QUERY_CAN_VIEW_GROUP

public static final String QUERY_CAN_VIEW_GROUP
See Also:
Constant Field Values

QUERY_CAN_VIEW_AUTO_GROUP

public static final String QUERY_CAN_VIEW_AUTO_GROUP
See Also:
Constant Field Values

QUERY_GET_RESOURCES_BY_PERMISSION

public static final String QUERY_GET_RESOURCES_BY_PERMISSION
See Also:
Constant Field Values

QUERY_FIND_AVAILABLE_SUBJECTS_FOR_ROLE_WITH_EXCLUDES

public static final String QUERY_FIND_AVAILABLE_SUBJECTS_FOR_ROLE_WITH_EXCLUDES
See Also:
Constant Field Values

QUERY_FIND_AVAILABLE_SUBJECTS_FOR_ROLE

public static final String QUERY_FIND_AVAILABLE_SUBJECTS_FOR_ROLE
See Also:
Constant Field Values

QUERY_DYNAMIC_CONFIG_VALUES

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

Subject

public Subject()
Creates a new instance of Subject


Subject

public Subject(@NotNull
               String name,
               boolean factive,
               boolean fsystem)
Method Detail

getId

public int getId()

setSessionId

public void setSessionId(Integer sessionId)
When a user successfully logs in, the user will be assigned a session ID. This is that session ID - when not null, you can assume this user has been authenticated and is currently logged into the system.

Parameters:
sessionId -

getSessionId

public Integer getSessionId()
If not null, you can assume the user associated with this Subject has been authenticated.

Returns:
the logged in user's session ID

setId

public void setId(int id)

getName

@NotNull
public String getName()

setName

public void setName(@NotNull
                    String name)

getFirstName

public String getFirstName()

setFirstName

public void setFirstName(String firstName)

getLastName

public String getLastName()

setLastName

public void setLastName(String lastName)

getEmailAddress

public String getEmailAddress()

setEmailAddress

public void setEmailAddress(String emailAddress)

getSmsAddress

public String getSmsAddress()

setSmsAddress

public void setSmsAddress(String smsAddress)

getPhoneNumber

public String getPhoneNumber()

setPhoneNumber

public void setPhoneNumber(String phoneNumber)

getDepartment

public String getDepartment()

setDepartment

public void setDepartment(String department)

getFactive

public boolean getFactive()

setFactive

public void setFactive(boolean factive)

getFsystem

public boolean getFsystem()

setFsystem

public void setFsystem(boolean fsystem)

getUserConfiguration

public Configuration getUserConfiguration()

setUserConfiguration

public void setUserConfiguration(Configuration configuration)

getRoles

public Set<Role> getRoles()

setRoles

public void setRoles(Set<Role> roles)

addRole

public void addRole(Role role,
                    boolean isLdap)

addRole

public void addRole(Role role)

removeRole

public void removeRole(Role role)

getLdapRoles

public Set<Role> getLdapRoles()

setLdapRoles

public void setLdapRoles(Set<Role> roles)

addLdapRole

public void addLdapRole(Role role)

removeLdapRole

public void removeLdapRole(Role role)

getOwnedGroups

public List<ResourceGroup> getOwnedGroups()

setOwnedGroups

public void setOwnedGroups(List<ResourceGroup> ownedGroups)

getOwnedrepos

protected Set<Repo> getOwnedrepos()

setOwnedRepos

protected void setOwnedRepos(Set<Repo> repos)

getOwnedDashboards

protected List<Dashboard> getOwnedDashboards()

setOwnedDashboards

protected void setOwnedDashboards(List<Dashboard> ownedDashboards)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


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