Interface ResourceAttributeDefinition<T>
-
- All Superinterfaces:
Cloneable
,DebugDumpable
,Definition
,Freezable
,ItemDefinition<PrismProperty<T>>
,LayeredDefinition
,PrismContextSensitive
,PrismItemAccessDefinition
,PrismPropertyDefinition<T>
,RawResourceAttributeDefinition<T>
,Revivable
,Serializable
,SmartVisitable<Definition>
,Visitable<Definition>
- All Known Subinterfaces:
AttributeDefinitionDelegator<T>
,RefinedAttributeDefinitionDelegator<T>
,ResourceAttributeWrapper<T>
- All Known Implementing Classes:
ResourceAttributeDefinitionImpl
,ResourceAttributeWrapperImpl
public interface ResourceAttributeDefinition<T> extends PrismPropertyDefinition<T>, RawResourceAttributeDefinition<T>, LayeredDefinition
Information about a resource attribute that is available from the connector and optionally refined by configuration in resource `schemaHandling` section. For clarity, the information is categorized into: - data obtainable from the resource:RawResourceAttributeDefinition
, - full information available (this interface) This class represents schema definition for resource object attribute. SeeDefinition
for more details.- See Also:
ResourceAttribute
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
PrismItemAccessDefinition.Mutable
-
-
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 boolean
canAdd(LayerType layer)
Is adding allowed (at specified layer)?boolean
canModify(LayerType layer)
Is modification allowed (at specified layer)?boolean
canRead(LayerType layer)
Is reading allowed (at specified layer)?@NotNull ResourceAttributeDefinition<T>
clone()
String
debugDump(int indent, LayerType layer)
Provides a debug dump respective to the given layer.ResourceAttributeDefinition<T>
deepClone(@NotNull DeepCloneOperation operation)
TODO document@NotNull ResourceAttributeDefinition<T>
forLayer(@NotNull LayerType layer)
Creates a view of the current definition for a given layer.@Nullable ItemCorrelatorDefinitionType
getCorrelatorDefinition()
String
getDescription()
Gets the (configured) attribute description.AttributeFetchStrategyType
getFetchStrategy()
Returns configured fetch strategy.@NotNull List<InboundMappingType>
getInboundMappingBeans()
Gets the inbound mappings (if any).@NotNull List<String>
getIntolerantValuePatterns()
Gets patterns for values that are not "tolerated" on the resource.PropertyLimitations
getLimitations(LayerType layer)
Returns limitations (cardinality, access rights, processing) for given layer.int
getMaxOccurs(LayerType layer)
Gets `maxOccurs` limitation for given layer.int
getMinOccurs(LayerType layer)
Gets `minOccurs` limitation for given layer.Integer
getModificationPriority()
Determines the order in which this attribute should be modified (in very special cases).@Nullable MappingType
getOutboundMappingBean()
Gets the outbound mapping, if defined.ItemProcessing
getProcessing(LayerType layer)
Gets the level of processing for specified layer.RawResourceAttributeDefinition<T>
getRawAttributeDefinition()
Gets the original (raw) attribute definition.Boolean
getReadReplaceMode()
Should be this attribute modified solely in "replace" mode?@NotNull AttributeStorageStrategyType
getStorageStrategy()
Returns configured storage strategy.@NotNull List<String>
getTolerantValuePatterns()
Gets patterns for values that are "tolerated" on the resource.default boolean
hasOutboundMapping()
@NotNull ResourceAttribute<T>
instantiate()
Create an item instance.@NotNull ResourceAttribute<T>
instantiate(QName name)
Create an item instance.boolean
isDisplayNameAttribute()
Is this attribute configured to serve as a display name?boolean
isExclusiveStrong()
Drives behavior of strong and normal mappings for this attribute.default boolean
isIgnored(LayerType layer)
Is the attribute ignored (at specified layer)?default boolean
isMandatory(LayerType layer)
default boolean
isMultiValue(LayerType layer)
default boolean
isOptional(LayerType layer)
Boolean
isSecondaryIdentifierOverride()
Is this attribute designated as a secondary identifier via `schemaHandling`?default boolean
isSingleValue(LayerType layer)
boolean
isTolerant()
When set to true, allows to preserve attribute values that are set outside midPoint.boolean
isVolatilityTrigger()
Is this attribute so-called volatility trigger, i.e.void
setOverrideCanAdd(Boolean value)
Provides a value that will overridecanAdd(LayerType)
return values (for all layers).void
setOverrideCanModify(Boolean value)
Provides a value that will overridecanModify(LayerType)
return values (for all layers).void
setOverrideCanRead(Boolean value)
Provides a value that will overridecanRead(LayerType)
return values (for all layers).default ResourceAttributeDefinition<T>
spawnModifyingRaw(@NotNull Consumer<MutableRawResourceAttributeDefinition<T>> rawPartCustomizer)
Creates a copy of the definition, with a given customizer applied to the _raw_ part of the definition.@NotNull MutableRawResourceAttributeDefinition<T>
toMutable()
Returns an interface to mutate this definition.-
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, 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.prism.ItemDefinition
adoptElementDefinitionFrom, canBeDefinitionOf, canBeDefinitionOf, debugDumpShortToString, findItemDefinition, getItemName, getMaxOccurs, getMinOccurs, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSingleValue, isValidFor, structuredType
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.LayeredDefinition
getCurrentLayer
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
canAdd, canModify, canRead
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismPropertyDefinition
createEmptyDelta, defaultValue, getAllowedValues, getMatchingRuleQName, getSuggestedValues, getTypeClass, isAnyType, isIndexed
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.RawResourceAttributeDefinition
getFrameworkAttributeName, getNativeAttributeName, getReturnedByDefault, isReturnedByDefault
-
Methods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
accept
-
-
-
-
Method Detail
-
getLimitations
PropertyLimitations getLimitations(LayerType layer)
Returns limitations (cardinality, access rights, processing) for given layer. These are obtained from resource and/or explicitly configured.
-
getProcessing
ItemProcessing getProcessing(LayerType layer)
Gets the level of processing for specified layer.- See Also:
Definition.getProcessing()
-
isIgnored
default boolean isIgnored(LayerType layer)
Is the attribute ignored (at specified layer)?
-
getMaxOccurs
int getMaxOccurs(LayerType layer)
Gets `maxOccurs` limitation for given layer.- See Also:
ItemDefinition.getMaxOccurs()
-
getMinOccurs
int getMinOccurs(LayerType layer)
Gets `minOccurs` limitation for given layer.
-
isOptional
default boolean isOptional(LayerType layer)
-
isMandatory
default boolean isMandatory(LayerType layer)
-
isMultiValue
default boolean isMultiValue(LayerType layer)
-
isSingleValue
default boolean isSingleValue(LayerType layer)
-
canAdd
boolean canAdd(LayerType layer)
Is adding allowed (at specified layer)?- See Also:
PrismItemAccessDefinition.canAdd()
-
canRead
boolean canRead(LayerType layer)
Is reading allowed (at specified layer)?- See Also:
PrismItemAccessDefinition.canRead()
-
canModify
boolean canModify(LayerType layer)
Is modification allowed (at specified layer)?- See Also:
PrismItemAccessDefinition.canModify()
-
getFetchStrategy
AttributeFetchStrategyType getFetchStrategy()
Returns configured fetch strategy.
-
getStorageStrategy
@NotNull @NotNull AttributeStorageStrategyType getStorageStrategy()
Returns configured storage strategy.
-
isVolatilityTrigger
boolean isVolatilityTrigger()
Is this attribute so-called volatility trigger, i.e. may its changes cause changes in other attributes?
-
getModificationPriority
Integer getModificationPriority()
Determines the order in which this attribute should be modified (in very special cases).
-
getReadReplaceMode
Boolean getReadReplaceMode()
Should be this attribute modified solely in "replace" mode?
-
instantiate
@NotNull @NotNull ResourceAttribute<T> instantiate()
Description copied from interface:ItemDefinition
Create an item instance. Definition name or default name will be used as an element name for the instance. The instance will otherwise be empty.- Specified by:
instantiate
in interfaceItemDefinition<T>
- Specified by:
instantiate
in interfacePrismPropertyDefinition<T>
- Specified by:
instantiate
in interfaceRawResourceAttributeDefinition<T>
-
instantiate
@NotNull @NotNull ResourceAttribute<T> instantiate(QName name)
Description copied from interface:ItemDefinition
Create an item instance. Definition name will use provided name. for the instance. The instance will otherwise be empty.- Specified by:
instantiate
in interfaceItemDefinition<T>
- Specified by:
instantiate
in interfacePrismPropertyDefinition<T>
- Specified by:
instantiate
in interfaceRawResourceAttributeDefinition<T>
-
clone
@NotNull @NotNull ResourceAttributeDefinition<T> clone()
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<T>
- Specified by:
clone
in interfacePrismPropertyDefinition<T>
-
deepClone
ResourceAttributeDefinition<T> deepClone(@NotNull @NotNull DeepCloneOperation operation)
Description copied from interface:ItemDefinition
TODO document- Specified by:
deepClone
in interfaceItemDefinition<T>
-
toMutable
@NotNull @NotNull MutableRawResourceAttributeDefinition<T> toMutable()
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceItemDefinition<T>
- Specified by:
toMutable
in interfacePrismPropertyDefinition<T>
-
debugDump
String debugDump(int indent, LayerType layer)
Provides a debug dump respective to the given layer. TODO reconsider this method
-
spawnModifyingRaw
default ResourceAttributeDefinition<T> spawnModifyingRaw(@NotNull @NotNull Consumer<MutableRawResourceAttributeDefinition<T>> rawPartCustomizer)
Creates a copy of the definition, with a given customizer applied to the _raw_ part of the definition. Should be used only in special cases, near the resource schema construction time. (So various alternate implementations of this interface need not support this method.) May not preserve all information (like access override flags).
-
forLayer
@NotNull @NotNull ResourceAttributeDefinition<T> forLayer(@NotNull @NotNull LayerType layer)
Creates a view of the current definition for a given layer. (May return even the original object e.g. if the layer matches the current one.)
-
setOverrideCanRead
void setOverrideCanRead(Boolean value)
Provides a value that will overridecanRead(LayerType)
return values (for all layers). Used e.g. when applying authorizations on the definition.
-
setOverrideCanAdd
void setOverrideCanAdd(Boolean value)
Provides a value that will overridecanAdd(LayerType)
return values (for all layers). Used e.g. when applying authorizations on the definition.
-
setOverrideCanModify
void setOverrideCanModify(Boolean value)
Provides a value that will overridecanModify(LayerType)
return values (for all layers). Used e.g. when applying authorizations on the definition.
-
isTolerant
boolean isTolerant()
When set to true, allows to preserve attribute values that are set outside midPoint.- See Also:
ItemRefinedDefinitionType.isTolerant()
-
isSecondaryIdentifierOverride
Boolean isSecondaryIdentifierOverride()
Is this attribute designated as a secondary identifier via `schemaHandling`?
-
getDescription
String getDescription()
Gets the (configured) attribute description.
-
getRawAttributeDefinition
RawResourceAttributeDefinition<T> getRawAttributeDefinition()
Gets the original (raw) attribute definition.
-
getOutboundMappingBean
@Nullable @Nullable MappingType getOutboundMappingBean()
Gets the outbound mapping, if defined.- See Also:
ResourceItemDefinitionType.getOutbound()
-
hasOutboundMapping
default boolean hasOutboundMapping()
-
getInboundMappingBeans
@NotNull @NotNull List<InboundMappingType> getInboundMappingBeans()
Gets the inbound mappings (if any).- See Also:
ResourceItemDefinitionType.getInbound()
-
isExclusiveStrong
boolean isExclusiveStrong()
Drives behavior of strong and normal mappings for this attribute.
-
getTolerantValuePatterns
@NotNull @NotNull List<String> getTolerantValuePatterns()
Gets patterns for values that are "tolerated" on the resource.
-
getIntolerantValuePatterns
@NotNull @NotNull List<String> getIntolerantValuePatterns()
Gets patterns for values that are not "tolerated" on the resource.
-
isDisplayNameAttribute
boolean isDisplayNameAttribute()
Is this attribute configured to serve as a display name?
-
getCorrelatorDefinition
@Nullable @Nullable ItemCorrelatorDefinitionType getCorrelatorDefinition()
- See Also:
()
-
-