Class ServiceBaseImpl
- java.lang.Object
-
- org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
-
- All Implemented Interfaces:
RecordsManagementCustomModel
,RecordsManagementModel
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
BaseBehaviourBean
,ContentBinDuplicationUtility
,DispositionServiceImpl
,ExtendedSecurityServiceImpl
,FilePlanPermissionServiceImpl
,FilePlanServiceImpl
,FreezeServiceImpl
,HoldServiceImpl
,InplaceRecordServiceImpl
,RecordFolderServiceImpl
,RecordsManagementServiceImpl
,ReportServiceImpl
,TransferServiceImpl
,VitalRecordServiceImpl
public class ServiceBaseImpl extends Object implements RecordsManagementModel, org.springframework.context.ApplicationContextAware
Helper base class for service implementations.- Since:
- 2.1
- Author:
- Roy Wetherall
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.context.ApplicationContext
applicationContext
Application contextprotected AuthenticationUtil
authenticationUtil
authentication helperprotected org.alfresco.service.cmr.repository.ContentService
contentService
Content serviceprotected org.alfresco.service.cmr.dictionary.DictionaryService
dictionaryService
Dictionary serviceprotected org.alfresco.service.cmr.repository.NodeService
nodeService
Node serviceprotected NodeTypeUtility
nodeTypeUtility
Node type utilityprotected org.alfresco.service.cmr.rendition.RenditionService
renditionService
Rendition serviceprotected TransactionalResourceHelper
transactionalResourceHelper
transactional resource helper-
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 ServiceBaseImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.alfresco.service.cmr.repository.NodeRef
getFilePlan(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets the file plan that a given file plan component resides within.FilePlanComponentKind
getFilePlanComponentKind(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets the file plan component kind from the given node referenceFilePlanComponentKind
getFilePlanComponentKindFromType(org.alfresco.service.namespace.QName type)
Gets the file plan component kind from the given type.protected org.alfresco.service.cmr.repository.NodeService
getInternalNodeService()
Helper to get internal node service.protected int
getNextCount(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Utility method to get the next counter for a node.protected Set<org.alfresco.service.namespace.QName>
getTypeAndApsects(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Helper method to get a set containing the node's type and all it's aspectsprotected boolean
instanceOf(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName ofClassName)
Utility method to safely and quickly determine if a node is a type (or sub-type) of the one specified.protected boolean
instanceOf(org.alfresco.service.namespace.QName className, org.alfresco.service.namespace.QName ofClassName)
Utility method to quickly determine whether one class is equal to or sub of another.boolean
isDeclared(org.alfresco.service.cmr.repository.NodeRef record)
Indicates whether a record is complete or not.boolean
isFilePlan(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a file plan or not.boolean
isFilePlanComponent(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a file plan component or not.boolean
isFilePlanContainer(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a file plan container or not.boolean
isHold(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node reference is a hold or not.boolean
isRecord(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node reference is a record or not.boolean
isRecordCategory(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a record category or not.boolean
isRecordFolder(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a record folder or not.boolean
isTransfer(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node reference is a transfer or not.boolean
isUnfiledRecordsContainer(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node reference is an unfiled records container or not.void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setAuthenticationUtil(AuthenticationUtil authenticationUtil)
void
setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
Set the content servicevoid
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
void
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
void
setNodeTypeUtility(NodeTypeUtility nodeTypeUtility)
void
setRenditionService(org.alfresco.service.cmr.rendition.RenditionService service)
void
setTransactionalResourceHelper(TransactionalResourceHelper transactionalResourceHelper)
-
-
-
Field Detail
-
nodeService
protected org.alfresco.service.cmr.repository.NodeService nodeService
Node service
-
dictionaryService
protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
Dictionary service
-
renditionService
protected org.alfresco.service.cmr.rendition.RenditionService renditionService
Rendition service
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
Application context
-
authenticationUtil
protected AuthenticationUtil authenticationUtil
authentication helper
-
transactionalResourceHelper
protected TransactionalResourceHelper transactionalResourceHelper
transactional resource helper
-
contentService
protected org.alfresco.service.cmr.repository.ContentService contentService
Content service
-
nodeTypeUtility
protected NodeTypeUtility nodeTypeUtility
Node type utility
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- See Also:
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
- Parameters:
nodeService
- node service
-
setRenditionService
public void setRenditionService(org.alfresco.service.cmr.rendition.RenditionService service)
- Parameters:
service
- service
-
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
- Parameters:
dictionaryService
- dictionary service
-
setAuthenticationUtil
public void setAuthenticationUtil(AuthenticationUtil authenticationUtil)
- Parameters:
authenticationUtil
- authentication util helper
-
setNodeTypeUtility
public void setNodeTypeUtility(NodeTypeUtility nodeTypeUtility)
- Parameters:
nodeTypeUtility
- node type utility
-
setTransactionalResourceHelper
public void setTransactionalResourceHelper(TransactionalResourceHelper transactionalResourceHelper)
- Parameters:
transactionalResourceHelper
- transactional resource helper
-
setContentService
public void setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
Set the content service- Parameters:
contentService
- content service
-
getInternalNodeService
protected org.alfresco.service.cmr.repository.NodeService getInternalNodeService()
Helper to get internal node service.Used for performance reasons.
-
getFilePlanComponentKind
public FilePlanComponentKind getFilePlanComponentKind(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets the file plan component kind from the given node reference
-
getFilePlanComponentKindFromType
public FilePlanComponentKind getFilePlanComponentKindFromType(org.alfresco.service.namespace.QName type)
Gets the file plan component kind from the given type.
-
isFilePlanComponent
public boolean isFilePlanComponent(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a file plan component or not.Exposed in the FilePlan service.
-
isFilePlan
public boolean isFilePlan(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a file plan or not.Exposed in the FilePlan service.
-
isFilePlanContainer
public boolean isFilePlanContainer(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a file plan container or not.
-
isRecordCategory
public boolean isRecordCategory(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a record category or not.
-
isRecordFolder
public boolean isRecordFolder(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node is a record folder or not.Exposed in the RecordFolder service.
- Parameters:
nodeRef
- node reference- Returns:
- boolean true if record folder, false otherwise
-
isRecord
public boolean isRecord(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node reference is a record or not.- Parameters:
nodeRef
- node reference- Returns:
- boolean true if node reference is a record, false otherwise
-
isHold
public boolean isHold(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node reference is a hold or not.Exposed publicly in the
HoldService
- Parameters:
nodeRef
- node reference- Returns:
- boolean true if rma:hold or sub-type, false otherwise
-
isTransfer
public boolean isTransfer(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node reference is a transfer or not.- See Also:
TransferService.isTransfer(NodeRef)
-
isUnfiledRecordsContainer
public boolean isUnfiledRecordsContainer(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node reference is an unfiled records container or not.- Parameters:
nodeRef
- node reference- Returns:
- boolean true if rma:unfiledRecordContainer or sub-type, false otherwise
-
isDeclared
public boolean isDeclared(org.alfresco.service.cmr.repository.NodeRef record)
Indicates whether a record is complete or not.
-
getFilePlan
public org.alfresco.service.cmr.repository.NodeRef getFilePlan(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets the file plan that a given file plan component resides within.- Parameters:
nodeRef
- node reference- Returns:
NodeRef
file plan, null if none
-
instanceOf
protected boolean instanceOf(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName ofClassName)
Utility method to safely and quickly determine if a node is a type (or sub-type) of the one specified.- Parameters:
nodeRef
- node referenceofClassName
- class name to check
-
instanceOf
protected boolean instanceOf(org.alfresco.service.namespace.QName className, org.alfresco.service.namespace.QName ofClassName)
Utility method to quickly determine whether one class is equal to or sub of another.- Parameters:
className
- class nameofClassName
- class name to check against- Returns:
- boolean true if equal to or sub, false otherwise
-
getNextCount
protected int getNextCount(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Utility method to get the next counter for a node.If the node is not already countable, then rma:countable is added and 0 returned.
- Parameters:
nodeRef
- node reference- Returns:
- int next counter value
-
getTypeAndApsects
protected Set<org.alfresco.service.namespace.QName> getTypeAndApsects(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Helper method to get a set containing the node's type and all it's aspects- Parameters:
nodeRef
- nodeRef- Returns:
- Set
set of qname's
-
-