Package org.alfresco.opencmis.dictionary
Class CMISAbstractDictionaryService
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService
- All Implemented Interfaces:
EventListener,CMISDictionaryService,DictionaryListener,ExtendedDictionaryListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
- Direct Known Subclasses:
CMISStrictDictionaryService
public abstract class CMISAbstractDictionaryService
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
implements CMISDictionaryService, ExtendedDictionaryListener
Common CMIS Dictionary Support including registry of Types.
- Author:
- davidc, florian.mueller
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PropertyAccessorMappingprotected CMISMappingprotected DictionaryDAOprotected DictionaryServiceprotected static final org.apache.commons.logging.Logprotected PropertyLuceneBuilderMappingprotected TenantServiceFields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCallback once dictionary destroy is complete (executed in the current tenant context)voidCallback once dictionary initialisation is complete (executed in the current tenant context)protected CMISDictionaryRegistryprotected CMISDictionaryRegistrycreateDictionaryRegistry(String tenant) protected CMISDictionaryRegistryprotected CMISDictionaryRegistrycreateTenantDictionaryRegistry(String tenant) findAlfrescoDataType(org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType) findAssocType(QName clazz) org.apache.chemistry.opencmis.commons.enums.PropertyTypefindDataType(QName dataType) Find data typefindNodeType(QName clazz) findProperty(String propId) findPropertyByQueryName(String queryName) Find type for type idfindTypeByQueryName(String queryName) Find a type by its query namefindTypeForClass(QName clazz, org.apache.chemistry.opencmis.commons.enums.BaseTypeId... matchingScopes) Find type for Alfresco class name.Get all TypesgetAllTypes(boolean includeParent) Get Base TypesgetBaseTypes(boolean includeParent) getChildren(String typeId) protected abstract CMISAbstractDictionaryService.DictionaryInitializerprotected CMISDictionaryRegistryprotected abstract CMISAbstractDictionaryService.DictionaryInitializerbooleanisExcluded(QName qname) voidmodelAdded(CompiledModel model, String tenantDomain) protected voidonBootstrap(org.springframework.context.ApplicationEvent event) voidCallback for (re-)initialising the Dictionary caches (executed in the current tenant context)protected voidonShutdown(org.springframework.context.ApplicationEvent event) voidsetCmisMapping(CMISMapping cmisMapping) Set the mapping servicevoidsetDictionaryDAO(DictionaryDAO dictionaryDAO) Set the dictionary DAOvoidsetDictionaryService(DictionaryService dictionaryService) Set the dictionary ServicevoidsetPropertyAccessorMapping(PropertyAccessorMapping accessorMapping) Set the property accessor mapping servicevoidsetPropertyLuceneBuilderMapping(PropertyLuceneBuilderMapping luceneBuilderMapping) Set the property lucene mapping servicevoidsetSingletonCache(SimpleCache<String, CMISDictionaryRegistry> singletonCache) voidsetTenantService(TenantService tenantService) Methods 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
protected static final org.apache.commons.logging.Log logger -
dictionaryDAO
-
dictionaryService
-
cmisMapping
-
accessorMapping
-
luceneBuilderMapping
-
tenantService
-
-
Constructor Details
-
CMISAbstractDictionaryService
public CMISAbstractDictionaryService()
-
-
Method Details
-
setTenantService
-
setCmisMapping
Set the mapping service- Parameters:
cmisMapping- CMISMapping
-
setPropertyAccessorMapping
Set the property accessor mapping service- Parameters:
accessorMapping- mapping
-
setPropertyLuceneBuilderMapping
Set the property lucene mapping service- Parameters:
luceneBuilderMapping- mapping
-
setDictionaryService
Set the dictionary Service- Parameters:
dictionaryService- DictionaryService
-
setDictionaryDAO
Set the dictionary DAO- Parameters:
dictionaryDAO- DictionaryDAO
-
setSingletonCache
-
getCoreDictionaryInitializer
protected abstract CMISAbstractDictionaryService.DictionaryInitializer getCoreDictionaryInitializer() -
getTenantDictionaryInitializer
protected abstract CMISAbstractDictionaryService.DictionaryInitializer getTenantDictionaryInitializer() -
getRegistry
-
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
-
createCoreDictionaryRegistry
-
createTenantDictionaryRegistry
-
createDictionaryRegistryWithWriteLock
-
createDictionaryRegistry
-
findType
Description copied from interface:CMISDictionaryServiceFind type for type id- Specified by:
findTypein interfaceCMISDictionaryService- Parameters:
typeId- String- Returns:
- TypeDefinitionWrapper
-
isExcluded
- Specified by:
isExcludedin interfaceCMISDictionaryService
-
findTypeForClass
public TypeDefinitionWrapper findTypeForClass(QName clazz, org.apache.chemistry.opencmis.commons.enums.BaseTypeId... matchingScopes) Description copied from interface:CMISDictionaryServiceFind type for Alfresco class name. Optionally, constrain match to one of specified CMIS scopes- Specified by:
findTypeForClassin interfaceCMISDictionaryService- Parameters:
clazz- QNamematchingScopes- BaseTypeId...- Returns:
- TypeDefinitionWrapper
-
findNodeType
- Specified by:
findNodeTypein interfaceCMISDictionaryService
-
findAssocType
- Specified by:
findAssocTypein interfaceCMISDictionaryService
-
findTypeByQueryName
Description copied from interface:CMISDictionaryServiceFind a type by its query name- Specified by:
findTypeByQueryNamein interfaceCMISDictionaryService- Parameters:
queryName- String- Returns:
- TypeDefinitionWrapper
-
findProperty
- Specified by:
findPropertyin interfaceCMISDictionaryService
-
findPropertyByQueryName
- Specified by:
findPropertyByQueryNamein interfaceCMISDictionaryService
-
getBaseTypes
Description copied from interface:CMISDictionaryServiceGet Base Types- Specified by:
getBaseTypesin interfaceCMISDictionaryService
-
getBaseTypes
- Specified by:
getBaseTypesin interfaceCMISDictionaryService
-
getAllTypes
Description copied from interface:CMISDictionaryServiceGet all Types- Specified by:
getAllTypesin interfaceCMISDictionaryService
-
getAllTypes
- Specified by:
getAllTypesin interfaceCMISDictionaryService
-
findDataType
Description copied from interface:CMISDictionaryServiceFind data type- Specified by:
findDataTypein interfaceCMISDictionaryService- Parameters:
dataType- QName- Returns:
- PropertyType
-
findAlfrescoDataType
public QName findAlfrescoDataType(org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType) - Specified by:
findAlfrescoDataTypein interfaceCMISDictionaryService
-
onDictionaryInit
public void onDictionaryInit()Description copied from interface:DictionaryListenerCallback for (re-)initialising the Dictionary caches (executed in the current tenant context)- Specified by:
onDictionaryInitin interfaceDictionaryListener
-
modelAdded
- Specified by:
modelAddedin interfaceExtendedDictionaryListener
-
afterDictionaryInit
public void afterDictionaryInit()Description copied from interface:DictionaryListenerCallback once dictionary initialisation is complete (executed in the current tenant context)- Specified by:
afterDictionaryInitin interfaceDictionaryListener
-
afterDictionaryDestroy
public void afterDictionaryDestroy()Description copied from interface:DictionaryListenerCallback once dictionary destroy is complete (executed in the current tenant context)- Specified by:
afterDictionaryDestroyin interfaceDictionaryListener
-
getChildren
- Specified by:
getChildrenin interfaceCMISDictionaryService
-