Interface Role
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddIncludedRole(Role includedRole)IncludesincludedRoleto the rolevoidaddPermissions(Permission... permissions)Adds permissions to the roleStringgetId()Returns id of the roleRole[]getIncludedRoles()Returns roles which are included in this roleStringgetName()Returns name of the rolePermissionsgetOwnPermissions()Return only own permissions of the role without inherited permissionsPermissionsgetPermissions()Returns permissions of the rolebooleanisProjectAssociationSupported()Returns true if this role can be associated with a particular project.voidremoveIncludedRole(Role includedRole)ExcludesincludedRolefrom the rolevoidremovePermission(Permission permission)Removes permission from the role
-
-
-
Method Detail
-
getId
@NotNull String getId()
Returns id of the role- Returns:
- id of the role
-
getName
@NotNull String getName()
Returns name of the role- Returns:
- name of the role
-
getPermissions
@NotNull Permissions getPermissions()
Returns permissions of the role- Returns:
- permissions of the role
-
getOwnPermissions
@NotNull Permissions getOwnPermissions()
Return only own permissions of the role without inherited permissions- Returns:
- own permissions of the role
-
getIncludedRoles
@NotNull Role[] getIncludedRoles()
Returns roles which are included in this role- Returns:
- included roles
-
isProjectAssociationSupported
boolean isProjectAssociationSupported()
Returns true if this role can be associated with a particular project. This means that this role contains at least one permission that can be associated with a project.- Returns:
- true if this role can be associated with a project
-
addPermissions
void addPermissions(@NotNull Permission... permissions)Adds permissions to the role- Parameters:
permissions- permissions
-
removePermission
void removePermission(@NotNull Permission permission)Removes permission from the role- Parameters:
permission- permission
-
addIncludedRole
void addIncludedRole(@NotNull Role includedRole)IncludesincludedRoleto the role- Parameters:
includedRole- role to include
-
removeIncludedRole
void removeIncludedRole(@NotNull Role includedRole)ExcludesincludedRolefrom the role- Parameters:
includedRole- role to include
-
-