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,Serializable
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:
-
Constructor Summary
ConstructorsConstructorDescriptionRole(String id, ObjectIdentity definedContext, ObjectIdentity assignedContext, String name, String description, long revision, Set<ScopedPrivilege> privileges, Set<Principal> members) It is not intended or recommended that the consumer of this API construct these objects. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the members assigned to this role.longGets the internal revision number of this object.inthashCode()voidsetMembers(Set<Principal> members) Sets the members assigned to this role.toString()Methods inherited from class com.sas.lsaf.security.role.RoleDescriptor
getAssignedContext, getDefinedContext, getDescription, getName, getPrivileges, isInherited, setDescription, setName, setPrivilegesMethods inherited from class com.sas.lsaf.core.AbstractIdentifiable
getId, getTypeId
-
Constructor Details
-
Role
public Role(String id, ObjectIdentity definedContext, ObjectIdentity assignedContext, String name, String description, long revision, Set<ScopedPrivilege> privileges, 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 Details
-
getRevision
public long getRevision()Gets the internal revision number of this object.- Returns:
- The internal revision number of this object.
-
getMembers
Gets the members assigned to this role.- Returns:
- The members assigned to this role.
-
setMembers
Sets the members assigned to this role.- Parameters:
members- the members assigned to this role.
-
hashCode
public int hashCode()- Overrides:
hashCodein classRoleDescriptor
-
equals
- Overrides:
equalsin classRoleDescriptor
-
toString
- Overrides:
toStringin classRoleDescriptor
-