Class AdminRoleRef
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String name, Object value) Add an attribute to the attributes map.protected booleanbooleangetAttribute(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.inthashCode()booleanIndicate if this role was assigned by a third party systemvoidsetAttributes(Map<String, Object> attributes) Contains any additional properties of a role that do not fit in the above fields.voidThe ID of this role as it exists in the system where roles are stored (default storage is Auth)voidThe name of this role.voidsetParentRoleId(String parentRoleId) The id of the parent of this role (if any).voidsetPermissions(Set<AdminPermissionRef> permissions) voidsetTenantId(String tenantId) The tenant ID of this role.voidsetThirdPartyAssigned(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
permissionsof 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
permissionsof 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
-