Package com.sas.lsaf.security.role
Class RoleDescriptor
java.lang.Object
com.sas.lsaf.core.AbstractIdentifiable
com.sas.lsaf.security.role.RoleDescriptor
- All Implemented Interfaces:
Identifiable,Serializable
- Direct Known Subclasses:
Role
A lightweight representation of a role.
- Since:
- 1.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRoleDescriptor(String id, ObjectIdentity definedContext, ObjectIdentity assignedContext, String name, String description, Set<ScopedPrivilege> privileges) It is not intended or recommended that the consumer of this API construct these objects. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the context where a role was assigned.Gets the context where a role is defined.Gets the description of a role.getName()Gets the name of a role.Gets the privileges assigned to a role.inthashCode()booleanChecks if this role is a defined role or an inherited role.voidsetDescription(String description) Sets the description of a role.voidSets the name of a role.voidsetPrivileges(Set<ScopedPrivilege> privileges) Sets the privileges assigned to a role.toString()Methods inherited from class com.sas.lsaf.core.AbstractIdentifiable
getId, getTypeId
-
Constructor Details
-
RoleDescriptor
public RoleDescriptor(String id, ObjectIdentity definedContext, ObjectIdentity assignedContext, String name, String description, Set<ScopedPrivilege> privileges) It is not intended or recommended that the consumer of this API construct these objects. They should only deal with the role descriptors 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.privileges- the privileges associated with this role.
-
-
Method Details
-
getDefinedContext
Gets the context where a role is defined.- Returns:
- The context where a role is defined.
-
getAssignedContext
Gets the context where a role was assigned. If a role is a defined role a context value will always match thegetDefinedContext()value. If a role is inherited then this value will be a descendant context where the role was inherited.- Returns:
- The context where this role has been applied.
-
isInherited
public boolean isInherited()Checks if this role is a defined role or an inherited role.- Returns:
trueif this role is an inherited role,falseif this a defined role.
-
getName
Gets the name of a role.- Returns:
- The name of this role.
-
setName
Sets the name of a role.- Parameters:
name- the name of this role.
-
getDescription
Gets the description of a role.- Returns:
- The description of this role.
-
setDescription
Sets the description of a role.- Parameters:
description- the description of this role.
-
getPrivileges
Gets the privileges assigned to a role.- Returns:
- The privileges assigned to this role.
-
setPrivileges
Sets the privileges assigned to a role.- Parameters:
privileges- the privileges to assign to this role.
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractIdentifiable
-
equals
- Overrides:
equalsin classAbstractIdentifiable
-
toString
- Overrides:
toStringin classAbstractIdentifiable
-