public class DictionaryDAOImpl extends java.lang.Object implements DictionaryDAO
Modifier and Type | Class and Description |
---|---|
class |
DictionaryDAOImpl.DictionaryRegistry |
Constructor and Description |
---|
DictionaryDAOImpl(NamespaceDAO namespaceDAO)
Construct
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy the Dictionary & Namespaces
|
java.util.List |
diffModel(M2Model model)
Return diffs between input model and model in the Dictionary.
|
java.util.List |
diffModel(M2Model model,
boolean enableConstraintClassLoading)
Return diffs between input model and model in the Dictionary.
|
java.util.List |
diffModelIgnoringConstraints(M2Model model) |
TypeDefinition |
getAnonymousType(QName type,
java.util.Collection aspects)
Construct an anonymous type that combines a primary type definition and
and one or more aspects
|
AspectDefinition |
getAspect(QName aspectName)
Gets the specified aspect
|
java.util.Collection |
getAspects(QName modelName) |
AssociationDefinition |
getAssociation(QName assocName)
Gets the specified association
|
java.util.Collection |
getAssociations(QName modelName) |
ClassDefinition |
getClass(QName className)
Gets the specified class
|
CompiledModel |
getCompiledModel(QName modelName) |
ConstraintDefinition |
getConstraint(QName constraintQName)
Gets the specified property constraint
|
java.util.Collection |
getConstraints(QName modelName) |
java.util.Collection |
getConstraints(QName modelName,
boolean referenceableDefsOnly) |
DataTypeDefinition |
getDataType(java.lang.Class javaClass)
Gets the data type for the specified Java Class
|
DataTypeDefinition |
getDataType(QName typeName)
Gets the specified data type
|
java.util.Collection |
getDataTypes(QName modelName) |
java.lang.String |
getDefaultAnalyserResourceBundleName() |
ModelDefinition |
getModel(QName name) |
java.util.Collection |
getModels() |
java.util.Collection |
getNamespaces(QName modelName) |
java.util.Collection |
getProperties(QName modelName) |
java.util.Collection |
getProperties(QName modelName,
QName dataType)
Get all properties for the model and that are of the given data type.
|
java.util.Collection |
getPropertiesOfDataType(QName dataType)
Get all properties for all models of the given data type.
|
PropertyDefinition |
getProperty(QName propertyName)
Gets the specified property
|
java.lang.ClassLoader |
getResourceClassLoader() |
java.util.Collection |
getSubAspects(QName superAspect,
boolean follow) |
java.util.Collection |
getSubTypes(QName superType,
boolean follow) |
TypeDefinition |
getType(QName typeName)
Gets the specified type
|
java.util.Collection |
getTypes(QName modelName) |
void |
init()
Initialise the Dictionary & Namespaces
|
boolean |
isModelInherited(QName modelName) |
QName |
putModel(M2Model model)
Adds a model to the dictionary.
|
QName |
putModelIgnoringConstraints(M2Model model)
Adds a model to the dictionary.
|
QName |
putModelImpl(M2Model model,
boolean enableConstraintClassLoading) |
void |
register(DictionaryListener dictionaryListener)
Register with the Dictionary
|
void |
removeModel(QName modelName)
Removes a model from the dictionary.
|
void |
reset()
Reset the Dictionary & Namespaces
|
void |
setDefaultAnalyserResourceBundleName(java.lang.String defaultAnalyserResourceBundleName) |
void |
setDictionaryRegistryCache(SimpleCache dictionaryRegistryCache) |
void |
setResourceClassLoader(java.lang.ClassLoader resourceClassLoader) |
void |
setTenantService(TenantService tenantService) |
public DictionaryDAOImpl(NamespaceDAO namespaceDAO)
namespaceDAO
- namespace data accesspublic void setTenantService(TenantService tenantService)
public void setDictionaryRegistryCache(SimpleCache dictionaryRegistryCache)
public java.lang.String getDefaultAnalyserResourceBundleName()
getDefaultAnalyserResourceBundleName
in interface DictionaryDAO
public void setDefaultAnalyserResourceBundleName(java.lang.String defaultAnalyserResourceBundleName)
public void register(DictionaryListener dictionaryListener)
register
in interface DictionaryDAO
public void init()
init
in interface DictionaryDAO
public void destroy()
destroy
in interface DictionaryDAO
public void reset()
reset
in interface DictionaryDAO
public QName putModel(M2Model model)
DictionaryDAO
putModel
in interface DictionaryDAO
model
- the model to addpublic QName putModelIgnoringConstraints(M2Model model)
DictionaryDAO
putModelIgnoringConstraints
in interface DictionaryDAO
model
- the model to addpublic void removeModel(QName modelName)
DictionaryDAO
removeModel
in interface DictionaryDAO
modelName
- the qname of the model to removeDictionaryDAO.removeModel(org.alfresco.service.namespace.QName)
public CompiledModel getCompiledModel(QName modelName)
modelName
- the model namepublic DataTypeDefinition getDataType(QName typeName)
typeName
- name of the data typepublic DataTypeDefinition getDataType(java.lang.Class javaClass)
javaClass
- the java classpublic java.util.Collection getDataTypes(QName modelName)
getDataTypes
in interface DictionaryDAO
modelName
- the model to retrieve property types forpublic TypeDefinition getType(QName typeName)
typeName
- name of the typepublic java.util.Collection getSubTypes(QName superType, boolean follow)
getSubTypes
in interface DictionaryDAO
follow
- true => follow up the super-class hierarchy, false => immediate sub types onlypublic AspectDefinition getAspect(QName aspectName)
aspectName
- name of the aspectpublic java.util.Collection getSubAspects(QName superAspect, boolean follow)
getSubAspects
in interface DictionaryDAO
follow
- true => follow up the super-class hierarchy, false => immediate sub aspects onlypublic ClassDefinition getClass(QName className)
className
- name of the classpublic PropertyDefinition getProperty(QName propertyName)
propertyName
- name of the propertypublic ConstraintDefinition getConstraint(QName constraintQName)
constraintQName
- the qualified name of the property constraintpublic AssociationDefinition getAssociation(QName assocName)
assocName
- name of the associationpublic java.util.Collection getAssociations(QName modelName)
getAssociations
in interface DictionaryDAO
modelName
- the model to retrieve associations forpublic java.util.Collection getModels()
getModels
in interface DictionaryDAO
public boolean isModelInherited(QName modelName)
isModelInherited
in interface DictionaryDAO
public ModelDefinition getModel(QName name)
getModel
in interface DictionaryDAO
name
- the model to retrievepublic java.util.Collection getTypes(QName modelName)
getTypes
in interface DictionaryDAO
modelName
- the model to retrieve types forpublic java.util.Collection getAspects(QName modelName)
getAspects
in interface DictionaryDAO
modelName
- the model to retrieve aspects forpublic TypeDefinition getAnonymousType(QName type, java.util.Collection aspects)
DictionaryDAO
getAnonymousType
in interface DictionaryDAO
type
- the primary typeaspects
- the aspects to combinepublic java.util.Collection getProperties(QName modelName)
getProperties
in interface DictionaryDAO
modelName
- the model for which to get properties forpublic java.util.Collection getProperties(QName modelName, QName dataType)
DictionaryDAO
getProperties
in interface DictionaryDAO
modelName
- the name of the modeldataType
- null to get all propertiespublic java.util.Collection getPropertiesOfDataType(QName dataType)
DictionaryDAO
getPropertiesOfDataType
in interface DictionaryDAO
public java.util.Collection getNamespaces(QName modelName)
getNamespaces
in interface DictionaryDAO
public java.util.Collection getConstraints(QName modelName)
getConstraints
in interface DictionaryDAO
modelName
- the model to retrieve constraint defs (including property constaint refs)public java.util.Collection getConstraints(QName modelName, boolean referenceableDefsOnly)
getConstraints
in interface DictionaryDAO
modelName
- the model to retrieve constraint defs (optionally only referenceable constraints)public java.util.List diffModel(M2Model model)
diffModel
in interface DictionaryDAO
model
- public java.util.List diffModelIgnoringConstraints(M2Model model)
diffModelIgnoringConstraints
in interface DictionaryDAO
public java.util.List diffModel(M2Model model, boolean enableConstraintClassLoading)
model
- public java.lang.ClassLoader getResourceClassLoader()
getResourceClassLoader
in interface DictionaryDAO
public void setResourceClassLoader(java.lang.ClassLoader resourceClassLoader)
setResourceClassLoader
in interface DictionaryDAO
Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.