org.alfresco.repo.dictionary
Class DictionaryRepositoryBootstrap

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

public class DictionaryRepositoryBootstrap
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
implements org.alfresco.repo.tenant.TenantDeployer, org.alfresco.repo.dictionary.DictionaryListener, MessageDeployer

Bootstrap the dictionary from specified locations within the repository


Field Summary
 
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log
 
Constructor Summary
DictionaryRepositoryBootstrap()
           
 
Method Summary
 void afterDictionaryDestroy()
           
 void afterDictionaryInit()
           
 org.alfresco.repo.dictionary.M2Model createM2Model(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Create a M2Model from a dictionary model node
 void destroy()
           
 java.util.List getModelRefs()
           
protected  java.util.List getNodes(org.alfresco.service.cmr.repository.StoreRef storeRef, RepositoryLocation repositoryLocation, org.alfresco.service.namespace.QName nodeType)
           
 void init()
          Initialise - after bootstrap of schema and tenant admin service
 void initMessages()
           
protected  void onBootstrap(org.springframework.context.ApplicationEvent event)
           
 void onDictionaryInit()
           
 void onDisableTenant()
           
 void onEnableTenant()
           
protected  void onShutdown(org.springframework.context.ApplicationEvent event)
           
 void register()
          Register
protected  org.alfresco.service.cmr.repository.NodeRef resolveQNamePath(org.alfresco.service.cmr.repository.NodeRef rootNodeRef, java.lang.String[] pathPrefixQNameStrings)
           
 void setContentService(ContentService contentService)
          Set the content service
 void setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)
          Sets the Dictionary DAO
 void setMessageService(MessageService messageService)
          Set the message service
 void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
          Set the namespace service
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
          Set the node service
 void setRepositoryMessagesLocations(java.util.List repositoryLocations)
          Set the repository messages (resource bundle) locations
 void setRepositoryModelsLocations(java.util.List repositoryLocations)
          Set the repository models locations
 void setTenantAdminService(TenantAdminService tenantAdminService)
          Set the tenant admin service
 void setTransactionService(TransactionService transactionService)
          Set the transaction service
protected  void unregister()
          Unregister
 
Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryRepositoryBootstrap

public DictionaryRepositoryBootstrap()
Method Detail

setDictionaryDAO

public void setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)
Sets the Dictionary DAO

Parameters:
dictionaryDAO -

setContentService

public void setContentService(ContentService contentService)
Set the content service

Parameters:
contentService - the content service

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the node service

Parameters:
nodeService - the node service

setTenantAdminService

public void setTenantAdminService(TenantAdminService tenantAdminService)
Set the tenant admin service

Parameters:
tenantAdminService - the tenant admin service

setNamespaceService

public void setNamespaceService(org.alfresco.service.namespace.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(java.util.List repositoryLocations)
Set the repository models locations

Parameters:
repositoryModelsLocations - list of the repository models locations

setRepositoryMessagesLocations

public void setRepositoryMessagesLocations(java.util.List 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 org.alfresco.repo.tenant.TenantDeployer

destroy

public void destroy()
Specified by:
destroy in interface org.alfresco.repo.tenant.TenantDeployer

onDictionaryInit

public void onDictionaryInit()
Specified by:
onDictionaryInit in interface org.alfresco.repo.dictionary.DictionaryListener

afterDictionaryInit

public void afterDictionaryInit()
Specified by:
afterDictionaryInit in interface org.alfresco.repo.dictionary.DictionaryListener

afterDictionaryDestroy

public void afterDictionaryDestroy()
Specified by:
afterDictionaryDestroy in interface org.alfresco.repo.dictionary.DictionaryListener

initMessages

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

getModelRefs

public java.util.List getModelRefs()

getNodes

protected java.util.List getNodes(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                  RepositoryLocation repositoryLocation,
                                  org.alfresco.service.namespace.QName nodeType)

createM2Model

public org.alfresco.repo.dictionary.M2Model createM2Model(org.alfresco.service.cmr.repository.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 org.alfresco.repo.tenant.TenantDeployer

onDisableTenant

public void onDisableTenant()
Specified by:
onDisableTenant in interface org.alfresco.repo.tenant.TenantDeployer

register

public void register()
Register


unregister

protected void unregister()
Unregister


resolveQNamePath

protected org.alfresco.service.cmr.repository.NodeRef resolveQNamePath(org.alfresco.service.cmr.repository.NodeRef rootNodeRef,
                                                                       java.lang.String[] pathPrefixQNameStrings)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.