Class ResourceAttributeDefinitionImpl<T>
- java.lang.Object
-
- com.evolveum.midpoint.prism.AbstractFreezable
-
- 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>
-
- All Implemented Interfaces:
Definition
,Freezable
,ItemDefinition<PrismProperty<T>>
,ItemDefinitionTestAccess
,MutableDefinition
,MutableItemDefinition<PrismProperty<T>>
,MutablePrismPropertyDefinition<T>
,PrismContextSensitive
,PrismItemAccessDefinition
,PrismPropertyDefinition<T>
,Revivable
,SmartVisitable<Definition>
,Visitable<Definition>
,MutableResourceAttributeDefinition<T>
,ResourceAttributeDefinition<T>
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
RefinedAttributeDefinitionImpl
public class ResourceAttributeDefinitionImpl<T> extends com.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T> implements MutableResourceAttributeDefinition<T>
Resource Object Attribute Definition. Resource Object Attribute is a Property of Resource Object. All that applies to property applies also to attribute, e.g. only a whole attributes can be changed, they may be simple or complex types, they should be representable in XML, etc. In addition, attribute definition may have some annotations that suggest its purpose and use on the Resource. Resource Object Attribute understands resource-specific annotations such as native attribute name. This class represents schema definition for resource object attribute. SeeDefinition
for more details.- Author:
- Radovan Semancik
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
PrismItemAccessDefinition.Mutable
-
-
Field Summary
-
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, displayName, displayOrder, documentation, elaborate, emphasized, experimental, help, isAbstract, isRuntimeSchema, plannedRemoval, processing, typeName
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description ResourceAttributeDefinitionImpl(QName elementName, QName typeName, PrismContext prismContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ResourceAttributeDefinitionImpl<T>
clone()
protected void
copyDefinitionData(ResourceAttributeDefinitionImpl<T> clone)
boolean
equals(Object o)
protected void
extendToString(StringBuilder sb)
protected String
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.String
getFrameworkAttributeName()
Returns name of the attribute as given in the connector framework.String
getNativeAttributeName()
Returns native attribute name.Boolean
getReturnedByDefault()
int
hashCode()
@NotNull ResourceAttribute<T>
instantiate()
Create an item instance.@NotNull ResourceAttribute<T>
instantiate(QName name)
Create an item instance.boolean
isPrimaryIdentifier(ObjectClassComplexTypeDefinition objectDefinition)
boolean
isPrimaryIdentifier(ResourceAttributeContainerDefinition objectDefinition)
Returns true if the attribute is a (primary) identifier.boolean
isReturnedByDefault()
boolean
isSecondaryIdentifier(ObjectClassComplexTypeDefinition objectDefinition)
void
setFrameworkAttributeName(String frameworkAttributeName)
void
setNativeAttributeName(String nativeAttributeName)
void
setReturnedByDefault(Boolean returnedByDefault)
MutableResourceAttributeDefinition<T>
toMutable()
-
Methods inherited from class com.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl
canBeDefinitionOf, copyDefinitionData, createEmptyDelta, defaultValue, getAllowedValues, getDocClassName, getMatchingRuleQName, getValueType, isIndexed, setIndexed, setMatchingRuleQName, structuredType
-
Methods inherited from class com.evolveum.midpoint.prism.impl.ItemDefinitionImpl
adoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canModify, canRead, copyDefinitionData, debugDumpShortToString, debugFlags, debugMultiplicity, deepClone, deepClone, findItemDefinition, getItemName, getMaxOccurs, getMinOccurs, getNamespace, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isOperational, isOptional, isValidFor, isValidFor, replaceName, revive, setCanAdd, setCanModify, setCanRead, setDynamic, setHeterogeneousListItem, setIndexOnly, setInherited, setItemName, setMaxOccurs, setMinOccurs, setOperational, setReadOnly, setSubstitutionHead, setValueEnumerationRef, toString, useSerializationProxy, writeReplace
-
Methods inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
accept, accept, addDiagram, addSchemaMigration, checkMutableOnExposing, copyDefinitionData, debugDump, extendDumpHeader, getAnnotation, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getPlannedRemoval, getPrismContext, getProcessing, getSchemaMigrations, getTypeClass, getTypeClassIfKnown, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRuntimeSchema, setAbstract, setAnnotation, setDeprecated, setDeprecatedSince, setDisplayName, setDisplayOrder, setDocumentation, setElaborate, setEmphasized, setExperimental, setHelp, setPlannedRemoval, setProcessing, setRuntimeSchema, setTypeName
-
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable, performFreeze
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getAnnotation, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getSchemaMigrations, getSchemaRegistry, 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.prism.ItemDefinition
adoptElementDefinitionFrom, canBeDefinitionOf, canBeDefinitionOf, debugDumpShortToString, deepClone, deepClone, findItemDefinition, getItemName, getMaxOccurs, getMinOccurs, getNamespace, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSingleValue, isValidFor, isValidFor, revive, structuredType
-
Methods inherited from interface com.evolveum.midpoint.prism.MutableDefinition
addDiagram, addSchemaMigration, setDeprecated, setDisplayName, setDisplayOrder, setDocumentation, setEmphasized, setExperimental, setHelp, setProcessing, setRuntimeSchema, setTypeName
-
Methods inherited from interface com.evolveum.midpoint.prism.MutableItemDefinition
setCanAdd, setCanModify, setCanRead, setDeprecatedSince, setDynamic, setElaborate, setHeterogeneousListItem, setIndexOnly, setItemName, setMaxOccurs, setMinOccurs, setOperational, setPlannedRemoval, setReadOnly, setSubstitutionHead, setValueEnumerationRef
-
Methods inherited from interface com.evolveum.midpoint.prism.MutablePrismPropertyDefinition
setIndexed, setInherited, setMatchingRuleQName
-
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, getTypeClass, getValueType, isAnyType, isIndexed
-
Methods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
accept
-
-
-
-
Constructor Detail
-
ResourceAttributeDefinitionImpl
public ResourceAttributeDefinitionImpl(QName elementName, QName typeName, PrismContext prismContext)
-
-
Method Detail
-
instantiate
@NotNull public @NotNull ResourceAttribute<T> instantiate()
Description copied from interface:ItemDefinition
Create an item instance. Definition name or default name will 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 interfaceResourceAttributeDefinition<T>
- Overrides:
instantiate
in classcom.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
- Returns:
- created item instance
-
instantiate
@NotNull public @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 interfaceResourceAttributeDefinition<T>
- Overrides:
instantiate
in classcom.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
- Returns:
- created item instance
-
getReturnedByDefault
public Boolean getReturnedByDefault()
- Specified by:
getReturnedByDefault
in interfaceResourceAttributeDefinition<T>
-
isReturnedByDefault
public boolean isReturnedByDefault()
- Specified by:
isReturnedByDefault
in interfaceResourceAttributeDefinition<T>
-
setReturnedByDefault
public void setReturnedByDefault(Boolean returnedByDefault)
- Specified by:
setReturnedByDefault
in interfaceMutableResourceAttributeDefinition<T>
-
isPrimaryIdentifier
public boolean isPrimaryIdentifier(ResourceAttributeContainerDefinition objectDefinition)
Returns true if the attribute is a (primary) identifier. Convenience method.- Specified by:
isPrimaryIdentifier
in interfaceResourceAttributeDefinition<T>
- Returns:
- true if the attribute is a (primary) identifier.
-
isPrimaryIdentifier
public boolean isPrimaryIdentifier(ObjectClassComplexTypeDefinition objectDefinition)
- Specified by:
isPrimaryIdentifier
in interfaceResourceAttributeDefinition<T>
-
isSecondaryIdentifier
public boolean isSecondaryIdentifier(ObjectClassComplexTypeDefinition objectDefinition)
- Specified by:
isSecondaryIdentifier
in interfaceResourceAttributeDefinition<T>
-
getNativeAttributeName
public String getNativeAttributeName()
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>
- Returns:
- native attribute name
-
setNativeAttributeName
public void setNativeAttributeName(String nativeAttributeName)
- Specified by:
setNativeAttributeName
in interfaceMutableResourceAttributeDefinition<T>
-
getFrameworkAttributeName
public String getFrameworkAttributeName()
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>
- Returns:
- name of the attribute as given in the connector framework.
-
setFrameworkAttributeName
public void setFrameworkAttributeName(String frameworkAttributeName)
- Specified by:
setFrameworkAttributeName
in interfaceMutableResourceAttributeDefinition<T>
-
clone
@NotNull public @NotNull ResourceAttributeDefinitionImpl<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 interfaceResourceAttributeDefinition<T>
- Overrides:
clone
in classcom.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
-
copyDefinitionData
protected void copyDefinitionData(ResourceAttributeDefinitionImpl<T> clone)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
-
extendToString
protected void extendToString(StringBuilder sb)
- Overrides:
extendToString
in classcom.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
-
getDebugDumpClassName
protected String getDebugDumpClassName()
Return a human readable name of this class suitable for logs.- Overrides:
getDebugDumpClassName
in classcom.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
-
toMutable
public MutableResourceAttributeDefinition<T> toMutable()
- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceItemDefinition<T>
- Specified by:
toMutable
in interfacePrismPropertyDefinition<T>
- Specified by:
toMutable
in interfaceResourceAttributeDefinition<T>
- Overrides:
toMutable
in classcom.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl<T>
-
-