Interface FilePlanRoleService
- All Known Implementing Classes:
FilePlanRoleServiceImpl
@AlfrescoPublicApi
public interface FilePlanRoleService
Role service interface
- Since:
- 2.1
- Author:
- Roy Wetherall
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
assignRoleToAuthority
(NodeRef filePlan, String role, String authorityName) Assign a role to an authoritycreateRole
(NodeRef filePlan, String role, String roleDisplayLabel, Set<Capability> capabilities) Create a new rolevoid
deleteRole
(NodeRef filePlan, String role) Delete a roleboolean
existsRole
(NodeRef filePlan, String role) Indicate whether a role exists for a given records management root nodegetAllAssignedToRole
(NodeRef filePlan, String role) Gets all the groups and users that have been directly assigned to a role.getAllRolesContainerGroup
(NodeRef filePlan) Returns the name of the container group for all roles of a specified file plan.getGroupsAssignedToRole
(NodeRef filePlan, String role) Gets all the groups that have been directly assigned to a role.Get a role by nameGet all the available roles for the given records management root node (includes also the system roles)Get all the available roles for the given records management root node.getRolesByUser
(NodeRef filePlan, String user) Gets the roles for a given user (includes also the system roles)getRolesByUser
(NodeRef filePlan, String user, boolean includeSystemRoles) Gets the roles for a given user.getUsersAssignedToRole
(NodeRef filePlan, String role) Gets all the users that have been directly assigned to a role.boolean
hasRMAdminRole
(NodeRef filePlan, String user) Determines whether the given user has the RM Admin rolevoid
setupFilePlanRoles
(NodeRef filePlan) Sets up the roles on a new file plan.void
tearDownFilePlanRoles
(NodeRef filePlan) Tears down the roles on a file plan.void
unassignRoleFromAuthority
(NodeRef filePlan, String role, String authorityName) Unassign a role from an authorityupdateRole
(NodeRef filePlan, String role, String roleDisplayLabel, Set<Capability> capabilities) Update an existing role
-
Field Details
-
ROLE_USER
Default role names- See Also:
-
ROLE_POWER_USER
- See Also:
-
ROLE_SECURITY_OFFICER
- See Also:
-
ROLE_RECORDS_MANAGER
- See Also:
-
ROLE_ADMIN
- See Also:
-
ROLE_EXTENDED_READERS
- See Also:
-
ROLE_EXTENDED_WRITERS
- See Also:
-
SYSTEM_ROLES
System roles
-
-
Method Details
-
setupFilePlanRoles
Sets up the roles on a new file plan.- Parameters:
filePlan
- file plan
-
tearDownFilePlanRoles
Tears down the roles on a file plan.- Parameters:
filePlan
- file plan
-
getAllRolesContainerGroup
Returns the name of the container group for all roles of a specified file plan.- Parameters:
filePlan
- file plan node reference- Returns:
- String group name
-
getRoles
Get all the available roles for the given records management root node (includes also the system roles)- Parameters:
filePlan
- file plan- Returns:
-
getRoles
Get all the available roles for the given records management root node. System roles can be filtered- Parameters:
filePlan
- file planincludeSystemRoles
- system roles- Returns:
-
getRolesByUser
Gets the roles for a given user (includes also the system roles)- Parameters:
filePlan
- file planuser
- user- Returns:
-
getRolesByUser
Gets the roles for a given user. System roles can be filtered- Parameters:
filePlan
- file planuser
- userincludeSystemRoles
- system roles- Returns:
-
getRole
Get a role by name- Parameters:
filePlan
- file planrole
- role- Returns:
-
existsRole
Indicate whether a role exists for a given records management root node- Parameters:
filePlan
- file planrole
- role- Returns:
-
hasRMAdminRole
Determines whether the given user has the RM Admin role- Parameters:
filePlan
- filePlanuser
- user name to check- Returns:
- true if the user has the RM Admin role, false otherwise
-
createRole
Role createRole(NodeRef filePlan, String role, String roleDisplayLabel, Set<Capability> capabilities) Create a new role- Parameters:
filePlan
- file planrole
-roleDisplayLabel
-capabilities
-- Returns:
-
updateRole
Role updateRole(NodeRef filePlan, String role, String roleDisplayLabel, Set<Capability> capabilities) Update an existing role- Parameters:
filePlan
- file planrole
-roleDisplayLabel
-capabilities
-- Returns:
-
deleteRole
Delete a role- Parameters:
filePlan
- file planrole
- role
-
getUsersAssignedToRole
Gets all the users that have been directly assigned to a role. -
getGroupsAssignedToRole
Gets all the groups that have been directly assigned to a role. -
getAllAssignedToRole
Gets all the groups and users that have been directly assigned to a role. -
assignRoleToAuthority
Assign a role to an authority- Parameters:
filePlan
- file planrole
- roleauthorityName
- authority name
-
unassignRoleFromAuthority
Unassign a role from an authority- Parameters:
filePlan
- file planrole
- roleauthorityName
- authority name
-