Package com.sas.lsaf.security.role
Class Role
- java.lang.Object
-
- com.sas.lsaf.core.AbstractIdentifiable
-
- com.sas.lsaf.security.role.RoleDescriptor
-
- com.sas.lsaf.security.role.Role
-
- All Implemented Interfaces:
Identifiable
,java.io.Serializable
public class Role extends RoleDescriptor
A 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 that role. A role is associated with and scoped to a context where it is defined. A role context is a repository context that is configured with the membership capability.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.
- Since:
- 1.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Role(java.lang.String id, ObjectIdentity definedContext, ObjectIdentity assignedContext, java.lang.String name, java.lang.String description, long revision, java.util.Set<ScopedPrivilege> privileges, java.util.Set<Principal> members)
It is not intended or recommended that the consumer of this API construct these objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Set<Principal>
getMembers()
Gets the members assigned to this role.long
getRevision()
Gets the internal revision number of this object.int
hashCode()
void
setMembers(java.util.Set<Principal> members)
Sets the members assigned to this role.java.lang.String
toString()
-
Methods inherited from class com.sas.lsaf.security.role.RoleDescriptor
getAssignedContext, getDefinedContext, getDescription, getName, getPrivileges, isInherited, setDescription, setName, setPrivileges
-
Methods inherited from class com.sas.lsaf.core.AbstractIdentifiable
getId, getTypeId
-
-
-
-
Constructor Detail
-
Role
public Role(java.lang.String id, ObjectIdentity definedContext, ObjectIdentity assignedContext, java.lang.String name, java.lang.String description, long revision, java.util.Set<ScopedPrivilege> privileges, java.util.Set<Principal> members)
It is not intended or recommended that the consumer of this API construct these objects. They should only deal with the roles returned by the API.- Parameters:
id
- the unique identifier of this role.definedContext
- the context where this role was defined.assignedContext
- the context where this role is being assigned.name
- the name of this role.description
- the description of this role.revision
- the internal revision number of this role.privileges
- the privileges associated with this role.members
- the members associated with this role.
-
-
Method Detail
-
getRevision
public long getRevision()
Gets the internal revision number of this object.- Returns:
- The internal revision number of this object.
-
getMembers
public java.util.Set<Principal> getMembers()
Gets the members assigned to this role.- Returns:
- The members assigned to this role.
-
setMembers
public void setMembers(java.util.Set<Principal> members)
Sets the members assigned to this role.- Parameters:
members
- the members assigned to this role.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classRoleDescriptor
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classRoleDescriptor
-
toString
public java.lang.String toString()
- Overrides:
toString
in classRoleDescriptor
-
-