org.alfresco.opencmis.dictionary
Class CMISAbstractDictionaryService

java.lang.Object
  extended by org.springframework.extensions.surf.util.AbstractLifecycleBean
      extended by org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService
All Implemented Interfaces:
java.util.EventListener, CMISDictionaryService, DictionaryListener, 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, DictionaryListener

Common CMIS Dictionary Support including registry of Types.


Field Summary
protected  PropertyAccessorMapping accessorMapping
           
protected  CMISMapping cmisMapping
           
protected  DictionaryService dictionaryService
           
protected static org.apache.commons.logging.Log logger
           
protected  PropertyLuceneBuilderMapping luceneBuilderMapping
           
protected  TenantService tenantService
           
 
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log
 
Constructor Summary
CMISAbstractDictionaryService()
           
 
Method Summary
 void afterDictionaryDestroy()
           
 void afterDictionaryInit()
           
protected abstract  void createDefinitions(org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.DictionaryRegistry registry)
          Factory for creating CMIS Definitions
 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 type
 TypeDefinitionWrapper 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 id
 TypeDefinitionWrapper findTypeByQueryName(java.lang.String queryName)
          Find a type by its query name
 TypeDefinitionWrapper findTypeForClass(QName clazz, org.apache.chemistry.opencmis.commons.enums.BaseTypeId[] matchingScopes)
          Find type for Alfresco class name.
 QName getAlfrescoClass(QName name)
           
 java.util.List getAllTypes()
          Get all Types
 java.util.List getBaseTypes()
          Get Base Types
protected  void onBootstrap(org.springframework.context.ApplicationEvent event)
           
 void onDictionaryInit()
           
protected  void onShutdown(org.springframework.context.ApplicationEvent event)
           
 void setCmisMapping(CMISMapping cmisMapping)
          Set the mapping service
 void setDictionaryDAO(DictionaryDAO dictionaryDAO)
          Set the dictionary DAO
 void setDictionaryService(DictionaryService dictionaryService)
          Set the dictionary Service
 void setPropertyAccessorMapping(PropertyAccessorMapping accessorMapping)
          Set the property accessor mapping service
 void setPropertyLuceneBuilderMapping(PropertyLuceneBuilderMapping luceneBuilderMapping)
          Set the property lucene mapping service
 void setTenantService(TenantService tenantService)
          Set the tenant Service
 
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
 

Field Detail

logger

protected static final org.apache.commons.logging.Log logger

dictionaryService

protected DictionaryService dictionaryService

tenantService

protected TenantService tenantService

cmisMapping

protected CMISMapping cmisMapping

accessorMapping

protected PropertyAccessorMapping accessorMapping

luceneBuilderMapping

protected PropertyLuceneBuilderMapping luceneBuilderMapping
Constructor Detail

CMISAbstractDictionaryService

public CMISAbstractDictionaryService()
Method Detail

setCmisMapping

public void setCmisMapping(CMISMapping cmisMapping)
Set the mapping service

Parameters:
cmisMapping -

setPropertyAccessorMapping

public void setPropertyAccessorMapping(PropertyAccessorMapping accessorMapping)
Set the property accessor mapping service

Parameters:
accessor - mapping

setPropertyLuceneBuilderMapping

public void setPropertyLuceneBuilderMapping(PropertyLuceneBuilderMapping luceneBuilderMapping)
Set the property lucene mapping service

Parameters:
lucene - mapping

setDictionaryService

public void setDictionaryService(DictionaryService dictionaryService)
Set the dictionary Service

Parameters:
dictionaryService -

setDictionaryDAO

public void setDictionaryDAO(DictionaryDAO dictionaryDAO)
Set the dictionary DAO

Parameters:
dictionaryDAO -

setTenantService

public void setTenantService(TenantService tenantService)
Set the tenant Service

Parameters:
tenantService -

findType

public TypeDefinitionWrapper findType(java.lang.String typeId)
Description copied from interface: CMISDictionaryService
Find type for type id

Specified by:
findType in interface CMISDictionaryService
Returns:

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 interface CMISDictionaryService
Returns:

findNodeType

public TypeDefinitionWrapper findNodeType(QName clazz)
Specified by:
findNodeType in interface CMISDictionaryService

findAssocType

public TypeDefinitionWrapper findAssocType(QName clazz)
Specified by:
findAssocType in interface CMISDictionaryService

findTypeByQueryName

public TypeDefinitionWrapper findTypeByQueryName(java.lang.String queryName)
Description copied from interface: CMISDictionaryService
Find a type by its query name

Specified by:
findTypeByQueryName in interface CMISDictionaryService
Returns:

getAlfrescoClass

public QName getAlfrescoClass(QName name)

findProperty

public PropertyDefinitionWrapper findProperty(java.lang.String propId)
Specified by:
findProperty in interface CMISDictionaryService

findPropertyByQueryName

public PropertyDefinitionWrapper findPropertyByQueryName(java.lang.String queryName)
Specified by:
findPropertyByQueryName in interface CMISDictionaryService

getBaseTypes

public java.util.List getBaseTypes()
Description copied from interface: CMISDictionaryService
Get Base Types

Specified by:
getBaseTypes in interface CMISDictionaryService

getAllTypes

public java.util.List getAllTypes()
Description copied from interface: CMISDictionaryService
Get all Types

Specified by:
getAllTypes in interface CMISDictionaryService
Returns:

findDataType

public org.apache.chemistry.opencmis.commons.enums.PropertyType findDataType(QName dataType)
Description copied from interface: CMISDictionaryService
Find data type

Specified by:
findDataType in interface CMISDictionaryService
Returns:

findAlfrescoDataType

public QName findAlfrescoDataType(org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType)
Specified by:
findAlfrescoDataType in interface CMISDictionaryService

createDefinitions

protected abstract void createDefinitions(org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.DictionaryRegistry registry)
Factory for creating CMIS Definitions

Parameters:
registry -

onDictionaryInit

public void onDictionaryInit()
Specified by:
onDictionaryInit in interface DictionaryListener

afterDictionaryInit

public void afterDictionaryInit()
Specified by:
afterDictionaryInit in interface DictionaryListener

afterDictionaryDestroy

public void afterDictionaryDestroy()
Specified by:
afterDictionaryDestroy in interface DictionaryListener

onBootstrap

protected void onBootstrap(org.springframework.context.ApplicationEvent event)
Specified by:
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean

onShutdown

protected void onShutdown(org.springframework.context.ApplicationEvent event)
Specified by:
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.