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 Details

    • nodeService

      protected NodeService nodeService
      Node service
    • dictionaryService

      protected DictionaryService dictionaryService
      Dictionary service
    • renditionService

      protected 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 ContentService contentService
      Content service
    • nodeTypeUtility

      protected NodeTypeUtility nodeTypeUtility
      Node type utility
  • Constructor Details

    • ServiceBaseImpl

      public ServiceBaseImpl()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      See Also:
      • ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
    • setNodeService

      public void setNodeService(NodeService nodeService)
      Parameters:
      nodeService - node service
    • setRenditionService

      public void setRenditionService(RenditionService service)
      Parameters:
      service - service
    • setDictionaryService

      public void setDictionaryService(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(ContentService contentService)
      Set the content service
      Parameters:
      contentService - content service
    • getInternalNodeService

      protected NodeService getInternalNodeService()
      Helper to get internal node service.

      Used for performance reasons.

    • getFilePlanComponentKind

      public FilePlanComponentKind getFilePlanComponentKind(NodeRef nodeRef)
      Gets the file plan component kind from the given node reference
      See Also:
    • getFilePlanComponentKindFromType

      public FilePlanComponentKind getFilePlanComponentKindFromType(QName type)
      Gets the file plan component kind from the given type.
      See Also:
    • isFilePlanComponent

      public boolean isFilePlanComponent(NodeRef nodeRef)
      Indicates whether the given node is a file plan component or not.

      Exposed in the FilePlan service.

      See Also:
    • isFilePlan

      public boolean isFilePlan(NodeRef nodeRef)
      Indicates whether the given node is a file plan or not.

      Exposed in the FilePlan service.

      See Also:
    • isFilePlanContainer

      public boolean isFilePlanContainer(NodeRef nodeRef)
      Indicates whether the given node is a file plan container or not.
      See Also:
    • isRecordCategory

      public boolean isRecordCategory(NodeRef nodeRef)
      Indicates whether the given node is a record category or not.
      See Also:
    • isRecordFolder

      public boolean isRecordFolder(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(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(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(NodeRef nodeRef)
      Indicates whether the given node reference is a transfer or not.
      See Also:
    • isUnfiledRecordsContainer

      public boolean isUnfiledRecordsContainer(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(NodeRef record)
      Indicates whether a record is complete or not.
      See Also:
    • getFilePlan

      public NodeRef getFilePlan(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(NodeRef nodeRef, 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 reference
      ofClassName - class name to check
    • instanceOf

      protected boolean instanceOf(QName className, QName ofClassName)
      Utility method to quickly determine whether one class is equal to or sub of another.
      Parameters:
      className - class name
      ofClassName - class name to check against
      Returns:
      boolean true if equal to or sub, false otherwise
    • getNextCount

      protected int getNextCount(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<QName> getTypeAndApsects(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