|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sas.hls.security.role.RoleDescriptor
com.sas.hls.security.role.Role
public class Role
Role is a logical grouping of privileges. A Role can be defined with a set of privileges that are required to perform
actions by a user assigned to the role. A Role is associated with and scoped to a context where it is defined. A role
context is an object that implements the RoleContext interface. See RoleContext
. Examples of RoleContext are
Organization, Project and Analysis objects.
Members (users and groups) of that context may be assigned to the roles associated with a given role context. This will grant them all the privileges of the role.
Field Summary |
---|
Fields inherited from class com.sas.hls.security.role.RoleDescriptor |
---|
OBJECT_TYPE |
Constructor Summary | |
---|---|
Role(Identifiable roleContext,
String name,
String identifier,
String description,
Set<Privilege> privileges)
Constructor |
|
Role(ObjectIdentity roleContext,
String name,
String identifier,
String description,
Set<Privilege> privileges)
Constructor |
|
Role(ObjectIdentity roleContext,
String name,
String identifier,
String description,
Set<Privilege> privileges,
long revision)
Constructor (internal version) |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Indicate whether some other object is "equal to" this one. |
Set<Privilege> |
getPrivileges()
Get the privileges associated with this role. |
int |
hashCode()
Return a hash code value for the object. |
void |
setPrivileges(Set<Privilege> privileges)
Set the privileges associated with this role. |
RoleDescriptor |
toDescriptor()
Get a roleDescriptor for this role |
static List<RoleDescriptor> |
toDescriptors(List<Role> roles)
Get roleDescriptors for these roles |
String |
toString()
Return a string representation of the object. |
Methods inherited from class com.sas.hls.security.role.RoleDescriptor |
---|
getDescription, getIdentifier, getName, getObjectType, getRevision, getRoleContext, setDescription, setIdentifier, setName, setObjectType, setRevision, setRoleContext |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Role(ObjectIdentity roleContext, String name, String identifier, String description, Set<Privilege> privileges)
roleContext
- the context in which the role is being definedname
- the name of the roleidentifier
- the identifier of the roledescription
- the description of the roleprivileges
- the set of privileges of the rolepublic Role(ObjectIdentity roleContext, String name, String identifier, String description, Set<Privilege> privileges, long revision)
roleContext
- the context in which the role is being definedname
- the name of the roleidentifier
- the identifier of the roledescription
- the description of the roleprivileges
- the set of privileges of the rolerevision
- the internal revision number of this rolepublic Role(Identifiable roleContext, String name, String identifier, String description, Set<Privilege> privileges)
roleContext
- the context in which the role is being definedname
- the name of the roleidentifier
- the identifier of the roledescription
- the description of the roleprivileges
- the set of privileges of the roleMethod Detail |
---|
public Set<Privilege> getPrivileges()
public void setPrivileges(Set<Privilege> privileges)
privileges
- the privileges to associate with this rolepublic int hashCode()
hashCode
in class RoleDescriptor
Object.hashCode()
public boolean equals(Object obj)
equals
in class RoleDescriptor
Object.equals(java.lang.Object)
public String toString()
toString
in class RoleDescriptor
Object.toString()
public RoleDescriptor toDescriptor()
public static List<RoleDescriptor> toDescriptors(List<Role> roles)
roles
- the list of roles for which to get roleDescriptors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |