Class ResourceSchemaFactory
java.lang.Object
com.evolveum.midpoint.schema.processor.ResourceSchemaFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceSchema
getCompleteSchema
(@NotNull PrismObject<ResourceType> resource) Obtains refined schema for the resource.static ResourceSchema
getCompleteSchema
(@NotNull ResourceType resource) static ResourceSchema
getCompleteSchema
(PrismObject<ResourceType> resource, LayerType layer) Returned schema is immutable.static ResourceSchema
getCompleteSchema
(ResourceType resourceType, LayerType layer) static @NotNull ResourceSchema
getCompleteSchemaRequired
(@NotNull ResourceType resource) We assume that missing schema is a configuration (not schema) problem.static @NotNull ResourceSchema
getCompleteSchemaRequired
(PrismObject<ResourceType> resource, LayerType layer) static @NotNull ResourceSchema
getCompleteSchemaRequired
(ResourceType resource, LayerType layer) static ResourceSchema
getRawSchema
(@NotNull PrismObject<ResourceType> resource) Obtains "raw" schema for the resource, i.e. the one without `schemaHandling` and similar configuration.static ResourceSchema
getRawSchema
(@NotNull ResourceType resource) static ResourceSchema
getRawSchemaRequired
(ResourceType resource) static boolean
hasParsedSchema
(ResourceType resource) static ResourceSchema
parseCompleteSchema
(ResourceType resource) Executes the real parsing.
-
Constructor Details
-
ResourceSchemaFactory
public ResourceSchemaFactory()
-
-
Method Details
-
getCompleteSchema
public static ResourceSchema getCompleteSchema(@NotNull @NotNull ResourceType resource) throws SchemaException, ConfigurationException -
getCompleteSchemaRequired
@NotNull public static @NotNull ResourceSchema getCompleteSchemaRequired(@NotNull @NotNull ResourceType resource) throws ConfigurationException, SchemaException We assume that missing schema is a configuration (not schema) problem. -
getCompleteSchema
public static ResourceSchema 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 -
getCompleteSchema
public static ResourceSchema getCompleteSchema(@NotNull @NotNull PrismObject<ResourceType> resource) throws SchemaException, ConfigurationException Obtains refined schema for the resource. Returns null if the resource does not contain any (raw) schema. If the resource does NOT contain the schema, it must be mutable. Returned schema is immutable. -
getCompleteSchema
public static ResourceSchema getCompleteSchema(PrismObject<ResourceType> resource, LayerType layer) throws SchemaException, ConfigurationException Returned schema is immutable. FIXME there is a lot of cloning if layer != MODEL! -
getRawSchema
public static ResourceSchema getRawSchema(@NotNull @NotNull ResourceType resource) throws SchemaException - Throws:
SchemaException
-
getRawSchemaRequired
public static ResourceSchema getRawSchemaRequired(ResourceType resource) throws SchemaException, ConfigurationException -
getRawSchema
public static ResourceSchema getRawSchema(@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 ResourceSchema 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 schema is NOT immutable here, but we want to ensure immutability throughout the running system. UsegetCompleteSchema(PrismObject)
instead.
-