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
,MutableResourceObjectClassDefinition
,ResourceObjectClassDefinition
,ResourceObjectDefinitionDelegator
,ResourceObjectTypeDefinition
- All Known Implementing Classes:
AbstractResourceObjectDefinitionImpl
,CompositeObjectDefinitionImpl
,ResourceObjectClassDefinitionImpl
,ResourceObjectTypeDefinitionImpl
,TransformableComplexTypeDefinition.TrResourceObjectDefinition
public interface ResourceObjectDefinition extends ComplexTypeDefinition, IdentifiersDefinitionStore, AttributeDefinitionStore, AssociationDefinitionStore, LayeredDefinition
Definition that describes either an object class (as fetched from the resource), 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. (E.g. in cases when there is no `schemaHandling` for given object class, or globally.) 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 ResourceObjectDefinition
clone()
Does a shallow clone of this definition (i.e.PrismObject<ShadowType>
createBlankShadow(String resourceOid, String tag)
Creates a blankShadowType
object, with the attributes container having appropriate definition.@NotNull ObjectQuery
createShadowSearchQuery(String resourceOid)
Creates a query for obtaining shadows related to this object class or object type.@NotNull ResourceObjectDefinition
deepClone(@NotNull DeepCloneOperation operation)
Does a deep clone of this definition.ResourceObjectDefinition
forLayer(@NotNull LayerType layer)
Creates a layer-specific version of this definition.default ResourceBidirectionalMappingType
getActivationBidirectionalMappingType(ItemName itemName)
TODO Rarely used, consider removing from the interfacedefault @Nullable AttributeFetchStrategyType
getActivationFetchStrategy(ItemName itemName)
TODO Rarely used, consider removing from the interfaceResourceActivationDefinitionType
getActivationSchemaHandling()
@NotNull Collection<ResourceObjectDefinition>
getAuxiliaryDefinitions()
TODO define semantics (it's different forCompositeObjectDefinition
and the others!ResourceBidirectionalMappingAndDefinitionType
getAuxiliaryObjectClassMappings()
ResourceObjectReferenceType
getBaseContext()
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).@Nullable CapabilitiesType
getConfiguredCapabilities()
Returns configured capabilities for given refined object class definition.String
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.@Nullable DefaultInboundMappingEvaluationPhasesType
getDefaultInboundMappingEvaluationPhases()
Returns the phases in which inbound mappings are evaluated by default.String
getDescription()
Free-form textual description of the object.default @Nullable ResourceAttributeDefinition<?>
getDescriptionAttribute()
Returns the definition of description attribute of a resource object.@Nullable QName
getDescriptionAttributeName()
Returns name of the description attribute.default ResourceAttributeDefinition<?>
getDisplayNameAttribute()
Returns the definition of display name attribute.@Nullable QName
getDisplayNameAttributeName()
Returns name of the display name attribute.<T extends CapabilityType>
TgetEffectiveCapability(Class<T> capabilityClass, ResourceType resource)
TODOString
getHumanReadableName()
TODOdefault @Nullable ResourceAttributeDefinition<?>
getNamingAttribute()
Returns the attribute used as a visible name of the resource object.@Nullable QName
getNamingAttributeName()
Returns name of the naming attribute.@NotNull ResourceObjectClassDefinition
getObjectClassDefinition()
Returns the object class definition.@NotNull QName
getObjectClassName()
Returns the name of the object class.ResourceObjectMultiplicityType
getObjectMultiplicity()
default PagedSearchCapabilityType
getPagedSearches(ResourceType resource)
@Nullable ResourcePasswordDefinitionType
getPasswordDefinition()
default @Nullable AttributeFetchStrategyType
getPasswordFetchStrategy()
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.ProjectionPolicyType
getProjectionPolicy()
@NotNull Collection<ResourceObjectPattern>
getProtectedObjectPatterns()
Returns compiled patterns denoting protected objects.String
getResourceOid()
This is currently used only to pass information about association in the model-impl TODO consider removal!SearchHierarchyScope
getSearchHierarchyScope()
Definition of search hierarchy scope.ObjectReferenceType
getSecurityPolicyRef()
@NotNull ResourceObjectVolatilityType
getVolatility()
Specifies volatility of this type of resource objects, i.e.boolean
hasAuxiliaryObjectClass(QName expectedObjectClassName)
TODO define semantics (it's different forCompositeObjectDefinition
and the others!default ResourceAttributeContainer
instantiate(ItemName itemName)
Creates aResourceAttributeContainer
instance with this definition as its complex type definition.default boolean
isObjectCountingEnabled(ResourceType resourceType)
default boolean
isPagedSearchEnabled(ResourceType resourceType)
default boolean
matchesObjectClassName(@Nullable QName name)
Returns true if the type definition matches specified object class name.default void
replaceDefinition(@NotNull ItemDefinition<?> newDefinition)
void
replaceDefinition(@NotNull QName itemName, @Nullable ItemDefinition<?> newDefinition)
Replaces a definition for given item name with a provided one.default ResourceAttributeContainerDefinition
toResourceAttributeContainerDefinition()
CreatesResourceAttributeContainerDefinition
with this definition as a complex type definition.default ResourceAttributeContainerDefinition
toResourceAttributeContainerDefinition(QName elementName)
CreatesResourceAttributeContainerDefinition
(with given item name) with this definition as a complex type definition.-
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, hasSubstitutions, hasSubstitutions, isContainerMarker, isEmpty, 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, getTypeClassIfKnown, 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, 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 object class definition. It is either this object itself, or the linked definition (for object type).
-
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 (CompositeObjectDefinition
only the statically-defined ones (i.e. those from the structural definition) are returned. TODO
-
getAuxiliaryDefinitions
@NotNull @NotNull Collection<ResourceObjectDefinition> getAuxiliaryDefinitions()
TODO define semantics (it's different forCompositeObjectDefinition
and the others!
-
hasAuxiliaryObjectClass
boolean hasAuxiliaryObjectClass(QName expectedObjectClassName)
TODO define semantics (it's different forCompositeObjectDefinition
and 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()
-
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.- See Also:
ResourceObjectTypeDefinitionType#getInboundMappingsEvaluation()
-
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 blankShadowType
object, 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()
CreatesResourceAttributeContainerDefinition
with 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 aResourceAttributeContainer
instance with this definition as its complex type definition.
-
getConfiguredCapabilities
@Nullable @Nullable CapabilitiesType getConfiguredCapabilities()
Returns configured capabilities for given refined object class definition. Returned object is freely modifiable copy of the original information.
-
getEffectiveCapability
<T extends CapabilityType> T getEffectiveCapability(Class<T> capabilityClass, ResourceType resource)
TODO
-
getPagedSearches
default PagedSearchCapabilityType getPagedSearches(ResourceType resource)
-
isPagedSearchEnabled
default boolean isPagedSearchEnabled(ResourceType resourceType)
-
isObjectCountingEnabled
default boolean isObjectCountingEnabled(ResourceType resourceType)
-
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:ComplexTypeDefinition
Does a shallow clone of this definition (i.e. item definitions themselves are NOT cloned).- Specified by:
clone
in interfaceComplexTypeDefinition
- Specified by:
clone
in interfaceDefinition
-
deepClone
@NotNull @NotNull ResourceObjectDefinition deepClone(@NotNull @NotNull DeepCloneOperation operation)
Description copied from interface:ComplexTypeDefinition
Does a deep clone of this definition.- Specified by:
deepClone
in interfaceComplexTypeDefinition
-
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.
-
-