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 PropertyAccessorMapping
protected CMISMapping
protected DictionaryDAO
protected DictionaryService
protected static final org.apache.commons.logging.Log
protected PropertyLuceneBuilderMapping
protected TenantService
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Callback once dictionary destroy is complete (executed in the current tenant context)void
Callback once dictionary initialisation is complete (executed in the current tenant context)protected CMISDictionaryRegistry
protected CMISDictionaryRegistry
createDictionaryRegistry
(String tenant) protected CMISDictionaryRegistry
protected CMISDictionaryRegistry
createTenantDictionaryRegistry
(String tenant) findAlfrescoDataType
(org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType) findAssocType
(QName clazz) org.apache.chemistry.opencmis.commons.enums.PropertyType
findDataType
(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.DictionaryInitializer
protected CMISDictionaryRegistry
protected abstract CMISAbstractDictionaryService.DictionaryInitializer
boolean
isExcluded
(QName qname) void
modelAdded
(CompiledModel model, String tenantDomain) protected void
onBootstrap
(org.springframework.context.ApplicationEvent event) void
Callback for (re-)initialising the Dictionary caches (executed in the current tenant context)protected void
onShutdown
(org.springframework.context.ApplicationEvent event) void
setCmisMapping
(CMISMapping cmisMapping) Set the mapping servicevoid
setDictionaryDAO
(DictionaryDAO dictionaryDAO) Set the dictionary DAOvoid
setDictionaryService
(DictionaryService dictionaryService) Set the dictionary Servicevoid
setPropertyAccessorMapping
(PropertyAccessorMapping accessorMapping) Set the property accessor mapping servicevoid
setPropertyLuceneBuilderMapping
(PropertyLuceneBuilderMapping luceneBuilderMapping) Set the property lucene mapping servicevoid
setSingletonCache
(SimpleCache<String, CMISDictionaryRegistry> singletonCache) void
setTenantService
(TenantService tenantService) Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
-
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:
onBootstrap
in classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event) - Specified by:
onShutdown
in classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
createCoreDictionaryRegistry
-
createTenantDictionaryRegistry
-
createDictionaryRegistryWithWriteLock
-
createDictionaryRegistry
-
findType
Description copied from interface:CMISDictionaryService
Find type for type id- Specified by:
findType
in interfaceCMISDictionaryService
- Parameters:
typeId
- String- Returns:
- TypeDefinitionWrapper
-
isExcluded
- Specified by:
isExcluded
in interfaceCMISDictionaryService
-
findTypeForClass
public TypeDefinitionWrapper findTypeForClass(QName clazz, org.apache.chemistry.opencmis.commons.enums.BaseTypeId... matchingScopes) Description copied from interface:CMISDictionaryService
Find type for Alfresco class name. Optionally, constrain match to one of specified CMIS scopes- Specified by:
findTypeForClass
in interfaceCMISDictionaryService
- Parameters:
clazz
- QNamematchingScopes
- BaseTypeId...- Returns:
- TypeDefinitionWrapper
-
findNodeType
- Specified by:
findNodeType
in interfaceCMISDictionaryService
-
findAssocType
- Specified by:
findAssocType
in interfaceCMISDictionaryService
-
findTypeByQueryName
Description copied from interface:CMISDictionaryService
Find a type by its query name- Specified by:
findTypeByQueryName
in interfaceCMISDictionaryService
- Parameters:
queryName
- String- Returns:
- TypeDefinitionWrapper
-
findProperty
- Specified by:
findProperty
in interfaceCMISDictionaryService
-
findPropertyByQueryName
- Specified by:
findPropertyByQueryName
in interfaceCMISDictionaryService
-
getBaseTypes
Description copied from interface:CMISDictionaryService
Get Base Types- Specified by:
getBaseTypes
in interfaceCMISDictionaryService
-
getBaseTypes
- Specified by:
getBaseTypes
in interfaceCMISDictionaryService
-
getAllTypes
Description copied from interface:CMISDictionaryService
Get all Types- Specified by:
getAllTypes
in interfaceCMISDictionaryService
-
getAllTypes
- Specified by:
getAllTypes
in interfaceCMISDictionaryService
-
findDataType
Description copied from interface:CMISDictionaryService
Find data type- Specified by:
findDataType
in interfaceCMISDictionaryService
- Parameters:
dataType
- QName- Returns:
- PropertyType
-
findAlfrescoDataType
public QName findAlfrescoDataType(org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType) - Specified by:
findAlfrescoDataType
in interfaceCMISDictionaryService
-
onDictionaryInit
public void onDictionaryInit()Description copied from interface:DictionaryListener
Callback for (re-)initialising the Dictionary caches (executed in the current tenant context)- Specified by:
onDictionaryInit
in interfaceDictionaryListener
-
modelAdded
- Specified by:
modelAdded
in interfaceExtendedDictionaryListener
-
afterDictionaryInit
public void afterDictionaryInit()Description copied from interface:DictionaryListener
Callback once dictionary initialisation is complete (executed in the current tenant context)- Specified by:
afterDictionaryInit
in interfaceDictionaryListener
-
afterDictionaryDestroy
public void afterDictionaryDestroy()Description copied from interface:DictionaryListener
Callback once dictionary destroy is complete (executed in the current tenant context)- Specified by:
afterDictionaryDestroy
in interfaceDictionaryListener
-
getChildren
- Specified by:
getChildren
in interfaceCMISDictionaryService
-