com.sas.hls.security.role
Class RoleAssignment

java.lang.Object
  extended by com.sas.hls.security.role.RoleAssignment
All Implemented Interfaces:
Serializable

public class RoleAssignment
extends Object
implements Serializable

This object represents the association between an existing role, a context and the members assigned to the role at that context

See Also:
Serialized Form

Field Summary
static String OBJECT_TYPE
          Represents the type name of a RoleAssignment object.
 
Constructor Summary
RoleAssignment(long revision, AssignedRole assignedRole)
          Constructor
RoleAssignment(long revision, AssignedRole assignedRole, Set<Principal> members)
          Constructor when you have a membership list defined.
 
Method Summary
 boolean equals(Object obj)
          Indicate whether some other object is "equal to" this one.
 AssignedRole getAssignedRole()
          Get the assignedRole who's membership this object manages.
 Set<Principal> getMembers()
          Get the membership of this roleAssignment.
 String getObjectType()
          Get the objectType of this roleAssignment.
 long getRevision()
          Get the internal revision number of this roleAssignment.
 int hashCode()
          Return a hash code value for the object.
 void setMembers(Set<Principal> members)
          Set the membership of this roleAssignment.
 String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OBJECT_TYPE

public static final String OBJECT_TYPE
Represents the type name of a RoleAssignment object.

See Also:
Constant Field Values
Constructor Detail

RoleAssignment

public RoleAssignment(long revision,
                      AssignedRole assignedRole,
                      Set<Principal> members)
Constructor when you have a membership list defined.

Parameters:
revision - internal revision number
assignedRole - The constructed roleAssignment represents the membership of this assignedRole.
members - The set of members to associate to the assignedRole.

RoleAssignment

public RoleAssignment(long revision,
                      AssignedRole assignedRole)
Constructor

Parameters:
revision - internal revision number
assignedRole - The assigned role to manage membership of.
Method Detail

getMembers

public Set<Principal> getMembers()
Get the membership of this roleAssignment.

Returns:
The set of principals which are the members of this roleAssignment.

setMembers

public void setMembers(Set<Principal> members)
Set the membership of this roleAssignment.

Parameters:
members - The list of principals to set as the members of this roleAssignment.

getAssignedRole

public AssignedRole getAssignedRole()
Get the assignedRole who's membership this object manages.

Returns:
the assignedRole the assignedRole that this object manages.

getObjectType

public String getObjectType()
Get the objectType of this roleAssignment.

Returns:
the objectType

getRevision

public long getRevision()
Get the internal revision number of this roleAssignment.

Returns:
the revision

hashCode

public int hashCode()
Return a hash code value for the object.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Indicate whether some other object is "equal to" this one.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Return a string representation of the object.

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright (c) 2014, SAS Institute Inc., Cary, NC, USA