Class ExtendedSecurityServiceImpl
- java.lang.Object
-
- org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
-
- org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityServiceImpl
-
- All Implemented Interfaces:
EventListener
,RecordsManagementCustomModel
,RecordsManagementModel
,DeprecatedExtendedSecurityService
,ExtendedSecurityService
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
public class ExtendedSecurityServiceImpl extends ServiceBaseImpl implements ExtendedSecurityService, RecordsManagementModel, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Extended security service implementation.- Since:
- 2.1
- Author:
- Roy Wetherall
-
-
Field Summary
-
Fields inherited from class org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
applicationContext, authenticationUtil, contentService, dictionaryService, nodeService, nodeTypeUtility, renditionService, transactionalResourceHelper
-
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityService
IPR_GROUP_PREFIX
-
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 ExtendedSecurityServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers)
Deprecated.void
addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents)
Deprecated.Set<String>
getExtendedReaders(NodeRef nodeRef)
Deprecated.Set<String>
getExtendedWriters(NodeRef nodeRef)
Deprecated.Set<String>
getReaders(NodeRef nodeRef)
Gets the set of authorities that are extended readers for the given node.Set<String>
getWriters(NodeRef nodeRef)
Get the set of authorities that are extended writers for the given node.boolean
hasExtendedSecurity(NodeRef nodeRef)
Indicates whether a node has extended security.void
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent contextRefreshedEvent)
Application context refresh event handlervoid
remove(NodeRef nodeRef)
Removes all extended security from a node.void
removeAllExtendedSecurity(NodeRef nodeRef)
Deprecated.void
removeAllExtendedSecurity(NodeRef nodeRef, boolean applyToParents)
Deprecated.void
removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers)
Deprecated.void
removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents)
Deprecated.void
set(NodeRef nodeRef, Set<String> readers, Set<String> writers)
Set extended security for a node, where the readers will be granted ReadRecord permission and ViewRecord capability to the node and where the writers will be granted Filling permission and Filling capability to the node.void
set(NodeRef nodeRef, Pair<Set<String>,Set<String>> readersAndWriters)
Helper to allow caller to provide authority sets as a pair where the first is the readers and the second is the writers.void
setAuthorityService(AuthorityService authorityService)
void
setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
void
setFilePlanService(FilePlanService filePlanService)
void
setPermissionService(PermissionService permissionService)
void
setTransactionService(TransactionService transactionService)
-
Methods inherited from class org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
getFilePlan, getFilePlanComponentKind, getFilePlanComponentKindFromType, getInternalNodeService, getNextCount, getTypeAndApsects, instanceOf, instanceOf, isDeclared, isFilePlan, isFilePlanComponent, isFilePlanContainer, isHold, isRecord, isRecordCategory, isRecordFolder, isTransfer, isUnfiledRecordsContainer, setApplicationContext, setAuthenticationUtil, setContentService, setDictionaryService, setNodeService, setNodeTypeUtility, setRenditionService, setTransactionalResourceHelper
-
-
-
-
Method Detail
-
setFilePlanService
public void setFilePlanService(FilePlanService filePlanService)
- Parameters:
filePlanService
- file plan service
-
setFilePlanRoleService
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
- Parameters:
filePlanRoleService
- file plan role service
-
setAuthorityService
public void setAuthorityService(AuthorityService authorityService)
- Parameters:
authorityService
- authority service
-
setPermissionService
public void setPermissionService(PermissionService permissionService)
- Parameters:
permissionService
- permission service
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
- Parameters:
transactionService
- transaction service
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent contextRefreshedEvent)
Application context refresh event handler- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
hasExtendedSecurity
public boolean hasExtendedSecurity(NodeRef nodeRef)
Description copied from interface:ExtendedSecurityService
Indicates whether a node has extended security.- Specified by:
hasExtendedSecurity
in interfaceExtendedSecurityService
- Parameters:
nodeRef
- node reference- Returns:
- boolean true if the node has extended security, false otherwise
- See Also:
ExtendedSecurityService.hasExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef)
-
getReaders
public Set<String> getReaders(NodeRef nodeRef)
Description copied from interface:ExtendedSecurityService
Gets the set of authorities that are extended readers for the given node.- Specified by:
getReaders
in interfaceExtendedSecurityService
- Parameters:
nodeRef
- node reference- Returns:
Set
<String
> set of extended readers- See Also:
ExtendedSecurityService.getReaders(org.alfresco.service.cmr.repository.NodeRef)
-
getWriters
public Set<String> getWriters(NodeRef nodeRef)
Description copied from interface:ExtendedSecurityService
Get the set of authorities that are extended writers for the given node.- Specified by:
getWriters
in interfaceExtendedSecurityService
- Parameters:
nodeRef
- node reference- Returns:
Set
<String
> set of extended writers- See Also:
ExtendedSecurityService.getWriters(org.alfresco.service.cmr.repository.NodeRef)
-
set
public void set(NodeRef nodeRef, Pair<Set<String>,Set<String>> readersAndWriters)
Description copied from interface:ExtendedSecurityService
Helper to allow caller to provide authority sets as a pair where the first is the readers and the second is the writers.- Specified by:
set
in interfaceExtendedSecurityService
- Parameters:
nodeRef
- node referencereadersAndWriters
- pair where first is the set of readers and the second is the set of writers- See Also:
ExtendedSecurityService.set(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.util.Pair)
-
set
public void set(NodeRef nodeRef, Set<String> readers, Set<String> writers)
Description copied from interface:ExtendedSecurityService
Set extended security for a node, where the readers will be granted ReadRecord permission and ViewRecord capability to the node and where the writers will be granted Filling permission and Filling capability to the node.Note it is vaild to provide 'null' values for readers and/or writers.
- Specified by:
set
in interfaceExtendedSecurityService
- Parameters:
nodeRef
- node referencereaders
- set of readerswriters
- set of writers- See Also:
ExtendedSecurityService.set(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set)
-
remove
public void remove(NodeRef nodeRef)
Description copied from interface:ExtendedSecurityService
Removes all extended security from a node.- Specified by:
remove
in interfaceExtendedSecurityService
- Parameters:
nodeRef
- node reference- See Also:
ExtendedSecurityService.remove(org.alfresco.service.cmr.repository.NodeRef)
-
getExtendedReaders
@Deprecated public Set<String> getExtendedReaders(NodeRef nodeRef)
Deprecated.Description copied from interface:DeprecatedExtendedSecurityService
Gets the set of authorities that are extended readers for the given node.- Specified by:
getExtendedReaders
in interfaceDeprecatedExtendedSecurityService
- Parameters:
nodeRef
- node reference- Returns:
Set
<String
> set of extended readers- See Also:
DeprecatedExtendedSecurityService.getExtendedReaders(org.alfresco.service.cmr.repository.NodeRef)
-
getExtendedWriters
@Deprecated public Set<String> getExtendedWriters(NodeRef nodeRef)
Deprecated.Description copied from interface:DeprecatedExtendedSecurityService
Get the set of authorities that are extended writers for the given node.- Specified by:
getExtendedWriters
in interfaceDeprecatedExtendedSecurityService
- Parameters:
nodeRef
- node reference- Returns:
Set
<String
> set of extended writers- See Also:
DeprecatedExtendedSecurityService.getExtendedWriters(org.alfresco.service.cmr.repository.NodeRef)
-
addExtendedSecurity
@Deprecated public void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers)
Deprecated.Description copied from interface:DeprecatedExtendedSecurityService
Add extended security for the specified authorities to a node. As of, 2.5 this method no longer applies the extended security to parents.- Specified by:
addExtendedSecurity
in interfaceDeprecatedExtendedSecurityService
- Parameters:
nodeRef
- node referencereaders
- set of authorities to add extended read permissionswriters
- set of authorities to add extended write permissions- See Also:
DeprecatedExtendedSecurityService.addExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set)
-
addExtendedSecurity
@Deprecated public void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents)
Deprecated.Description copied from interface:DeprecatedExtendedSecurityService
Add extended security for the specified authorities to a node.If specified, the read and write extended permissions are applied to all parents up to the file plan as extended read. This ensures parental read, but not parental write.
- Specified by:
addExtendedSecurity
in interfaceDeprecatedExtendedSecurityService
- Parameters:
nodeRef
- node referencereaders
- set of authorities to add extended read permissionswriters
- set of authorities to add extended write permissionsapplyToParents
- true if extended security applied to parents (read only) false otherwise.- See Also:
DeprecatedExtendedSecurityService.addExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set, boolean)
-
removeAllExtendedSecurity
@Deprecated public void removeAllExtendedSecurity(NodeRef nodeRef)
Deprecated.Description copied from interface:DeprecatedExtendedSecurityService
Remove all extended readers and writers from the given node reference.- Specified by:
removeAllExtendedSecurity
in interfaceDeprecatedExtendedSecurityService
- Parameters:
nodeRef
- node reference- See Also:
DeprecatedExtendedSecurityService.removeAllExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef)
-
removeExtendedSecurity
@Deprecated public void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers)
Deprecated.Description copied from interface:DeprecatedExtendedSecurityService
Remove the extended security for the specified authorities from a node.- Specified by:
removeExtendedSecurity
in interfaceDeprecatedExtendedSecurityService
- Parameters:
nodeRef
- node referencereaders
- set of authorities to remove as extended readerswriters
- set of authorities to remove as extended writers- See Also:
DeprecatedExtendedSecurityService.removeExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set)
-
removeExtendedSecurity
@Deprecated public void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents)
Deprecated.Description copied from interface:DeprecatedExtendedSecurityService
Remove the extended security for the specified authorities from a node.If specified, extended security will also be removed from the parent hierarchy.(read only). Note that extended security is records as a reference count, so security will only be utterly removed from the parent hierarchy if all references to the authority are removed.
- Specified by:
removeExtendedSecurity
in interfaceDeprecatedExtendedSecurityService
- Parameters:
nodeRef
- node referencereaders
- set of authorities to remove as extended readerswriters
- set of authorities to remove as extedned writersapplyToParents
- true if removal of extended security is applied to parent hierarchy (read only), false otherwise- See Also:
DeprecatedExtendedSecurityService.removeExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set, boolean)
-
removeAllExtendedSecurity
@Deprecated public void removeAllExtendedSecurity(NodeRef nodeRef, boolean applyToParents)
Deprecated.Description copied from interface:DeprecatedExtendedSecurityService
Remove all extended readers and writers from the given node reference.- Specified by:
removeAllExtendedSecurity
in interfaceDeprecatedExtendedSecurityService
- Parameters:
nodeRef
- node referenceapplyToParents
- if true then apply removal to parent hierarchy (read only) false otherwise.- See Also:
DeprecatedExtendedSecurityService.removeAllExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, boolean)
-
-