Package org.alfresco.repo.dictionary
Class DictionaryRepositoryBootstrap
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap
-
- All Implemented Interfaces:
java.util.EventListener,org.alfresco.repo.dictionary.DictionaryListener,MessageDeployer,org.alfresco.repo.tenant.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 org.alfresco.repo.tenant.TenantDeployer, org.alfresco.repo.dictionary.DictionaryListener, MessageDeployer
Bootstrap the dictionary from specified locations within the repository- Author:
- Roy Wetherall, JanV, sglover
-
-
Constructor Summary
Constructors Constructor Description DictionaryRepositoryBootstrap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterDictionaryDestroy()voidafterDictionaryInit()org.alfresco.repo.dictionary.M2ModelcreateM2Model(org.alfresco.service.cmr.repository.NodeRef nodeRef)Create a M2Model from a dictionary model nodevoiddestroy()java.util.List<org.alfresco.service.cmr.repository.NodeRef>getModelRefs()protected java.util.List<org.alfresco.service.cmr.repository.NodeRef>getNodes(org.alfresco.service.cmr.repository.StoreRef storeRef, RepositoryLocation repositoryLocation, org.alfresco.service.namespace.QName nodeType)PolicyComponentgetPolicyComponent()voidinit()Initialise - after bootstrap of schema and tenant admin servicevoidinitMessages()voidnotifyDynamicModelLoaded(org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.DynamicModelInfo entry)protected voidonBootstrap(org.springframework.context.ApplicationEvent event)voidonDictionaryInit()Initialise the dictionary, ensuring that a transaction is availablevoidonDisableTenant()voidonEnableTenant()protected voidonShutdown(org.springframework.context.ApplicationEvent event)voidregister()Register listenersprotected org.alfresco.service.cmr.repository.NodeRefresolveQNamePath(org.alfresco.service.cmr.repository.NodeRef rootNodeRef, java.lang.String[] pathPrefixQNameStrings)voidsetContentService(ContentService contentService)Set the content servicevoidsetDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)Sets the Dictionary DAOvoidsetMessageService(MessageService messageService)Set the message servicevoidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)Set the namespace servicevoidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)Set the node servicevoidsetPolicyComponent(PolicyComponent policyComponent)voidsetRepositoryMessagesLocations(java.util.List<RepositoryLocation> repositoryLocations)Set the repository messages (resource bundle) locationsvoidsetRepositoryModelsLocations(java.util.List<RepositoryLocation> repositoryLocations)Set the repository models locationsvoidsetTenantAdminService(TenantAdminService tenantAdminService)Set the tenant admin servicevoidsetTransactionService(TransactionService transactionService)Set the transaction serviceprotected voidunregister()Unregister
-
-
-
Method Detail
-
setDictionaryDAO
public void setDictionaryDAO(org.alfresco.repo.dictionary.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(org.alfresco.service.cmr.repository.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(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<RepositoryLocation> repositoryLocations)
Set the repository models locations- Parameters:
repositoryLocations- list of the repository models locations
-
setRepositoryMessagesLocations
public void setRepositoryMessagesLocations(java.util.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:
initin interfaceorg.alfresco.repo.tenant.TenantDeployer
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.alfresco.repo.tenant.TenantDeployer
-
notifyDynamicModelLoaded
public void notifyDynamicModelLoaded(org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.DynamicModelInfo entry)
-
initMessages
public void initMessages()
- Specified by:
initMessagesin interfaceMessageDeployer
-
getModelRefs
public java.util.List<org.alfresco.service.cmr.repository.NodeRef> getModelRefs()
-
getNodes
protected java.util.List<org.alfresco.service.cmr.repository.NodeRef> 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:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
- Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onEnableTenant
public void onEnableTenant()
- Specified by:
onEnableTenantin interfaceorg.alfresco.repo.tenant.TenantDeployer
-
onDisableTenant
public void onDisableTenant()
- Specified by:
onDisableTenantin interfaceorg.alfresco.repo.tenant.TenantDeployer
-
register
public void register()
Register listeners
-
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)
-
onDictionaryInit
public void onDictionaryInit()
Initialise the dictionary, ensuring that a transaction is available- Specified by:
onDictionaryInitin interfaceorg.alfresco.repo.dictionary.DictionaryListener
-
afterDictionaryDestroy
public void afterDictionaryDestroy()
- Specified by:
afterDictionaryDestroyin interfaceorg.alfresco.repo.dictionary.DictionaryListener
-
afterDictionaryInit
public void afterDictionaryInit()
- Specified by:
afterDictionaryInitin interfaceorg.alfresco.repo.dictionary.DictionaryListener
-
-