Class AdminRoleRef
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(String name, Object value) Add an attribute to the attributes map.protected boolean
boolean
getAttribute
(String name) Get the value of an attribute.Contains any additional properties of a role that do not fit in the above fields.getId()
The ID of this role as it exists in the system where roles are stored (default storage is Auth)getName()
The name of this role.The id of the parent of this role (if any).The tenant ID of this role.int
hashCode()
boolean
Indicate if this role was assigned by a third party systemvoid
setAttributes
(Map<String, Object> attributes) Contains any additional properties of a role that do not fit in the above fields.void
The ID of this role as it exists in the system where roles are stored (default storage is Auth)void
The name of this role.void
setParentRoleId
(String parentRoleId) The id of the parent of this role (if any).void
setPermissions
(Set<AdminPermissionRef> permissions) void
setTenantId
(String tenantId) The tenant ID of this role.void
setThirdPartyAssigned
(boolean thirdPartyAssigned) Indicate if this role was assigned by a third party systemtoString()
-
Constructor Details
-
AdminRoleRef
public AdminRoleRef()
-
-
Method Details
-
getAttribute
Get the value of an attribute. May return null.- Parameters:
name
- The attribute name.- Returns:
- The attribute value if it exists, or null.
-
addAttribute
Add an attribute to the attributes map.- Parameters:
name
- The attribute key.value
- The attribute value.
-
getId
The ID of this role as it exists in the system where roles are stored (default storage is Auth) -
getName
The name of this role. Must be hydrated. -
getTenantId
The tenant ID of this role. TODO This currently appears to have no effect. Other than direct DB inserts, there is no valid way to set this value. -
getAttributes
Contains any additional properties of a role that do not fit in the above fields. -
getParentRoleId
The id of the parent of this role (if any).This role will effectively inherit all of the
permissions
of its parent and any ancestors further up in the hierarchy.Global roles can only have global parents, while tenant roles can have parents from global or the same tenant.
Furthermore, there is validation in place to prevent cycles from being created in a role's ancestry (role cannot become a parent of itself).
-
getPermissions
-
isThirdPartyAssigned
public boolean isThirdPartyAssigned()Indicate if this role was assigned by a third party system -
setId
The ID of this role as it exists in the system where roles are stored (default storage is Auth) -
setName
The name of this role. Must be hydrated. -
setTenantId
The tenant ID of this role. TODO This currently appears to have no effect. Other than direct DB inserts, there is no valid way to set this value. -
setAttributes
Contains any additional properties of a role that do not fit in the above fields. -
setParentRoleId
The id of the parent of this role (if any).This role will effectively inherit all of the
permissions
of its parent and any ancestors further up in the hierarchy.Global roles can only have global parents, while tenant roles can have parents from global or the same tenant.
Furthermore, there is validation in place to prevent cycles from being created in a role's ancestry (role cannot become a parent of itself).
-
setPermissions
-
setThirdPartyAssigned
public void setThirdPartyAssigned(boolean thirdPartyAssigned) Indicate if this role was assigned by a third party system -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-