Class ResourceSchemaUtil
- java.lang.Object
-
- com.evolveum.midpoint.schema.processor.ResourceSchemaUtil
-
public class ResourceSchemaUtil extends Object
Various utility methods related to resource schema handling, including sophisticated object definition lookup.
-
-
Constructor Summary
Constructors Constructor Description ResourceSchemaUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull ResourceObjectDefinition
addOwnAuxiliaryObjectClasses(@NotNull ResourceObjectDefinition objectDefinition, @NotNull ResourceSchema resourceSchema)
static @Nullable ResourceObjectDefinition
findDefinitionForBulkOperation(@NotNull ResourceType resource, @Nullable ShadowKindType kind, @Nullable String intent, @Nullable QName objectClassName)
Looks up appropriate definition for "bulk operation" i.e.static ResourceObjectDefinition
findObjectDefinitionPrecisely(@NotNull ResourceType resource, @Nullable ShadowKindType kind, @Nullable String intent, @Nullable QName objectClassName)
Determines object type/class definition in a precise way.static boolean
isIgnored(ResourceAttributeDefinitionType attrDefBean)
TEMPORARY
-
-
-
Method Detail
-
findDefinitionForBulkOperation
@Nullable public static @Nullable ResourceObjectDefinition findDefinitionForBulkOperation(@NotNull @NotNull ResourceType resource, @Nullable @Nullable ShadowKindType kind, @Nullable @Nullable String intent, @Nullable @Nullable QName objectClassName) throws SchemaException, ConfigurationException
Looks up appropriate definition for "bulk operation" i.e. operation that is executed for given kind/intent/objectclass on given resource. Currently, this is the same asfindObjectDefinitionPrecisely(ResourceType, ShadowKindType, String, QName)
. *BEWARE* This method is really complex. If at all possible, please consider using specific lookup methods present inResourceSchema
. Most probably we'll remove this method in the future.
-
findObjectDefinitionPrecisely
@Contract(" _, null, null, null -> null; _, _, _, !null -> !null; _, !null, !null, _ -> !null; _, null, !null, _ -> fail") public static ResourceObjectDefinition findObjectDefinitionPrecisely(@NotNull @NotNull ResourceType resource, @Nullable @Nullable ShadowKindType kind, @Nullable @Nullable String intent, @Nullable @Nullable QName objectClassName) throws SchemaException, ConfigurationException
Determines object type/class definition in a precise way. The decision is based on kind/intent/objectclass triple, and later enriched by aux object class names. Basic schema is: . No kind, intent, nor object class is present: No definition (the `null` value) is returned. . Kind is not present -> the decision is based on the object class name: .. if there is a type definition (for given object class name) marked as "default for object class", it is returned; .. otherwise, the object class definition (refined, if there's any; raw otherwise) is returned. . Kind is present: .. if intent is specified, then the type definition for given kind/intent is found (and its object class is checked for equality with the specified one, if there's any); .. if no intent is specified, then "default for kind" definition is looked for. !!! *BEWARE* This method is really complex. If at all possible, please consider using specific lookup methods present inResourceSchema
. Most probably we'll remove this method in the future. !!!- Throws:
SchemaException
ConfigurationException
- See Also:
ResourceObjectDefinitionResolver.findObjectDefinition(ResourceSchema, ShadowKindType, String, QName)
,ResourceSchema.findDefinitionForObjectClass(QName)
-
addOwnAuxiliaryObjectClasses
@NotNull public static @NotNull ResourceObjectDefinition addOwnAuxiliaryObjectClasses(@NotNull @NotNull ResourceObjectDefinition objectDefinition, @NotNull @NotNull ResourceSchema resourceSchema)
-
isIgnored
public static boolean isIgnored(ResourceAttributeDefinitionType attrDefBean) throws SchemaException
TEMPORARY- Throws:
SchemaException
-
-