Package org.alfresco.repo.dictionary
Class AbstractDictionaryRegistry
- java.lang.Object
-
- org.alfresco.repo.dictionary.AbstractDictionaryRegistry
-
- All Implemented Interfaces:
DictionaryRegistry
- Direct Known Subclasses:
CoreDictionaryRegistryImpl
,TenantDictionaryRegistryImpl
public abstract class AbstractDictionaryRegistry extends java.lang.Object implements DictionaryRegistry
- Author:
- sglover
-
-
Field Summary
Fields Modifier and Type Field Description protected DictionaryDAO
dictionaryDAO
protected static org.apache.commons.logging.Log
logger
-
Constructor Summary
Constructors Constructor Description AbstractDictionaryRegistry(DictionaryDAO dictionaryDAO)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addPrefix(java.lang.String prefix, java.lang.String uri)
protected void
addPrefixImpl(java.lang.String prefix, java.lang.String uri)
void
addURI(java.lang.String uri)
protected void
addURIImpl(java.lang.String uri)
void
clear()
AspectDefinition
getAspect(QName aspectName)
protected AspectDefinition
getAspectImpl(QName aspectName)
java.util.Collection<QName>
getAspects(boolean includeInherited)
AssociationDefinition
getAssociation(QName assocName)
protected AssociationDefinition
getAssociationImpl(QName assocName)
java.util.Collection<QName>
getAssociations(boolean includeInherited)
ClassDefinition
getClass(QName className)
protected ClassDefinition
getClassImpl(QName className)
java.util.Map<QName,CompiledModel>
getCompiledModels(boolean includeInherited)
ConstraintDefinition
getConstraint(QName constraintQName)
protected ConstraintDefinition
getConstraintImpl(QName constraintQName)
DataTypeDefinition
getDataType(java.lang.Class javaClass)
DataTypeDefinition
getDataType(QName typeName)
protected DataTypeDefinition
getDataTypeImp(QName typeName)
protected DataTypeDefinition
getDataTypeImpl(java.lang.Class javaClass)
CompiledModel
getModel(QName modelName)
protected CompiledModel
getModelImpl(QName modelName)
java.util.List<CompiledModel>
getModelsForUri(java.lang.String uri)
protected java.util.List<CompiledModel>
getModelsForUriImpl(java.lang.String uri)
java.lang.String
getNamespaceURI(java.lang.String prefix)
java.util.Collection<java.lang.String>
getPrefixes(java.lang.String URI)
java.util.Map<java.lang.String,java.lang.String>
getPrefixesCache()
protected java.util.Map<java.lang.String,java.lang.String>
getPrefixesCacheImpl()
protected java.util.Collection<java.lang.String>
getPrefixesImpl(java.lang.String URI)
PropertyDefinition
getProperty(QName propertyName)
protected PropertyDefinition
getPropertyImpl(QName propertyName)
TypeDefinition
getType(QName typeName)
protected TypeDefinition
getTypeImpl(QName typeName)
java.util.Collection<QName>
getTypes(boolean includeInherited)
java.util.List<java.lang.String>
getUrisCache()
protected java.util.List<java.lang.String>
getUrisCacheImpl()
java.util.Map<java.lang.String,java.util.List<CompiledModel>>
getUriToModels()
boolean
hasPrefix(java.lang.String prefix)
boolean
hasURI(java.lang.String uri)
void
init()
protected abstract void
initImpl()
boolean
isModelInherited(QName modelName)
protected void
mapUriToModel(java.lang.String uri, CompiledModel model)
boolean
modelExists(QName modelName)
QName
putModel(CompiledModel model)
protected QName
putModelImpl(CompiledModel model)
void
remove()
protected abstract void
removeImpl()
void
removeModel(QName modelName)
protected CompiledModel
removeModelImpl(QName modelName)
void
removePrefix(java.lang.String prefix)
protected boolean
removePrefixImpl(java.lang.String prefix)
void
removeURI(java.lang.String uri)
protected boolean
removeURIImpl(java.lang.String uri)
protected void
unmapUriToModel(java.lang.String uri, CompiledModel model)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.dictionary.DictionaryRegistry
getTenantDomain
-
-
-
-
Field Detail
-
logger
protected static final org.apache.commons.logging.Log logger
-
dictionaryDAO
protected DictionaryDAO dictionaryDAO
-
-
Constructor Detail
-
AbstractDictionaryRegistry
public AbstractDictionaryRegistry(DictionaryDAO dictionaryDAO)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceDictionaryRegistry
-
getUriToModels
public java.util.Map<java.lang.String,java.util.List<CompiledModel>> getUriToModels()
- Specified by:
getUriToModels
in interfaceDictionaryRegistry
-
getCompiledModels
public java.util.Map<QName,CompiledModel> getCompiledModels(boolean includeInherited)
- Specified by:
getCompiledModels
in interfaceDictionaryRegistry
-
getModelsForUri
public java.util.List<CompiledModel> getModelsForUri(java.lang.String uri)
- Specified by:
getModelsForUri
in interfaceDictionaryRegistry
-
putModel
public QName putModel(CompiledModel model)
- Specified by:
putModel
in interfaceDictionaryRegistry
-
getModel
public CompiledModel getModel(QName modelName)
- Specified by:
getModel
in interfaceDictionaryRegistry
-
modelExists
public boolean modelExists(QName modelName)
- Specified by:
modelExists
in interfaceDictionaryRegistry
-
removeModel
public void removeModel(QName modelName)
- Specified by:
removeModel
in interfaceDictionaryRegistry
-
removeModelImpl
protected CompiledModel removeModelImpl(QName modelName)
-
getModelImpl
protected CompiledModel getModelImpl(QName modelName)
-
getModelsForUriImpl
protected java.util.List<CompiledModel> getModelsForUriImpl(java.lang.String uri)
-
unmapUriToModel
protected void unmapUriToModel(java.lang.String uri, CompiledModel model)
-
mapUriToModel
protected void mapUriToModel(java.lang.String uri, CompiledModel model)
-
putModelImpl
protected QName putModelImpl(CompiledModel model)
-
getAspect
public AspectDefinition getAspect(QName aspectName)
- Specified by:
getAspect
in interfaceDictionaryRegistry
-
getAspectImpl
protected AspectDefinition getAspectImpl(QName aspectName)
-
getAssociation
public AssociationDefinition getAssociation(QName assocName)
- Specified by:
getAssociation
in interfaceDictionaryRegistry
-
getAssociationImpl
protected AssociationDefinition getAssociationImpl(QName assocName)
-
getClass
public ClassDefinition getClass(QName className)
- Specified by:
getClass
in interfaceDictionaryRegistry
-
getClassImpl
protected ClassDefinition getClassImpl(QName className)
-
getProperty
public PropertyDefinition getProperty(QName propertyName)
- Specified by:
getProperty
in interfaceDictionaryRegistry
-
getPropertyImpl
protected PropertyDefinition getPropertyImpl(QName propertyName)
-
getType
public TypeDefinition getType(QName typeName)
- Specified by:
getType
in interfaceDictionaryRegistry
-
getTypeImpl
protected TypeDefinition getTypeImpl(QName typeName)
-
getConstraint
public ConstraintDefinition getConstraint(QName constraintQName)
- Specified by:
getConstraint
in interfaceDictionaryRegistry
-
getConstraintImpl
protected ConstraintDefinition getConstraintImpl(QName constraintQName)
-
getDataType
public DataTypeDefinition getDataType(QName typeName)
- Specified by:
getDataType
in interfaceDictionaryRegistry
-
getDataTypeImp
protected DataTypeDefinition getDataTypeImp(QName typeName)
-
getDataType
public DataTypeDefinition getDataType(java.lang.Class javaClass)
- Specified by:
getDataType
in interfaceDictionaryRegistry
-
getDataTypeImpl
protected DataTypeDefinition getDataTypeImpl(java.lang.Class javaClass)
-
getPrefixesCacheImpl
protected java.util.Map<java.lang.String,java.lang.String> getPrefixesCacheImpl()
-
getPrefixesCache
public java.util.Map<java.lang.String,java.lang.String> getPrefixesCache()
- Specified by:
getPrefixesCache
in interfaceDictionaryRegistry
-
getUrisCache
public java.util.List<java.lang.String> getUrisCache()
- Specified by:
getUrisCache
in interfaceDictionaryRegistry
-
getUrisCacheImpl
protected java.util.List<java.lang.String> getUrisCacheImpl()
-
getPrefixes
public java.util.Collection<java.lang.String> getPrefixes(java.lang.String URI)
- Specified by:
getPrefixes
in interfaceDictionaryRegistry
-
getPrefixesImpl
protected java.util.Collection<java.lang.String> getPrefixesImpl(java.lang.String URI)
-
addURI
public void addURI(java.lang.String uri)
- Specified by:
addURI
in interfaceDictionaryRegistry
-
addURIImpl
protected void addURIImpl(java.lang.String uri)
-
hasURI
public boolean hasURI(java.lang.String uri)
- Specified by:
hasURI
in interfaceDictionaryRegistry
-
addPrefix
public void addPrefix(java.lang.String prefix, java.lang.String uri)
- Specified by:
addPrefix
in interfaceDictionaryRegistry
-
hasPrefix
public boolean hasPrefix(java.lang.String prefix)
- Specified by:
hasPrefix
in interfaceDictionaryRegistry
-
addPrefixImpl
protected void addPrefixImpl(java.lang.String prefix, java.lang.String uri)
-
removeURI
public void removeURI(java.lang.String uri)
- Specified by:
removeURI
in interfaceDictionaryRegistry
-
removePrefix
public void removePrefix(java.lang.String prefix)
- Specified by:
removePrefix
in interfaceDictionaryRegistry
-
removeURIImpl
protected boolean removeURIImpl(java.lang.String uri)
-
removePrefixImpl
protected boolean removePrefixImpl(java.lang.String prefix)
-
getTypes
public java.util.Collection<QName> getTypes(boolean includeInherited)
- Specified by:
getTypes
in interfaceDictionaryRegistry
-
getAssociations
public java.util.Collection<QName> getAssociations(boolean includeInherited)
- Specified by:
getAssociations
in interfaceDictionaryRegistry
-
getAspects
public java.util.Collection<QName> getAspects(boolean includeInherited)
- Specified by:
getAspects
in interfaceDictionaryRegistry
-
initImpl
protected abstract void initImpl()
-
init
public void init()
- Specified by:
init
in interfaceDictionaryRegistry
-
removeImpl
protected abstract void removeImpl()
-
remove
public void remove()
- Specified by:
remove
in interfaceDictionaryRegistry
-
isModelInherited
public boolean isModelInherited(QName modelName)
- Specified by:
isModelInherited
in interfaceDictionaryRegistry
-
getNamespaceURI
public java.lang.String getNamespaceURI(java.lang.String prefix)
- Specified by:
getNamespaceURI
in interfaceDictionaryRegistry
-
-