public class DictionaryDAOImpl extends 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
|
List<M2ModelDiff> |
diffModel(M2Model model)
Return diffs between input model and model in the Dictionary.
|
List<M2ModelDiff> |
diffModel(M2Model model,
boolean enableConstraintClassLoading)
Return diffs between input model and model in the Dictionary.
|
List<M2ModelDiff> |
diffModelIgnoringConstraints(M2Model model) |
TypeDefinition |
getAnonymousType(QName type,
Collection<QName> 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
|
Collection<AspectDefinition> |
getAspects(QName modelName) |
AssociationDefinition |
getAssociation(QName assocName)
Gets the specified association
|
Collection<AssociationDefinition> |
getAssociations(QName modelName) |
ClassDefinition |
getClass(QName className)
Gets the specified class
|
CompiledModel |
getCompiledModel(QName modelName) |
ConstraintDefinition |
getConstraint(QName constraintQName)
Gets the specified property constraint
|
Collection<ConstraintDefinition> |
getConstraints(QName modelName) |
Collection<ConstraintDefinition> |
getConstraints(QName modelName,
boolean referenceableDefsOnly) |
DataTypeDefinition |
getDataType(Class javaClass)
Gets the data type for the specified Java Class
|
DataTypeDefinition |
getDataType(QName typeName)
Gets the specified data type
|
Collection<DataTypeDefinition> |
getDataTypes(QName modelName) |
String |
getDefaultAnalyserResourceBundleName() |
ModelDefinition |
getModel(QName name) |
Collection<QName> |
getModels() |
Collection<NamespaceDefinition> |
getNamespaces(QName modelName) |
Collection<PropertyDefinition> |
getProperties(QName modelName) |
Collection<PropertyDefinition> |
getProperties(QName modelName,
QName dataType)
Get all properties for the model and that are of the given data type.
|
Collection<PropertyDefinition> |
getPropertiesOfDataType(QName dataType)
Get all properties for all models of the given data type.
|
PropertyDefinition |
getProperty(QName propertyName)
Gets the specified property
|
ClassLoader |
getResourceClassLoader() |
Collection<QName> |
getSubAspects(QName superAspect,
boolean follow) |
Collection<QName> |
getSubTypes(QName superType,
boolean follow) |
TypeDefinition |
getType(QName typeName)
Gets the specified type
|
Collection<TypeDefinition> |
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(String defaultAnalyserResourceBundleName) |
void |
setDictionaryRegistryCache(SimpleCache<String,DictionaryDAOImpl.DictionaryRegistry> dictionaryRegistryCache) |
void |
setResourceClassLoader(ClassLoader resourceClassLoader) |
void |
setTenantService(TenantService tenantService) |
void |
setTryLockTimeout(long tryLockTimeout) |
public DictionaryDAOImpl(NamespaceDAO namespaceDAO)
namespaceDAO - namespace data accesspublic void setTenantService(TenantService tenantService)
public void setTryLockTimeout(long tryLockTimeout)
public void setDictionaryRegistryCache(SimpleCache<String,DictionaryDAOImpl.DictionaryRegistry> dictionaryRegistryCache)
public String getDefaultAnalyserResourceBundleName()
getDefaultAnalyserResourceBundleName in interface DictionaryDAOpublic void setDefaultAnalyserResourceBundleName(String defaultAnalyserResourceBundleName)
public void register(DictionaryListener dictionaryListener)
register in interface DictionaryDAOpublic void init()
init in interface DictionaryDAOpublic void destroy()
destroy in interface DictionaryDAOpublic void reset()
reset in interface DictionaryDAOpublic QName putModel(M2Model model)
DictionaryDAOputModel in interface DictionaryDAOmodel - the model to addpublic QName putModelIgnoringConstraints(M2Model model)
DictionaryDAOputModelIgnoringConstraints in interface DictionaryDAOmodel - the model to addpublic void removeModel(QName modelName)
DictionaryDAOremoveModel in interface DictionaryDAOmodelName - 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(Class javaClass)
javaClass - the java classpublic Collection<DataTypeDefinition> getDataTypes(QName modelName)
getDataTypes in interface DictionaryDAOmodelName - the model to retrieve property types forpublic TypeDefinition getType(QName typeName)
typeName - name of the typepublic Collection<QName> getSubTypes(QName superType, boolean follow)
getSubTypes in interface DictionaryDAOfollow - true => follow up the super-class hierarchy, false => immediate sub types onlypublic AspectDefinition getAspect(QName aspectName)
aspectName - name of the aspectpublic Collection<QName> getSubAspects(QName superAspect, boolean follow)
getSubAspects in interface DictionaryDAOfollow - 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 Collection<AssociationDefinition> getAssociations(QName modelName)
getAssociations in interface DictionaryDAOmodelName - the model to retrieve associations forpublic Collection<QName> getModels()
getModels in interface DictionaryDAOpublic boolean isModelInherited(QName modelName)
isModelInherited in interface DictionaryDAOpublic ModelDefinition getModel(QName name)
getModel in interface DictionaryDAOname - the model to retrievepublic Collection<TypeDefinition> getTypes(QName modelName)
getTypes in interface DictionaryDAOmodelName - the model to retrieve types forpublic Collection<AspectDefinition> getAspects(QName modelName)
getAspects in interface DictionaryDAOmodelName - the model to retrieve aspects forpublic TypeDefinition getAnonymousType(QName type, Collection<QName> aspects)
DictionaryDAOgetAnonymousType in interface DictionaryDAOtype - the primary typeaspects - the aspects to combinepublic Collection<PropertyDefinition> getProperties(QName modelName)
getProperties in interface DictionaryDAOmodelName - the model for which to get properties forpublic Collection<PropertyDefinition> getProperties(QName modelName, QName dataType)
DictionaryDAOgetProperties in interface DictionaryDAOmodelName - the name of the modeldataType - null to get all propertiespublic Collection<PropertyDefinition> getPropertiesOfDataType(QName dataType)
DictionaryDAOgetPropertiesOfDataType in interface DictionaryDAOpublic Collection<NamespaceDefinition> getNamespaces(QName modelName)
getNamespaces in interface DictionaryDAOpublic Collection<ConstraintDefinition> getConstraints(QName modelName)
getConstraints in interface DictionaryDAOmodelName - the model to retrieve constraint defs (including property constaint refs)public Collection<ConstraintDefinition> getConstraints(QName modelName, boolean referenceableDefsOnly)
getConstraints in interface DictionaryDAOmodelName - the model to retrieve constraint defs (optionally only referenceable constraints)public List<M2ModelDiff> diffModel(M2Model model)
diffModel in interface DictionaryDAOmodel - public List<M2ModelDiff> diffModelIgnoringConstraints(M2Model model)
diffModelIgnoringConstraints in interface DictionaryDAOpublic List<M2ModelDiff> diffModel(M2Model model, boolean enableConstraintClassLoading)
model - public ClassLoader getResourceClassLoader()
getResourceClassLoader in interface DictionaryDAOpublic void setResourceClassLoader(ClassLoader resourceClassLoader)
setResourceClassLoader in interface DictionaryDAOCopyright © 2005–2014 Alfresco Software. All rights reserved.