public interface DictionaryDAO
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy the Dictionary.
|
List<M2ModelDiff> |
diffModel(M2Model model)
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 name)
Gets the specified aspect
|
Collection<QName> |
getAspects(boolean includeInherited) |
Collection<AspectDefinition> |
getAspects(QName model) |
AssociationDefinition |
getAssociation(QName name)
Gets the specified association
|
Collection<QName> |
getAssociations(boolean includeInherited) |
Collection<AssociationDefinition> |
getAssociations(QName model) |
ClassDefinition |
getClass(QName name)
Gets the specified class
|
ConstraintDefinition |
getConstraint(QName name)
Gets the specified property constraint
|
Collection<ConstraintDefinition> |
getConstraints(QName model) |
Collection<ConstraintDefinition> |
getConstraints(QName model,
boolean referenceableDefsOnly) |
DataTypeDefinition |
getDataType(Class javaClass)
Gets the data type for the specified Java Class
|
DataTypeDefinition |
getDataType(QName name)
Gets the specified data type
|
Collection<DataTypeDefinition> |
getDataTypes(QName model) |
String |
getDefaultAnalyserResourceBundleName() |
List<DictionaryListener> |
getDictionaryListeners()
get DictionaryListener registered by calls to registerListener
|
DictionaryRegistry |
getDictionaryRegistry(String tenantDomain) |
ModelDefinition |
getModel(QName name) |
Collection<QName> |
getModels() |
Collection<QName> |
getModels(boolean includeInherited) |
Collection<NamespaceDefinition> |
getNamespaces(QName modelName) |
Collection<PropertyDefinition> |
getProperties(QName model) |
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 name)
Gets the specified property
|
ClassLoader |
getResourceClassLoader() |
Collection<QName> |
getSubAspects(QName superAspect,
boolean follow) |
Collection<QName> |
getSubTypes(QName superType,
boolean follow) |
TypeDefinition |
getType(QName name)
Gets the specified type
|
Collection<QName> |
getTypes(boolean includeInherited) |
Collection<TypeDefinition> |
getTypes(QName model) |
void |
init()
Initialise a reload of the dictionary for the current tenant.
|
boolean |
isContextRefreshed() |
boolean |
isModelInherited(QName name) |
QName |
putModel(M2Model model)
Adds a model to the dictionary.
|
QName |
putModelIgnoringConstraints(M2Model model)
Adds a model to the dictionary.
|
void |
register(DictionaryListener dictionaryListener)
Deprecated.
|
void |
registerListener(DictionaryListener dictionaryListener)
Register listener with the Dictionary
|
void |
removeModel(QName model)
Removes a model from the dictionary.
|
void |
reset()
Reset the Dictionary for the current tenant.
|
void |
setResourceClassLoader(ClassLoader resourceClassLoader) |
List<DictionaryListener> getDictionaryListeners()
DictionaryListener
DictionaryRegistry getDictionaryRegistry(String tenantDomain)
boolean isContextRefreshed()
Collection<QName> getModels()
Collection<QName> getModels(boolean includeInherited)
Collection<QName> getTypes(boolean includeInherited)
Collection<QName> getAssociations(boolean includeInherited)
Collection<QName> getAspects(boolean includeInherited)
ModelDefinition getModel(QName name)
name
- the model to retrieveCollection<DataTypeDefinition> getDataTypes(QName model)
model
- the model to retrieve property types forCollection<TypeDefinition> getTypes(QName model)
model
- the model to retrieve types forCollection<QName> getSubTypes(QName superType, boolean follow)
superType
- QNamefollow
- true => follow up the super-class hierarchy, false =>
immediate sub types onlyCollection<AspectDefinition> getAspects(QName model)
model
- the model to retrieve aspects forCollection<AssociationDefinition> getAssociations(QName model)
model
- the model to retrieve associations forCollection<QName> getSubAspects(QName superAspect, boolean follow)
superAspect
- QNamefollow
- true => follow up the super-class hierarchy, false =>
immediate sub aspects onlyCollection<PropertyDefinition> getProperties(QName model)
model
- the model for which to get properties forTypeDefinition getAnonymousType(QName type, Collection<QName> aspects)
type
- the primary typeaspects
- the aspects to combineQName putModel(M2Model model)
model
- the model to addQName putModelIgnoringConstraints(M2Model model)
model
- the model to addvoid removeModel(QName model)
model
- the qname of the model to removeCollection<PropertyDefinition> getProperties(QName modelName, QName dataType)
modelName
- the name of the modeldataType
- null to get all propertiesCollection<PropertyDefinition> getPropertiesOfDataType(QName dataType)
dataType
- QNameCollection<NamespaceDefinition> getNamespaces(QName modelName)
modelName
- the model to retrieve namespaces forCollection<ConstraintDefinition> getConstraints(QName model)
model
- the model to retrieve constraint defs (including property
constaint refs)Collection<ConstraintDefinition> getConstraints(QName model, boolean referenceableDefsOnly)
model
- the model to retrieve constraint defs (optionally only
referenceable constraints)List<M2ModelDiff> diffModel(M2Model model)
model
- M2ModelList<M2ModelDiff> diffModelIgnoringConstraints(M2Model model)
@Deprecated void register(DictionaryListener dictionaryListener)
This method is deprecated, use registerListener(DictionaryListener dictionaryListener)
instead.
dictionaryListener
- void registerListener(DictionaryListener dictionaryListener)
dictionaryListener
- DictionaryListenervoid reset()
void init()
void destroy()
WARNING: This method can cause 'stutter' on user threads as they wait for
the dictionary to reload. It is safer to call init()
, which will also rebuild the
dictionary but will not destroy the old one, thereby allowing other threads to continue
operating.
boolean isModelInherited(QName name)
String getDefaultAnalyserResourceBundleName()
ClassLoader getResourceClassLoader()
void setResourceClassLoader(ClassLoader resourceClassLoader)
resourceClassLoader
- ClassLoaderDataTypeDefinition getDataType(QName name)
name
- name of the data typeDataTypeDefinition getDataType(Class javaClass)
javaClass
- the java classTypeDefinition getType(QName name)
name
- name of the typeAspectDefinition getAspect(QName name)
name
- name of the aspectClassDefinition getClass(QName name)
name
- name of the classPropertyDefinition getProperty(QName name)
name
- name of the propertyConstraintDefinition getConstraint(QName name)
name
- the qualified name of the property constraintAssociationDefinition getAssociation(QName name)
name
- name of the associationCopyright © 2005–2017 Alfresco Software. All rights reserved.