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 voidadd(ItemDefinition<?> definition)voidaddPrimaryIdentifier(ResourceAttributeDefinition<?> identifier)voidaddSecondaryIdentifier(ResourceAttributeDefinition<?> identifier)@NotNull ObjectClassComplexTypeDefinitionImplclone()Does a shallow clone of this definition (i.e.protected voidcopyDefinitionData(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 ObjectClassComplexTypeDefinitiondeepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)Does a deep clone of this definition.booleanequals(Object obj)protected voidextendDumpHeader(StringBuilder sb)protected voidextendItemDumpDefinition(StringBuilder sb, ItemDefinition<?> def)@NotNull Collection<? extends ResourceAttributeDefinition<?>>getAttributeDefinitions()Returns all attribute definitions as an unmodifiable collection.protected StringgetDebugDumpClassName()<X> ResourceAttributeDefinition<X>getDescriptionAttribute()Returns the definition of description attribute of a resource object.ResourceAttributeDefinition<?>getDisplayNameAttribute()Returns the definition of display name attribute.StringgetIntent()TODO: THIS SHOULD NOT BE HEREShadowKindTypegetKind()TODO: THIS SHOULD NOT BE HERE<X> ResourceAttributeDefinition<X>getNamingAttribute()TODOStringgetNativeObjectClass()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.inthashCode()ResourceAttributeContainerinstantiate(QName elementName)This may not be really "clean" as it actually does two steps instead of one.static ResourceAttributeContainerinstantiate(QName elementName, ObjectClassComplexTypeDefinition ocdef)booleanisAuxiliary()TODObooleanisDefaultInAKind()Indicates whether definition is should be used as default definition in ist kind.booleanmatches(ShadowType shadow)Do not use.voidsetAuxiliary(boolean auxiliary)voidsetDefaultInAKind(boolean defaultAccountType)voidsetDescriptionAttribute(ResourceAttributeDefinition<?> descriptionAttribute)voidsetDisplayNameAttribute(ResourceAttributeDefinition<?> displayName)voidsetDisplayNameAttribute(QName displayName)TODO Convenience method.voidsetIntent(String intent)voidsetKind(ShadowKindType kind)voidsetNamingAttribute(ResourceAttributeDefinition<?> namingAttribute)voidsetNamingAttribute(QName namingAttribute)voidsetNativeObjectClass(String nativeObjectClass)MutableObjectClassComplexTypeDefinitiontoMutable()-
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, 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:ObjectClassComplexTypeDefinitionReturns all attribute definitions as an unmodifiable collection. Should be the same content as returned by getDefinitions().- Specified by:
getAttributeDefinitionsin interfaceObjectClassComplexTypeDefinition
-
add
public void add(ItemDefinition<?> definition)
- Specified by:
addin interfaceMutableComplexTypeDefinition- Specified by:
addin interfaceMutableObjectClassComplexTypeDefinition- Overrides:
addin classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
getPrimaryIdentifiers
@NotNull public @NotNull Collection<? extends ResourceAttributeDefinition<?>> getPrimaryIdentifiers()
Description copied from interface:ObjectClassComplexTypeDefinitionReturns 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:
getPrimaryIdentifiersin interfaceObjectClassComplexTypeDefinition- Returns:
- definition of identifier attributes
-
addPrimaryIdentifier
public void addPrimaryIdentifier(ResourceAttributeDefinition<?> identifier)
- Specified by:
addPrimaryIdentifierin interfaceMutableObjectClassComplexTypeDefinition
-
getSecondaryIdentifiers
@NotNull public @NotNull Collection<? extends ResourceAttributeDefinition<?>> getSecondaryIdentifiers()
Description copied from interface:ObjectClassComplexTypeDefinitionReturns 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:
getSecondaryIdentifiersin interfaceObjectClassComplexTypeDefinition- Returns:
- definition of secondary identifier attributes
-
addSecondaryIdentifier
public void addSecondaryIdentifier(ResourceAttributeDefinition<?> identifier)
- Specified by:
addSecondaryIdentifierin interfaceMutableObjectClassComplexTypeDefinition
-
getDescriptionAttribute
public <X> ResourceAttributeDefinition<X> getDescriptionAttribute()
Description copied from interface:ObjectClassComplexTypeDefinitionReturns 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:
getDescriptionAttributein interfaceObjectClassComplexTypeDefinition
-
setDescriptionAttribute
public void setDescriptionAttribute(ResourceAttributeDefinition<?> descriptionAttribute)
- Specified by:
setDescriptionAttributein interfaceMutableObjectClassComplexTypeDefinition
-
getNamingAttribute
public <X> ResourceAttributeDefinition<X> getNamingAttribute()
Description copied from interface:ObjectClassComplexTypeDefinitionTODO- Specified by:
getNamingAttributein interfaceObjectClassComplexTypeDefinition
-
setNamingAttribute
public void setNamingAttribute(ResourceAttributeDefinition<?> namingAttribute)
- Specified by:
setNamingAttributein interfaceMutableObjectClassComplexTypeDefinition
-
setNamingAttribute
public void setNamingAttribute(QName namingAttribute)
- Specified by:
setNamingAttributein interfaceMutableObjectClassComplexTypeDefinition
-
getNativeObjectClass
public String getNativeObjectClass()
Description copied from interface:ObjectClassComplexTypeDefinitionReturns 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:
getNativeObjectClassin interfaceObjectClassComplexTypeDefinition- Returns:
- native object class
-
setNativeObjectClass
public void setNativeObjectClass(String nativeObjectClass)
- Specified by:
setNativeObjectClassin interfaceMutableObjectClassComplexTypeDefinition
-
isAuxiliary
public boolean isAuxiliary()
Description copied from interface:ObjectClassComplexTypeDefinitionTODO- Specified by:
isAuxiliaryin interfaceObjectClassComplexTypeDefinition- Returns:
-
setAuxiliary
public void setAuxiliary(boolean auxiliary)
- Specified by:
setAuxiliaryin interfaceMutableObjectClassComplexTypeDefinition
-
getKind
public ShadowKindType getKind()
Description copied from interface:ObjectClassComplexTypeDefinitionTODO: THIS SHOULD NOT BE HERE- Specified by:
getKindin interfaceObjectClassComplexTypeDefinition- Returns:
-
setKind
public void setKind(ShadowKindType kind)
- Specified by:
setKindin interfaceMutableObjectClassComplexTypeDefinition
-
isDefaultInAKind
public boolean isDefaultInAKind()
Description copied from interface:ObjectClassComplexTypeDefinitionIndicates 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:
isDefaultInAKindin interfaceObjectClassComplexTypeDefinition- Returns:
- true if the definition should be used as account type.
-
setDefaultInAKind
public void setDefaultInAKind(boolean defaultAccountType)
- Specified by:
setDefaultInAKindin interfaceMutableObjectClassComplexTypeDefinition
-
getIntent
public String getIntent()
Description copied from interface:ObjectClassComplexTypeDefinitionTODO: THIS SHOULD NOT BE HERE- Specified by:
getIntentin interfaceObjectClassComplexTypeDefinition- Returns:
-
setIntent
public void setIntent(String intent)
- Specified by:
setIntentin interfaceMutableObjectClassComplexTypeDefinition
-
getDisplayNameAttribute
public ResourceAttributeDefinition<?> getDisplayNameAttribute()
Description copied from interface:ObjectClassComplexTypeDefinitionReturns 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:
getDisplayNameAttributein interfaceObjectClassComplexTypeDefinition
-
setDisplayNameAttribute
public void setDisplayNameAttribute(ResourceAttributeDefinition<?> displayName)
- Specified by:
setDisplayNameAttributein interfaceMutableObjectClassComplexTypeDefinition
-
setDisplayNameAttribute
public void setDisplayNameAttribute(QName displayName)
TODO Convenience method. It will internally look up the correct definition.- Specified by:
setDisplayNameAttributein interfaceMutableObjectClassComplexTypeDefinition
-
createAttributeDefinition
public <X> ResourceAttributeDefinitionImpl<X> createAttributeDefinition(QName name, QName typeName)
- Specified by:
createAttributeDefinitionin interfaceMutableObjectClassComplexTypeDefinition
-
createAttributeDefinition
public <X> ResourceAttributeDefinitionImpl<X> createAttributeDefinition(String localName, QName typeName)
- Specified by:
createAttributeDefinitionin interfaceMutableObjectClassComplexTypeDefinition
-
createAttributeDefinition
public <X> ResourceAttributeDefinition<X> createAttributeDefinition(String localName, String localTypeName)
- Specified by:
createAttributeDefinitionin interfaceMutableObjectClassComplexTypeDefinition
-
matches
public boolean matches(ShadowType shadow)
Description copied from interface:ObjectClassComplexTypeDefinitionDo not use. Unclear semantics. For synchronization tasks usecom.evolveum.midpoint.model.impl.sync.SynchronizationObjectsFilterclass instead.- Specified by:
matchesin 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:
instantiatein interfaceObjectClassComplexTypeDefinition
-
instantiate
public static ResourceAttributeContainer instantiate(QName elementName, ObjectClassComplexTypeDefinition ocdef)
-
clone
@NotNull public @NotNull ObjectClassComplexTypeDefinitionImpl clone()
Description copied from interface:ComplexTypeDefinitionDoes a shallow clone of this definition (i.e. item definitions themselves are NOT cloned).- Specified by:
clonein interfaceComplexTypeDefinition- Specified by:
clonein interfaceDefinition- Specified by:
clonein interfaceMutableComplexTypeDefinition- Specified by:
clonein interfaceObjectClassComplexTypeDefinition- Overrides:
clonein 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:ComplexTypeDefinitionDoes a deep clone of this definition.- Specified by:
deepClonein interfaceComplexTypeDefinition- Specified by:
deepClonein interfaceObjectClassComplexTypeDefinition- Overrides:
deepClonein 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:
hashCodein classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
getDebugDumpClassName
protected String getDebugDumpClassName()
- Overrides:
getDebugDumpClassNamein classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
extendDumpHeader
protected void extendDumpHeader(StringBuilder sb)
- Overrides:
extendDumpHeaderin classcom.evolveum.midpoint.prism.impl.DefinitionImpl
-
extendItemDumpDefinition
protected void extendItemDumpDefinition(StringBuilder sb, ItemDefinition<?> def)
- Overrides:
extendItemDumpDefinitionin classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
toMutable
public MutableObjectClassComplexTypeDefinition toMutable()
- Specified by:
toMutablein interfaceComplexTypeDefinition- Specified by:
toMutablein interfaceDefinition- Specified by:
toMutablein interfaceObjectClassComplexTypeDefinition- Overrides:
toMutablein classcom.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
-
-