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

    Fields
    Modifier and Type
    Field
    Description
    private static final org.apache.commons.logging.Log
     

    Fields inherited from class org.alfresco.opencmis.dictionary.CMISStrictDictionaryService

    DEFAULT

    Fields inherited from class org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService

    accessorMapping, cmisMapping, dictionaryDAO, dictionaryService, luceneBuilderMapping, tenantService

    Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean

    log
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Drops the registry of the current tenant, so that the next use rebuilds it from the reloaded dictionary.
    protected void
    onBootstrap(org.springframework.context.ApplicationEvent event)
    Listens to dictionary changes without building the registry.

    Methods inherited from class org.alfresco.opencmis.dictionary.CMISStrictDictionaryService

    getCoreDictionaryInitializer, getTenantDictionaryInitializer, init

    Methods 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, setTenantService

    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

    Methods 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:
      onBootstrap in class org.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:
      afterDictionaryInit in interface org.alfresco.repo.dictionary.DictionaryListener
      Overrides:
      afterDictionaryInit in class org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService