Package org.alfresco.repo.dictionary
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
-
Field Summary
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcreateM2Model(NodeRef nodeRef) Create a M2Model from a dictionary model nodevoiddestroy()getNodes(StoreRef storeRef, RepositoryLocation repositoryLocation, QName nodeType) voidinit()Initialise - after bootstrap of schema and tenant admin servicevoidvoidnotifyDynamicModelLoaded(org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.DynamicModelInfo entry) protected voidonBootstrap(org.springframework.context.ApplicationEvent event) voidInitialise the dictionary, ensuring that a transaction is availablevoidvoidprotected voidonShutdown(org.springframework.context.ApplicationEvent event) voidregister()Register listenersprotected NodeRefresolveQNamePath(NodeRef rootNodeRef, String[] pathPrefixQNameStrings) voidsetContentService(ContentService contentService) Set the content servicevoidsetDictionaryDAO(DictionaryDAO dictionaryDAO) Sets the Dictionary DAOvoidsetMessageService(MessageService messageService) Set the message servicevoidsetNamespaceService(NamespaceService namespaceService) Set the namespace servicevoidsetNodeService(NodeService nodeService) Set the node servicevoidsetPolicyComponent(PolicyComponent policyComponent) voidsetRepositoryMessagesLocations(List<RepositoryLocation> repositoryLocations) Set the repository messages (resource bundle) locationsvoidsetRepositoryModelsLocations(List<RepositoryLocation> repositoryLocations) Set the repository models locationsvoidsetTenantAdminService(TenantAdminService tenantAdminService) Set the tenant admin servicevoidsetTransactionService(TransactionService transactionService) Set the transaction serviceprotected voidUnregisterMethods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
-
Constructor Details
-
DictionaryRepositoryBootstrap
public DictionaryRepositoryBootstrap()
-
-
Method Details
-
setDictionaryDAO
Sets the Dictionary DAO- Parameters:
dictionaryDAO- DictionaryDAO
-
setContentService
Set the content service- Parameters:
contentService- the content service
-
setNodeService
Set the node service- Parameters:
nodeService- the node service
-
getPolicyComponent
-
setPolicyComponent
-
setTenantAdminService
Set the tenant admin service- Parameters:
tenantAdminService- the tenant admin service
-
setNamespaceService
Set the namespace service- Parameters:
namespaceService- the namespace service
-
setMessageService
Set the message service- Parameters:
messageService- the message service
-
setTransactionService
Set the transaction service- Parameters:
transactionService- the transaction service
-
setRepositoryModelsLocations
Set the repository models locations- Parameters:
repositoryLocations- list of the repository models locations
-
setRepositoryMessagesLocations
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 interfaceTenantDeployer
-
destroy
public void destroy()- Specified by:
destroyin interfaceTenantDeployer
-
notifyDynamicModelLoaded
public void notifyDynamicModelLoaded(org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.DynamicModelInfo entry) -
initMessages
public void initMessages()- Specified by:
initMessagesin interfaceMessageDeployer
-
getModelRefs
-
getNodes
protected List<NodeRef> getNodes(StoreRef storeRef, RepositoryLocation repositoryLocation, QName nodeType) -
createM2Model
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 interfaceTenantDeployer
-
onDisableTenant
public void onDisableTenant()- Specified by:
onDisableTenantin interfaceTenantDeployer
-
register
public void register()Register listeners -
unregister
protected void unregister()Unregister -
resolveQNamePath
-
onDictionaryInit
public void onDictionaryInit()Initialise the dictionary, ensuring that a transaction is available- Specified by:
onDictionaryInitin interfaceDictionaryListener
-
afterDictionaryDestroy
public void afterDictionaryDestroy()- Specified by:
afterDictionaryDestroyin interfaceDictionaryListener
-
afterDictionaryInit
public void afterDictionaryInit()- Specified by:
afterDictionaryInitin interfaceDictionaryListener
-