Class DictionaryRepositoryBootstrap

java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap
All Implemented Interfaces:
EventListener, DictionaryListener, MessageDeployer, TenantDeployer, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class DictionaryRepositoryBootstrap extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements TenantDeployer, DictionaryListener, MessageDeployer
Bootstrap the dictionary from specified locations within the repository
Author:
Roy Wetherall, JanV, sglover
  • Constructor Details

    • DictionaryRepositoryBootstrap

      public DictionaryRepositoryBootstrap()
  • Method Details

    • setDictionaryDAO

      public void setDictionaryDAO(DictionaryDAO dictionaryDAO)
      Sets the Dictionary DAO
      Parameters:
      dictionaryDAO - DictionaryDAO
    • setContentService

      public void setContentService(ContentService contentService)
      Set the content service
      Parameters:
      contentService - the content service
    • setNodeService

      public void setNodeService(NodeService nodeService)
      Set the node service
      Parameters:
      nodeService - the node service
    • getPolicyComponent

      public PolicyComponent getPolicyComponent()
    • setPolicyComponent

      public void setPolicyComponent(PolicyComponent policyComponent)
    • setTenantAdminService

      public void setTenantAdminService(TenantAdminService tenantAdminService)
      Set the tenant admin service
      Parameters:
      tenantAdminService - the tenant admin service
    • setNamespaceService

      public void setNamespaceService(NamespaceService namespaceService)
      Set the namespace service
      Parameters:
      namespaceService - the namespace service
    • setMessageService

      public void setMessageService(MessageService messageService)
      Set the message service
      Parameters:
      messageService - the message service
    • setTransactionService

      public void setTransactionService(TransactionService transactionService)
      Set the transaction service
      Parameters:
      transactionService - the transaction service
    • setRepositoryModelsLocations

      public void setRepositoryModelsLocations(List<RepositoryLocation> repositoryLocations)
      Set the repository models locations
      Parameters:
      repositoryLocations - list of the repository models locations
    • setRepositoryMessagesLocations

      public void setRepositoryMessagesLocations(List<RepositoryLocation> repositoryLocations)
      Set the repository messages (resource bundle) locations
      Parameters:
      repositoryLocations - list of the repository messages locations
    • init

      public void init()
      Initialise - after bootstrap of schema and tenant admin service
      Specified by:
      init in interface TenantDeployer
    • destroy

      public void destroy()
      Specified by:
      destroy in interface TenantDeployer
    • notifyDynamicModelLoaded

    • initMessages

      public void initMessages()
      Specified by:
      initMessages in interface MessageDeployer
    • getModelRefs

      public List<NodeRef> getModelRefs()
    • getNodes

      protected List<NodeRef> getNodes(StoreRef storeRef, RepositoryLocation repositoryLocation, QName nodeType)
    • createM2Model

      public M2Model createM2Model(NodeRef nodeRef)
      Create a M2Model from a dictionary model node
      Parameters:
      nodeRef - the dictionary model node reference
      Returns:
      the M2Model
    • onBootstrap

      protected void onBootstrap(org.springframework.context.ApplicationEvent event)
      Specified by:
      onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean
    • onShutdown

      protected void onShutdown(org.springframework.context.ApplicationEvent event)
      Specified by:
      onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean
    • onEnableTenant

      public void onEnableTenant()
      Specified by:
      onEnableTenant in interface TenantDeployer
    • onDisableTenant

      public void onDisableTenant()
      Specified by:
      onDisableTenant in interface TenantDeployer
    • register

      public void register()
      Register listeners
    • unregister

      protected void unregister()
      Unregister
    • resolveQNamePath

      protected NodeRef resolveQNamePath(NodeRef rootNodeRef, String[] pathPrefixQNameStrings)
    • onDictionaryInit

      public void onDictionaryInit()
      Initialise the dictionary, ensuring that a transaction is available
      Specified by:
      onDictionaryInit in interface DictionaryListener
    • afterDictionaryDestroy

      public void afterDictionaryDestroy()
      Specified by:
      afterDictionaryDestroy in interface DictionaryListener
    • afterDictionaryInit

      public void afterDictionaryInit()
      Specified by:
      afterDictionaryInit in interface DictionaryListener