Class ResourceSchemaFactory
java.lang.Object
com.evolveum.midpoint.schema.processor.ResourceSchemaFactory
The official place where resource schemas are created.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic BareResourceSchemagetBareSchema(@NotNull PrismObject<ResourceType> resource) static BareResourceSchemagetBareSchema(@NotNull ResourceType resource) static CompleteResourceSchemagetCompleteSchema(@NotNull PrismObject<ResourceType> resource) Obtains refined schema for the resource.static @Nullable CompleteResourceSchemagetCompleteSchema(@NotNull ResourceType resource) static CompleteResourceSchemagetCompleteSchema(PrismObject<ResourceType> resource, LayerType layer) Returned schema is immutable.static CompleteResourceSchemagetCompleteSchema(ResourceType resourceType, LayerType layer) static @NotNull CompleteResourceSchemagetCompleteSchemaRequired(@NotNull PrismObject<ResourceType> resource) static @NotNull CompleteResourceSchemagetCompleteSchemaRequired(@NotNull ResourceType resource) We assume that missing schema is a configuration (not schema) problem.static @NotNull ResourceSchemagetCompleteSchemaRequired(PrismObject<ResourceType> resource, LayerType layer) static @NotNull ResourceSchemagetCompleteSchemaRequired(ResourceType resource, LayerType layer) static NativeResourceSchemagetNativeSchema(@NotNull PrismObject<ResourceType> resource) Obtains "raw" schema for the resource, i.e. the one without `schemaHandling` and similar configuration.static NativeResourceSchemagetNativeSchema(@NotNull ResourceType resource) static NativeResourceSchemagetNativeSchemaRequired(PrismObject<ResourceType> resource) static NativeResourceSchemagetNativeSchemaRequired(ResourceType resource) static booleanhasParsedSchema(ResourceType resource) static BareResourceSchemanativeToBare(@Nullable NativeResourceSchema nativeResourceSchema) static CompleteResourceSchemaparseCompleteSchema(@NotNull ResourceType resource, NativeResourceSchema nativeSchema) Parses the complete schema from the provided raw schema plus definitions in the resource.static CompleteResourceSchemaparseCompleteSchema(ResourceType resource) Executes the real parsing.static @NotNull NativeResourceSchemaparseNativeSchema(@NotNull Element sourceXsdElement, String description) static @NotNull BareResourceSchemaparseNativeSchemaAsBare(@NotNull Document sourceXsdDocument) static @NotNull BareResourceSchemaparseNativeSchemaAsBare(@NotNull Element sourceXsdElement) 
- 
Constructor Details- 
ResourceSchemaFactorypublic ResourceSchemaFactory()
 
- 
- 
Method Details- 
getCompleteSchema@Nullable public static @Nullable CompleteResourceSchema getCompleteSchema(@NotNull @NotNull ResourceType resource) throws SchemaException, ConfigurationException 
- 
getCompleteSchemaRequired@NotNull public static @NotNull CompleteResourceSchema getCompleteSchemaRequired(@NotNull @NotNull ResourceType resource) throws ConfigurationException, SchemaException We assume that missing schema is a configuration (not schema) problem.
- 
getCompleteSchemaRequired@NotNull public static @NotNull CompleteResourceSchema getCompleteSchemaRequired(@NotNull @NotNull PrismObject<ResourceType> resource) throws ConfigurationException, SchemaException 
- 
getCompleteSchemapublic static CompleteResourceSchema getCompleteSchema(ResourceType resourceType, LayerType layer) throws SchemaException, ConfigurationException 
- 
getCompleteSchemaRequired@NotNull public static @NotNull ResourceSchema getCompleteSchemaRequired(PrismObject<ResourceType> resource, LayerType layer) throws SchemaException, ConfigurationException 
- 
getCompleteSchemaRequired@NotNull public static @NotNull ResourceSchema getCompleteSchemaRequired(ResourceType resource, LayerType layer) throws SchemaException, ConfigurationException 
- 
getCompleteSchemapublic static CompleteResourceSchema getCompleteSchema(@NotNull @NotNull PrismObject<ResourceType> resource) throws SchemaException, ConfigurationException Obtains refined schema for the resource. Returns null if the resource does not contain any (native) schema. If the resource does NOT contain the schema, it must be mutable. Returned schema is immutable.
- 
getCompleteSchemapublic static CompleteResourceSchema getCompleteSchema(PrismObject<ResourceType> resource, LayerType layer) throws SchemaException, ConfigurationException Returned schema is immutable. FIXME there is a lot of cloning if layer != MODEL!
- 
getNativeSchemapublic static NativeResourceSchema getNativeSchema(@NotNull @NotNull ResourceType resource) throws SchemaException - Throws:
- SchemaException
 
- 
getNativeSchemaRequiredpublic static NativeResourceSchema getNativeSchemaRequired(ResourceType resource) throws SchemaException, ConfigurationException 
- 
getNativeSchemaRequiredpublic static NativeResourceSchema getNativeSchemaRequired(PrismObject<ResourceType> resource) throws SchemaException, ConfigurationException 
- 
getBareSchemapublic static BareResourceSchema getBareSchema(@NotNull @NotNull PrismObject<ResourceType> resource) throws SchemaException - Throws:
- SchemaException
 
- 
getBareSchemapublic static BareResourceSchema getBareSchema(@NotNull @NotNull ResourceType resource) throws SchemaException - Throws:
- SchemaException
 
- 
getNativeSchemapublic static NativeResourceSchema getNativeSchema(@NotNull @NotNull PrismObject<ResourceType> resource) throws SchemaException Obtains "raw" schema for the resource, i.e. the one without `schemaHandling` and similar configuration. If the resource does NOT contain the schema, it must be mutable. The returned schema is immutable.- Throws:
- SchemaException
 
- 
hasParsedSchema
- 
parseCompleteSchema@VisibleForTesting public static CompleteResourceSchema parseCompleteSchema(ResourceType resource) throws SchemaException, ConfigurationException Executes the real parsing. Returns complete schema (raw + refined). Normally internal to this class, but may be called externally from the test code. DO NOT call it directly from the production code. The returned schema is NOT immutable here, but we want to ensure immutability throughout the running system. UsegetCompleteSchema(PrismObject)instead.
- 
parseCompleteSchema@Contract("_, null -> null; _, !null -> !null") public static CompleteResourceSchema parseCompleteSchema(@NotNull @NotNull ResourceType resource, NativeResourceSchema nativeSchema) throws SchemaException, ConfigurationException Parses the complete schema from the provided raw schema plus definitions in the resource.
- 
parseNativeSchema@NotNull public static @NotNull NativeResourceSchema parseNativeSchema(@NotNull @NotNull Element sourceXsdElement, String description) throws SchemaException - Throws:
- SchemaException
 
- 
parseNativeSchemaAsBare@TestOnly @NotNull public static @NotNull BareResourceSchema parseNativeSchemaAsBare(@NotNull @NotNull Document sourceXsdDocument) throws SchemaException - Throws:
- SchemaException
 
- 
parseNativeSchemaAsBare@TestOnly @NotNull public static @NotNull BareResourceSchema parseNativeSchemaAsBare(@NotNull @NotNull Element sourceXsdElement) throws SchemaException - Throws:
- SchemaException
 
- 
nativeToBare@Contract("null -> null; !null -> !null") public static BareResourceSchema nativeToBare(@Nullable @Nullable NativeResourceSchema nativeResourceSchema) throws SchemaException - Throws:
- SchemaException
 
 
-