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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull ResourceObjectDefinitionclone()Does a shallow clone of this definition (i.e.PrismObject<ShadowType>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)Does a deep clone of this definition.ResourceObjectDefinitionforLayer(@NotNull LayerType layer)Creates a layer-specific version of this definition.default ResourceBidirectionalMappingTypegetActivationBidirectionalMappingType(ItemName itemName)TODO Rarely used, consider removing from the interfacedefault @Nullable AttributeFetchStrategyTypegetActivationFetchStrategy(ItemName itemName)TODO Rarely used, consider removing from the interfaceResourceActivationDefinitionTypegetActivationSchemaHandling()@NotNull Collection<ResourceObjectDefinition>getAuxiliaryDefinitions()TODO define semantics (it's different forCompositeObjectDefinitionand the others!ResourceBidirectionalMappingAndDefinitionTypegetAuxiliaryObjectClassMappings()ResourceObjectReferenceTypegetBaseContext()The definition of base context (resource object container).Collection<QName>getConfiguredAuxiliaryObjectClassNames()Returns the names of auxiliary object classes that are "statically" defined for this object type (or object class, in the future).StringgetDebugDumpClassName()Return a human readable name of this class suitable for logs.@Nullable DefaultInboundMappingEvaluationPhasesTypegetDefaultInboundMappingEvaluationPhases()Returns the phases in which inbound mappings are evaluated by default.@NotNull ResourceObjectTypeDefinitionTypegetDefinitionBean()Returns the "raw" configuration bean for this object type.@NotNull ResourceObjectTypeDelineationgetDelineation()Returns the delineation of the set of objects belonging to this object type.StringgetDescription()Free-form textual description of the object.default @Nullable ResourceAttributeDefinition<?>getDescriptionAttribute()Returns the definition of description attribute of a resource object.@Nullable QNamegetDescriptionAttributeName()Returns name of the description attribute.default ResourceAttributeDefinition<?>getDisplayNameAttribute()Returns the definition of display name attribute.@Nullable QNamegetDisplayNameAttributeName()Returns name of the display name attribute.<T extends CapabilityType>
TgetEnabledCapability(@NotNull Class<T> capabilityClass, ResourceType resource)Checks the presence of capability in: 1.StringgetHumanReadableName()TODO@Nullable StringgetLifecycleState()What lifecycle state is the (refined) object class or object type definition? Raw object class definition should always return `null` here.default @Nullable ResourceAttributeDefinition<?>getNamingAttribute()Returns the attribute used as a visible name of the resource object.@Nullable QNamegetNamingAttributeName()Returns name of the naming attribute.@NotNull ResourceObjectClassDefinitiongetObjectClassDefinition()Returns the (raw or refined) object class definition.@NotNull QNamegetObjectClassName()Returns the name of the object class.ResourceObjectMultiplicityTypegetObjectMultiplicity()@Nullable ResourcePasswordDefinitionTypegetPasswordDefinition()default @Nullable AttributeFetchStrategyTypegetPasswordFetchStrategy()TODO Rarely used, consider removing from the interfacedefault @NotNull List<MappingType>getPasswordInbound()default @NotNull List<MappingType>getPasswordOutbound()PrismObjectDefinition<ShadowType>getPrismObjectDefinition()Returns a prism definition for the prism object/objects carrying the resource object/objects.ProjectionPolicyTypegetProjectionPolicy()@NotNull Collection<ResourceObjectPattern>getProtectedObjectPatterns()Returns compiled patterns denoting protected objects.@NotNull ResourceObjectClassDefinitiongetRawObjectClassDefinition()Returns the raw object class definition.StringgetResourceOid()This is currently used only to pass information about association in the model-impl TODO consider removal!SearchHierarchyScopegetSearchHierarchyScope()Definition of search hierarchy scope.ObjectReferenceTypegetSecurityPolicyRef()@Nullable ResourceObjectTypeDefinitiongetTypeDefinition()Is this definition bound to a specific resource type? If yes, this method returns its definition.@Nullable ResourceObjectTypeIdentificationgetTypeIdentification()Is this definition bound to a specific resource type? If yes, this method returns its identification.@NotNull ResourceObjectVolatilityTypegetVolatility()Specifies 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.default ResourceAttributeContainerDefinitiontoResourceAttributeContainerDefinition()CreatesResourceAttributeContainerDefinitionwith this definition as a complex type definition.default ResourceAttributeContainerDefinitiontoResourceAttributeContainerDefinition(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, getNamesOfAssociationsWithOutboundExpressions
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.AttributeDefinitionStore
containsAttributeDefinition, findAttributeDefinition, findAttributeDefinition, findAttributeDefinition, findAttributeDefinitionRequired, findAttributeDefinitionRequired, findAttributeDefinitionStrictlyRequired, findAttributeDefinitionStrictlyRequired, getAttributeDefinitions, getAttributeDefinitions, getNamesOfAttributesWithInboundExpressions, getNamesOfAttributesWithOutboundExpressions, hasIndexOnlyAttributes
-
Methods 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, trimTo
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getAnnotation, getAnnotations, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getSchemaMigrations, getSchemaRegistry, getTypeClass, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRuntimeSchema, setAnnotation
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.IdentifiersDefinitionStore
getAllIdentifiers, getPrimaryIdentifierRequired, getPrimaryIdentifiers, getPrimaryIdentifiersNames, getSecondaryIdentifiers, getSecondaryIdentifiersNames, isIdentifier, isPrimaryIdentifier, isSecondaryIdentifier
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.LayeredDefinition
getCurrentLayer
-
Methods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findContainerDefinition, findItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinition
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
accept
-
Methods inherited from interface com.evolveum.midpoint.prism.TypeDefinition
canRepresent, getCompileTimeClass, getInstantiationOrder, getStaticSubTypes, getSuperType, isAssignableFrom
-
-
-
-
Method Detail
-
getObjectClassDefinition
@NotNull @NotNull ResourceObjectClassDefinition 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
@NotNull @NotNull ResourceObjectClassDefinition getRawObjectClassDefinition()
Returns the raw object class definition.
-
getObjectClassName
@NotNull @NotNull QName getObjectClassName()
Returns the name of the object class.
-
getConfiguredAuxiliaryObjectClassNames
@Experimental Collection<QName> 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
@NotNull @NotNull Collection<ResourceObjectDefinition> getAuxiliaryDefinitions()
TODO define semantics (it's different forCompositeObjectDefinitionand the others!
-
hasAuxiliaryObjectClass
boolean hasAuxiliaryObjectClass(QName expectedObjectClassName)
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
@Nullable default @Nullable ResourceAttributeDefinition<?> 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
@Nullable @Nullable QName getDescriptionAttributeName()
Returns name of the description attribute.- See Also:
getDescriptionAttribute()
-
getNamingAttribute
@Nullable default @Nullable ResourceAttributeDefinition<?> getNamingAttribute()
Returns the attribute used as a visible name of the resource object.
-
getNamingAttributeName
@Nullable @Nullable QName getNamingAttributeName()
Returns name of the naming attribute.- See Also:
getNamingAttributeName()
-
getDisplayNameAttribute
default ResourceAttributeDefinition<?> 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
@Nullable @Nullable QName getDisplayNameAttributeName()
Returns name of the display name attribute.- See Also:
getDisplayNameAttribute()
-
getDelineation
@NotNull @NotNull ResourceObjectTypeDelineation 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
@NotNull @NotNull Collection<ResourceObjectPattern> getProtectedObjectPatterns()
Returns compiled patterns denoting protected objects.
-
getAuxiliaryObjectClassMappings
ResourceBidirectionalMappingAndDefinitionType getAuxiliaryObjectClassMappings()
-
getSecurityPolicyRef
ObjectReferenceType getSecurityPolicyRef()
-
getObjectMultiplicity
ResourceObjectMultiplicityType getObjectMultiplicity()
-
getProjectionPolicy
ProjectionPolicyType getProjectionPolicy()
-
getPasswordDefinition
@Nullable @Nullable ResourcePasswordDefinitionType getPasswordDefinition()
-
getPasswordFetchStrategy
@Nullable default @Nullable AttributeFetchStrategyType getPasswordFetchStrategy()
TODO Rarely used, consider removing from the interface
-
getPasswordInbound
@NotNull default @NotNull List<MappingType> getPasswordInbound()
-
getPasswordOutbound
@NotNull default @NotNull List<MappingType> getPasswordOutbound()
-
getActivationSchemaHandling
ResourceActivationDefinitionType getActivationSchemaHandling()
-
getActivationBidirectionalMappingType
default ResourceBidirectionalMappingType getActivationBidirectionalMappingType(ItemName itemName)
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
@NotNull @NotNull ResourceObjectVolatilityType 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
@Nullable @Nullable String getLifecycleState()
What lifecycle state is the (refined) object class or object type definition? Raw object class definition should always return `null` here.
-
createShadowSearchQuery
@NotNull @NotNull ObjectQuery createShadowSearchQuery(String resourceOid) throws SchemaException
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
PrismObject<ShadowType> createBlankShadow(String resourceOid, String tag)
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
default ResourceAttributeContainerDefinition 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
default ResourceAttributeContainer instantiate(ItemName itemName)
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
void validate() throws SchemaExceptionExecutes 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
@NotNull @NotNull ResourceObjectDefinition clone()
Description copied from interface:ComplexTypeDefinitionDoes a shallow clone of this definition (i.e. item definitions themselves are NOT cloned).- Specified by:
clonein interfaceComplexTypeDefinition- Specified by:
clonein interfaceDefinition
-
deepClone
@NotNull @NotNull ResourceObjectDefinition deepClone(@NotNull @NotNull DeepCloneOperation operation)
Description copied from interface:ComplexTypeDefinitionDoes a deep clone of this definition.- Specified by:
deepClonein interfaceComplexTypeDefinition
-
getDefinitionBean
@NotNull @NotNull ResourceObjectTypeDefinitionType getDefinitionBean()
Returns the "raw" configuration bean for this object type. BEWARE: In the case of inherited object types, this is only the partial information. (Parts inherited from the parents are not returned.)
-
forLayer
ResourceObjectDefinition forLayer(@NotNull @NotNull LayerType layer)
Creates a layer-specific version of this definition.
-
replaceDefinition
void replaceDefinition(@NotNull @NotNull QName itemName, @Nullable @Nullable ItemDefinition<?> newDefinition)Replaces a definition for given item name with a provided one.
-
replaceDefinition
default void replaceDefinition(@NotNull @NotNull ItemDefinition<?> newDefinition)
-
getResourceOid
String getResourceOid()
This is currently used only to pass information about association in the model-impl TODO consider removal!
-
matchesObjectClassName
default boolean matchesObjectClassName(@Nullable @Nullable QName name)Returns true if the type definition matches specified object class name. OC name of `null` matches all definitions.
-
getTypeIdentification
@Nullable @Nullable ResourceObjectTypeIdentification getTypeIdentification()
Is this definition bound to a specific resource type? If yes, this method returns its identification.
-
getTypeDefinition
@Nullable @Nullable ResourceObjectTypeDefinition getTypeDefinition()
Is this definition bound to a specific resource type? If yes, this method returns its definition.
-
isDefaultFor
@Experimental boolean isDefaultFor(@NotNull @NotNull ShadowKindType kind)
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!
-
-