Package org.alfresco.opencmis.dictionary
Class CMISAbstractDictionaryService
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService
-
- All Implemented Interfaces:
java.util.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 Classes Modifier and Type Class Description protected static interface
CMISAbstractDictionaryService.DictionaryInitializer
-
Field Summary
Fields Modifier and Type Field Description protected PropertyAccessorMapping
accessorMapping
protected CMISMapping
cmisMapping
protected DictionaryDAO
dictionaryDAO
protected DictionaryService
dictionaryService
protected static org.apache.commons.logging.Log
logger
protected PropertyLuceneBuilderMapping
luceneBuilderMapping
protected TenantService
tenantService
-
Constructor Summary
Constructors Constructor Description CMISAbstractDictionaryService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
afterDictionaryDestroy()
Callback once dictionary destroy is complete (executed in the current tenant context)void
afterDictionaryInit()
Callback once dictionary initialisation is complete (executed in the current tenant context)protected CMISDictionaryRegistry
createCoreDictionaryRegistry()
protected CMISDictionaryRegistry
createDictionaryRegistry(java.lang.String tenant)
protected CMISDictionaryRegistry
createDictionaryRegistryWithWriteLock()
protected CMISDictionaryRegistry
createTenantDictionaryRegistry(java.lang.String tenant)
QName
findAlfrescoDataType(org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType)
TypeDefinitionWrapper
findAssocType(QName clazz)
org.apache.chemistry.opencmis.commons.enums.PropertyType
findDataType(QName dataType)
Find data typeTypeDefinitionWrapper
findNodeType(QName clazz)
PropertyDefinitionWrapper
findProperty(java.lang.String propId)
PropertyDefinitionWrapper
findPropertyByQueryName(java.lang.String queryName)
TypeDefinitionWrapper
findType(java.lang.String typeId)
Find type for type idTypeDefinitionWrapper
findTypeByQueryName(java.lang.String queryName)
Find a type by its query nameTypeDefinitionWrapper
findTypeForClass(QName clazz, org.apache.chemistry.opencmis.commons.enums.BaseTypeId... matchingScopes)
Find type for Alfresco class name.java.util.List<TypeDefinitionWrapper>
getAllTypes()
Get all Typesjava.util.List<TypeDefinitionWrapper>
getAllTypes(boolean includeParent)
java.util.List<TypeDefinitionWrapper>
getBaseTypes()
Get Base Typesjava.util.List<TypeDefinitionWrapper>
getBaseTypes(boolean includeParent)
java.util.List<TypeDefinitionWrapper>
getChildren(java.lang.String typeId)
protected abstract CMISAbstractDictionaryService.DictionaryInitializer
getCoreDictionaryInitializer()
protected CMISDictionaryRegistry
getRegistry()
protected abstract CMISAbstractDictionaryService.DictionaryInitializer
getTenantDictionaryInitializer()
boolean
isExcluded(QName qname)
void
modelAdded(CompiledModel model, java.lang.String tenantDomain)
protected void
onBootstrap(org.springframework.context.ApplicationEvent event)
void
onDictionaryInit()
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<java.lang.String,CMISDictionaryRegistry> singletonCache)
void
setTenantService(TenantService tenantService)
-
-
-
Field Detail
-
logger
protected static final org.apache.commons.logging.Log logger
-
dictionaryDAO
protected DictionaryDAO dictionaryDAO
-
dictionaryService
protected DictionaryService dictionaryService
-
cmisMapping
protected CMISMapping cmisMapping
-
accessorMapping
protected PropertyAccessorMapping accessorMapping
-
luceneBuilderMapping
protected PropertyLuceneBuilderMapping luceneBuilderMapping
-
tenantService
protected TenantService tenantService
-
-
Method Detail
-
setTenantService
public void setTenantService(TenantService tenantService)
-
setCmisMapping
public void setCmisMapping(CMISMapping cmisMapping)
Set the mapping service- Parameters:
cmisMapping
- CMISMapping
-
setPropertyAccessorMapping
public void setPropertyAccessorMapping(PropertyAccessorMapping accessorMapping)
Set the property accessor mapping service- Parameters:
accessorMapping
- mapping
-
setPropertyLuceneBuilderMapping
public void setPropertyLuceneBuilderMapping(PropertyLuceneBuilderMapping luceneBuilderMapping)
Set the property lucene mapping service- Parameters:
luceneBuilderMapping
- mapping
-
setDictionaryService
public void setDictionaryService(DictionaryService dictionaryService)
Set the dictionary Service- Parameters:
dictionaryService
- DictionaryService
-
setDictionaryDAO
public void setDictionaryDAO(DictionaryDAO dictionaryDAO)
Set the dictionary DAO- Parameters:
dictionaryDAO
- DictionaryDAO
-
setSingletonCache
public void setSingletonCache(SimpleCache<java.lang.String,CMISDictionaryRegistry> singletonCache)
-
getCoreDictionaryInitializer
protected abstract CMISAbstractDictionaryService.DictionaryInitializer getCoreDictionaryInitializer()
-
getTenantDictionaryInitializer
protected abstract CMISAbstractDictionaryService.DictionaryInitializer getTenantDictionaryInitializer()
-
getRegistry
protected CMISDictionaryRegistry 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
protected CMISDictionaryRegistry createCoreDictionaryRegistry()
-
createTenantDictionaryRegistry
protected CMISDictionaryRegistry createTenantDictionaryRegistry(java.lang.String tenant)
-
createDictionaryRegistryWithWriteLock
protected CMISDictionaryRegistry createDictionaryRegistryWithWriteLock()
-
createDictionaryRegistry
protected CMISDictionaryRegistry createDictionaryRegistry(java.lang.String tenant)
-
findType
public TypeDefinitionWrapper findType(java.lang.String typeId)
Description copied from interface:CMISDictionaryService
Find type for type id- Specified by:
findType
in interfaceCMISDictionaryService
- Parameters:
typeId
- String- Returns:
- TypeDefinitionWrapper
-
isExcluded
public boolean isExcluded(QName qname)
- 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
public TypeDefinitionWrapper findNodeType(QName clazz)
- Specified by:
findNodeType
in interfaceCMISDictionaryService
-
findAssocType
public TypeDefinitionWrapper findAssocType(QName clazz)
- Specified by:
findAssocType
in interfaceCMISDictionaryService
-
findTypeByQueryName
public TypeDefinitionWrapper findTypeByQueryName(java.lang.String queryName)
Description copied from interface:CMISDictionaryService
Find a type by its query name- Specified by:
findTypeByQueryName
in interfaceCMISDictionaryService
- Parameters:
queryName
- String- Returns:
- TypeDefinitionWrapper
-
findProperty
public PropertyDefinitionWrapper findProperty(java.lang.String propId)
- Specified by:
findProperty
in interfaceCMISDictionaryService
-
findPropertyByQueryName
public PropertyDefinitionWrapper findPropertyByQueryName(java.lang.String queryName)
- Specified by:
findPropertyByQueryName
in interfaceCMISDictionaryService
-
getBaseTypes
public java.util.List<TypeDefinitionWrapper> getBaseTypes()
Description copied from interface:CMISDictionaryService
Get Base Types- Specified by:
getBaseTypes
in interfaceCMISDictionaryService
-
getBaseTypes
public java.util.List<TypeDefinitionWrapper> getBaseTypes(boolean includeParent)
- Specified by:
getBaseTypes
in interfaceCMISDictionaryService
-
getAllTypes
public java.util.List<TypeDefinitionWrapper> getAllTypes()
Description copied from interface:CMISDictionaryService
Get all Types- Specified by:
getAllTypes
in interfaceCMISDictionaryService
-
getAllTypes
public java.util.List<TypeDefinitionWrapper> getAllTypes(boolean includeParent)
- Specified by:
getAllTypes
in interfaceCMISDictionaryService
-
findDataType
public org.apache.chemistry.opencmis.commons.enums.PropertyType findDataType(QName dataType)
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
public void modelAdded(CompiledModel model, java.lang.String tenantDomain)
- 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
public java.util.List<TypeDefinitionWrapper> getChildren(java.lang.String typeId)
- Specified by:
getChildren
in interfaceCMISDictionaryService
-
-