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 Details

    • ResourceSchemaUtil

      public ResourceSchemaUtil()
  • Method Details

    • 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 as findObjectDefinitionPrecisely(ResourceType, ShadowKindType, String, QName). *BEWARE* This method is really complex. If at all possible, please consider using specific lookup methods present in ResourceSchema. Most probably we'll remove this method in the future.
      Throws:
      SchemaException
      ConfigurationException
    • 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 in ResourceSchema. Most probably we'll remove this method in the future. !!!
      Throws:
      SchemaException
      ConfigurationException
      See Also:
    • 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