XGTRBAC
Class UserRoleAssign

java.lang.Object
  extended by XGTRBAC.UserRoleAssign

public class UserRoleAssign
extends java.lang.Object

This class contains methods and members for maintaining user-to-role assignments. It is instantiated in XURAS_DTDScanner class (addURAssign method).


Nested Class Summary
 class UserRoleAssign.AssignCondition
          An inner "AssignCondition" class *
 class UserRoleAssign.AssignConstraint
          An inner "AssignConstraint" class *
 class UserRoleAssign.CandidateUser
          An inner "CandidateUser" class *
 
Field Summary
private  java.util.LinkedList AssignedUserList
           
private  java.util.LinkedList AuthorizedUserList
           
private  java.util.LinkedList CandidateUserList
           
private  Policy policy
           
private  java.lang.String RoleName
           
private  java.lang.String URAssignId
           
 
Constructor Summary
UserRoleAssign(java.lang.String id)
          Creates a new instance of URAssign
 
Method Summary
 int addAssignedUser(java.lang.String user_id)
          Adds a new user to the AssignedUserList
 int addAuthorizedUser(java.lang.String user_id)
          Adds a new user to the AuthorizedUserList
 int addCandidateUser(java.lang.String user_id)
          Adds a new user to the CandidateUserList
 int getAssignedUserCount()
          Returns the number of assigned users for the role
 java.lang.String getAssignedUserId(int index)
          Returns the id of the assigned user
 int getAuthorizedUserCount()
          Returns the number of authorized users for the role
 java.lang.String getAuthorizedUserId(int index)
          Returns the id of the authorized user
 UserRoleAssign.CandidateUser getCandidateUser(java.lang.String user_id)
          Returns the CandidateUser object
 int getCandidateUserCount()
          Returns the number of candidate users for the role
 java.lang.String getCandidateUserId(int index)
          Returns the id of the candidate user
 Policy getPolicy()
          Returns the policy object containing this urassign
 DurationExpr getRoleDuration(Policy policy, java.lang.String user_id)
          Returns the duration expression for the role given an assigned user
 java.lang.String getRoleName()
          Returns the name of a role
 java.lang.String getURAssignId()
          Returns the id of a URAssign
 void setPolicy(Policy policy)
          Sets the policy object containing this urassign
 void setRoleName(java.lang.String role_name)
          Sets the name of a role
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URAssignId

private java.lang.String URAssignId

RoleName

private java.lang.String RoleName

CandidateUserList

private java.util.LinkedList CandidateUserList

AssignedUserList

private java.util.LinkedList AssignedUserList

AuthorizedUserList

private java.util.LinkedList AuthorizedUserList

policy

private Policy policy
Constructor Detail

UserRoleAssign

public UserRoleAssign(java.lang.String id)
Creates a new instance of URAssign

Method Detail

getURAssignId

public java.lang.String getURAssignId()
Returns the id of a URAssign

Returns:
The URAssign id as String

getRoleName

public java.lang.String getRoleName()
Returns the name of a role

Returns:
The role name as String

setRoleName

public void setRoleName(java.lang.String role_name)
Sets the name of a role

Parameters:
role_name - The role name supplied as String

getCandidateUserCount

public int getCandidateUserCount()
Returns the number of candidate users for the role

Returns:
The candidate user count as int

getAssignedUserCount

public int getAssignedUserCount()
Returns the number of assigned users for the role

Returns:
The assigned user count as int

getAuthorizedUserCount

public int getAuthorizedUserCount()
Returns the number of authorized users for the role

Returns:
The authorized user count as int

getCandidateUserId

public java.lang.String getCandidateUserId(int index)
Returns the id of the candidate user

Parameters:
index - The integer index of the candidate user in the CandidateUserList
Returns:
The candidate user id as String

getAssignedUserId

public java.lang.String getAssignedUserId(int index)
Returns the id of the assigned user

Parameters:
index - The integer index of the assigned user in the AssignedUserList
Returns:
The assigned user id as String

getAuthorizedUserId

public java.lang.String getAuthorizedUserId(int index)
Returns the id of the authorized user

Parameters:
index - The integer index of the authorized user in the AuthorizedUserList
Returns:
The authorized user id as String

addCandidateUser

public int addCandidateUser(java.lang.String user_id)
Adds a new user to the CandidateUserList

Parameters:
user_id - The id of candidate user supplied as String
Returns:
Integer representing state of the operation

getCandidateUser

public UserRoleAssign.CandidateUser getCandidateUser(java.lang.String user_id)
Returns the CandidateUser object

Parameters:
user_id - The id of the candidate user supplied as String
Returns:
The CandidateUser object, null if none found

addAssignedUser

public int addAssignedUser(java.lang.String user_id)
Adds a new user to the AssignedUserList

Parameters:
user_id - The id of assigned user supplied as String
Returns:
Integer representing state of the operation

addAuthorizedUser

public int addAuthorizedUser(java.lang.String user_id)
Adds a new user to the AuthorizedUserList

Parameters:
user_id - The id of authorized user supplied as String
Returns:
Integer representing state of the operation

getPolicy

public Policy getPolicy()
Returns the policy object containing this urassign

Returns:
The policy object as Policy

setPolicy

public void setPolicy(Policy policy)
Sets the policy object containing this urassign

Parameters:
policy - The policy object supplied as Policy

getRoleDuration

public DurationExpr getRoleDuration(Policy policy,
                                    java.lang.String user_id)
Returns the duration expression for the role given an assigned user

Parameters:
user_id - The id of assigned user supplied as String
policy - The reference to policy object supplied as Policy
Returns:
The duration expression as DurationExpr, null if none found