Class RefinedAttributeDefinitionImpl<T>
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.DefinitionImpl
-
- com.evolveum.midpoint.prism.impl.ItemDefinitionImpl<PrismProperty<T>>
-
- com.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
-
- com.evolveum.midpoint.schema.processor.ResourceAttributeDefinitionImpl<T>
-
- com.evolveum.midpoint.common.refinery.RefinedAttributeDefinitionImpl<T>
-
- All Implemented Interfaces:
RefinedAttributeDefinition<T>
,Definition
,ItemDefinition<PrismProperty<T>>
,MutableDefinition
,MutableItemDefinition<PrismProperty<T>>
,MutablePrismPropertyDefinition<T>
,PrismPropertyDefinition<T>
,Revivable
,Visitable
,MutableResourceAttributeDefinition<T>
,ResourceAttributeDefinition<T>
,DebugDumpable
,Serializable
,Cloneable
public class RefinedAttributeDefinitionImpl<T> extends ResourceAttributeDefinitionImpl<T> implements RefinedAttributeDefinition<T>
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Boolean
secondaryIdentifierOverride
-
Fields inherited from class com.evolveum.midpoint.prism.impl.ItemDefinitionImpl
heterogeneousListItem, itemName, substitutionHead
-
Fields inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
deprecated, deprecatedSince, displayOrder, documentation, elaborate, emphasized, experimental, help, isAbstract, isRuntimeSchema, plannedRemoval, prismContext, processing, typeName
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RefinedAttributeDefinitionImpl(ResourceAttributeDefinition<T> attrDef, PrismContext prismContext)
-
Method Summary
-
Methods inherited from class com.evolveum.midpoint.schema.processor.ResourceAttributeDefinitionImpl
copyDefinitionData, equals, extendToString, getReturnedByDefault, hashCode, instantiate, instantiate, isPrimaryIdentifier, isPrimaryIdentifier, isSecondaryIdentifier, setFrameworkAttributeName, toMutable
-
Methods inherited from class com.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl
canBeDefinitionOf, copyDefinitionData, createEmptyDelta, defaultValue, getDocClassName, isIndexed, setIndexed
-
Methods inherited from class com.evolveum.midpoint.prism.impl.ItemDefinitionImpl
accept, adoptElementDefinitionFrom, canBeDefinitionOf, copyDefinitionData, debugDumpShortToString, debugFlags, debugMultiplicity, deepClone, findItemDefinition, getNamespace, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSingleValue, isValidFor, isValidFor, revive, setDynamic, setHeterogeneousListItem, setIndexOnly, setInherited, setItemName, setOperational, setSubstitutionHead, setValueEnumerationRef
-
Methods inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
addSchemaMigration, copyDefinitionData, extendDumpHeader, getAnnotation, getDeprecatedSince, getDisplayOrder, getDocumentation, getDocumentationPreview, getPlannedRemoval, getPrismContext, getProcessing, getSchemaMigrations, getTypeClass, getTypeClassIfKnown, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isRuntimeSchema, setAbstract, setAnnotation, setDeprecated, setDeprecatedSince, setDisplayOrder, setDocumentation, setElaborate, setEmphasized, setExperimental, setPlannedRemoval, setRuntimeSchema, setTypeName
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getAnnotation, getDeprecatedSince, getDisplayOrder, getDocumentation, getDocumentationPreview, getPlannedRemoval, getPrismContext, getProcessing, getSchemaMigrations, getSchemaRegistry, getTypeClassIfKnown, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isRuntimeSchema, setAnnotation
-
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
adoptElementDefinitionFrom, canBeDefinitionOf, canBeDefinitionOf, debugDumpShortToString, deepClone, findItemDefinition, getNamespace, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSingleValue, isValidFor, isValidFor, revive
-
Methods inherited from interface com.evolveum.midpoint.prism.MutableDefinition
addSchemaMigration, setDeprecated, setDisplayOrder, setDocumentation, setEmphasized, setExperimental, setRuntimeSchema, setTypeName
-
Methods inherited from interface com.evolveum.midpoint.prism.MutableItemDefinition
setDeprecatedSince, setDynamic, setElaborate, setHeterogeneousListItem, setIndexOnly, setItemName, setOperational, setPlannedRemoval, setSubstitutionHead, setValueEnumerationRef
-
Methods inherited from interface com.evolveum.midpoint.prism.MutablePrismPropertyDefinition
setIndexed, setInherited
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismPropertyDefinition
createEmptyDelta, defaultValue, getTypeClass, isAnyType, isIndexed
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.ResourceAttributeDefinition
getReturnedByDefault, instantiate, instantiate, isPrimaryIdentifier, isPrimaryIdentifier, isSecondaryIdentifier, toMutable
-
-
-
-
Field Detail
-
secondaryIdentifierOverride
protected Boolean secondaryIdentifierOverride
-
-
Constructor Detail
-
RefinedAttributeDefinitionImpl
protected RefinedAttributeDefinitionImpl(ResourceAttributeDefinition<T> attrDef, PrismContext prismContext)
-
-
Method Detail
-
setNativeAttributeName
public void setNativeAttributeName(String nativeAttributeName)
- Specified by:
setNativeAttributeName
in interfaceMutableResourceAttributeDefinition<T>
- Overrides:
setNativeAttributeName
in classResourceAttributeDefinitionImpl<T>
-
isTolerant
public boolean isTolerant()
- Specified by:
isTolerant
in interfaceRefinedAttributeDefinition<T>
-
setTolerant
public void setTolerant(boolean tolerant)
-
isSecondaryIdentifierOverride
public Boolean isSecondaryIdentifierOverride()
- Specified by:
isSecondaryIdentifierOverride
in interfaceRefinedAttributeDefinition<T>
-
setSecondaryIdentifierOverride
public void setSecondaryIdentifierOverride(Boolean secondaryIdentifier)
-
canAdd
public boolean canAdd()
Description copied from class:ItemDefinitionImpl
Returns true if the item can be added. I.e. if it can be present in the object when a new object is created.- Specified by:
canAdd
in interfaceItemDefinition<T>
- Overrides:
canAdd
in classItemDefinitionImpl<PrismProperty<T>>
-
canAdd
public boolean canAdd(LayerType layer)
- Specified by:
canAdd
in interfaceRefinedAttributeDefinition<T>
-
canRead
public boolean canRead()
Description copied from class:ItemDefinitionImpl
Returns true if the property can be read. I.e. if it is returned in objects retrieved from "get", "search" and similar operations.- Specified by:
canRead
in interfaceItemDefinition<T>
- Overrides:
canRead
in classItemDefinitionImpl<PrismProperty<T>>
-
canRead
public boolean canRead(LayerType layer)
- Specified by:
canRead
in interfaceRefinedAttributeDefinition<T>
-
canModify
public boolean canModify()
Description copied from class:ItemDefinitionImpl
Returns true if the item can be modified. I.e. if it can be changed during a modification of existing object.- Specified by:
canModify
in interfaceItemDefinition<T>
- Overrides:
canModify
in classItemDefinitionImpl<PrismProperty<T>>
-
canModify
public boolean canModify(LayerType layer)
- Specified by:
canModify
in interfaceRefinedAttributeDefinition<T>
-
setReadOnly
public void setReadOnly()
- Specified by:
setReadOnly
in interfaceMutableItemDefinition<T>
- Overrides:
setReadOnly
in classItemDefinitionImpl<PrismProperty<T>>
-
getValueType
public QName getValueType()
Description copied from interface:PrismPropertyDefinition
Returns QName of the property value type.The returned type is either XSD simple type or complex type. It may not be defined in the same schema (especially if it is standard XSD simple type).
- Specified by:
getValueType
in interfacePrismPropertyDefinition<T>
- Overrides:
getValueType
in classPrismPropertyDefinitionImpl<T>
- Returns:
- QName of the property value type NOTE: This is very strange property. Isn't it the same as typeName(). It is even not used in midPoint. Marking as deprecated.
-
setMinOccurs
public void setMinOccurs(int minOccurs)
- Specified by:
setMinOccurs
in interfaceMutableItemDefinition<T>
- Overrides:
setMinOccurs
in classItemDefinitionImpl<PrismProperty<T>>
-
setMaxOccurs
public void setMaxOccurs(int maxOccurs)
- Specified by:
setMaxOccurs
in interfaceMutableItemDefinition<T>
- Overrides:
setMaxOccurs
in classItemDefinitionImpl<PrismProperty<T>>
-
setCanRead
public void setCanRead(boolean read)
- Specified by:
setCanRead
in interfaceMutableItemDefinition<T>
- Overrides:
setCanRead
in classItemDefinitionImpl<PrismProperty<T>>
-
setCanModify
public void setCanModify(boolean update)
- Specified by:
setCanModify
in interfaceMutableItemDefinition<T>
- Overrides:
setCanModify
in classItemDefinitionImpl<PrismProperty<T>>
-
setCanAdd
public void setCanAdd(boolean create)
- Specified by:
setCanAdd
in interfaceMutableItemDefinition<T>
- Overrides:
setCanAdd
in classItemDefinitionImpl<PrismProperty<T>>
-
isIgnored
public boolean isIgnored()
Description copied from interface:Definition
Item definition that has this flag set should be ignored by any processing. The ignored item is still part of the schema. Item instances may appear in the serialized data formats (e.g. XML) or data store and the parser should not raise an error if it encounters them. But any high-level processing code should ignore presence of this item. E.g. it should not be displayed to the user, should not be present in transformed data structures, etc. Note that the same item can be ignored at higher layer (e.g. presentation) but not ignored at lower layer (e.g. model). This works by presenting different item definitions for these layers (see LayerRefinedAttributeDefinition). Semantics of this flag for complex type definitions is to be defined yet.- Specified by:
isIgnored
in interfaceDefinition
- Overrides:
isIgnored
in classDefinitionImpl
-
isIgnored
public boolean isIgnored(LayerType layer)
- Specified by:
isIgnored
in interfaceRefinedAttributeDefinition<T>
-
getProcessing
public ItemProcessing getProcessing(LayerType layer)
- Specified by:
getProcessing
in interfaceRefinedAttributeDefinition<T>
-
setProcessing
public void setProcessing(ItemProcessing processing)
- Specified by:
setProcessing
in interfaceMutableDefinition
- Overrides:
setProcessing
in classDefinitionImpl
-
setHelp
public void setHelp(String help)
- Specified by:
setHelp
in interfaceMutableDefinition
- Overrides:
setHelp
in classDefinitionImpl
-
getDisplayName
public String getDisplayName()
Description copied from interface:Definition
Returns display name. Specifies the printable name of the object class or attribute. It must contain a printable string. It may also contain a key to catalog file. Returns null if no display name is set. Corresponds to "displayName" XSD annotation.- Specified by:
getDisplayName
in interfaceDefinition
- Overrides:
getDisplayName
in classDefinitionImpl
- Returns:
- display name string or catalog key
-
setDisplayName
public void setDisplayName(String displayName)
- Specified by:
setDisplayName
in interfaceMutableDefinition
- Overrides:
setDisplayName
in classDefinitionImpl
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceRefinedAttributeDefinition<T>
-
setDescription
public void setDescription(String description)
-
getAttributeDefinition
public ResourceAttributeDefinition<T> getAttributeDefinition()
- Specified by:
getAttributeDefinition
in interfaceRefinedAttributeDefinition<T>
-
setAttributeDefinition
public void setAttributeDefinition(ResourceAttributeDefinition<T> attributeDefinition)
-
getOutboundMappingType
public MappingType getOutboundMappingType()
- Specified by:
getOutboundMappingType
in interfaceRefinedAttributeDefinition<T>
-
setOutboundMappingType
public void setOutboundMappingType(MappingType outboundMappingType)
-
hasOutboundMapping
public boolean hasOutboundMapping()
- Specified by:
hasOutboundMapping
in interfaceRefinedAttributeDefinition<T>
-
getInboundMappingTypes
public List<MappingType> getInboundMappingTypes()
- Specified by:
getInboundMappingTypes
in interfaceRefinedAttributeDefinition<T>
-
setInboundMappingTypes
public void setInboundMappingTypes(List<MappingType> inboundAssignmentTypes)
-
getItemName
@NotNull public ItemName getItemName()
Description copied from class:ItemDefinitionImpl
Returns name of the defined entity. The name is a name of the entity instance if it is fixed by the schema. E.g. it may be a name of the property in the container that cannot be changed. The name corresponds to the XML element name in the XML representation of the schema. It does NOT correspond to a XSD type name. Name is optional. If name is not set the null value is returned. If name is not set the type is "abstract", does not correspond to the element.- Specified by:
getItemName
in interfaceItemDefinition<T>
- Overrides:
getItemName
in classItemDefinitionImpl<PrismProperty<T>>
- Returns:
- the name name of the entity or null.
-
getTypeName
@NotNull public QName getTypeName()
Description copied from interface:Definition
Returns a name of the type for this definition. The type can be part of the compile-time schema or it can be defined at run time. Examples of the former case are types like c:UserType, xsd:string, or even flexible ones like c:ExtensionType or c:ShadowAttributesType. Examples of the latter case are types used in - custom extensions, like ext:LocationsType (where ext = e.g. http://example.com/extension), - resource schema, like ri:inetOrgPerson (ri = http://.../resource/instance-3), - connector schema, like TODO In XML representation that corresponds to the name of the XSD type. Although beware, the run-time types do not have statically defined structure. And the resource and connector-related types may even represent different kinds of objects within different contexts (e.g. two distinct resources both with ri:AccountObjectClass types). Also note that for complex type definitions, the type name serves as a unique identifier. On the other hand, for item definitions, it is just one of its attributes; primary key is item name in that case. The type name should be fully qualified. (TODO reconsider this)- Specified by:
getTypeName
in interfaceDefinition
- Overrides:
getTypeName
in classDefinitionImpl
- Returns:
- the type name
-
getNativeAttributeName
public String getNativeAttributeName()
Description copied from class:ResourceAttributeDefinitionImpl
Returns native attribute name. Native name of the attribute is a name as it is used on the resource or as seen by the connector. It is used for diagnostics purposes and may be used by the connector itself. As the attribute names in XSD have to comply with XML element name limitations, this may be the only way how to determine original attribute name. Returns null if native attribute name is not set or unknown. The name should be the same as the one used by the resource, if the resource supports naming of attributes. E.g. in case of LDAP this annotation should contain "cn", "givenName", etc. If the resource is not that flexible, the native attribute names may be hardcoded (e.g. "username", "homeDirectory") or may not be present at all.- Specified by:
getNativeAttributeName
in interfaceResourceAttributeDefinition<T>
- Overrides:
getNativeAttributeName
in classResourceAttributeDefinitionImpl<T>
- Returns:
- native attribute name
-
getFrameworkAttributeName
public String getFrameworkAttributeName()
Description copied from class:ResourceAttributeDefinitionImpl
Returns name of the attribute as given in the connector framework. This is not used for any significant logic. It is mostly for diagnostics.- Specified by:
getFrameworkAttributeName
in interfaceResourceAttributeDefinition<T>
- Overrides:
getFrameworkAttributeName
in classResourceAttributeDefinitionImpl<T>
- Returns:
- name of the attribute as given in the connector framework.
-
getAllowedValues
public Collection<? extends DisplayableValue<T>> getAllowedValues()
Description copied from class:PrismPropertyDefinitionImpl
Returns allowed values for this property.- Specified by:
getAllowedValues
in interfacePrismPropertyDefinition<T>
- Overrides:
getAllowedValues
in classPrismPropertyDefinitionImpl<T>
- Returns:
- Object array. May be null.
-
isReturnedByDefault
public boolean isReturnedByDefault()
- Specified by:
isReturnedByDefault
in interfaceResourceAttributeDefinition<T>
- Overrides:
isReturnedByDefault
in classResourceAttributeDefinitionImpl<T>
-
setReturnedByDefault
public void setReturnedByDefault(Boolean returnedByDefault)
- Specified by:
setReturnedByDefault
in interfaceMutableResourceAttributeDefinition<T>
- Overrides:
setReturnedByDefault
in classResourceAttributeDefinitionImpl<T>
-
getMaxOccurs
public int getMaxOccurs()
Description copied from class:ItemDefinitionImpl
Return the number of maximal value occurrences.Any negative number means "unbounded".
- Specified by:
getMaxOccurs
in interfaceItemDefinition<T>
- Overrides:
getMaxOccurs
in classItemDefinitionImpl<PrismProperty<T>>
- Returns:
- the maxOccurs
-
getMaxOccurs
public int getMaxOccurs(LayerType layer)
- Specified by:
getMaxOccurs
in interfaceRefinedAttributeDefinition<T>
-
getMinOccurs
public int getMinOccurs()
Description copied from class:ItemDefinitionImpl
Return the number of minimal value occurrences.- Specified by:
getMinOccurs
in interfaceItemDefinition<T>
- Overrides:
getMinOccurs
in classItemDefinitionImpl<PrismProperty<T>>
- Returns:
- the minOccurs
-
getMinOccurs
public int getMinOccurs(LayerType layer)
- Specified by:
getMinOccurs
in interfaceRefinedAttributeDefinition<T>
-
isOptional
public boolean isOptional(LayerType layer)
- Specified by:
isOptional
in interfaceRefinedAttributeDefinition<T>
-
isMandatory
public boolean isMandatory(LayerType layer)
- Specified by:
isMandatory
in interfaceRefinedAttributeDefinition<T>
-
isMultiValue
public boolean isMultiValue(LayerType layer)
- Specified by:
isMultiValue
in interfaceRefinedAttributeDefinition<T>
-
isSingleValue
public boolean isSingleValue(LayerType layer)
- Specified by:
isSingleValue
in interfaceRefinedAttributeDefinition<T>
-
isExlusiveStrong
public boolean isExlusiveStrong()
- Specified by:
isExlusiveStrong
in interfaceRefinedAttributeDefinition<T>
-
setExclusiveStrong
public void setExclusiveStrong(boolean isExclusiveStrong)
-
getLimitations
public PropertyLimitations getLimitations(LayerType layer)
- Specified by:
getLimitations
in interfaceRefinedAttributeDefinition<T>
-
getHelp
public String getHelp()
Description copied from interface:Definition
Returns help string. Specifies the help text or a key to catalog file for a help text. The help text may be displayed in any suitable way by the GUI. It should explain the meaning of an attribute or object class. Returns null if no help string is set. Corresponds to "help" XSD annotation.- Specified by:
getHelp
in interfaceDefinition
- Overrides:
getHelp
in classDefinitionImpl
- Returns:
- help string or catalog key
-
getFetchStrategy
public AttributeFetchStrategyType getFetchStrategy()
- Specified by:
getFetchStrategy
in interfaceRefinedAttributeDefinition<T>
-
setFetchStrategy
public void setFetchStrategy(AttributeFetchStrategyType fetchStrategy)
-
getStorageStrategy
public AttributeStorageStrategyType getStorageStrategy()
- Specified by:
getStorageStrategy
in interfaceRefinedAttributeDefinition<T>
-
setStorageStrategy
public void setStorageStrategy(AttributeStorageStrategyType storageStrategy)
-
getMatchingRuleQName
public QName getMatchingRuleQName()
Description copied from class:PrismPropertyDefinitionImpl
Returns matching rule name. Matching rules are algorithms that specify how to compare, normalize and/or order the values. E.g. there are matching rules for case insensitive string comparison, for LDAP DNs, etc.- Specified by:
getMatchingRuleQName
in interfacePrismPropertyDefinition<T>
- Overrides:
getMatchingRuleQName
in classPrismPropertyDefinitionImpl<T>
- Returns:
- matching rule name
-
setMatchingRuleQName
public void setMatchingRuleQName(QName matchingRuleQName)
- Specified by:
setMatchingRuleQName
in interfaceMutablePrismPropertyDefinition<T>
- Overrides:
setMatchingRuleQName
in classPrismPropertyDefinitionImpl<T>
-
getTolerantValuePattern
public List<String> getTolerantValuePattern()
- Specified by:
getTolerantValuePattern
in interfaceRefinedAttributeDefinition<T>
-
getIntolerantValuePattern
public List<String> getIntolerantValuePattern()
- Specified by:
getIntolerantValuePattern
in interfaceRefinedAttributeDefinition<T>
-
isVolatilityTrigger
public boolean isVolatilityTrigger()
- Specified by:
isVolatilityTrigger
in interfaceRefinedAttributeDefinition<T>
-
setVolatilityTrigger
public void setVolatilityTrigger(boolean isVolatilityTrigger)
-
clone
@NotNull public RefinedAttributeDefinitionImpl<T> clone()
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<T>
- Specified by:
clone
in interfaceMutablePrismPropertyDefinition<T>
- Specified by:
clone
in interfacePrismPropertyDefinition<T>
- Specified by:
clone
in interfaceRefinedAttributeDefinition<T>
- Specified by:
clone
in interfaceResourceAttributeDefinition<T>
- Overrides:
clone
in classResourceAttributeDefinitionImpl<T>
-
copyDefinitionData
protected void copyDefinitionData(RefinedAttributeDefinitionImpl<T> clone)
-
deepClone
public RefinedAttributeDefinition<T> deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
- Specified by:
deepClone
in interfaceItemDefinition<T>
- Specified by:
deepClone
in interfaceRefinedAttributeDefinition<T>
- Overrides:
deepClone
in classItemDefinitionImpl<PrismProperty<T>>
-
toString
public String toString()
- Overrides:
toString
in classItemDefinitionImpl<PrismProperty<T>>
-
getDebugDumpClassName
public String getDebugDumpClassName()
Return a human readable name of this class suitable for logs.- Overrides:
getDebugDumpClassName
in classResourceAttributeDefinitionImpl<T>
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
- Overrides:
debugDump
in classDefinitionImpl
-
debugDump
public String debugDump(int indent, LayerType layer)
- Specified by:
debugDump
in interfaceRefinedAttributeDefinition<T>
-
setModificationPriority
public void setModificationPriority(Integer modificationPriority)
-
getModificationPriority
public Integer getModificationPriority()
- Specified by:
getModificationPriority
in interfaceRefinedAttributeDefinition<T>
-
getReadReplaceMode
public Boolean getReadReplaceMode()
- Specified by:
getReadReplaceMode
in interfaceRefinedAttributeDefinition<T>
-
setReadReplaceMode
public void setReadReplaceMode(Boolean readReplaceMode)
-
isDisplayNameAttribute
public boolean isDisplayNameAttribute()
- Specified by:
isDisplayNameAttribute
in interfaceRefinedAttributeDefinition<T>
-
-