Class FilePlanRoleServiceImpl
- java.lang.Object
-
- org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleServiceImpl
-
- All Implemented Interfaces:
RecordsManagementCustomModel
,RecordsManagementModel
,FilePlanRoleService
public class FilePlanRoleServiceImpl extends Object implements FilePlanRoleService, RecordsManagementModel
Role service implementation- Since:
- 2.1
- Author:
- Roy Wetherall
-
-
Field Summary
Fields Modifier and Type Field Description static String
RM_ROLE_ZONE_PREFIX
Records management role zone-
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService
ROLE_ADMIN, ROLE_EXTENDED_READERS, ROLE_EXTENDED_WRITERS, ROLE_POWER_USER, ROLE_RECORDS_MANAGER, ROLE_SECURITY_OFFICER, ROLE_USER, SYSTEM_ROLES
-
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementCustomModel
ASPECT_CUSTOM_ASSOCIATIONS, ASPECT_SUPPLEMENTAL_MARKING_LIST, CONSTRAINT_CUSTOM_SMLIST, CUSTOM_REF_CROSSREFERENCE, CUSTOM_REF_OBSOLETES, CUSTOM_REF_RENDITION, CUSTOM_REF_SUPERSEDES, CUSTOM_REF_SUPPORTS, CUSTOM_REF_VERSIONS, PROP_SUPPLEMENTAL_MARKING_LIST, RM_CUSTOM_MODEL, RM_CUSTOM_PREFIX, RM_CUSTOM_URI
-
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel
ASPECT_ARCHIVED, ASPECT_ASCENDED, ASPECT_CAVEAT_CONFIG_ROOT, ASPECT_COMMON_RECORD_DETAILS, ASPECT_COUNTABLE, ASPECT_CUSTOM_RM_DATA, ASPECT_CUT_OFF, ASPECT_DECLARED_RECORD, ASPECT_DISPOSITION_LIFECYCLE, ASPECT_DISPOSITION_PROCESSED, ASPECT_EMAIL_CONFIG_ROOT, ASPECT_EXTENDED_SECURITY, ASPECT_FILABLE, ASPECT_FILE_PLAN_COMPONENT, ASPECT_FROZEN, ASPECT_GHOSTED, ASPECT_HELD_CHILDREN, ASPECT_LOADED_DATA_SET_ID, ASPECT_RECORD, ASPECT_RECORD_COMPONENT_ID, ASPECT_RECORD_META_DATA, ASPECT_RECORD_ORIGINATING_DETAILS, ASPECT_RECORD_REJECTION_DETAILS, ASPECT_RECORDS_MANAGEMENT_ROOT, ASPECT_RM_SEARCH, ASPECT_SAVED_SEARCH, ASPECT_SCHEDULED, ASPECT_TRANSFERRED, ASPECT_TRANSFERRING, ASPECT_UNCUT_OFF, ASPECT_UNPUBLISHED_UPDATE, ASPECT_VERSIONED_RECORD, ASPECT_VITAL_RECORD, ASPECT_VITAL_RECORD_DEFINITION, ASSOC_CAVEAT_CONFIG, ASSOC_DISPOSITION_ACTION_DEFINITIONS, ASSOC_DISPOSITION_ACTION_HISTORY, ASSOC_DISPOSITION_SCHEDULE, ASSOC_EMAIL_CONFIG, ASSOC_EVENT_EXECUTIONS, ASSOC_FROZEN_CONTENT, ASSOC_FROZEN_RECORDS, ASSOC_HOLDS, ASSOC_NEXT_DISPOSITION_ACTION, ASSOC_TRANSFERRED, ASSOC_TRANSFERS, GL_URI, PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, PROP_COUNT, PROP_CUT_OFF_DATE, PROP_DATE_FILED, PROP_DB_UNIQUENESS_ID, PROP_DECLARED_AT, PROP_DECLARED_BY, PROP_DISPOSITION_ACTION, PROP_DISPOSITION_ACTION_COMPLETED_AT, PROP_DISPOSITION_ACTION_COMPLETED_BY, PROP_DISPOSITION_ACTION_GHOST_ON_DESTROY, PROP_DISPOSITION_ACTION_ID, PROP_DISPOSITION_ACTION_NAME, PROP_DISPOSITION_ACTION_STARTED_AT, PROP_DISPOSITION_ACTION_STARTED_BY, PROP_DISPOSITION_AS_OF, PROP_DISPOSITION_AUTHORITY, PROP_DISPOSITION_DESCRIPTION, PROP_DISPOSITION_EVENT, PROP_DISPOSITION_EVENT_COMBINATION, PROP_DISPOSITION_EVENTS_ELIGIBLE, PROP_DISPOSITION_INSTRUCTIONS, PROP_DISPOSITION_LOCATION, PROP_DISPOSITION_PERIOD, PROP_DISPOSITION_PERIOD_PROPERTY, PROP_EVENT_EXECUTION_AUTOMATIC, PROP_EVENT_EXECUTION_COMPLETE, PROP_EVENT_EXECUTION_COMPLETED_AT, PROP_EVENT_EXECUTION_COMPLETED_BY, PROP_EVENT_EXECUTION_NAME, PROP_FROZEN_AT, PROP_FROZEN_BY, PROP_HELD_CHILDREN_COUNT, PROP_HOLD_REASON, PROP_IDENTIFIER, PROP_IS_CLOSED, PROP_LOADED_DATA_SET_IDS, PROP_LOCATION, PROP_MANUALLY_SET_AS_OF, PROP_ORIGIONAL_NAME, PROP_PUBLISH_IN_PROGRESS, PROP_READERS, PROP_RECORD_LEVEL_DISPOSITION, PROP_RECORD_ORIGINATING_CREATION_DATE, PROP_RECORD_ORIGINATING_LOCATION, PROP_RECORD_ORIGINATING_USER_ID, PROP_RECORD_REJECTION_DATE, PROP_RECORD_REJECTION_REASON, PROP_RECORD_REJECTION_USER_ID, PROP_REVIEW_AS_OF, PROP_REVIEW_PERIOD, PROP_ROOT_NODEREF, PROP_RS_DECLASSIFICATION_REVIEW_COMPLETED_AT, PROP_RS_DECLASSIFICATION_REVIEW_COMPLETED_BY, PROP_RS_DISPOITION_AUTHORITY, PROP_RS_DISPOITION_INSTRUCTIONS, PROP_RS_DISPOSITION_ACTION_AS_OF, PROP_RS_DISPOSITION_ACTION_NAME, PROP_RS_DISPOSITION_EVENTS, PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, PROP_RS_DISPOSITION_PERIOD, PROP_RS_DISPOSITION_PERIOD_EXPRESSION, PROP_RS_HAS_DISPOITION_SCHEDULE, PROP_RS_HOLD_REASON, PROP_RS_VITAL_RECORD_REVIEW_PERIOD, PROP_RS_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION, PROP_TRANSFER_ACCESSION_INDICATOR, PROP_TRANSFER_LOCATION, PROP_TRANSFER_PDF_INDICATOR, PROP_UNPUBLISHED_UPDATE, PROP_UPDATE_TO, PROP_UPDATED_PROPERTIES, PROP_VITAL_RECORD_INDICATOR, PROP_WRITERS, RM_MODEL, RM_PREFIX, RM_URI, TYPE_CAVEAT_CONFIG, TYPE_DISPOSITION_ACTION, TYPE_DISPOSITION_ACTION_DEFINITION, TYPE_DISPOSITION_SCHEDULE, TYPE_EMAIL_CONFIG, TYPE_EVENT_EXECUTION, TYPE_FILE_PLAN, TYPE_HOLD, TYPE_HOLD_CONTAINER, TYPE_NON_ELECTRONIC_DOCUMENT, TYPE_RECORD_CATEGORY, TYPE_RECORD_FOLDER, TYPE_RECORDS_MANAGEMENT_CONTAINER, TYPE_RM_SITE, TYPE_TRANSFER, TYPE_TRANSFER_CONTAINER, TYPE_UNFILED_RECORD_CONTAINER, TYPE_UNFILED_RECORD_FOLDER, UPDATE_TO_DISPOSITION_ACTION_DEFINITION
-
-
Constructor Summary
Constructors Constructor Description FilePlanRoleServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete 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 rmRootNode, String role)
Delete a roleboolean
existsRole(NodeRef rmRootNode, 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 roleName)
Gets all the groups that have been directly assigned to a role.Role
getRole(NodeRef rmRootNode, String role)
Get a role by nameSet<Role>
getRoles(NodeRef rmRootNode)
Get all the available roles for the given records management root node (includes also the system roles)Set<Role>
getRoles(NodeRef rmRootNode, boolean includeSystemRoles)
Get all the available roles for the given records management root node.Set<Role>
getRolesByUser(NodeRef rmRootNode, String user)
Gets the roles for a given user (includes also the system roles)Set<Role>
getRolesByUser(NodeRef rmRootNode, String user, boolean includeSystemRoles)
Gets the roles for a given user.Set<String>
getUsersAssignedToRole(NodeRef filePlan, String roleName)
Gets all the users that have been directly assigned to a role.boolean
hasRMAdminRole(NodeRef rmRootNode, String user)
Determines whether the given user has the RM Admin rolevoid
setAuthorityService(AuthorityService authorityService)
void
setBootstrapImporterModuleComponent(BootstrapImporterModuleComponent bootstrapImporterModuleComponent)
void
setCapabilityService(CapabilityService capabilityService)
void
setFilePlanService(FilePlanService filePlanService)
void
setNodeService(NodeService nodeService)
void
setPermissionService(PermissionService permissionService)
void
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 rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities)
Update an existing role
-
-
-
Field Detail
-
RM_ROLE_ZONE_PREFIX
public static final String RM_ROLE_ZONE_PREFIX
Records management role zone- See Also:
- Constant Field Values
-
-
Method Detail
-
setCapabilityService
public void setCapabilityService(CapabilityService capabilityService)
- Parameters:
capabilityService
- capability service
-
setAuthorityService
public void setAuthorityService(AuthorityService authorityService)
- Parameters:
authorityService
- authority service
-
setPermissionService
public void setPermissionService(PermissionService permissionService)
- Parameters:
permissionService
- permission service
-
setNodeService
public void setNodeService(NodeService nodeService)
- Parameters:
nodeService
- node service
-
setFilePlanService
public void setFilePlanService(FilePlanService filePlanService)
- Parameters:
filePlanService
- file plan service
-
setBootstrapImporterModuleComponent
public void setBootstrapImporterModuleComponent(BootstrapImporterModuleComponent bootstrapImporterModuleComponent)
- Parameters:
bootstrapImporterModuleComponent
-
-
setupFilePlanRoles
public void setupFilePlanRoles(NodeRef filePlan)
Description copied from interface:FilePlanRoleService
Sets up the roles on a new file plan.- Specified by:
setupFilePlanRoles
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file plan- See Also:
FilePlanRoleService.setupFilePlanRoles(NodeRef)
-
tearDownFilePlanRoles
public void tearDownFilePlanRoles(NodeRef filePlan)
Description copied from interface:FilePlanRoleService
Tears down the roles on a file plan.- Specified by:
tearDownFilePlanRoles
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file plan- See Also:
FilePlanRoleService.tearDownFilePlanRoles(org.alfresco.service.cmr.repository.NodeRef)
-
getRoles
public Set<Role> getRoles(NodeRef rmRootNode)
Description copied from interface:FilePlanRoleService
Get all the available roles for the given records management root node (includes also the system roles)- Specified by:
getRoles
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- file plan- Returns:
- See Also:
FilePlanRoleService.getRoles(NodeRef)
-
getRoles
public Set<Role> getRoles(NodeRef rmRootNode, boolean includeSystemRoles)
Description copied from interface:FilePlanRoleService
Get all the available roles for the given records management root node. System roles can be filtered- Specified by:
getRoles
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- file planincludeSystemRoles
- system roles- Returns:
- See Also:
FilePlanRoleService.getRoles(NodeRef, boolean)
-
getRolesByUser
public Set<Role> getRolesByUser(NodeRef rmRootNode, String user)
Description copied from interface:FilePlanRoleService
Gets the roles for a given user (includes also the system roles)- Specified by:
getRolesByUser
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- file planuser
- user- Returns:
- See Also:
RecordsManagementSecurityService.getRolesByUser(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
getRolesByUser
public Set<Role> getRolesByUser(NodeRef rmRootNode, String user, boolean includeSystemRoles)
Description copied from interface:FilePlanRoleService
Gets the roles for a given user. System roles can be filtered- Specified by:
getRolesByUser
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- file planuser
- userincludeSystemRoles
- system roles- Returns:
- See Also:
FilePlanRoleService.getRolesByUser(NodeRef, String, boolean)
-
getRole
public Role getRole(NodeRef rmRootNode, String role)
Description copied from interface:FilePlanRoleService
Get a role by name- Specified by:
getRole
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- file planrole
- role- Returns:
- See Also:
FilePlanRoleService.getRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
existsRole
public boolean existsRole(NodeRef rmRootNode, String role)
Description copied from interface:FilePlanRoleService
Indicate whether a role exists for a given records management root node- Specified by:
existsRole
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- file planrole
- role- Returns:
- See Also:
FilePlanRoleService.existsRole(NodeRef, java.lang.String)
-
hasRMAdminRole
public boolean hasRMAdminRole(NodeRef rmRootNode, String user)
Description copied from interface:FilePlanRoleService
Determines whether the given user has the RM Admin role- Specified by:
hasRMAdminRole
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- filePlanuser
- user name to check- Returns:
- true if the user has the RM Admin role, false otherwise
- See Also:
TODO .. change this to check a property of the role its self
-
createRole
public Role createRole(NodeRef filePlan, String role, String roleDisplayLabel, Set<Capability> capabilities)
Description copied from interface:FilePlanRoleService
Create a new role- Specified by:
createRole
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file plan- Returns:
- See Also:
RecordsManagementSecurityService.createRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String, java.util.Set)
-
updateRole
public Role updateRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities)
Description copied from interface:FilePlanRoleService
Update an existing role- Specified by:
updateRole
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- file plan- Returns:
- See Also:
RecordsManagementSecurityService.updateRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String, java.util.Set)
-
deleteRole
public void deleteRole(NodeRef rmRootNode, String role)
Description copied from interface:FilePlanRoleService
Delete a role- Specified by:
deleteRole
in interfaceFilePlanRoleService
- Parameters:
rmRootNode
- file planrole
- role- See Also:
RecordsManagementSecurityService.deleteRole(NodeRef,String)
-
getUsersAssignedToRole
public Set<String> getUsersAssignedToRole(NodeRef filePlan, String roleName)
Description copied from interface:FilePlanRoleService
Gets all the users that have been directly assigned to a role.- Specified by:
getUsersAssignedToRole
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file planroleName
- role- Returns:
Set
<String
> set of users- See Also:
FilePlanRoleService.getUsersAssignedToRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
getGroupsAssignedToRole
public Set<String> getGroupsAssignedToRole(NodeRef filePlan, String roleName)
Description copied from interface:FilePlanRoleService
Gets all the groups that have been directly assigned to a role.- Specified by:
getGroupsAssignedToRole
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file planroleName
- role- Returns:
Set
<String
> set of groups- See Also:
FilePlanRoleService.getGroupsAssignedToRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
getAllAssignedToRole
public Set<String> getAllAssignedToRole(NodeRef filePlan, String role)
Description copied from interface:FilePlanRoleService
Gets all the groups and users that have been directly assigned to a role.- Specified by:
getAllAssignedToRole
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file planrole
- role- Returns:
Set
<String
> set of groups and users- See Also:
FilePlanRoleService.getAllAssignedToRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
assignRoleToAuthority
public void assignRoleToAuthority(NodeRef filePlan, String role, String authorityName)
Description copied from interface:FilePlanRoleService
Assign a role to an authority- Specified by:
assignRoleToAuthority
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file planrole
- roleauthorityName
- authority name- See Also:
RecordsManagementSecurityService.assignRoleToAuthority(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String)
-
unassignRoleFromAuthority
public void unassignRoleFromAuthority(NodeRef filePlan, String role, String authorityName)
Description copied from interface:FilePlanRoleService
Unassign a role from an authority- Specified by:
unassignRoleFromAuthority
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file planrole
- roleauthorityName
- authority name- See Also:
FilePlanRoleService.unassignRoleFromAuthority(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String)
-
getAllRolesContainerGroup
public String getAllRolesContainerGroup(NodeRef filePlan)
Description copied from interface:FilePlanRoleService
Returns the name of the container group for all roles of a specified file plan.- Specified by:
getAllRolesContainerGroup
in interfaceFilePlanRoleService
- Parameters:
filePlan
- file plan node reference- Returns:
- String group name
- See Also:
RecordsManagementSecurityService.getAllRolesContainerGroup(org.alfresco.service.cmr.repository.NodeRef)
-
-