Interface FilePlanRoleService
-
- All Known Implementing Classes:
FilePlanRoleServiceImpl
@AlfrescoPublicApi public interface FilePlanRoleService
Role service interface- Since:
- 2.1
- Author:
- Roy Wetherall
-
-
Field Summary
Fields Modifier and Type Field Description static String
ROLE_ADMIN
static String
ROLE_EXTENDED_READERS
static String
ROLE_EXTENDED_WRITERS
static String
ROLE_POWER_USER
static String
ROLE_RECORDS_MANAGER
static String
ROLE_SECURITY_OFFICER
static String
ROLE_USER
Default role namesstatic List<String>
SYSTEM_ROLES
System roles
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
assignRoleToAuthority(NodeRef filePlan, String role, String authorityName)
Assign a role to an authorityRole
createRole(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 nodeSet<String>
getAllAssignedToRole(NodeRef filePlan, String role)
Gets all the groups and users that have been directly assigned to a role.String
getAllRolesContainerGroup(NodeRef filePlan)
Returns the name of the container group for all roles of a specified file plan.Set<String>
getGroupsAssignedToRole(NodeRef filePlan, String role)
Gets all the groups that have been directly assigned to a role.Role
getRole(NodeRef filePlan, String role)
Get a role by nameSet<Role>
getRoles(NodeRef filePlan)
Get all the available roles for the given records management root node (includes also the system roles)Set<Role>
getRoles(NodeRef filePlan, boolean includeSystemRoles)
Get all the available roles for the given records management root node.Set<Role>
getRolesByUser(NodeRef filePlan, String user)
Gets the roles for a given user (includes also the system roles)Set<Role>
getRolesByUser(NodeRef filePlan, String user, boolean includeSystemRoles)
Gets the roles for a given user.Set<String>
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 authorityRole
updateRole(NodeRef filePlan, String role, String roleDisplayLabel, Set<Capability> capabilities)
Update an existing role
-
-
-
Field Detail
-
ROLE_USER
static final String ROLE_USER
Default role names- See Also:
- Constant Field Values
-
ROLE_POWER_USER
static final String ROLE_POWER_USER
- See Also:
- Constant Field Values
-
ROLE_SECURITY_OFFICER
static final String ROLE_SECURITY_OFFICER
- See Also:
- Constant Field Values
-
ROLE_RECORDS_MANAGER
static final String ROLE_RECORDS_MANAGER
- See Also:
- Constant Field Values
-
ROLE_ADMIN
static final String ROLE_ADMIN
- See Also:
- Constant Field Values
-
ROLE_EXTENDED_READERS
static final String ROLE_EXTENDED_READERS
- See Also:
- Constant Field Values
-
ROLE_EXTENDED_WRITERS
static final String ROLE_EXTENDED_WRITERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setupFilePlanRoles
void setupFilePlanRoles(NodeRef filePlan)
Sets up the roles on a new file plan.- Parameters:
filePlan
- file plan
-
tearDownFilePlanRoles
void tearDownFilePlanRoles(NodeRef filePlan)
Tears down the roles on a file plan.- Parameters:
filePlan
- file plan
-
getAllRolesContainerGroup
String getAllRolesContainerGroup(NodeRef filePlan)
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
Set<Role> getRoles(NodeRef filePlan)
Get all the available roles for the given records management root node (includes also the system roles)- Parameters:
filePlan
- file plan- Returns:
-
getRoles
Set<Role> getRoles(NodeRef filePlan, boolean includeSystemRoles)
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
Set<Role> getRolesByUser(NodeRef filePlan, String user)
Gets the roles for a given user (includes also the system roles)- Parameters:
filePlan
- file planuser
- user- Returns:
-
getRolesByUser
Set<Role> getRolesByUser(NodeRef filePlan, String user, boolean includeSystemRoles)
Gets the roles for a given user. System roles can be filtered- Parameters:
filePlan
- file planuser
- userincludeSystemRoles
- system roles- Returns:
-
getRole
Role getRole(NodeRef filePlan, String role)
Get a role by name- Parameters:
filePlan
- file planrole
- role- Returns:
-
existsRole
boolean existsRole(NodeRef filePlan, String role)
Indicate whether a role exists for a given records management root node- Parameters:
filePlan
- file planrole
- role- Returns:
-
hasRMAdminRole
boolean hasRMAdminRole(NodeRef filePlan, String user)
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
void deleteRole(NodeRef filePlan, String role)
Delete a role- Parameters:
filePlan
- file planrole
- role
-
getUsersAssignedToRole
Set<String> getUsersAssignedToRole(NodeRef filePlan, String role)
Gets all the users that have been directly assigned to a role.
-
getGroupsAssignedToRole
Set<String> getGroupsAssignedToRole(NodeRef filePlan, String role)
Gets all the groups that have been directly assigned to a role.
-
getAllAssignedToRole
Set<String> getAllAssignedToRole(NodeRef filePlan, String role)
Gets all the groups and users that have been directly assigned to a role.
-
assignRoleToAuthority
void assignRoleToAuthority(NodeRef filePlan, String role, String authorityName)
Assign a role to an authority- Parameters:
filePlan
- file planrole
- roleauthorityName
- authority name
-
-