public class RoleDescriptor extends AbstractIdentifiable
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
ObjectIdentity |
getAssignedContext()
Gets the context where a role was assigned.
|
ObjectIdentity |
getDefinedContext()
Gets the context where a role is defined.
|
String |
getDescription()
Gets the description of a role.
|
String |
getName()
Gets the name of a role.
|
Set<ScopedPrivilege> |
getPrivileges()
Gets the privileges assigned to a role.
|
int |
hashCode() |
boolean |
isInherited()
Checks if this role is a defined role or an inherited role.
|
void |
setDescription(String description)
Sets the description of a role.
|
void |
setName(String name)
Sets the name of a role.
|
void |
setPrivileges(Set<ScopedPrivilege> privileges)
Sets the privileges assigned to a role.
|
String |
toString() |
getId, getTypeId
public RoleDescriptor(String id, ObjectIdentity definedContext, ObjectIdentity assignedContext, String name, String description, Set<ScopedPrivilege> privileges)
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.public ObjectIdentity getDefinedContext()
public ObjectIdentity getAssignedContext()
getDefinedContext()
value. If a role is inherited then this value will be a
descendant context where the role was inherited.public boolean isInherited()
true
if this role is an inherited role, false
if this a defined role.public String getName()
public void setName(String name)
name
- the name of this role.public String getDescription()
public void setDescription(String description)
description
- the description of this role.public Set<ScopedPrivilege> getPrivileges()
public void setPrivileges(Set<ScopedPrivilege> privileges)
privileges
- the privileges to assign to this role.public int hashCode()
hashCode
in class AbstractIdentifiable
public boolean equals(Object obj)
equals
in class AbstractIdentifiable
public String toString()
toString
in class AbstractIdentifiable
<i>Copyright (c) 2022, SAS Institute Inc., Cary, NC, USA</i>