Class ObjectClassComplexTypeDefinitionImpl
- java.lang.Object
-
- com.evolveum.midpoint.prism.AbstractFreezable
-
- com.evolveum.midpoint.prism.impl.DefinitionImpl
-
- com.evolveum.midpoint.prism.impl.TypeDefinitionImpl
-
- com.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
- com.evolveum.midpoint.schema.processor.ObjectClassComplexTypeDefinitionImpl
-
- All Implemented Interfaces:
ComplexTypeDefinition
,Definition
,Freezable
,LocalDefinitionStore
,MutableComplexTypeDefinition
,MutableDefinition
,MutableTypeDefinition
,PrismContextSensitive
,Revivable
,SmartVisitable<Definition>
,TypeDefinition
,Visitable<Definition>
,MutableObjectClassComplexTypeDefinition
,ObjectClassComplexTypeDefinition
,DebugDumpable
,Serializable
,Cloneable
public class ObjectClassComplexTypeDefinitionImpl extends com.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl implements MutableObjectClassComplexTypeDefinition
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.prism.impl.TypeDefinitionImpl
compileTimeClass, instantiationOrder, serializationProxy
-
Fields inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
deprecated, deprecatedSince, displayName, displayOrder, documentation, elaborate, emphasized, experimental, help, inherited, isAbstract, isRuntimeSchema, plannedRemoval, processing, typeName
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description ObjectClassComplexTypeDefinitionImpl(QName typeName, PrismContext prismContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ItemDefinition<?> definition)
void
addPrimaryIdentifier(ResourceAttributeDefinition<?> identifier)
void
addSecondaryIdentifier(ResourceAttributeDefinition<?> identifier)
@NotNull ObjectClassComplexTypeDefinitionImpl
clone()
Does a shallow clone of this definition (i.e.protected void
copyDefinitionData(ObjectClassComplexTypeDefinitionImpl clone)
<X> ResourceAttributeDefinition<X>
createAttributeDefinition(String localName, String localTypeName)
<X> ResourceAttributeDefinitionImpl<X>
createAttributeDefinition(String localName, QName typeName)
<X> ResourceAttributeDefinitionImpl<X>
createAttributeDefinition(QName name, QName typeName)
@NotNull ObjectClassComplexTypeDefinition
deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
Does a deep clone of this definition.boolean
equals(Object obj)
protected void
extendDumpHeader(StringBuilder sb)
protected void
extendItemDumpDefinition(StringBuilder sb, ItemDefinition<?> def)
@NotNull Collection<? extends ResourceAttributeDefinition<?>>
getAttributeDefinitions()
Returns all attribute definitions as an unmodifiable collection.protected String
getDebugDumpClassName()
<X> ResourceAttributeDefinition<X>
getDescriptionAttribute()
Returns the definition of description attribute of a resource object.ResourceAttributeDefinition<?>
getDisplayNameAttribute()
Returns the definition of display name attribute.String
getIntent()
TODO: THIS SHOULD NOT BE HEREShadowKindType
getKind()
TODO: THIS SHOULD NOT BE HERE<X> ResourceAttributeDefinition<X>
getNamingAttribute()
TODOString
getNativeObjectClass()
Returns the native object class string for the resource object.@NotNull Collection<? extends ResourceAttributeDefinition<?>>
getPrimaryIdentifiers()
Returns the definition of primary identifier attributes of a resource object.@NotNull Collection<? extends ResourceAttributeDefinition<?>>
getSecondaryIdentifiers()
Returns the definition of secondary identifier attributes of a resource object.int
hashCode()
ResourceAttributeContainer
instantiate(QName elementName)
This may not be really "clean" as it actually does two steps instead of one.static ResourceAttributeContainer
instantiate(QName elementName, ObjectClassComplexTypeDefinition ocdef)
boolean
isAuxiliary()
TODOboolean
isDefaultInAKind()
Indicates whether definition is should be used as default definition in ist kind.boolean
matches(ShadowType shadow)
Do not use.void
setAuxiliary(boolean auxiliary)
void
setDefaultInAKind(boolean defaultAccountType)
void
setDescriptionAttribute(ResourceAttributeDefinition<?> descriptionAttribute)
void
setDisplayNameAttribute(ResourceAttributeDefinition<?> displayName)
void
setDisplayNameAttribute(QName displayName)
TODO Convenience method.void
setIntent(String intent)
void
setKind(ShadowKindType kind)
void
setNamingAttribute(ResourceAttributeDefinition<?> namingAttribute)
void
setNamingAttribute(QName namingAttribute)
void
setNativeObjectClass(String nativeObjectClass)
MutableObjectClassComplexTypeDefinition
toMutable()
-
Methods inherited from class com.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
accept, addSubstitution, copyDefinitionData, createPropertyDefinition, createPropertyDefinition, createPropertyDefinition, createPropertyDefinition, debugDump, debugDump, deepClone, delete, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findNamedItemDefinition, getDefaultNamespace, getDefinitions, getDocClassName, getExtensionForType, getIgnoredNamespaces, getSchemaNamespace, hasSubstitutions, isContainerMarker, isEmpty, isListMarker, isObjectMarker, isReferenceMarker, isShared, isXsdAnyMarker, merge, performFreeze, replaceDefinition, revive, setContainerMarker, setDefaultNamespace, setExtensionForType, setIgnoredNamespaces, setListMarker, setObjectMarker, setReferenceMarker, setXsdAnyMarker, substitution, trimTo
-
Methods inherited from class com.evolveum.midpoint.prism.impl.TypeDefinitionImpl
addStaticSubType, canRepresent, copyDefinitionData, getCompileTimeClass, getInstantiationOrder, getStaticSubTypes, getSuperType, isAssignableFrom, setCompileTimeClass, setInstantiationOrder, setSuperType, useSerializationProxy, writeReplace
-
Methods inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
accept, addDiagram, addSchemaMigration, checkMutableOnExposing, copyDefinitionData, 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, setInherited, setPlannedRemoval, setProcessing, setRuntimeSchema, setTypeName, toString
-
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.prism.ComplexTypeDefinition
containsItemDefinition, getDefaultNamespace, getDefinitions, getExtensionForType, getIgnoredNamespaces, hasSubstitutions, isContainerMarker, isEmpty, isItemDefinitionRemoved, isListMarker, isObjectMarker, isReferenceMarker, isShared, isXsdAnyMarker, itemOrSubstitution, merge, revive, substitution, 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, 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.prism.LocalDefinitionStore
findContainerDefinition, findContainerDefinition, findItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findNamedItemDefinition, findPropertyDefinition, findReferenceDefinition, findReferenceDefinition
-
Methods inherited from interface com.evolveum.midpoint.prism.MutableComplexTypeDefinition
addSubstitution, createPropertyDefinition, createPropertyDefinition, delete, replaceDefinition, setAbstract, setCompileTimeClass, setContainerMarker, setDefaultNamespace, setExtensionForType, setIgnoredNamespaces, setListMarker, setObjectMarker, setReferenceMarker, setSuperType, setXsdAnyMarker
-
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.MutableTypeDefinition
setInstantiationOrder
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.ObjectClassComplexTypeDefinition
createShadowSearchQuery, findAttributeDefinition, findAttributeDefinition, findAttributeDefinition, getAllIdentifiers, hasIndexOnlyAttributes, isIdentifier, isPrimaryIdentifier, isSecondaryIdentifier, toResourceAttributeContainerDefinition, toResourceAttributeContainerDefinition
-
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
-
-
-
-
Constructor Detail
-
ObjectClassComplexTypeDefinitionImpl
public ObjectClassComplexTypeDefinitionImpl(QName typeName, PrismContext prismContext)
-
-
Method Detail
-
getAttributeDefinitions
@NotNull public @NotNull Collection<? extends ResourceAttributeDefinition<?>> getAttributeDefinitions()
Description copied from interface:ObjectClassComplexTypeDefinition
Returns all attribute definitions as an unmodifiable collection. Should be the same content as returned by getDefinitions().- Specified by:
getAttributeDefinitions
in interfaceObjectClassComplexTypeDefinition
-
add
public void add(ItemDefinition<?> definition)
- Specified by:
add
in interfaceMutableComplexTypeDefinition
- Specified by:
add
in interfaceMutableObjectClassComplexTypeDefinition
- Overrides:
add
in classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
getPrimaryIdentifiers
@NotNull public @NotNull Collection<? extends ResourceAttributeDefinition<?>> getPrimaryIdentifiers()
Description copied from interface:ObjectClassComplexTypeDefinition
Returns the definition of primary identifier attributes of a resource object. May return empty set if there are no identifier attributes. Must not return null. 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.- Specified by:
getPrimaryIdentifiers
in interfaceObjectClassComplexTypeDefinition
- Returns:
- definition of identifier attributes
-
addPrimaryIdentifier
public void addPrimaryIdentifier(ResourceAttributeDefinition<?> identifier)
- Specified by:
addPrimaryIdentifier
in interfaceMutableObjectClassComplexTypeDefinition
-
getSecondaryIdentifiers
@NotNull public @NotNull Collection<? extends ResourceAttributeDefinition<?>> getSecondaryIdentifiers()
Description copied from interface:ObjectClassComplexTypeDefinition
Returns the definition of secondary identifier attributes of a resource object. May return empty set if there are no secondary identifier attributes. Must not return null. 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.- Specified by:
getSecondaryIdentifiers
in interfaceObjectClassComplexTypeDefinition
- Returns:
- definition of secondary identifier attributes
-
addSecondaryIdentifier
public void addSecondaryIdentifier(ResourceAttributeDefinition<?> identifier)
- Specified by:
addSecondaryIdentifier
in interfaceMutableObjectClassComplexTypeDefinition
-
getDescriptionAttribute
public <X> ResourceAttributeDefinition<X> getDescriptionAttribute()
Description copied from interface:ObjectClassComplexTypeDefinition
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.- Specified by:
getDescriptionAttribute
in interfaceObjectClassComplexTypeDefinition
-
setDescriptionAttribute
public void setDescriptionAttribute(ResourceAttributeDefinition<?> descriptionAttribute)
- Specified by:
setDescriptionAttribute
in interfaceMutableObjectClassComplexTypeDefinition
-
getNamingAttribute
public <X> ResourceAttributeDefinition<X> getNamingAttribute()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO- Specified by:
getNamingAttribute
in interfaceObjectClassComplexTypeDefinition
-
setNamingAttribute
public void setNamingAttribute(ResourceAttributeDefinition<?> namingAttribute)
- Specified by:
setNamingAttribute
in interfaceMutableObjectClassComplexTypeDefinition
-
setNamingAttribute
public void setNamingAttribute(QName namingAttribute)
- Specified by:
setNamingAttribute
in interfaceMutableObjectClassComplexTypeDefinition
-
getNativeObjectClass
public String getNativeObjectClass()
Description copied from interface:ObjectClassComplexTypeDefinition
Returns the native object class string for the resource object. Native object class is the name of the Resource Object Definition (Object Class) as it is seen by the resource itself. The name of the Resource Object Definition may be constrained by XSD or other syntax and therefore may be "mangled" to conform to such syntax. The native object class value will contain unmangled name (if available). Returns null if there is no native object class. 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.- Specified by:
getNativeObjectClass
in interfaceObjectClassComplexTypeDefinition
- Returns:
- native object class
-
setNativeObjectClass
public void setNativeObjectClass(String nativeObjectClass)
- Specified by:
setNativeObjectClass
in interfaceMutableObjectClassComplexTypeDefinition
-
isAuxiliary
public boolean isAuxiliary()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO- Specified by:
isAuxiliary
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
setAuxiliary
public void setAuxiliary(boolean auxiliary)
- Specified by:
setAuxiliary
in interfaceMutableObjectClassComplexTypeDefinition
-
getKind
public ShadowKindType getKind()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO: THIS SHOULD NOT BE HERE- Specified by:
getKind
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
setKind
public void setKind(ShadowKindType kind)
- Specified by:
setKind
in interfaceMutableObjectClassComplexTypeDefinition
-
isDefaultInAKind
public boolean isDefaultInAKind()
Description copied from interface:ObjectClassComplexTypeDefinition
Indicates whether definition is should be used as default definition in ist kind. E.g. if used in an "account" kind it indicates default account definition. If true value is returned then the definition should be used as a default definition for the kind. This is a way how a resource connector may suggest applicable object classes (resource object definitions) for individual shadow kinds (e.g. accounts).- Specified by:
isDefaultInAKind
in interfaceObjectClassComplexTypeDefinition
- Returns:
- true if the definition should be used as account type.
-
setDefaultInAKind
public void setDefaultInAKind(boolean defaultAccountType)
- Specified by:
setDefaultInAKind
in interfaceMutableObjectClassComplexTypeDefinition
-
getIntent
public String getIntent()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO: THIS SHOULD NOT BE HERE- Specified by:
getIntent
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
setIntent
public void setIntent(String intent)
- Specified by:
setIntent
in interfaceMutableObjectClassComplexTypeDefinition
-
getDisplayNameAttribute
public ResourceAttributeDefinition<?> getDisplayNameAttribute()
Description copied from interface:ObjectClassComplexTypeDefinition
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.- Specified by:
getDisplayNameAttribute
in interfaceObjectClassComplexTypeDefinition
-
setDisplayNameAttribute
public void setDisplayNameAttribute(ResourceAttributeDefinition<?> displayName)
- Specified by:
setDisplayNameAttribute
in interfaceMutableObjectClassComplexTypeDefinition
-
setDisplayNameAttribute
public void setDisplayNameAttribute(QName displayName)
TODO Convenience method. It will internally look up the correct definition.- Specified by:
setDisplayNameAttribute
in interfaceMutableObjectClassComplexTypeDefinition
-
createAttributeDefinition
public <X> ResourceAttributeDefinitionImpl<X> createAttributeDefinition(QName name, QName typeName)
- Specified by:
createAttributeDefinition
in interfaceMutableObjectClassComplexTypeDefinition
-
createAttributeDefinition
public <X> ResourceAttributeDefinitionImpl<X> createAttributeDefinition(String localName, QName typeName)
- Specified by:
createAttributeDefinition
in interfaceMutableObjectClassComplexTypeDefinition
-
createAttributeDefinition
public <X> ResourceAttributeDefinition<X> createAttributeDefinition(String localName, String localTypeName)
- Specified by:
createAttributeDefinition
in interfaceMutableObjectClassComplexTypeDefinition
-
matches
public boolean matches(ShadowType shadow)
Description copied from interface:ObjectClassComplexTypeDefinition
Do not use. Unclear semantics. For synchronization tasks usecom.evolveum.midpoint.model.impl.sync.SynchronizationObjectsFilter
class instead.- Specified by:
matches
in interfaceObjectClassComplexTypeDefinition
-
instantiate
public ResourceAttributeContainer instantiate(QName elementName)
This may not be really "clean" as it actually does two steps instead of one. But it is useful.- Specified by:
instantiate
in interfaceObjectClassComplexTypeDefinition
-
instantiate
public static ResourceAttributeContainer instantiate(QName elementName, ObjectClassComplexTypeDefinition ocdef)
-
clone
@NotNull public @NotNull ObjectClassComplexTypeDefinitionImpl 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
- Specified by:
clone
in interfaceMutableComplexTypeDefinition
- Specified by:
clone
in interfaceObjectClassComplexTypeDefinition
- Overrides:
clone
in classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
deepClone
@NotNull public @NotNull ObjectClassComplexTypeDefinition deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
Description copied from interface:ComplexTypeDefinition
Does a deep clone of this definition.- Specified by:
deepClone
in interfaceComplexTypeDefinition
- Specified by:
deepClone
in interfaceObjectClassComplexTypeDefinition
- Overrides:
deepClone
in classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
- Parameters:
ctdMap
- Keeps already cloned definitions when 'ultra deep cloning' is not requested. Each definition is then cloned only once.onThisPath
- Keeps already cloned definitions on the path from root to current node; in order to prevent infinite loops when doing ultra deep cloning.
-
copyDefinitionData
protected void copyDefinitionData(ObjectClassComplexTypeDefinitionImpl clone)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
getDebugDumpClassName
protected String getDebugDumpClassName()
- Overrides:
getDebugDumpClassName
in classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
extendDumpHeader
protected void extendDumpHeader(StringBuilder sb)
- Overrides:
extendDumpHeader
in classcom.evolveum.midpoint.prism.impl.DefinitionImpl
-
extendItemDumpDefinition
protected void extendItemDumpDefinition(StringBuilder sb, ItemDefinition<?> def)
- Overrides:
extendItemDumpDefinition
in classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
toMutable
public MutableObjectClassComplexTypeDefinition toMutable()
- Specified by:
toMutable
in interfaceComplexTypeDefinition
- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceObjectClassComplexTypeDefinition
- Overrides:
toMutable
in classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
-