Package net.bluemind.role.api
Class RoleDescriptor
java.lang.Object
net.bluemind.role.api.RoleDescriptor
Declaration of a role.
-
Field Summary
Modifier and TypeFieldDescriptionAssociatedinvalid reference
RoleCategory
Child roles.Role applies to containers.boolean
Role can be delegated.Role description.Role applies to specific directory entry kind.boolean
Role applies to associated directory entry.Unique identifier.Label.Parent role, this role inherits all permissions of the parent role.int
Role priority //FIXME unusedboolean
Role applies to own roles only.Sibling role //FIXME explainboolean
Visible in administration. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RoleDescriptor
Make this role delegable.forDirEntry
(BaseDirEntry.Kind kind) forDirEntry
(BaseDirEntry.Kind kind, String siblingRole, String parentId) Assign child roles.Hide this role.priotity
(int priority) Assign a priority.withContainerRoles
(String... roles) Assign container roles.withParent
(String parentRoleId) Assign a parent role.withSelfPromote
(String parentRoleId) Assign permission to own a role in the context of the specific owner of this role.
-
Field Details
-
id
Unique identifier. -
parentRoleId
Parent role, this role inherits all permissions of the parent role. -
categoryId
Associatedinvalid reference
RoleCategory
-
label
Label. -
description
Role description. -
selfPromote
public boolean selfPromoteRole applies to own roles only. -
dirEntryPromote
public boolean dirEntryPromoteRole applies to associated directory entry. -
dirEntryKind
Role applies to specific directory entry kind. -
siblingRole
Sibling role //FIXME explain -
childsRole
Child roles. -
visible
public boolean visibleVisible in administration. -
delegable
public boolean delegableRole can be delegated. -
containerRoles
Role applies to containers. -
priority
public int priorityRole priority //FIXME unused
-
-
Constructor Details
-
RoleDescriptor
public RoleDescriptor()
-
-
Method Details
-
create
-
giveRoles
Assign child roles.- Parameters:
roles
- Array of roles.- Returns:
- A reference to the current instance (this).
-
withParent
Assign a parent role.- Parameters:
parentRoleId
- Parent role id.- Returns:
- A reference to the current instance (this).
-
withSelfPromote
Assign permission to own a role in the context of the specific owner of this role. A user owning this role will hava permission "parentRoleId" on the entities he owns.- Parameters:
parentRoleId
- Role identifier.- Returns:
- A reference to the current instance (this).
-
withContainerRoles
Assign container roles.- Parameters:
roles
- Array of roles.- Returns:
- A reference to the current instance (this).
-
notVisible
Hide this role.- Returns:
- A reference to the current instance (this).
-
delegable
Make this role delegable.- Returns:
- A reference to the current instance (this).
-
priotity
Assign a priority.- Parameters:
priority
-- Returns:
- A reference to the current instance (this).
-
forDirEntry
-
forDirEntry
-