Interface ResourceObjectDefinition
- All Superinterfaces:
AssociationDefinitionStore,AttributeDefinitionStore,Cloneable,ComplexTypeDefinition,DebugDumpable,Definition,Freezable,IdentifiersDefinitionStore,LayeredDefinition,LocalItemDefinitionStore,PrismContextSensitive,Revivable,Serializable,SmartVisitable<Definition>,TypeDefinition,Visitable<Definition>
- All Known Subinterfaces:
CompositeObjectDefinition,CompositeObjectDefinitionDelegator,MutableResourceObjectClassDefinition,ResourceObjectClassDefinition,ResourceObjectClassDefinitionDelegator,ResourceObjectDefinitionDelegator,ResourceObjectTypeDefinition,ResourceObjectTypeDefinitionDelegator
- All Known Implementing Classes:
AbstractResourceObjectDefinitionImpl,CompositeObjectDefinitionImpl,ResourceObjectClassDefinitionImpl,ResourceObjectTypeDefinitionImpl,TransformableComplexTypeDefinition.TrCompositeObjectDefinition,TransformableComplexTypeDefinition.TrResourceObjectClassDefinition,TransformableComplexTypeDefinition.TrResourceObjectDefinition,TransformableComplexTypeDefinition.TrResourceObjectTypeDefinition
public interface ResourceObjectDefinition
extends ComplexTypeDefinition, IdentifiersDefinitionStore, AttributeDefinitionStore, AssociationDefinitionStore, LayeredDefinition
A definition that describes either an object class (as fetched from the resource, optionally refined by `schemaHandling`),
or an object type (as defined in `schemaHandling` part of resource definition).
It is used as a common interface to both "raw" and "refined" definitions. (Raw definitions are used e.g. in cases
when there is no `schemaHandling` for given object class, or for the resource as a whole.)
Note: Before midPoint 4.5, this interface was known as `ObjectClassComplexTypeDefinition`.
So the hierarchy was:
ComplexTypeDefinition
^
|
ObjectClassComplexTypeDefinition
^
|
RefinedObjectClassDefinition
Now the hierarchy is like this:
ComplexTypeDefinition
^
|
ResourceObjectDefinition
^
|
+------------------+-------------------+
| |
ResourceObjectClassDefinition ResourceObjectTypeDefinition
This change eliminates e.g. the need to create "artificial" refined object class definitions just to allow
model and provisioning modules to work with object classes not described in schema handling. (Confusion stemmed
e.g. from the fact that `RefinedObjectClassDefinition` had to have kind/intent. This is now fixed.)
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescription@NotNull ResourceObjectDefinitionclone()Returns a mutable definition.createBlankShadow(String resourceOid, String tag) Creates a blankShadowTypeobject, with the attributes container having appropriate definition.@NotNull ObjectQuerycreateShadowSearchQuery(String resourceOid) Creates a query for obtaining shadows related to this object class or object type.@NotNull ResourceObjectDefinitiondeepClone(@NotNull DeepCloneOperation operation) Returns a mutable definition.@NotNull ResourceObjectDefinitionforLayerImmutable(@NotNull LayerType layer) AsforLayerMutable(LayerType)but returns immutable definition.@NotNull ResourceObjectDefinitionforLayerMutable(@NotNull LayerType layer) Creates a layer-specific mutable version of this definition.default ResourceBidirectionalMappingTypeTODO Rarely used, consider removing from the interfacedefault @Nullable AttributeFetchStrategyTypegetActivationFetchStrategy(ItemName itemName) TODO Rarely used, consider removing from the interface@NotNull Collection<ResourceObjectDefinition>TODO define semantics (it's different forCompositeObjectDefinitionand the others!The definition of base context (resource object container).Returns the names of auxiliary object classes that are "statically" defined for this object type (or object class, in the future).Return a human readable name of this class suitable for logs.Returns the phases in which inbound mappings are evaluated by default.@NotNull ResourceObjectTypeDefinitionTypeReturns the "raw" configuration bean for this object type.@NotNull ResourceObjectTypeDelineationReturns the delineation of the set of objects belonging to this object type.Free-form textual description of the object.default @Nullable ResourceAttributeDefinition<?>Returns the definition of description attribute of a resource object.@Nullable QNameReturns name of the description attribute.default ResourceAttributeDefinition<?>Returns the definition of display name attribute.@Nullable QNameReturns name of the display name attribute.<T extends CapabilityType>
TgetEnabledCapability(@NotNull Class<T> capabilityClass, ResourceType resource) Checks the presence of capability in: 1.TODO@Nullable StringWhat lifecycle state is the (refined) object class or object type definition? Raw object class definition should always return `null` here.default @Nullable ResourceAttributeDefinition<?>Returns the attribute used as a visible name of the resource object.@Nullable QNameReturns name of the naming attribute.@NotNull ResourceObjectClassDefinitionReturns the (raw or refined) object class definition.@NotNull QNameReturns the name of the object class.@Nullable ResourcePasswordDefinitionTypedefault @Nullable AttributeFetchStrategyTypeTODO Rarely used, consider removing from the interfacedefault @NotNull List<MappingType>default @NotNull List<MappingType>Returns a prism definition for the prism object/objects carrying the resource object/objects.@NotNull Collection<ResourceObjectPattern>Returns compiled patterns denoting protected objects.@NotNull ResourceObjectClassDefinitionReturns the raw object class definition.This is currently used only to pass information about association in the model-impl TODO consider removal!Definition of search hierarchy scope.@Nullable ResourceObjectTypeDefinitionIs this definition bound to a specific resource type? If yes, this method returns its definition.@Nullable ResourceObjectTypeIdentificationIs this definition bound to a specific resource type? If yes, this method returns its identification.@NotNull ResourceObjectVolatilityTypeSpecifies volatility of this type of resource objects, i.e.booleanhasAuxiliaryObjectClass(QName expectedObjectClassName) TODO define semantics (it's different forCompositeObjectDefinitionand the others!default ResourceAttributeContainerinstantiate(ItemName itemName) Creates aResourceAttributeContainerinstance with this definition as its complex type definition.booleanisDefaultFor(@NotNull ShadowKindType kind) Returns true if this definition can be considered as a default for the specified kind.default booleanmatchesObjectClassName(@Nullable QName name) Returns true if the type definition matches specified object class name.default voidreplaceDefinition(@NotNull ItemDefinition<?> newDefinition) voidreplaceDefinition(@NotNull QName itemName, @Nullable ItemDefinition<?> newDefinition) Replaces a definition for given item name with a provided one.CreatesResourceAttributeContainerDefinitionwith this definition as a complex type definition.toResourceAttributeContainerDefinition(QName elementName) CreatesResourceAttributeContainerDefinition(with given item name) with this definition as a complex type definition.voidvalidate()Executes some basic checks on this object type.Methods inherited from interface com.evolveum.midpoint.schema.processor.AssociationDefinitionStore
findAssociationDefinition, findAssociationDefinitionRequired, getAssociationDefinitions, getAssociationDefinitions, getNamesOfAssociations, getNamesOfAssociationsWithInboundExpressions, getNamesOfAssociationsWithOutboundExpressionsMethods inherited from interface com.evolveum.midpoint.schema.processor.AttributeDefinitionStore
containsAttributeDefinition, findAttributeDefinition, findAttributeDefinition, findAttributeDefinition, findAttributeDefinitionRequired, findAttributeDefinitionRequired, findAttributeDefinitionStrictlyRequired, findAttributeDefinitionStrictlyRequired, getAttributeDefinitions, getAttributeDefinitions, getNamesOfAttributesWithInboundExpressions, getNamesOfAttributesWithOutboundExpressions, hasIndexOnlyAttributes, propertyToAttributeMethods inherited from interface com.evolveum.midpoint.prism.ComplexTypeDefinition
getDefaultNamespace, getDefinitions, getExtensionForType, getIgnoredNamespaces, getXmlAttributeDefinitions, hasOperationalOnlyItems, hasSubstitutions, hasSubstitutions, isContainerMarker, isEmpty, isItemDefinitionRemoved, isListMarker, isObjectMarker, isReferenceMarker, isStrictAnyMarker, isXsdAnyMarker, itemOrSubstitution, merge, substitution, toMutable, trimToMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getAnnotation, getAnnotations, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getRemovedSince, getSchemaMigrations, getSchemaRegistry, getTypeClass, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRemoved, isRuntimeSchema, setAnnotationMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.schema.processor.IdentifiersDefinitionStore
getAllIdentifiers, getPrimaryIdentifierRequired, getPrimaryIdentifiers, getPrimaryIdentifiersNames, getSecondaryIdentifiers, getSecondaryIdentifiersNames, isIdentifier, isPrimaryIdentifier, isSecondaryIdentifierMethods inherited from interface com.evolveum.midpoint.schema.processor.LayeredDefinition
getCurrentLayerMethods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findContainerDefinition, findItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinitionMethods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContextMethods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
acceptMethods inherited from interface com.evolveum.midpoint.prism.TypeDefinition
canRepresent, getCompileTimeClass, getInstantiationOrder, getStaticSubTypes, getSuperType, isAssignableFrom
-
Method Details
-
getObjectClassDefinition
Returns the (raw or refined) object class definition. It is either this object itself (for object classes), or the linked object class definition (for object types). -
getRawObjectClassDefinition
Returns the raw object class definition. -
getObjectClassName
Returns the name of the object class. -
getConfiguredAuxiliaryObjectClassNames
Returns the names of auxiliary object classes that are "statically" defined for this object type (or object class, in the future). For dynamically composed definitions (CompositeObjectDefinitiononly the statically-defined ones (i.e. those from the structural definition) are returned. -
getAuxiliaryDefinitions
TODO define semantics (it's different forCompositeObjectDefinitionand the others! -
hasAuxiliaryObjectClass
TODO define semantics (it's different forCompositeObjectDefinitionand the others! -
getDescription
String getDescription()Free-form textual description of the object. It is supposed to describe the object or a construct that it is attached to. -
getDescriptionAttribute
Returns the definition of description attribute of a resource object. Returns null if there is no description attribute. The exception should be never thrown unless there is some bug in the code. The validation of model consistency should be done at the time of schema parsing. NOTE: Currently seems to be not used. (Neither not set nor used.) -
getDescriptionAttributeName
Returns name of the description attribute.- See Also:
-
getNamingAttribute
Returns the attribute used as a visible name of the resource object. -
getNamingAttributeName
Returns name of the naming attribute.- See Also:
-
getDisplayNameAttribute
Returns the definition of display name attribute. Display name attribute specifies which resource attribute should be used as title when displaying objects of a specific resource object class. It must point to an attribute of String type. If not present, primary identifier should be used instead (but this method does not handle this default behavior). Returns null if there is no display name attribute. The exception should be never thrown unless there is some bug in the code. The validation of model consistency should be done at the time of schema parsing. NOTE: Currently seems to be not used. (Neither not set nor used.) -
getDisplayNameAttributeName
Returns name of the display name attribute.- See Also:
-
getDelineation
Returns the delineation of the set of objects belonging to this object type. Note that this tells only about information stored right in the definition bean, i.e. legacy configuration is not provided here. The complete picture is provided bySynchronizationPolicy.getDelineation(). -
getBaseContext
ResourceObjectReferenceType getBaseContext()The definition of base context (resource object container). This object will be used as a base for searches for objects of this type. -
getSearchHierarchyScope
SearchHierarchyScope getSearchHierarchyScope()Definition of search hierarchy scope. It specifies how "deep" the search should go into the object hierarchy. -
getProtectedObjectPatterns
Returns compiled patterns denoting protected objects. -
getAuxiliaryObjectClassMappings
ResourceBidirectionalMappingAndDefinitionType getAuxiliaryObjectClassMappings() -
getSecurityPolicyRef
ObjectReferenceType getSecurityPolicyRef() -
getObjectMultiplicity
ResourceObjectMultiplicityType getObjectMultiplicity() -
getProjectionPolicy
ProjectionPolicyType getProjectionPolicy() -
getPasswordDefinition
-
getPasswordFetchStrategy
TODO Rarely used, consider removing from the interface -
getPasswordInbound
-
getPasswordOutbound
-
getActivationSchemaHandling
ResourceActivationDefinitionType getActivationSchemaHandling() -
getActivationBidirectionalMappingType
TODO Rarely used, consider removing from the interface -
getActivationFetchStrategy
@Nullable default @Nullable AttributeFetchStrategyType getActivationFetchStrategy(ItemName itemName) TODO Rarely used, consider removing from the interface -
getVolatility
Specifies volatility of this type of resource objects, i.e. whether such an object can change when midPoint is not looking. -
getDefaultInboundMappingEvaluationPhases
@Nullable @Nullable DefaultInboundMappingEvaluationPhasesType getDefaultInboundMappingEvaluationPhases()Returns the phases in which inbound mappings are evaluated by default. -
getLifecycleState
What lifecycle state is the (refined) object class or object type definition? Raw object class definition should always return `null` here. -
createShadowSearchQuery
Creates a query for obtaining shadows related to this object class or object type. The current implementations return either: - a combination of resource OID + object class name, or - a combination of resource OID + kind + intent.- Throws:
SchemaException
-
createBlankShadow
Creates a blankShadowTypeobject, with the attributes container having appropriate definition. -
getPrismObjectDefinition
PrismObjectDefinition<ShadowType> getPrismObjectDefinition()Returns a prism definition for the prism object/objects carrying the resource object/objects. -
toResourceAttributeContainerDefinition
CreatesResourceAttributeContainerDefinitionwith this definition as a complex type definition. -
toResourceAttributeContainerDefinition
default ResourceAttributeContainerDefinition toResourceAttributeContainerDefinition(QName elementName) CreatesResourceAttributeContainerDefinition(with given item name) with this definition as a complex type definition. -
instantiate
Creates aResourceAttributeContainerinstance with this definition as its complex type definition. -
getEnabledCapability
<T extends CapabilityType> T getEnabledCapability(@NotNull @NotNull Class<T> capabilityClass, ResourceType resource) Checks the presence of capability in: 1. resource object definition (applicable only to resource object _type_ definitions), 2. additional connectors in resource (only if enabled there), 3. the main connector. Returns the present capability, but only if it's enabled. -
validate
Executes some basic checks on this object type. Moved from `validateObjectClassDefinition()` method inResourceTypeUtil. TODO review this method- Throws:
SchemaException
-
getDebugDumpClassName
String getDebugDumpClassName()Return a human readable name of this class suitable for logs. -
getHumanReadableName
String getHumanReadableName()TODO -
clone
Returns a mutable definition. BEWARE, the mutableCompositeObjectDefinitionis significantly slower than its immutable counterpart. See MID-9156.- Specified by:
clonein interfaceComplexTypeDefinition- Specified by:
clonein interfaceDefinition
-
deepClone
@NotNull @NotNull ResourceObjectDefinition deepClone(@NotNull @NotNull DeepCloneOperation operation) Returns a mutable definition. BEWARE, the mutableCompositeObjectDefinitionis significantly slower than its immutable counterpart. See MID-9156.- Specified by:
deepClonein interfaceComplexTypeDefinition
-
getDefinitionBean
Returns the "raw" configuration bean for this object type. -
forLayerMutable
Creates a layer-specific mutable version of this definition. -
forLayerImmutable
AsforLayerMutable(LayerType)but returns immutable definition. -
replaceDefinition
void replaceDefinition(@NotNull @NotNull QName itemName, @Nullable @Nullable ItemDefinition<?> newDefinition) Replaces a definition for given item name with a provided one. -
replaceDefinition
-
getResourceOid
String getResourceOid()This is currently used only to pass information about association in the model-impl TODO consider removal! -
matchesObjectClassName
Returns true if the type definition matches specified object class name. OC name of `null` matches all definitions. -
getTypeIdentification
Is this definition bound to a specific resource type? If yes, this method returns its identification. -
getTypeDefinition
Is this definition bound to a specific resource type? If yes, this method returns its definition. -
isDefaultFor
Returns true if this definition can be considered as a default for the specified kind. Normally, for a type definition it means that it is marked as "default for a kind" and has the specified kind. But there is a special case ofResourceObjectClassDefinitionwithResourceObjectClassDefinition.isDefaultAccountDefinition()being `true`. It is considered to be the default forShadowKindType.ACCOUNT. Use with care!
-