Class CompositeRefinedObjectClassDefinitionImpl
- java.lang.Object
-
- com.evolveum.midpoint.common.refinery.CompositeRefinedObjectClassDefinitionImpl
-
- All Implemented Interfaces:
CompositeRefinedObjectClassDefinition
,RefinedObjectClassDefinition
,ComplexTypeDefinition
,Definition
,Freezable
,LocalDefinitionStore
,PrismContextSensitive
,Revivable
,SmartVisitable<Definition>
,TypeDefinition
,Visitable<Definition>
,ObjectClassComplexTypeDefinition
,DebugDumpable
,Serializable
,Cloneable
public class CompositeRefinedObjectClassDefinitionImpl extends Object implements CompositeRefinedObjectClassDefinition
Used to represent combined definition 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 CompositeRefinedObjectClassDefinitionImpl(@NotNull RefinedObjectClassDefinition structuralObjectClassDefinition, Collection<RefinedObjectClassDefinition> auxiliaryObjectClassDefinitions)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
accept(Visitor<Definition> visitor)
boolean
accept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)
boolean
canRepresent(QName typeName)
@NotNull CompositeRefinedObjectClassDefinitionImpl
clone()
Does a shallow clone of this definition (i.e.boolean
containsAttributeDefinition(ItemPathType pathType)
boolean
containsAttributeDefinition(QName attributeName)
PrismObject<ShadowType>
createBlankShadow(RefinedObjectClassDefinition definition)
ObjectQuery
createShadowSearchQuery(String resourceOid)
String
debugDump(int indent)
protected String
debugDump(int indent, LayerType layer)
@NotNull CompositeRefinedObjectClassDefinitionImpl
deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
Does a deep clone of this definition.boolean
equals(Object obj)
RefinedAssociationDefinition
findAssociationDefinition(QName name)
<X> RefinedAttributeDefinition<X>
findAttributeDefinition(@NotNull QName name)
Finds a attribute definition by looking at the property name.<X> RefinedAttributeDefinition<X>
findAttributeDefinition(QName elementQName, boolean caseInsensitive)
Finds a attribute definition by looking at the property name; not considering the case.<ID extends ItemDefinition>
IDfindItemDefinition(@NotNull ItemPath path, @NotNull Class<ID> clazz)
<T extends ItemDefinition>
TfindLocalItemDefinition(@NotNull QName name, @NotNull Class<T> clazz, boolean caseInsensitive)
<ID extends ItemDefinition>
IDfindNamedItemDefinition(@NotNull QName firstName, @NotNull ItemPath rest, @NotNull Class<ID> clazz)
LayerRefinedObjectClassDefinition
forLayer(@NotNull LayerType layerType)
void
freeze()
ResourceBidirectionalMappingType
getActivationBidirectionalMappingType(QName propertyName)
AttributeFetchStrategyType
getActivationFetchStrategy(QName propertyName)
ResourceActivationDefinitionType
getActivationSchemaHandling()
Collection<? extends RefinedAttributeDefinition<?>>
getAllIdentifiers()
Returns both primary and secondary identifiers.<A> A
getAnnotation(QName qname)
Returns generic definition annotation.@NotNull Collection<RefinedAssociationDefinition>
getAssociationDefinitions()
Returns definitions of all associations as an unmodifiable collection.Collection<RefinedAssociationDefinition>
getAssociationDefinitions(ShadowKindType kind)
@NotNull Collection<? extends RefinedAttributeDefinition<?>>
getAttributeDefinitions()
Returns definitions of all attributes as an unmodifiable collection.@NotNull Collection<RefinedObjectClassDefinition>
getAuxiliaryObjectClassDefinitions()
ResourceBidirectionalMappingAndDefinitionType
getAuxiliaryObjectClassMappings()
ResourceObjectReferenceType
getBaseContext()
CapabilitiesType
getCapabilities()
Class<?>
getCompileTimeClass()
Returns compile-time class, if this type has any.String
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.String
getDefaultNamespace()
When resolving unqualified names for items contained in this CTD, what should be the default namespace to look into at first.@NotNull List<? extends ItemDefinition>
getDefinitions()
Returns definitions for all inner items.String
getDeprecatedSince()
String
getDescription()
<X> RefinedAttributeDefinition<X>
getDescriptionAttribute()
Returns the definition of description attribute of a resource object.String
getDisplayName()
Returns display name.<X> RefinedAttributeDefinition<X>
getDisplayNameAttribute()
Returns the definition of display name attribute.Integer
getDisplayOrder()
Specifies an order in which the item should be displayed relative to other items at the same level.String
getDocumentation()
String
getDocumentationPreview()
Returns only a first sentence of documentation.<T extends CapabilityType>
TgetEffectiveCapability(Class<T> capabilityClass, ResourceType resourceType)
Collection<RefinedAssociationDefinition>
getEntitlementAssociationDefinitions()
QName
getExtensionForType()
If not null, indicates that this type defines the structure of 'extension' element of a given type.String
getHelp()
Returns help string.String
getHumanReadableName()
@NotNull List<String>
getIgnoredNamespaces()
When resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored.Integer
getInstantiationOrder()
String
getIntent()
TODO: THIS SHOULD NOT BE HEREShadowKindType
getKind()
TODO: THIS SHOULD NOT BE HEREResourceObjectMultiplicityType
getMultiplicity()
Collection<QName>
getNamesOfAssociations()
Collection<? extends QName>
getNamesOfAssociationsWithInboundExpressions()
Collection<? extends QName>
getNamesOfAssociationsWithOutboundExpressions()
Collection<? extends QName>
getNamesOfAttributesWithInboundExpressions()
Collection<? extends QName>
getNamesOfAttributesWithOutboundExpressions()
<X> RefinedAttributeDefinition<X>
getNamingAttribute()
TODOString
getNativeObjectClass()
Returns the native object class string for the resource object.ObjectClassComplexTypeDefinition
getObjectClassDefinition()
PrismObjectDefinition<ShadowType>
getObjectDefinition()
PagedSearchCapabilityType
getPagedSearches(ResourceType resourceType)
ResourcePasswordDefinitionType
getPasswordDefinition()
AttributeFetchStrategyType
getPasswordFetchStrategy()
List<MappingType>
getPasswordInbound()
List<MappingType>
getPasswordOutbound()
ObjectReferenceType
getPasswordPolicy()
Deprecated.String
getPlannedRemoval()
Version of data model in which the item is likely to be removed.@NotNull Collection<? extends RefinedAttributeDefinition<?>>
getPrimaryIdentifiers()
Returns the definition of primary identifier attributes of a resource object.PrismContext
getPrismContext()
ItemProcessing
getProcessing()
ProjectionPolicyType
getProjection()
Collection<ResourceObjectPattern>
getProtectedObjectPatterns()
String
getResourceOid()
List<SchemaMigration>
getSchemaMigrations()
SearchHierarchyScope
getSearchHierarchyScope()
@NotNull Collection<? extends RefinedAttributeDefinition<?>>
getSecondaryIdentifiers()
Returns the definition of secondary identifier attributes of a resource object.ObjectReferenceType
getSecurityPolicyRef()
ResourceShadowDiscriminator
getShadowDiscriminator()
@NotNull Collection<TypeDefinition>
getStaticSubTypes()
Subtypes - but only these that are a part of the static schema.RefinedObjectClassDefinition
getStructuralObjectClassDefinition()
QName
getSuperType()
Name of super type of this complex type definition.Class
getTypeClass()
Returns a compile-time class that is used to represent items.Class
getTypeClassIfKnown()
@NotNull QName
getTypeName()
Returns a name of the type for this definition.ResourceObjectVolatilityType
getVolatility()
boolean
hasAuxiliaryObjectClass(QName expectedObjectClassName)
int
hashCode()
ResourceAttributeContainer
instantiate(QName elementName)
boolean
isAbstract()
boolean
isAuxiliary()
TODOboolean
isContainerMarker()
Flag indicating whether this type was marked as "container" in the original schema.boolean
isDefault()
boolean
isDefaultInAKind()
Indicates whether definition is should be used as default definition in ist kind.boolean
isDeprecated()
boolean
isElaborate()
Elaborate items are complicated data structure that may deviate from normal principles of the system.boolean
isEmphasized()
True for definitions that are more important than others and that should be emphasized during presentation.boolean
isEmpty()
Returns true if there are no item definitions.boolean
isExperimental()
Experimental functionality is not stable and it may be changed in any future release without any warning.boolean
isIgnored()
Item definition that has this flag set should be ignored by any processing.boolean
isImmutable()
boolean
isListMarker()
boolean
isObjectCountingEnabled(ResourceType resourceType)
boolean
isObjectMarker()
Flag indicating whether this type was marked as "object" in the original schema.boolean
isPagedSearchEnabled(ResourceType resourceType)
boolean
isPrimaryIdentifier(QName attrName)
Returns true if the attribute with a given name is among primary identifiers.boolean
isReferenceMarker()
Flag indicating whether this type was marked as "objectReference" in the original schema.boolean
isRuntimeSchema()
This means that this particular definition (of an item or of a type) is part of the runtime schema, e.g.boolean
isSecondaryIdentifier(QName attrName)
Returns true if the attribute with a given name is among secondary identifiers.boolean
isShared()
Is this definition shared, i.e.boolean
isXsdAnyMarker()
True if the complex type definition contains xsd:any (directly or indirectly).boolean
matches(ShadowType shadowType)
boolean
matchesWithoutIntent(ShadowType shadowType)
void
merge(ComplexTypeDefinition otherComplexTypeDef)
Copies cloned definitions from the other type definition into this one.void
revive(PrismContext prismContext)
<A> void
setAnnotation(QName qname, A value)
MutableObjectClassComplexTypeDefinition
toMutable()
String
toString()
void
trimTo(@NotNull Collection<ItemPath> paths)
Trims the definition (and any definitions it refers to) to contain only items related to given paths.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.prism.ComplexTypeDefinition
containsItemDefinition
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getMutabilityFlag, getSchemaRegistry
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
-
Methods inherited from interface com.evolveum.midpoint.prism.LocalDefinitionStore
findContainerDefinition, findContainerDefinition, findItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinition, findReferenceDefinition
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.ObjectClassComplexTypeDefinition
toResourceAttributeContainerDefinition, toResourceAttributeContainerDefinition
-
Methods inherited from interface com.evolveum.midpoint.common.refinery.RefinedObjectClassDefinition
createBlankShadow, findAttributeDefinition
-
-
-
-
Constructor Detail
-
CompositeRefinedObjectClassDefinitionImpl
public CompositeRefinedObjectClassDefinitionImpl(@NotNull @NotNull RefinedObjectClassDefinition structuralObjectClassDefinition, Collection<RefinedObjectClassDefinition> auxiliaryObjectClassDefinitions)
-
-
Method Detail
-
getStructuralObjectClassDefinition
public RefinedObjectClassDefinition getStructuralObjectClassDefinition()
- Specified by:
getStructuralObjectClassDefinition
in interfaceCompositeRefinedObjectClassDefinition
-
getAuxiliaryObjectClassDefinitions
@NotNull public @NotNull Collection<RefinedObjectClassDefinition> getAuxiliaryObjectClassDefinitions()
- Specified by:
getAuxiliaryObjectClassDefinitions
in interfaceCompositeRefinedObjectClassDefinition
- Specified by:
getAuxiliaryObjectClassDefinitions
in interfaceRefinedObjectClassDefinition
-
getObjectDefinition
public PrismObjectDefinition<ShadowType> getObjectDefinition()
- Specified by:
getObjectDefinition
in interfaceRefinedObjectClassDefinition
-
getCompileTimeClass
public Class<?> getCompileTimeClass()
Description copied from interface:TypeDefinition
Returns compile-time class, if this type has any. For example, UserType.class, ObjectType.class, ExtensionType.class.- Specified by:
getCompileTimeClass
in interfaceTypeDefinition
-
isContainerMarker
public boolean isContainerMarker()
Description copied from interface:ComplexTypeDefinition
Flag 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:
isContainerMarker
in interfaceComplexTypeDefinition
-
isPrimaryIdentifier
public boolean isPrimaryIdentifier(QName attrName)
Description copied from interface:ObjectClassComplexTypeDefinition
Returns 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:
isPrimaryIdentifier
in interfaceObjectClassComplexTypeDefinition
-
isObjectMarker
public boolean isObjectMarker()
Description copied from interface:ComplexTypeDefinition
Flag 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:
isObjectMarker
in interfaceComplexTypeDefinition
-
isIgnored
public boolean isIgnored()
Description copied from interface:Definition
Item definition that has this flag set should be ignored by any processing. The ignored item is still part of the schema. Item instances may appear in the serialized data formats (e.g. XML) or data store and the parser should not raise an error if it encounters them. But any high-level processing code should ignore presence of this item. E.g. it should not be displayed to the user, should not be present in transformed data structures, etc. Note that the same item can be ignored at higher layer (e.g. presentation) but not ignored at lower layer (e.g. model). This works by presenting different item definitions for these layers (see LayerRefinedAttributeDefinition). Semantics of this flag for complex type definitions is to be defined yet.- Specified by:
isIgnored
in interfaceDefinition
-
getProcessing
public ItemProcessing getProcessing()
- Specified by:
getProcessing
in interfaceDefinition
-
getSchemaMigrations
public List<SchemaMigration> getSchemaMigrations()
- Specified by:
getSchemaMigrations
in interfaceDefinition
-
isEmphasized
public boolean isEmphasized()
Description copied from interface:Definition
True 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:
isEmphasized
in interfaceDefinition
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interfaceDefinition
-
getSuperType
public QName getSuperType()
Description copied from interface:TypeDefinition
Name 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:
getSuperType
in interfaceTypeDefinition
-
isSecondaryIdentifier
public boolean isSecondaryIdentifier(QName attrName)
Description copied from interface:ObjectClassComplexTypeDefinition
Returns 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:
isSecondaryIdentifier
in interfaceObjectClassComplexTypeDefinition
-
isDeprecated
public boolean isDeprecated()
- Specified by:
isDeprecated
in interfaceDefinition
-
getDeprecatedSince
public String getDeprecatedSince()
- Specified by:
getDeprecatedSince
in interfaceDefinition
-
isExperimental
public boolean isExperimental()
Description copied from interface:Definition
Experimental functionality is not stable and it may be changed in any future release without any warning. Use at your own risk.- Specified by:
isExperimental
in interfaceDefinition
-
getPlannedRemoval
public String getPlannedRemoval()
Description copied from interface:Definition
Version 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:
getPlannedRemoval
in interfaceDefinition
-
isElaborate
public boolean isElaborate()
Description copied from interface:Definition
Elaborate 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:
isElaborate
in interfaceDefinition
-
getDisplayOrder
public Integer getDisplayOrder()
Description copied from interface:Definition
Specifies 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:
getDisplayOrder
in interfaceDefinition
-
getDescriptionAttribute
public <X> RefinedAttributeDefinition<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
- Specified by:
getDescriptionAttribute
in interfaceRefinedObjectClassDefinition
-
getNamingAttribute
public <X> RefinedAttributeDefinition<X> getNamingAttribute()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO- Specified by:
getNamingAttribute
in interfaceObjectClassComplexTypeDefinition
- Specified by:
getNamingAttribute
in interfaceRefinedObjectClassDefinition
-
getHelp
public String getHelp()
Description copied from interface:Definition
Returns help string. Specifies the help text or a key to catalog file for a help text. The help text may be displayed in any suitable way by the GUI. It should explain the meaning of an attribute or object class. Returns null if no help string is set. Corresponds to "help" XSD annotation.- Specified by:
getHelp
in interfaceDefinition
- Returns:
- help string or catalog key
-
getTypeName
@NotNull public @NotNull QName getTypeName()
Description copied from interface:Definition
Returns a name of the type for this definition. The type can be part of the compile-time schema or it can be defined at run time. Examples of the former case are types like c:UserType, xsd:string, or even flexible ones like c:ExtensionType or c:ShadowAttributesType. Examples of the latter case are types used in - custom extensions, like ext:LocationsType (where ext = e.g. http://example.com/extension), - resource schema, like ri:inetOrgPerson (ri = http://.../resource/instance-3), - connector schema, like TODO In XML representation that corresponds to the name of the XSD type. Although beware, the run-time types do not have statically defined structure. And the resource and connector-related types may even represent different kinds of objects within different contexts (e.g. two distinct resources both with ri:AccountObjectClass types). Also note that for complex type definitions, the type name serves as a unique identifier. On the other hand, for item definitions, it is just one of its attributes; primary key is item name in that case. The type name should be fully qualified. (TODO reconsider this)- Specified by:
getTypeName
in interfaceDefinition
- Returns:
- the type name
-
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
-
getDocumentation
public String getDocumentation()
- Specified by:
getDocumentation
in interfaceDefinition
-
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.
-
getDocumentationPreview
public String getDocumentationPreview()
Description copied from interface:Definition
Returns only a first sentence of documentation.- Specified by:
getDocumentationPreview
in interfaceDefinition
-
getIntent
public String getIntent()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO: THIS SHOULD NOT BE HERE- Specified by:
getIntent
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
getKind
public ShadowKindType getKind()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO: THIS SHOULD NOT BE HERE- Specified by:
getKind
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
isRuntimeSchema
public boolean isRuntimeSchema()
Description copied from interface:Definition
This 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:
isRuntimeSchema
in interfaceDefinition
-
getDisplayNameAttribute
public <X> RefinedAttributeDefinition<X> 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
- Specified by:
getDisplayNameAttribute
in interfaceRefinedObjectClassDefinition
-
getPrimaryIdentifiers
@NotNull public @NotNull Collection<? extends RefinedAttributeDefinition<?>> 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
- Specified by:
getPrimaryIdentifiers
in interfaceRefinedObjectClassDefinition
- Returns:
- definition of identifier attributes
-
getSecondaryIdentifiers
@NotNull public @NotNull Collection<? extends RefinedAttributeDefinition<?>> 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
- Specified by:
getSecondaryIdentifiers
in interfaceRefinedObjectClassDefinition
- Returns:
- definition of secondary identifier attributes
-
getAllIdentifiers
public Collection<? extends RefinedAttributeDefinition<?>> getAllIdentifiers()
Description copied from interface:ObjectClassComplexTypeDefinition
Returns both primary and secondary identifiers.- Specified by:
getAllIdentifiers
in interfaceObjectClassComplexTypeDefinition
- Specified by:
getAllIdentifiers
in interfaceRefinedObjectClassDefinition
-
isAuxiliary
public boolean isAuxiliary()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO- Specified by:
isAuxiliary
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
getAssociationDefinitions
@NotNull public @NotNull Collection<RefinedAssociationDefinition> getAssociationDefinitions()
Description copied from interface:RefinedObjectClassDefinition
Returns definitions of all associations as an unmodifiable collection. Note: these items are _not_ included in getDefinitions. (BTW, RefinedAssociationDefinition is not a subtype of ItemDefinition, not even of Definition.)- Specified by:
getAssociationDefinitions
in interfaceRefinedObjectClassDefinition
-
getAssociationDefinitions
public Collection<RefinedAssociationDefinition> getAssociationDefinitions(ShadowKindType kind)
- Specified by:
getAssociationDefinitions
in interfaceRefinedObjectClassDefinition
-
getNamesOfAssociations
public Collection<QName> getNamesOfAssociations()
- Specified by:
getNamesOfAssociations
in interfaceRefinedObjectClassDefinition
-
isEmpty
public boolean isEmpty()
Description copied from interface:ComplexTypeDefinition
Returns true if there are no item definitions.- Specified by:
isEmpty
in interfaceComplexTypeDefinition
-
getProtectedObjectPatterns
public Collection<ResourceObjectPattern> getProtectedObjectPatterns()
- Specified by:
getProtectedObjectPatterns
in interfaceRefinedObjectClassDefinition
-
getDisplayName
public String getDisplayName()
Description copied from interface:Definition
Returns display name. Specifies the printable name of the object class or attribute. It must contain a printable string. It may also contain a key to catalog file. Returns null if no display name is set. Corresponds to "displayName" XSD annotation.- Specified by:
getDisplayName
in interfaceDefinition
- Returns:
- display name string or catalog key
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceRefinedObjectClassDefinition
-
isDefault
public boolean isDefault()
- Specified by:
isDefault
in interfaceRefinedObjectClassDefinition
-
getResourceOid
public String getResourceOid()
- Specified by:
getResourceOid
in interfaceRefinedObjectClassDefinition
-
getObjectClassDefinition
public ObjectClassComplexTypeDefinition getObjectClassDefinition()
- Specified by:
getObjectClassDefinition
in interfaceRefinedObjectClassDefinition
-
getBaseContext
public ResourceObjectReferenceType getBaseContext()
- Specified by:
getBaseContext
in interfaceRefinedObjectClassDefinition
-
getSearchHierarchyScope
public SearchHierarchyScope getSearchHierarchyScope()
- Specified by:
getSearchHierarchyScope
in interfaceRefinedObjectClassDefinition
-
getVolatility
public ResourceObjectVolatilityType getVolatility()
- Specified by:
getVolatility
in interfaceRefinedObjectClassDefinition
-
getMultiplicity
public ResourceObjectMultiplicityType getMultiplicity()
- Specified by:
getMultiplicity
in interfaceRefinedObjectClassDefinition
-
getProjection
public ProjectionPolicyType getProjection()
- Specified by:
getProjection
in interfaceRefinedObjectClassDefinition
-
getPasswordInbound
public List<MappingType> getPasswordInbound()
- Specified by:
getPasswordInbound
in interfaceRefinedObjectClassDefinition
-
getPasswordOutbound
public List<MappingType> getPasswordOutbound()
- Specified by:
getPasswordOutbound
in interfaceRefinedObjectClassDefinition
-
getPasswordFetchStrategy
public AttributeFetchStrategyType getPasswordFetchStrategy()
- Specified by:
getPasswordFetchStrategy
in interfaceRefinedObjectClassDefinition
-
getPasswordPolicy
@Deprecated public ObjectReferenceType getPasswordPolicy()
Deprecated.- Specified by:
getPasswordPolicy
in interfaceRefinedObjectClassDefinition
-
getSecurityPolicyRef
public ObjectReferenceType getSecurityPolicyRef()
- Specified by:
getSecurityPolicyRef
in interfaceRefinedObjectClassDefinition
-
getActivationSchemaHandling
public ResourceActivationDefinitionType getActivationSchemaHandling()
- Specified by:
getActivationSchemaHandling
in interfaceRefinedObjectClassDefinition
-
getActivationBidirectionalMappingType
public ResourceBidirectionalMappingType getActivationBidirectionalMappingType(QName propertyName)
- Specified by:
getActivationBidirectionalMappingType
in interfaceRefinedObjectClassDefinition
-
getActivationFetchStrategy
public AttributeFetchStrategyType getActivationFetchStrategy(QName propertyName)
- Specified by:
getActivationFetchStrategy
in interfaceRefinedObjectClassDefinition
-
matches
public boolean matches(ShadowType shadowType)
- Specified by:
matches
in interfaceObjectClassComplexTypeDefinition
- Specified by:
matches
in interfaceRefinedObjectClassDefinition
-
matchesWithoutIntent
public boolean matchesWithoutIntent(ShadowType shadowType)
- Specified by:
matchesWithoutIntent
in interfaceRefinedObjectClassDefinition
-
getCapabilities
public CapabilitiesType getCapabilities()
- Specified by:
getCapabilities
in interfaceRefinedObjectClassDefinition
-
getEffectiveCapability
public <T extends CapabilityType> T getEffectiveCapability(Class<T> capabilityClass, ResourceType resourceType)
- Specified by:
getEffectiveCapability
in interfaceRefinedObjectClassDefinition
-
getPagedSearches
public PagedSearchCapabilityType getPagedSearches(ResourceType resourceType)
- Specified by:
getPagedSearches
in interfaceRefinedObjectClassDefinition
-
isPagedSearchEnabled
public boolean isPagedSearchEnabled(ResourceType resourceType)
- Specified by:
isPagedSearchEnabled
in interfaceRefinedObjectClassDefinition
-
isObjectCountingEnabled
public boolean isObjectCountingEnabled(ResourceType resourceType)
- Specified by:
isObjectCountingEnabled
in interfaceRefinedObjectClassDefinition
-
findLocalItemDefinition
public <T extends ItemDefinition> T findLocalItemDefinition(@NotNull @NotNull QName name, @NotNull @NotNull Class<T> clazz, boolean caseInsensitive)
- Specified by:
findLocalItemDefinition
in interfaceLocalDefinitionStore
-
findNamedItemDefinition
public <ID extends ItemDefinition> ID findNamedItemDefinition(@NotNull @NotNull QName firstName, @NotNull @NotNull ItemPath rest, @NotNull @NotNull Class<ID> clazz)
- Specified by:
findNamedItemDefinition
in interfaceLocalDefinitionStore
-
getAttributeDefinitions
@NotNull public @NotNull Collection<? extends RefinedAttributeDefinition<?>> getAttributeDefinitions()
Description copied from interface:RefinedObjectClassDefinition
Returns definitions of all attributes as an unmodifiable collection. Note: content of this is exactly the same as for getDefinitions- Specified by:
getAttributeDefinitions
in interfaceObjectClassComplexTypeDefinition
- Specified by:
getAttributeDefinitions
in interfaceRefinedObjectClassDefinition
-
getPrismContext
public PrismContext getPrismContext()
- Specified by:
getPrismContext
in interfacePrismContextSensitive
-
revive
public void revive(PrismContext prismContext)
- Specified by:
revive
in interfaceComplexTypeDefinition
- Specified by:
revive
in interfaceRevivable
-
getDefinitions
@NotNull public @NotNull List<? extends ItemDefinition> getDefinitions()
Description copied from interface:ComplexTypeDefinition
Returns definitions for all inner items. These are of type ItemDefinition. However, very often subtypes of this type are used, e.g. ResourceAttributeDefinition, RefinedAttributeDefinition, LayerRefinedAttributeDefinition, and so on. Although returned as a list, the order of definitions is insignificant. (TODO change to set?) The list is unmodifiable.- Specified by:
getDefinitions
in interfaceComplexTypeDefinition
-
getExtensionForType
public QName getExtensionForType()
Description copied from interface:ComplexTypeDefinition
If 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:
getExtensionForType
in interfaceComplexTypeDefinition
-
isXsdAnyMarker
public boolean isXsdAnyMarker()
Description copied from interface:ComplexTypeDefinition
True if the complex type definition contains xsd:any (directly or indirectly).- Specified by:
isXsdAnyMarker
in interfaceComplexTypeDefinition
-
getDefaultNamespace
public String getDefaultNamespace()
Description copied from interface:ComplexTypeDefinition
When 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).- Specified by:
getDefaultNamespace
in interfaceComplexTypeDefinition
-
getIgnoredNamespaces
@NotNull public @NotNull List<String> getIgnoredNamespaces()
Description copied from interface:ComplexTypeDefinition
When 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).- Specified by:
getIgnoredNamespaces
in interfaceComplexTypeDefinition
-
forLayer
public LayerRefinedObjectClassDefinition forLayer(@NotNull @NotNull LayerType layerType)
- Specified by:
forLayer
in interfaceRefinedObjectClassDefinition
-
findAttributeDefinition
public <X> RefinedAttributeDefinition<X> findAttributeDefinition(QName elementQName, boolean caseInsensitive)
Description copied from interface:ObjectClassComplexTypeDefinition
Finds a attribute definition by looking at the property name; not considering the case. Returns null if nothing is found.- Specified by:
findAttributeDefinition
in interfaceObjectClassComplexTypeDefinition
- Parameters:
elementQName
- property definition name- Returns:
- found property definition or null
-
findAttributeDefinition
public <X> RefinedAttributeDefinition<X> findAttributeDefinition(@NotNull @NotNull QName name)
Description copied from interface:ObjectClassComplexTypeDefinition
Finds a attribute definition by looking at the property name. Returns null if nothing is found.- Specified by:
findAttributeDefinition
in interfaceObjectClassComplexTypeDefinition
- Specified by:
findAttributeDefinition
in interfaceRefinedObjectClassDefinition
- Parameters:
name
- property definition name- Returns:
- found property definition or null
-
findAssociationDefinition
public RefinedAssociationDefinition findAssociationDefinition(QName name)
- Specified by:
findAssociationDefinition
in interfaceRefinedObjectClassDefinition
-
getEntitlementAssociationDefinitions
public Collection<RefinedAssociationDefinition> getEntitlementAssociationDefinitions()
-
getNamesOfAssociationsWithOutboundExpressions
public Collection<? extends QName> getNamesOfAssociationsWithOutboundExpressions()
- Specified by:
getNamesOfAssociationsWithOutboundExpressions
in interfaceRefinedObjectClassDefinition
-
getNamesOfAssociationsWithInboundExpressions
public Collection<? extends QName> getNamesOfAssociationsWithInboundExpressions()
- Specified by:
getNamesOfAssociationsWithInboundExpressions
in interfaceRefinedObjectClassDefinition
-
getAuxiliaryObjectClassMappings
public ResourceBidirectionalMappingAndDefinitionType getAuxiliaryObjectClassMappings()
- Specified by:
getAuxiliaryObjectClassMappings
in interfaceRefinedObjectClassDefinition
-
hasAuxiliaryObjectClass
public boolean hasAuxiliaryObjectClass(QName expectedObjectClassName)
- Specified by:
hasAuxiliaryObjectClass
in interfaceRefinedObjectClassDefinition
-
instantiate
public ResourceAttributeContainer instantiate(QName elementName)
- Specified by:
instantiate
in interfaceObjectClassComplexTypeDefinition
-
findItemDefinition
public <ID extends ItemDefinition> ID findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<ID> clazz)
- Specified by:
findItemDefinition
in interfaceLocalDefinitionStore
-
merge
public void merge(ComplexTypeDefinition otherComplexTypeDef)
Description copied from interface:ComplexTypeDefinition
Copies cloned definitions from the other type definition into this one. (TODO remove from the interface?)- Specified by:
merge
in interfaceComplexTypeDefinition
-
getTypeClassIfKnown
public Class getTypeClassIfKnown()
- Specified by:
getTypeClassIfKnown
in interfaceDefinition
-
getTypeClass
public Class getTypeClass()
Description copied from interface:Definition
Returns a compile-time class that is used to represent items. E.g. returns String, Integer, sublcasses of Objectable and Containerable and so on.- Specified by:
getTypeClass
in interfaceDefinition
-
containsAttributeDefinition
public boolean containsAttributeDefinition(ItemPathType pathType)
- Specified by:
containsAttributeDefinition
in interfaceRefinedObjectClassDefinition
-
containsAttributeDefinition
public boolean containsAttributeDefinition(QName attributeName)
- Specified by:
containsAttributeDefinition
in interfaceRefinedObjectClassDefinition
-
createShadowSearchQuery
public ObjectQuery createShadowSearchQuery(String resourceOid) throws SchemaException
- Specified by:
createShadowSearchQuery
in interfaceObjectClassComplexTypeDefinition
- Throws:
SchemaException
-
createBlankShadow
public PrismObject<ShadowType> createBlankShadow(RefinedObjectClassDefinition definition)
- Specified by:
createBlankShadow
in interfaceRefinedObjectClassDefinition
-
getShadowDiscriminator
public ResourceShadowDiscriminator getShadowDiscriminator()
- Specified by:
getShadowDiscriminator
in interfaceRefinedObjectClassDefinition
-
getNamesOfAttributesWithOutboundExpressions
public Collection<? extends QName> getNamesOfAttributesWithOutboundExpressions()
- Specified by:
getNamesOfAttributesWithOutboundExpressions
in interfaceRefinedObjectClassDefinition
-
getNamesOfAttributesWithInboundExpressions
public Collection<? extends QName> getNamesOfAttributesWithInboundExpressions()
- Specified by:
getNamesOfAttributesWithInboundExpressions
in interfaceRefinedObjectClassDefinition
-
getPasswordDefinition
public ResourcePasswordDefinitionType getPasswordDefinition()
- Specified by:
getPasswordDefinition
in interfaceRefinedObjectClassDefinition
-
accept
public void accept(Visitor<Definition> visitor)
- Specified by:
accept
in interfaceVisitable<Definition>
-
accept
public boolean accept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)
- Specified by:
accept
in interfaceSmartVisitable<Definition>
- Returns:
- false if we already was here
-
clone
@NotNull public @NotNull CompositeRefinedObjectClassDefinitionImpl 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 interfaceObjectClassComplexTypeDefinition
- Specified by:
clone
in interfaceRefinedObjectClassDefinition
- Overrides:
clone
in classObject
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
getDebugDumpClassName
public String getDebugDumpClassName()
Return a human readable name of this class suitable for logs.- Specified by:
getDebugDumpClassName
in interfaceRefinedObjectClassDefinition
-
getHumanReadableName
public String getHumanReadableName()
- Specified by:
getHumanReadableName
in interfaceRefinedObjectClassDefinition
-
deepClone
@NotNull public @NotNull CompositeRefinedObjectClassDefinitionImpl 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
- Specified by:
deepClone
in interfaceRefinedObjectClassDefinition
- 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.
-
isListMarker
public boolean isListMarker()
- Specified by:
isListMarker
in interfaceComplexTypeDefinition
-
trimTo
public void trimTo(@NotNull @NotNull Collection<ItemPath> paths)
Description copied from interface:ComplexTypeDefinition
Trims 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:
trimTo
in interfaceComplexTypeDefinition
-
toMutable
public MutableObjectClassComplexTypeDefinition toMutable()
- Specified by:
toMutable
in interfaceComplexTypeDefinition
- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceObjectClassComplexTypeDefinition
-
isShared
public boolean isShared()
Description copied from interface:ComplexTypeDefinition
Is this definition shared, i.e. used by more than one prism object? If so, it should not be e.g. trimmed. EXPERIMENTAL- Specified by:
isShared
in interfaceComplexTypeDefinition
-
isReferenceMarker
public boolean isReferenceMarker()
Description copied from interface:ComplexTypeDefinition
Flag indicating whether this type was marked as "objectReference" in the original schema.- Specified by:
isReferenceMarker
in interfaceComplexTypeDefinition
-
getStaticSubTypes
@NotNull public @NotNull Collection<TypeDefinition> getStaticSubTypes()
Description copied from interface:TypeDefinition
Subtypes - but only these that are a part of the static schema. A little bit experimental. :)- Specified by:
getStaticSubTypes
in interfaceTypeDefinition
-
getAnnotation
public <A> A getAnnotation(QName qname)
Description copied from interface:Definition
Returns 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:
getAnnotation
in interfaceDefinition
-
setAnnotation
public <A> void setAnnotation(QName qname, A value)
- Specified by:
setAnnotation
in interfaceDefinition
-
getInstantiationOrder
public Integer getInstantiationOrder()
- Specified by:
getInstantiationOrder
in interfaceTypeDefinition
-
canRepresent
public boolean canRepresent(QName typeName)
- Specified by:
canRepresent
in interfaceTypeDefinition
-
isImmutable
public boolean isImmutable()
- Specified by:
isImmutable
in interfaceFreezable
-
-