Interface SchemaRegistry
-
- All Superinterfaces:
DebugDumpable
,DefinitionsStore
,GlobalDefinitionsStore
- All Known Implementing Classes:
SchemaRegistryImpl
public interface SchemaRegistry extends DebugDumpable, GlobalDefinitionsStore
- Author:
- mederly
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SchemaRegistry.ComparisonResult
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.schema.GlobalDefinitionsStore
findComplexTypeDefinition, findComplexTypeDefinitionByCompileTimeClass, findComplexTypeDefinitionByType, findContainerDefinitionByCompileTimeClass, findContainerDefinitionByElementName, findContainerDefinitionByType, findItemDefinition, findItemDefinition, findItemDefinitionByCompileTimeClass, findItemDefinitionByElementName, findItemDefinitionByElementName, findItemDefinitionByType, findItemDefinitionByType, findItemDefinitionsByCompileTimeClass, findItemDefinitionsByElementName, findItemDefinitionsByElementName, findObjectDefinitionByCompileTimeClass, findObjectDefinitionByElementName, findObjectDefinitionByType, findPropertyDefinitionByElementName, findReferenceDefinitionByElementName, findSimpleTypeDefinitionByType, findTypeDefinitionByCompileTimeClass, findTypeDefinitionByType, findTypeDefinitionByType, findTypeDefinitionsByType, findTypeDefinitionsByType
-
-
-
-
Method Detail
-
getNamespacePrefixMapper
DynamicNamespacePrefixMapper getNamespacePrefixMapper()
-
getPrismContext
PrismContext getPrismContext()
-
getDefaultNamespace
String getDefaultNamespace()
-
initialize
void initialize() throws SAXException, IOException, SchemaException
- Throws:
SAXException
IOException
SchemaException
-
getJavaxSchema
Schema getJavaxSchema()
-
getPrismSchema
PrismSchema getPrismSchema(String namespace)
-
getSchemas
Collection<PrismSchema> getSchemas()
-
getSchemaDescriptions
Collection<SchemaDescription> getSchemaDescriptions()
-
getCompileTimePackages
Collection<Package> getCompileTimePackages()
-
locateItemDefinition
ItemDefinition locateItemDefinition(@NotNull QName itemName, @Nullable ComplexTypeDefinition complexTypeDefinition, @Nullable Function<QName,ItemDefinition> dynamicDefinitionResolver) throws SchemaException
- Throws:
SchemaException
-
resolveUnqualifiedTypeName
QName resolveUnqualifiedTypeName(QName type) throws SchemaException
- Throws:
SchemaException
-
qualifyTypeName
QName qualifyTypeName(QName typeName) throws SchemaException
- Throws:
SchemaException
-
determineParentDefinition
ComplexTypeDefinition determineParentDefinition(@NotNull ComplexTypeDefinition child, @NotNull ItemPath rest)
-
determineReferencedObjectDefinition
PrismObjectDefinition determineReferencedObjectDefinition(@NotNull QName targetTypeName, ItemPath rest)
-
getCompileTimeClassForObjectType
Class<? extends ObjectType> getCompileTimeClassForObjectType(QName objectType)
-
findItemDefinitionByElementName
ItemDefinition findItemDefinitionByElementName(QName elementName, @Nullable List<String> ignoredNamespaces)
-
findSchemaByCompileTimeClass
PrismSchema findSchemaByCompileTimeClass(@NotNull Class<?> compileTimeClass)
-
determineTypeForClass
QName determineTypeForClass(Class<?> clazz)
Tries to determine type name for any class (primitive, complex one). Does not use schemas (TODO explanation)- Parameters:
clazz
-- Returns:
-
applyDefinition
<C extends Containerable> void applyDefinition(PrismContainer<C> container, Class<C> type) throws SchemaException
This method will try to locate the appropriate object definition and apply it.- Parameters:
container
-type
-- Throws:
SchemaException
-
applyDefinition
<C extends Containerable> void applyDefinition(PrismContainer<C> prismObject, Class<C> type, boolean force) throws SchemaException
- Throws:
SchemaException
-
applyDefinition
<T extends Objectable> void applyDefinition(ObjectDelta<T> objectDelta, Class<T> type, boolean force) throws SchemaException
- Throws:
SchemaException
-
applyDefinition
<C extends Containerable,O extends Objectable> void applyDefinition(PrismContainerValue<C> prismContainerValue, Class<O> type, ItemPath path, boolean force) throws SchemaException
- Throws:
SchemaException
-
applyDefinition
<C extends Containerable> void applyDefinition(PrismContainerValue<C> prismContainerValue, QName typeName, ItemPath path, boolean force) throws SchemaException
- Throws:
SchemaException
-
findItemDefinitionByFullPath
<T extends ItemDefinition> T findItemDefinitionByFullPath(Class<? extends Objectable> objectClass, Class<T> defClass, QName... itemNames) throws SchemaException
- Throws:
SchemaException
-
findSchemaByNamespace
PrismSchema findSchemaByNamespace(String namespaceURI)
-
findSchemaDescriptionByNamespace
SchemaDescription findSchemaDescriptionByNamespace(String namespaceURI)
-
findSchemaByPrefix
PrismSchema findSchemaByPrefix(String prefix)
-
findSchemaDescriptionByPrefix
SchemaDescription findSchemaDescriptionByPrefix(String prefix)
-
determineDefinitionFromClass
PrismObjectDefinition determineDefinitionFromClass(Class type)
-
hasImplicitTypeDefinition
boolean hasImplicitTypeDefinition(@NotNull QName itemName, @NotNull QName typeName)
-
resolveGlobalItemDefinition
@Deprecated ItemDefinition resolveGlobalItemDefinition(QName elementQName, PrismContainerDefinition<?> containerDefinition) throws SchemaException
Deprecated.- Throws:
SchemaException
-
resolveGlobalItemDefinition
ItemDefinition resolveGlobalItemDefinition(QName itemName, @Nullable ComplexTypeDefinition complexTypeDefinition) throws SchemaException
- Throws:
SchemaException
-
instantiate
@Deprecated <T extends Objectable> PrismObject<T> instantiate(Class<T> compileTimeClass) throws SchemaException
Deprecated.- Throws:
SchemaException
-
determineClassForItemDefinition
Class<?> determineClassForItemDefinition(ItemDefinition<?> itemDefinition)
-
selectMoreSpecific
<ID extends ItemDefinition> ID selectMoreSpecific(ID def1, ID def2) throws SchemaException
- Throws:
SchemaException
-
selectMoreSpecific
QName selectMoreSpecific(QName type1, QName type2) throws SchemaException
- Throws:
SchemaException
-
areComparable
boolean areComparable(QName type1, QName type2) throws SchemaException
- Throws:
SchemaException
-
isContainer
boolean isContainer(QName typeName)
-
findTypeDefinitionsByElementName
@NotNull <TD extends TypeDefinition> Collection<TD> findTypeDefinitionsByElementName(@NotNull QName name, @NotNull Class<TD> clazz)
-
compareDefinitions
<ID extends ItemDefinition> SchemaRegistry.ComparisonResult compareDefinitions(@NotNull ID def1, @NotNull ID def2) throws SchemaException
- Returns:
- null means we cannot decide (types are different, and no compile time class for def1 and/or def2)
- Throws:
SchemaException
-
unifyTypes
QName unifyTypes(QName type1, QName type2)
Returns most specific common supertype for these two. If any of input params is null, it means it is ignored- Returns:
- null if unification cannot be done (or if both input types are null)
-
createAdHocDefinition
ItemDefinition<?> createAdHocDefinition(QName elementName, QName typeName, int minOccurs, int maxOccurs)
-
-