Package fr.becpg.repo.dictionary
Class LazyCMISDictionaryService
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService
org.alfresco.opencmis.dictionary.CMISStrictDictionaryService
fr.becpg.repo.dictionary.LazyCMISDictionaryService
- All Implemented Interfaces:
EventListener,org.alfresco.opencmis.dictionary.CMISDictionaryService,org.alfresco.repo.dictionary.DictionaryListener,org.alfresco.repo.dictionary.ExtendedDictionaryListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class LazyCMISDictionaryService
extends org.alfresco.opencmis.dictionary.CMISStrictDictionaryService
CMIS dictionary built on first use instead of at startup.
beCPG no longer queries through CMIS, but the Search subsystem still wires this service. Alfresco builds the CMIS
definitions of every model at each startup and again after each dictionary reload, about two seconds each time, for a
registry that is seldom read. The registry is now built by getRegistry the first time it is asked for.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService
org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.DictionaryInitializer -
Field Summary
FieldsFields inherited from class org.alfresco.opencmis.dictionary.CMISStrictDictionaryService
DEFAULTFields inherited from class org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService
accessorMapping, cmisMapping, dictionaryDAO, dictionaryService, luceneBuilderMapping, tenantServiceFields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDrops the registry of the current tenant, so that the next use rebuilds it from the reloaded dictionary.protected voidonBootstrap(org.springframework.context.ApplicationEvent event) Listens to dictionary changes without building the registry.Methods inherited from class org.alfresco.opencmis.dictionary.CMISStrictDictionaryService
getCoreDictionaryInitializer, getTenantDictionaryInitializer, initMethods inherited from class org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService
afterDictionaryDestroy, createCoreDictionaryRegistry, createDictionaryRegistry, createDictionaryRegistryWithWriteLock, createTenantDictionaryRegistry, findAlfrescoDataType, findAssocType, findDataType, findNodeType, findProperty, findPropertyByQueryName, findType, findTypeByQueryName, findTypeForClass, getAllTypes, getAllTypes, getBaseTypes, getBaseTypes, getChildren, getRegistry, isExcluded, modelAdded, onDictionaryInit, onShutdown, setCmisMapping, setDictionaryDAO, setDictionaryService, setPropertyAccessorMapping, setPropertyLuceneBuilderMapping, setSingletonCache, setTenantServiceMethods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Field Details
-
logger
private static final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
LazyCMISDictionaryService
public LazyCMISDictionaryService()
-
-
Method Details
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event) Listens to dictionary changes without building the registry.- Overrides:
onBootstrapin classorg.alfresco.opencmis.dictionary.CMISAbstractDictionaryService- Parameters:
event- the bootstrap event
-
afterDictionaryInit
public void afterDictionaryInit()Drops the registry of the current tenant, so that the next use rebuilds it from the reloaded dictionary.- Specified by:
afterDictionaryInitin interfaceorg.alfresco.repo.dictionary.DictionaryListener- Overrides:
afterDictionaryInitin classorg.alfresco.opencmis.dictionary.CMISAbstractDictionaryService
-