Class CompositeObjectDefinitionImpl
- java.lang.Object
-
- com.evolveum.midpoint.prism.AbstractFreezable
-
- com.evolveum.midpoint.schema.processor.CompositeObjectDefinitionImpl
-
- All Implemented Interfaces:
ComplexTypeDefinition,Definition,Freezable,LocalItemDefinitionStore,PrismContextSensitive,Revivable,SmartVisitable<Definition>,TypeDefinition,Visitable<Definition>,AssociationDefinitionStore,AttributeDefinitionStore,CompositeObjectDefinition,IdentifiersDefinitionStore,LayeredDefinition,ResourceObjectDefinition,DebugDumpable,Serializable,Cloneable
public class CompositeObjectDefinitionImpl extends AbstractFreezable implements CompositeObjectDefinition
Represents ad-hoc combination of definitions of structural and auxiliary object classes.- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description CompositeObjectDefinitionImpl(@NotNull ResourceObjectDefinition structuralDefinition, @Nullable Collection<ResourceObjectDefinition> auxiliaryDefinitions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor<Definition> visitor)booleanaccept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)booleancanRepresent(QName typeName)@NotNull CompositeObjectDefinitionImplclone()Does a shallow clone of this definition (i.e.PrismObject<ShadowType>createBlankShadow(String resourceOid, String tag)Creates a blankShadowTypeobject, with the attributes container having appropriate definition.@NotNull ObjectQuerycreateShadowSearchQuery(String resourceOid)Creates a query for obtaining shadows related to this object class or object type.StringdebugDump(int indent)@NotNull CompositeObjectDefinitionImpldeepClone(@NotNull DeepCloneOperation operation)Does a deep clone of this definition.booleanequals(Object obj)<ID extends ItemDefinition<?>>
IDfindItemDefinition(@NotNull ItemPath path, @NotNull Class<ID> clazz)Returns a definition of given type corresponding to given path (rooted at this store).CompositeObjectDefinitionforLayer(@NotNull LayerType layer)Creates a layer-specific version of this definition.ResourceActivationDefinitionTypegetActivationSchemaHandling()<A> AgetAnnotation(QName qname)Returns generic definition annotation.@Nullable Map<QName,Object>getAnnotations()Returns all annotations, as unmodifiable map.@NotNull Collection<ResourceAssociationDefinition>getAssociationDefinitions()Returns definitions of all associations as an unmodifiable collection.@NotNull List<? extends ResourceAttributeDefinition<?>>getAttributeDefinitions()Returns all attribute definitions as an unmodifiable collection.@NotNull Collection<ResourceObjectDefinition>getAuxiliaryDefinitions()Returns auxiliary definitions.ResourceBidirectionalMappingAndDefinitionTypegetAuxiliaryObjectClassMappings()ResourceObjectReferenceTypegetBaseContext()The definition of base context (resource object container).Class<?>getCompileTimeClass()Returns compile-time class, if this type has any.@NotNull LayerTypegetCurrentLayer()Gets the current point-of-view: on which layer do we look at the data?StringgetDebugDumpClassName()Return a human readable name of this class suitable for logs.@Nullable DefaultInboundMappingEvaluationPhasesTypegetDefaultInboundMappingEvaluationPhases()Returns the phases in which inbound mappings are evaluated by default.StringgetDefaultNamespace()When resolving unqualified names for items contained in this CTD, what should be the default namespace to look into at first.@NotNull ResourceObjectTypeDefinitionTypegetDefinitionBean()Returns the "raw" configuration bean for this object type.@NotNull List<? extends ItemDefinition<?>>getDefinitions()Returns definitions for all inner items.@NotNull ResourceObjectTypeDelineationgetDelineation()Returns the delineation of the set of objects belonging to this object type.StringgetDeprecatedSince()StringgetDescription()Free-form textual description of the object.@Nullable QNamegetDescriptionAttributeName()Returns name of the description attribute.List<ItemDiagramSpecification>getDiagrams()StringgetDisplayName()Returns display name.@Nullable QNamegetDisplayNameAttributeName()Returns name of the display name attribute.IntegergetDisplayOrder()Specifies an order in which the item should be displayed relative to other items at the same level.StringgetDocumentation()StringgetDocumentationPreview()Returns only a first sentence of documentation.<T extends CapabilityType>
TgetEnabledCapability(@NotNull Class<T> capabilityClass, ResourceType resource)Checks the presence of capability in: 1.QNamegetExtensionForType()If not null, indicates that this type defines the structure of `extension` element of a given type.StringgetHelp()Returns help string.StringgetHumanReadableName()TODO@NotNull List<String>getIgnoredNamespaces()When resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored.IntegergetInstantiationOrder()@Nullable QNamegetNamingAttributeName()Returns name of the naming attribute.@NotNull ResourceObjectClassDefinitiongetObjectClassDefinition()Returns the (raw or refined) object class definition.@NotNull QNamegetObjectClassName()Returns the name of the object class.ResourceObjectMultiplicityTypegetObjectMultiplicity()ResourcePasswordDefinitionTypegetPasswordDefinition()StringgetPlannedRemoval()Version of data model in which the item is likely to be removed.@NotNull Collection<? extends ResourceAttributeDefinition<?>>getPrimaryIdentifiers()Returns the definition of primary identifier attributes of a resource object.@NotNull Collection<QName>getPrimaryIdentifiersNames()Returns names of primary identifiers.PrismContextgetPrismContext()PrismObjectDefinition<ShadowType>getPrismObjectDefinition()Returns a prism definition for the prism object/objects carrying the resource object/objects.ItemProcessinggetProcessing()Level of processing (ignore, minimal, auto, full) for this item/type.ProjectionPolicyTypegetProjectionPolicy()@NotNull Collection<ResourceObjectPattern>getProtectedObjectPatterns()Returns compiled patterns denoting protected objects.@NotNull ResourceObjectClassDefinitiongetRawObjectClassDefinition()Returns the raw object class definition.StringgetResourceOid()This is currently used only to pass information about association in the model-impl TODO consider removal!List<SchemaMigration>getSchemaMigrations()SearchHierarchyScopegetSearchHierarchyScope()Definition of search hierarchy scope.@NotNull Collection<? extends ResourceAttributeDefinition<?>>getSecondaryIdentifiers()Returns the definition of secondary identifier attributes of a resource object.@NotNull Collection<QName>getSecondaryIdentifiersNames()Returns names of secondary identifiers.ObjectReferenceTypegetSecurityPolicyRef()@NotNull Collection<TypeDefinition>getStaticSubTypes()Subtypes - but only these that are a part of the static schema.@NotNull ResourceObjectDefinitiongetStructuralDefinition()Returns the structural definition that represents the "base" of this composite definition.QNamegetSuperType()Name of super type of this complex type definition.Class<?>getTypeClass()Returns a compile-time class that is used to represent items.@Nullable ResourceObjectTypeDefinitiongetTypeDefinition()Is this definition bound to a specific resource type? If yes, this method returns its definition.@Nullable ResourceObjectTypeIdentificationgetTypeIdentification()Is this definition bound to a specific resource type? If yes, this method returns its identification.@NotNull QNamegetTypeName()Returns a name of the type for this definition.@NotNull ResourceObjectVolatilityTypegetVolatility()Specifies volatility of this type of resource objects, i.e.booleanhasAuxiliaryObjectClass(QName expectedObjectClassName)TODO define semantics (it's different forCompositeObjectDefinitionand the others!inthashCode()booleanhasSubstitutions()booleanisAbstract()For types: is the type abstract so that it should not be instantiated directly? For items: TODObooleanisContainerMarker()Flag indicating whether this type was marked as "container" in the original schema.booleanisDefaultFor(@NotNull ShadowKindType kind)Returns true if this definition can be considered as a default for the specified kind.booleanisDeprecated()booleanisElaborate()Elaborate items are complicated data structure that may deviate from normal principles of the system.booleanisEmphasized()True for definitions that are more important than others and that should be emphasized during presentation.booleanisEmpty()Returns true if there are no item definitions.booleanisExperimental()Experimental functionality is not stable and it may be changed in any future release without any warning.booleanisListMarker()True if the complex type definition is a type dedicated to hold so-called https://docs.evolveum.com/midpoint/devel/design/xml-json-yaml-vs-xnode-vs-internal-data/heterogeneous-lists/[heterogeneous lists].booleanisObjectMarker()Flag indicating whether this type was marked as "object" in the original schema.booleanisPrimaryIdentifier(QName attrName)Returns true if the attribute with a given name is among primary identifiers.booleanisReferenceMarker()Flag indicating whether this type was marked as "objectReference" in the original schema.booleanisRuntimeSchema()This means that this particular definition (of an item or of a type) is part of the runtime schema, e.g.booleanisSecondaryIdentifier(QName attrName)Returns true if the attribute with a given name is among secondary identifiers.booleanisXsdAnyMarker()True if the complex type definition contains xsd:any (directly or indirectly).voidmerge(ComplexTypeDefinition otherComplexTypeDef)Copies cloned definitions from the other type definition into this one.voidperformFreeze()voidreplaceDefinition(@NotNull QName itemName, @Nullable ItemDefinition<?> newDefinition)Replaces a definition for given item name with a provided one.voidrevive(PrismContext prismContext)TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)<A> voidsetAnnotation(QName qname, A value)Optional<ItemDefinition<?>>substitution(QName name)MutableResourceObjectClassDefinitiontoMutable()Returns an interface to mutate this definition.StringtoString()voidtrimTo(@NotNull Collection<ItemPath> paths)Trims the definition (and any definitions it refers to) to contain only items related to given paths.voidvalidate()Executes some basic checks on this object type.-
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.schema.processor.AssociationDefinitionStore
findAssociationDefinition, findAssociationDefinitionRequired, getAssociationDefinitions, getNamesOfAssociations, getNamesOfAssociationsWithInboundExpressions, getNamesOfAssociationsWithOutboundExpressions
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.AttributeDefinitionStore
containsAttributeDefinition, findAttributeDefinition, findAttributeDefinition, findAttributeDefinition, findAttributeDefinitionRequired, findAttributeDefinitionRequired, findAttributeDefinitionStrictlyRequired, findAttributeDefinitionStrictlyRequired, getAttributeDefinitions, getNamesOfAttributesWithInboundExpressions, getNamesOfAttributesWithOutboundExpressions, hasIndexOnlyAttributes, propertyToAttribute
-
Methods inherited from interface com.evolveum.midpoint.prism.ComplexTypeDefinition
getXmlAttributeDefinitions, hasSubstitutions, isItemDefinitionRemoved, isStrictAnyMarker, itemOrSubstitution
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.CompositeObjectDefinition
getConfiguredAuxiliaryObjectClassNames
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getMutabilityFlag, getSchemaRegistry, isIgnored
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.IdentifiersDefinitionStore
getAllIdentifiers, isIdentifier
-
Methods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findContainerDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinition
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.ResourceObjectDefinition
getActivationBidirectionalMappingType, getActivationFetchStrategy, getDescriptionAttribute, getDisplayNameAttribute, getNamingAttribute, getPagedSearches, getPasswordFetchStrategy, getPasswordInbound, getPasswordOutbound, instantiate, isObjectCountingEnabled, isPagedSearchEnabled, matchesObjectClassName, replaceDefinition, toResourceAttributeContainerDefinition, toResourceAttributeContainerDefinition
-
Methods inherited from interface com.evolveum.midpoint.prism.TypeDefinition
isAssignableFrom
-
-
-
-
Constructor Detail
-
CompositeObjectDefinitionImpl
public CompositeObjectDefinitionImpl(@NotNull @NotNull ResourceObjectDefinition structuralDefinition, @Nullable @Nullable Collection<ResourceObjectDefinition> auxiliaryDefinitions)
-
-
Method Detail
-
getAuxiliaryDefinitions
@NotNull public @NotNull Collection<ResourceObjectDefinition> getAuxiliaryDefinitions()
Description copied from interface:CompositeObjectDefinitionReturns auxiliary definitions. They enrich the structural definition e.g. by adding attribute definitions. TODO specify better- Specified by:
getAuxiliaryDefinitionsin interfaceCompositeObjectDefinition- Specified by:
getAuxiliaryDefinitionsin interfaceResourceObjectDefinition
-
getPrismObjectDefinition
public PrismObjectDefinition<ShadowType> getPrismObjectDefinition()
Description copied from interface:ResourceObjectDefinitionReturns a prism definition for the prism object/objects carrying the resource object/objects.- Specified by:
getPrismObjectDefinitionin interfaceResourceObjectDefinition
-
getCompileTimeClass
public Class<?> getCompileTimeClass()
Description copied from interface:TypeDefinitionReturns compile-time class, if this type has any. For example, UserType.class, ObjectType.class, ExtensionType.class.- Specified by:
getCompileTimeClassin interfaceTypeDefinition
-
isContainerMarker
public boolean isContainerMarker()
Description copied from interface:ComplexTypeDefinitionFlag indicating whether this type was marked as "container" in the original schema. Does not provide any information to schema processing logic, just conveys the marker from original schema so we can serialize and deserialize the schema without loss of information.- Specified by:
isContainerMarkerin interfaceComplexTypeDefinition
-
isPrimaryIdentifier
public boolean isPrimaryIdentifier(QName attrName)
Description copied from interface:IdentifiersDefinitionStoreReturns true if the attribute with a given name is among primary identifiers. Matching is done using namespace-approximate method (testing only local part if no namespace is provided), so beware of incidental matching (e.g. ri:uid vs icfs:uid).- Specified by:
isPrimaryIdentifierin interfaceIdentifiersDefinitionStore
-
isObjectMarker
public boolean isObjectMarker()
Description copied from interface:ComplexTypeDefinitionFlag indicating whether this type was marked as "object" in the original schema. Does not provide any information to schema processing logic, just conveys the marker from original schema so we can serialized and deserialize the schema without loss of information.- Specified by:
isObjectMarkerin interfaceComplexTypeDefinition
-
getProcessing
public ItemProcessing getProcessing()
Description copied from interface:DefinitionLevel of processing (ignore, minimal, auto, full) for this item/type.- Specified by:
getProcessingin interfaceDefinition
-
getSchemaMigrations
public List<SchemaMigration> getSchemaMigrations()
- Specified by:
getSchemaMigrationsin interfaceDefinition
-
getDiagrams
public List<ItemDiagramSpecification> getDiagrams()
- Specified by:
getDiagramsin interfaceDefinition
-
isEmphasized
public boolean isEmphasized()
Description copied from interface:DefinitionTrue for definitions that are more important than others and that should be emphasized during presentation. E.g. the emphasized definitions will always be displayed in the user interfaces (even if they are empty), they will always be included in the dumps, etc.- Specified by:
isEmphasizedin interfaceDefinition
-
isAbstract
public boolean isAbstract()
Description copied from interface:DefinitionFor types: is the type abstract so that it should not be instantiated directly? For items: TODO- Specified by:
isAbstractin interfaceDefinition
-
getSuperType
public QName getSuperType()
Description copied from interface:TypeDefinitionName of super type of this complex type definition. E.g. c:ObjectType is a super type for c:FocusType which is a super type for c:UserType. Or (more complex example) ri:ShadowAttributesType is a super type of ri:AccountObjectClass. (TODO is this really true?)- Specified by:
getSuperTypein interfaceTypeDefinition
-
isSecondaryIdentifier
public boolean isSecondaryIdentifier(QName attrName)
Description copied from interface:IdentifiersDefinitionStoreReturns true if the attribute with a given name is among secondary identifiers. Matching is done using namespace-approximate method (testing only local part if no namespace is provided), so beware of incidental matching (e.g. ri:uid vs icfs:uid).- Specified by:
isSecondaryIdentifierin interfaceIdentifiersDefinitionStore
-
isDeprecated
public boolean isDeprecated()
- Specified by:
isDeprecatedin interfaceDefinition
-
getDeprecatedSince
public String getDeprecatedSince()
- Specified by:
getDeprecatedSincein interfaceDefinition
-
isExperimental
public boolean isExperimental()
Description copied from interface:DefinitionExperimental functionality is not stable and it may be changed in any future release without any warning. Use at your own risk.- Specified by:
isExperimentalin interfaceDefinition
-
getPlannedRemoval
public String getPlannedRemoval()
Description copied from interface:DefinitionVersion of data model in which the item is likely to be removed. This annotation is used for deprecated item to indicate imminent incompatibility in future versions of data model.- Specified by:
getPlannedRemovalin interfaceDefinition
-
isElaborate
public boolean isElaborate()
Description copied from interface:DefinitionElaborate items are complicated data structure that may deviate from normal principles of the system. For example elaborate items may not be supported in user interface and may only be manageable by raw edits or a special-purpose tools. Elaborate items may be not fully supported by authorizations, schema tools and so on.- Specified by:
isElaboratein interfaceDefinition
-
getDisplayOrder
public Integer getDisplayOrder()
Description copied from interface:DefinitionSpecifies an order in which the item should be displayed relative to other items at the same level. The items will be displayed by sorting them by the values of displayOrder annotation (ascending). Items that do not have any displayOrder annotation will be displayed last. The ordering of values with the same displayOrder is undefined and it may be arbitrary.- Specified by:
getDisplayOrderin interfaceDefinition
-
getHelp
public String getHelp()
Description copied from interface:DefinitionReturns 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:
getHelpin interfaceDefinition- Returns:
- help string or catalog key
-
getTypeName
@NotNull public @NotNull QName getTypeName()
Description copied from interface:DefinitionReturns 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:
getTypeNamein interfaceDefinition- Returns:
- the type name
-
getDocumentation
public String getDocumentation()
- Specified by:
getDocumentationin interfaceDefinition
-
getDocumentationPreview
public String getDocumentationPreview()
Description copied from interface:DefinitionReturns only a first sentence of documentation.- Specified by:
getDocumentationPreviewin interfaceDefinition
-
isRuntimeSchema
public boolean isRuntimeSchema()
Description copied from interface:DefinitionThis means that this particular definition (of an item or of a type) is part of the runtime schema, e.g. extension schema, resource schema or connector schema or something like that. I.e. it is not defined statically.- Specified by:
isRuntimeSchemain interfaceDefinition
-
getPrimaryIdentifiers
@NotNull public @NotNull Collection<? extends ResourceAttributeDefinition<?>> getPrimaryIdentifiers()
Description copied from interface:IdentifiersDefinitionStoreReturns 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 interfaceIdentifiersDefinitionStore- Returns:
- definition of identifier attributes
-
getPrimaryIdentifiersNames
@NotNull public @NotNull Collection<QName> getPrimaryIdentifiersNames()
Description copied from interface:IdentifiersDefinitionStoreReturns names of primary identifiers.- Specified by:
getPrimaryIdentifiersNamesin interfaceIdentifiersDefinitionStore- See Also:
IdentifiersDefinitionStore.getPrimaryIdentifiers()
-
getSecondaryIdentifiers
@NotNull public @NotNull Collection<? extends ResourceAttributeDefinition<?>> getSecondaryIdentifiers()
Description copied from interface:IdentifiersDefinitionStoreReturns 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 interfaceIdentifiersDefinitionStore- Returns:
- definition of secondary identifier attributes
-
getSecondaryIdentifiersNames
@NotNull public @NotNull Collection<QName> getSecondaryIdentifiersNames()
Description copied from interface:IdentifiersDefinitionStoreReturns names of secondary identifiers.- Specified by:
getSecondaryIdentifiersNamesin interfaceIdentifiersDefinitionStore- See Also:
()
-
getAssociationDefinitions
@NotNull public @NotNull Collection<ResourceAssociationDefinition> getAssociationDefinitions()
Description copied from interface:AssociationDefinitionStoreReturns definitions of all associations as an unmodifiable collection. Note: these items are _not_ included in getDefinitions. (BTW, ResourceAssociationDefinition is not a subtype of ItemDefinition, not even of Definition.)- Specified by:
getAssociationDefinitionsin interfaceAssociationDefinitionStore
-
isEmpty
public boolean isEmpty()
Description copied from interface:ComplexTypeDefinitionReturns true if there are no item definitions.- Specified by:
isEmptyin interfaceComplexTypeDefinition
-
getProtectedObjectPatterns
@NotNull public @NotNull Collection<ResourceObjectPattern> getProtectedObjectPatterns()
Description copied from interface:ResourceObjectDefinitionReturns compiled patterns denoting protected objects.- Specified by:
getProtectedObjectPatternsin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getProtected()
-
getDisplayName
public String getDisplayName()
Description copied from interface:DefinitionReturns 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:
getDisplayNamein interfaceDefinition- Returns:
- display name string or catalog key
-
getDescription
public String getDescription()
Description copied from interface:ResourceObjectDefinitionFree-form textual description of the object. It is supposed to describe the object or a construct that it is attached to.- Specified by:
getDescriptionin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getDescription()
-
getResourceOid
public String getResourceOid()
Description copied from interface:ResourceObjectDefinitionThis is currently used only to pass information about association in the model-impl TODO consider removal!- Specified by:
getResourceOidin interfaceResourceObjectDefinition
-
getObjectClassDefinition
@NotNull public @NotNull ResourceObjectClassDefinition getObjectClassDefinition()
Description copied from interface:ResourceObjectDefinitionReturns the (raw or refined) object class definition. It is either this object itself (for object classes), or the linked object class definition (for object types).- Specified by:
getObjectClassDefinitionin interfaceResourceObjectDefinition
-
getRawObjectClassDefinition
@NotNull public @NotNull ResourceObjectClassDefinition getRawObjectClassDefinition()
Description copied from interface:ResourceObjectDefinitionReturns the raw object class definition.- Specified by:
getRawObjectClassDefinitionin interfaceResourceObjectDefinition
-
getDelineation
@NotNull public @NotNull ResourceObjectTypeDelineation getDelineation()
Description copied from interface:ResourceObjectDefinitionReturns the delineation of the set of objects belonging to this object type. Note that this tells only about information stored right in the definition bean, i.e. legacy configuration is not provided here. The complete picture is provided bySynchronizationPolicy.getDelineation().- Specified by:
getDelineationin interfaceResourceObjectDefinition
-
getBaseContext
public ResourceObjectReferenceType getBaseContext()
Description copied from interface:ResourceObjectDefinitionThe definition of base context (resource object container). This object will be used as a base for searches for objects of this type.- Specified by:
getBaseContextin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getBaseContext()
-
getSearchHierarchyScope
public SearchHierarchyScope getSearchHierarchyScope()
Description copied from interface:ResourceObjectDefinitionDefinition of search hierarchy scope. It specifies how "deep" the search should go into the object hierarchy.- Specified by:
getSearchHierarchyScopein interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getSearchHierarchyScope()
-
getVolatility
@NotNull public @NotNull ResourceObjectVolatilityType getVolatility()
Description copied from interface:ResourceObjectDefinitionSpecifies volatility of this type of resource objects, i.e. whether such an object can change when midPoint is not looking.- Specified by:
getVolatilityin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getVolatility()
-
getDefaultInboundMappingEvaluationPhases
@Nullable public @Nullable DefaultInboundMappingEvaluationPhasesType getDefaultInboundMappingEvaluationPhases()
Description copied from interface:ResourceObjectDefinitionReturns the phases in which inbound mappings are evaluated by default.- Specified by:
getDefaultInboundMappingEvaluationPhasesin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getMappingsEvaluation()
-
getObjectMultiplicity
public ResourceObjectMultiplicityType getObjectMultiplicity()
- Specified by:
getObjectMultiplicityin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getMultiplicity()
-
getProjectionPolicy
public ProjectionPolicyType getProjectionPolicy()
- Specified by:
getProjectionPolicyin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getProjection()
-
getSecurityPolicyRef
public ObjectReferenceType getSecurityPolicyRef()
- Specified by:
getSecurityPolicyRefin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getSecurityPolicyRef()
-
getActivationSchemaHandling
public ResourceActivationDefinitionType getActivationSchemaHandling()
- Specified by:
getActivationSchemaHandlingin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getActivation()
-
getEnabledCapability
public <T extends CapabilityType> T getEnabledCapability(@NotNull @NotNull Class<T> capabilityClass, ResourceType resource)
Description copied from interface:ResourceObjectDefinitionChecks the presence of capability in: 1. resource object definition (applicable only to resource object _type_ definitions), 2. additional connectors in resource (only if enabled there), 3. the main connector. Returns the present capability, but only if it's enabled.- Specified by:
getEnabledCapabilityin interfaceResourceObjectDefinition
-
validate
public void validate() throws SchemaExceptionDescription copied from interface:ResourceObjectDefinitionExecutes some basic checks on this object type. Moved from `validateObjectClassDefinition()` method inResourceTypeUtil. TODO review this method- Specified by:
validatein interfaceResourceObjectDefinition- Throws:
SchemaException
-
getAttributeDefinitions
@NotNull public @NotNull List<? extends ResourceAttributeDefinition<?>> getAttributeDefinitions()
Description copied from interface:AttributeDefinitionStoreReturns all attribute definitions as an unmodifiable collection. Should be the same content as returned by `getDefinitions`. The returned value is aListbecause of the contract ofComplexTypeDefinition.getDefinitions().- Specified by:
getAttributeDefinitionsin interfaceAttributeDefinitionStore
-
getDefinitions
@NotNull public @NotNull List<? extends ItemDefinition<?>> getDefinitions()
Description copied from interface:ComplexTypeDefinitionReturns definitions for all inner items. These are of typeItemDefinition. However, very often subtypes of this type are used, e.g. ResourceAttributeDefinition, RefinedAttributeDefinition, LayerRefinedAttributeDefinition, and so on. The returned structure is aListbecause the ordering is significant, e.g. for serialization purposes. The list is unmodifiable.- Specified by:
getDefinitionsin interfaceComplexTypeDefinition- Specified by:
getDefinitionsin interfaceLocalItemDefinitionStore
-
getPrismContext
public PrismContext getPrismContext()
- Specified by:
getPrismContextin interfacePrismContextSensitive
-
revive
public void revive(PrismContext prismContext)
Description copied from interface:RevivableTODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)
-
getExtensionForType
public QName getExtensionForType()
Description copied from interface:ComplexTypeDefinitionIf not null, indicates that this type defines the structure of `extension` element of a given type. E.g. `getExtensionForType()` == `c:UserType` means that this complex type defines structure of `extension` elements of `UserType` objects.- Specified by:
getExtensionForTypein interfaceComplexTypeDefinition
-
isXsdAnyMarker
public boolean isXsdAnyMarker()
Description copied from interface:ComplexTypeDefinitionTrue if the complex type definition contains xsd:any (directly or indirectly).- Specified by:
isXsdAnyMarkerin interfaceComplexTypeDefinition
-
getDefaultNamespace
public String getDefaultNamespace()
Description copied from interface:ComplexTypeDefinitionWhen resolving unqualified names for items contained in this CTD, what should be the default namespace to look into at first. Currently does NOT apply recursively (to inner CTDs). Set by parsing `defaultNamespace` XSD annotation.- Specified by:
getDefaultNamespacein interfaceComplexTypeDefinition
-
getIgnoredNamespaces
@NotNull public @NotNull List<String> getIgnoredNamespaces()
Description copied from interface:ComplexTypeDefinitionWhen resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored. Names in this list are interpreted as a namespace prefixes. Currently does NOT apply recursively (to inner CTDs). Set by parsing `ignoredNamespace` XSD annotations.- Specified by:
getIgnoredNamespacesin interfaceComplexTypeDefinition
-
getAuxiliaryObjectClassMappings
public ResourceBidirectionalMappingAndDefinitionType getAuxiliaryObjectClassMappings()
- Specified by:
getAuxiliaryObjectClassMappingsin interfaceResourceObjectDefinition- See Also:
ResourceObjectTypeDefinitionType.getAuxiliaryObjectClassMappings()
-
hasAuxiliaryObjectClass
public boolean hasAuxiliaryObjectClass(QName expectedObjectClassName)
Description copied from interface:ResourceObjectDefinitionTODO define semantics (it's different forCompositeObjectDefinitionand the others!- Specified by:
hasAuxiliaryObjectClassin interfaceResourceObjectDefinition
-
findItemDefinition
public <ID extends ItemDefinition<?>> ID findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<ID> clazz)
Description copied from interface:LocalItemDefinitionStoreReturns a definition of given type corresponding to given path (rooted at this store). Tries the global resolution in the case of "any" content.- Specified by:
findItemDefinitionin interfaceLocalItemDefinitionStore
-
merge
public void merge(ComplexTypeDefinition otherComplexTypeDef)
Description copied from interface:ComplexTypeDefinitionCopies cloned definitions from the other type definition into this one. (TODO remove from the interface?)- Specified by:
mergein interfaceComplexTypeDefinition
-
getTypeClass
public Class<?> getTypeClass()
Description copied from interface:DefinitionReturns a compile-time class that is used to represent items. E.g. returns String, Integer, subclasses of Objectable and Containerable and so on.- Specified by:
getTypeClassin interfaceDefinition
-
createBlankShadow
public PrismObject<ShadowType> createBlankShadow(String resourceOid, String tag)
Description copied from interface:ResourceObjectDefinitionCreates a blankShadowTypeobject, with the attributes container having appropriate definition.- Specified by:
createBlankShadowin interfaceResourceObjectDefinition
-
getPasswordDefinition
public ResourcePasswordDefinitionType getPasswordDefinition()
Description copied from interface:ResourceObjectDefinition- Specified by:
getPasswordDefinitionin interfaceResourceObjectDefinition
-
accept
public void accept(Visitor<Definition> visitor)
- Specified by:
acceptin interfaceVisitable<Definition>
-
accept
public boolean accept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)
- Specified by:
acceptin interfaceSmartVisitable<Definition>- Returns:
- false if we already was here
-
clone
@NotNull public @NotNull CompositeObjectDefinitionImpl 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 interfaceResourceObjectDefinition- Overrides:
clonein classObject
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDumpin interfaceDebugDumpable
-
getDebugDumpClassName
public String getDebugDumpClassName()
Return a human readable name of this class suitable for logs.- Specified by:
getDebugDumpClassNamein interfaceResourceObjectDefinition
-
getHumanReadableName
public String getHumanReadableName()
Description copied from interface:ResourceObjectDefinitionTODO- Specified by:
getHumanReadableNamein interfaceResourceObjectDefinition
-
deepClone
@NotNull public @NotNull CompositeObjectDefinitionImpl deepClone(@NotNull @NotNull DeepCloneOperation operation)
Description copied from interface:ComplexTypeDefinitionDoes a deep clone of this definition.- Specified by:
deepClonein interfaceComplexTypeDefinition- Specified by:
deepClonein interfaceResourceObjectDefinition
-
getDefinitionBean
@NotNull public @NotNull ResourceObjectTypeDefinitionType getDefinitionBean()
Description copied from interface:ResourceObjectDefinitionReturns the "raw" configuration bean for this object type. BEWARE: In the case of inherited object types, this is only the partial information. (Parts inherited from the parents are not returned.)- Specified by:
getDefinitionBeanin interfaceResourceObjectDefinition
-
forLayer
public CompositeObjectDefinition forLayer(@NotNull @NotNull LayerType layer)
Description copied from interface:ResourceObjectDefinitionCreates a layer-specific version of this definition.- Specified by:
forLayerin interfaceResourceObjectDefinition
-
getCurrentLayer
@NotNull public @NotNull LayerType getCurrentLayer()
Description copied from interface:LayeredDefinitionGets the current point-of-view: on which layer do we look at the data?- Specified by:
getCurrentLayerin interfaceLayeredDefinition
-
replaceDefinition
public void replaceDefinition(@NotNull @NotNull QName itemName, @Nullable @Nullable ItemDefinition<?> newDefinition)Description copied from interface:ResourceObjectDefinitionReplaces a definition for given item name with a provided one.- Specified by:
replaceDefinitionin interfaceResourceObjectDefinition
-
isListMarker
public boolean isListMarker()
Description copied from interface:ComplexTypeDefinitionTrue if the complex type definition is a type dedicated to hold so-called https://docs.evolveum.com/midpoint/devel/design/xml-json-yaml-vs-xnode-vs-internal-data/heterogeneous-lists/[heterogeneous lists]. See alsoDOMUtil.IS_LIST_ATTRIBUTE_NAMEandItemDefinition.isHeterogeneousListItem().- Specified by:
isListMarkerin interfaceComplexTypeDefinition
-
trimTo
public void trimTo(@NotNull @NotNull Collection<ItemPath> paths)Description copied from interface:ComplexTypeDefinitionTrims the definition (and any definitions it refers to) to contain only items related to given paths. USE WITH CARE. Be sure no shared definitions would be affected by this operation!- Specified by:
trimToin interfaceComplexTypeDefinition
-
toMutable
public MutableResourceObjectClassDefinition toMutable()
Description copied from interface:DefinitionReturns an interface to mutate this definition.- Specified by:
toMutablein interfaceComplexTypeDefinition- Specified by:
toMutablein interfaceDefinition
-
isReferenceMarker
public boolean isReferenceMarker()
Description copied from interface:ComplexTypeDefinitionFlag indicating whether this type was marked as "objectReference" in the original schema.- Specified by:
isReferenceMarkerin interfaceComplexTypeDefinition
-
getStaticSubTypes
@NotNull public @NotNull Collection<TypeDefinition> getStaticSubTypes()
Description copied from interface:TypeDefinitionSubtypes - but only these that are a part of the static schema. A little bit experimental. :)- Specified by:
getStaticSubTypesin interfaceTypeDefinition
-
getAnnotation
public <A> A getAnnotation(QName qname)
Description copied from interface:DefinitionReturns generic definition annotation. Annotations are a method to extend schema definitions. This may be annotation stored in the schema definition file (e.g. XSD) or it may be a dynamic annotation determined at run-time. Annotation value should be a prism-supported object. E.g. a prims "bean" (JAXB annotated class), prism item, prism value or something like that. EXPERIMENTAL. Hic sunt leones. This may change at any moment. Note: annotations are only partially supported now (3.8). They are somehow transient. E.g. they are not serialized to XSD schema definitions (yet).- Specified by:
getAnnotationin interfaceDefinition
-
setAnnotation
public <A> void setAnnotation(QName qname, A value)
- Specified by:
setAnnotationin interfaceDefinition
-
getAnnotations
@Nullable public @Nullable Map<QName,Object> getAnnotations()
Description copied from interface:DefinitionReturns all annotations, as unmodifiable map. Nullable by design, to avoid creating lots of empty maps.- Specified by:
getAnnotationsin interfaceDefinition
-
getInstantiationOrder
public Integer getInstantiationOrder()
- Specified by:
getInstantiationOrderin interfaceTypeDefinition
-
canRepresent
public boolean canRepresent(QName typeName)
- Specified by:
canRepresentin interfaceTypeDefinition
-
performFreeze
public void performFreeze()
- Overrides:
performFreezein classAbstractFreezable
-
hasSubstitutions
public boolean hasSubstitutions()
- Specified by:
hasSubstitutionsin interfaceComplexTypeDefinition
-
substitution
public Optional<ItemDefinition<?>> substitution(QName name)
- Specified by:
substitutionin interfaceComplexTypeDefinition
-
getObjectClassName
@NotNull public @NotNull QName getObjectClassName()
Description copied from interface:ResourceObjectDefinitionReturns the name of the object class.- Specified by:
getObjectClassNamein interfaceResourceObjectDefinition
-
getDescriptionAttributeName
@Nullable public @Nullable QName getDescriptionAttributeName()
Description copied from interface:ResourceObjectDefinitionReturns name of the description attribute.- Specified by:
getDescriptionAttributeNamein interfaceResourceObjectDefinition- See Also:
ResourceObjectDefinition.getDescriptionAttribute()
-
getNamingAttributeName
@Nullable public @Nullable QName getNamingAttributeName()
Description copied from interface:ResourceObjectDefinitionReturns name of the naming attribute.- Specified by:
getNamingAttributeNamein interfaceResourceObjectDefinition- See Also:
ResourceObjectDefinition.getNamingAttributeName()
-
getDisplayNameAttributeName
@Nullable public @Nullable QName getDisplayNameAttributeName()
Description copied from interface:ResourceObjectDefinitionReturns name of the display name attribute.- Specified by:
getDisplayNameAttributeNamein interfaceResourceObjectDefinition- See Also:
ResourceObjectDefinition.getDisplayNameAttribute()
-
createShadowSearchQuery
@NotNull public @NotNull ObjectQuery createShadowSearchQuery(String resourceOid) throws SchemaException
Description copied from interface:ResourceObjectDefinitionCreates a query for obtaining shadows related to this object class or object type. The current implementations return either: - a combination of resource OID + object class name, or - a combination of resource OID + kind + intent.- Specified by:
createShadowSearchQueryin interfaceResourceObjectDefinition- Throws:
SchemaException
-
getStructuralDefinition
@NotNull public @NotNull ResourceObjectDefinition getStructuralDefinition()
Description copied from interface:CompositeObjectDefinitionReturns the structural definition that represents the "base" of this composite definition.- Specified by:
getStructuralDefinitionin interfaceCompositeObjectDefinition
-
getTypeIdentification
@Nullable public @Nullable ResourceObjectTypeIdentification getTypeIdentification()
Description copied from interface:ResourceObjectDefinitionIs this definition bound to a specific resource type? If yes, this method returns its identification.- Specified by:
getTypeIdentificationin interfaceResourceObjectDefinition
-
getTypeDefinition
@Nullable public @Nullable ResourceObjectTypeDefinition getTypeDefinition()
Description copied from interface:ResourceObjectDefinitionIs this definition bound to a specific resource type? If yes, this method returns its definition.- Specified by:
getTypeDefinitionin interfaceResourceObjectDefinition
-
isDefaultFor
public boolean isDefaultFor(@NotNull @NotNull ShadowKindType kind)Description copied from interface:ResourceObjectDefinitionReturns true if this definition can be considered as a default for the specified kind. Normally, for a type definition it means that it is marked as "default for a kind" and has the specified kind. But there is a special case ofResourceObjectClassDefinitionwithResourceObjectClassDefinition.isDefaultAccountDefinition()being `true`. It is considered to be the default forShadowKindType.ACCOUNT. Use with care!- Specified by:
isDefaultForin interfaceResourceObjectDefinition
-
-