public class SchemaRegistry extends Object implements LSResourceResolver, EntityResolver, Dumpable
Constructor and Description |
---|
SchemaRegistry() |
Modifier and Type | Method and Description |
---|---|
<T extends Objectable> |
applyDefinition(ObjectDelta<T> objectDelta,
Class<T> type,
boolean force)
This method will try to locate the appropriate object definition and apply it.
|
<C extends Containerable,O extends Objectable> |
applyDefinition(PrismContainerValue<C> prismContainerValue,
Class<O> type,
ItemPath path,
boolean force) |
void |
applyDefinition(PrismObject<? extends Objectable> prismObject,
Class<? extends Objectable> type) |
void |
applyDefinition(PrismObject<? extends Objectable> prismObject,
Class<? extends Objectable> type,
boolean force)
This method will try to locate the appropriate object definition and apply it.
|
static ItemDefinition |
createDefaultItemDefinition(QName itemName,
PrismContext prismContext) |
Class<?> |
determineCompileTimeClass(ComplexTypeDefinition complexTypeDefinition) |
Class<?> |
determineCompileTimeClass(QName typeName) |
Class<?> |
determineCompileTimeClass(QName elementName,
ComplexTypeDefinition complexTypeDefinition) |
PrismObjectDefinition |
determineDefinitionFromClass(Class type) |
String |
dump()
Show the content of the object intended for diagnostics by developer.
|
ComplexTypeDefinition |
findComplexTypeDefinition(QName typeName) |
PrismContainerDefinition |
findContainerDefinitionByElementName(QName elementName) |
PrismContainerDefinition |
findContainerDefinitionByType(QName typeName) |
ItemDefinition |
findItemDefinitionByElementName(QName elementName) |
<T extends Objectable> |
findObjectDefinitionByCompileTimeClass(Class<T> compileTimeClass) |
<T extends Objectable> |
findObjectDefinitionByElementName(QName elementName) |
<T extends Objectable> |
findObjectDefinitionByType(QName typeName) |
PrismPropertyDefinition |
findPropertyDefinitionByElementName(QName elementName) |
PrismReferenceDefinition |
findReferenceDefinitionByElementName(QName elementName) |
PrismSchema |
findSchemaByCompileTimeClass(Class<? extends Objectable> compileTimeClass) |
PrismSchema |
findSchemaByNamespace(String namespaceURI) |
SchemaDescription |
findSchemaDescriptionByNamespace(String namespaceURI) |
EntityResolver |
getBuiltinSchemaResolver() |
Collection<Package> |
getCompileTimePackages() |
Schema |
getJavaxSchema() |
DynamicNamespacePrefixMapper |
getNamespacePrefixMapper() |
PrismSchema |
getObjectSchema()
Returns a schema that contains all the object definitions augmented with
extension definitions as appropriate.
|
String |
getObjectSchemaNamespace() |
PrismContext |
getPrismContext() |
PrismSchema |
getSchema(String namespace) |
boolean |
hasImplicitTypeDefinition(QName elementName,
QName typeName)
Returns true if specified element has a definition that matches specified type
in the known schemas.
|
void |
initialize()
This can be used to read additional schemas even after the registry was initialized.
|
<T extends Objectable> |
instantiate(Class<T> compileTimeClass) |
void |
loadPrismSchemaFile(File file) |
SchemaDescription |
loadPrismSchemaFileDescription(File file) |
void |
loadPrismSchemaResource(String resourcePath) |
void |
loadPrismSchemasFromDirectory(File directory)
This can be used to read additional schemas even after the registry was initialized.
|
void |
registerPrismDefaultSchemaResource(String resourcePath,
String usualPrefix,
Package compileTimeClassesPackage)
Must be called before call to initialize()
|
void |
registerPrismSchemaFile(File file) |
void |
registerPrismSchemaResource(String resourcePath,
String usualPrefix)
Must be called before call to initialize()
|
void |
registerPrismSchemaResource(String resourcePath,
String usualPrefix,
Package compileTimeClassesPackage)
Must be called before call to initialize()
|
void |
registerPrismSchemaResource(String resourcePath,
String usualPrefix,
Package compileTimeClassesPackage,
boolean defaultSchema)
Must be called before call to initialize()
|
void |
registerPrismSchemasFromDirectory(File directory) |
void |
registerSchema(Node node,
String sourceDescription)
Must be called before call to initialize()
|
void |
registerSchema(Node node,
String sourceDescription,
String usualPrefix)
Must be called before call to initialize()
|
void |
registerSchemaResource(String resourcePath,
String usualPrefix)
Must be called before call to initialize()
|
InputSource |
resolveEntity(String publicId,
String systemId) |
ItemDefinition |
resolveGlobalItemDefinition(QName elementQName)
Looks for a top-level definition for the specified element name (in all schemas).
|
LSInput |
resolveResource(String type,
String namespaceURI,
String publicId,
String systemId,
String baseURI) |
InputSource |
resolveResourceUsingBuiltinResolver(String type,
String namespaceURI,
String publicId,
String systemId,
String baseURI) |
void |
setBuiltinSchemaResolver(EntityResolver builtinSchemaResolver) |
void |
setNamespacePrefixMapper(DynamicNamespacePrefixMapper namespacePrefixMapper) |
void |
setObjectSchemaNamespace(String objectSchemaNamespace) |
void |
setPrismContext(PrismContext prismContext) |
public String getObjectSchemaNamespace()
public void setObjectSchemaNamespace(String objectSchemaNamespace)
public DynamicNamespacePrefixMapper getNamespacePrefixMapper()
public void setNamespacePrefixMapper(DynamicNamespacePrefixMapper namespacePrefixMapper)
public PrismContext getPrismContext()
public void setPrismContext(PrismContext prismContext)
public EntityResolver getBuiltinSchemaResolver()
public void setBuiltinSchemaResolver(EntityResolver builtinSchemaResolver)
public void registerSchemaResource(String resourcePath, String usualPrefix) throws SchemaException
SchemaException
public void registerPrismSchemaResource(String resourcePath, String usualPrefix) throws SchemaException
SchemaException
public void registerPrismSchemaResource(String resourcePath, String usualPrefix, Package compileTimeClassesPackage) throws SchemaException
SchemaException
public void registerPrismDefaultSchemaResource(String resourcePath, String usualPrefix, Package compileTimeClassesPackage) throws SchemaException
SchemaException
public void registerPrismSchemaResource(String resourcePath, String usualPrefix, Package compileTimeClassesPackage, boolean defaultSchema) throws SchemaException
SchemaException
public void registerSchema(Node node, String sourceDescription) throws SchemaException
node
- SchemaException
public void registerSchema(Node node, String sourceDescription, String usualPrefix) throws SchemaException
node
- SchemaException
public void registerPrismSchemaFile(File file) throws FileNotFoundException, SchemaException
FileNotFoundException
SchemaException
public SchemaDescription loadPrismSchemaFileDescription(File file) throws FileNotFoundException, SchemaException
FileNotFoundException
SchemaException
public void registerPrismSchemasFromDirectory(File directory) throws FileNotFoundException, SchemaException
FileNotFoundException
SchemaException
public void loadPrismSchemasFromDirectory(File directory) throws FileNotFoundException, SchemaException
FileNotFoundException
SchemaException
public void loadPrismSchemaFile(File file) throws FileNotFoundException, SchemaException
FileNotFoundException
SchemaException
public void loadPrismSchemaResource(String resourcePath) throws SchemaException
SchemaException
public void initialize() throws SAXException, IOException, SchemaException
SAXException
IOException
SchemaException
public Schema getJavaxSchema()
public PrismSchema getSchema(String namespace)
public PrismSchema getObjectSchema()
public Collection<Package> getCompileTimePackages()
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
resolveEntity
in interface EntityResolver
SAXException
IOException
public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)
resolveResource
in interface LSResourceResolver
public InputSource resolveResourceUsingBuiltinResolver(String type, String namespaceURI, String publicId, String systemId, String baseURI)
public String dump()
Dumpable
public Class<?> determineCompileTimeClass(QName elementName, ComplexTypeDefinition complexTypeDefinition)
public Class<?> determineCompileTimeClass(ComplexTypeDefinition complexTypeDefinition)
public PrismSchema findSchemaByCompileTimeClass(Class<? extends Objectable> compileTimeClass)
public <T extends Objectable> PrismObjectDefinition<T> findObjectDefinitionByCompileTimeClass(Class<T> compileTimeClass)
public void applyDefinition(PrismObject<? extends Objectable> prismObject, Class<? extends Objectable> type) throws SchemaException
SchemaException
public void applyDefinition(PrismObject<? extends Objectable> prismObject, Class<? extends Objectable> type, boolean force) throws SchemaException
SchemaException
public <T extends Objectable> void applyDefinition(ObjectDelta<T> objectDelta, Class<T> type, boolean force) throws SchemaException
SchemaException
public <C extends Containerable,O extends Objectable> void applyDefinition(PrismContainerValue<C> prismContainerValue, Class<O> type, ItemPath path, boolean force) throws SchemaException
SchemaException
public <T extends Objectable> PrismObjectDefinition<T> findObjectDefinitionByType(QName typeName)
public <T extends Objectable> PrismObjectDefinition<T> findObjectDefinitionByElementName(QName elementName)
public PrismContainerDefinition findContainerDefinitionByType(QName typeName)
public PrismContainerDefinition findContainerDefinitionByElementName(QName elementName)
public ItemDefinition findItemDefinitionByElementName(QName elementName)
public PrismPropertyDefinition findPropertyDefinitionByElementName(QName elementName)
public PrismReferenceDefinition findReferenceDefinitionByElementName(QName elementName)
public ComplexTypeDefinition findComplexTypeDefinition(QName typeName)
public PrismSchema findSchemaByNamespace(String namespaceURI)
public SchemaDescription findSchemaDescriptionByNamespace(String namespaceURI)
public PrismObjectDefinition determineDefinitionFromClass(Class type)
public boolean hasImplicitTypeDefinition(QName elementName, QName typeName)
public static ItemDefinition createDefaultItemDefinition(QName itemName, PrismContext prismContext)
public ItemDefinition resolveGlobalItemDefinition(QName elementQName) throws SchemaException
SchemaException
public <T extends Objectable> PrismObject<T> instantiate(Class<T> compileTimeClass) throws SchemaException
SchemaException
Copyright © 2013 evolveum. All rights reserved.