Class RefinedObjectClassDefinitionImpl
- java.lang.Object
-
- com.evolveum.midpoint.common.refinery.RefinedObjectClassDefinitionImpl
-
- All Implemented Interfaces:
RefinedObjectClassDefinition
,ComplexTypeDefinition
,Definition
,Freezable
,LocalDefinitionStore
,PrismContextSensitive
,Revivable
,SmartVisitable<Definition>
,TypeDefinition
,Visitable<Definition>
,ObjectClassComplexTypeDefinition
,DebugDumpable
,Serializable
,Cloneable
public final class RefinedObjectClassDefinitionImpl extends Object implements RefinedObjectClassDefinition
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor<Definition> visitor)
boolean
accept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)
boolean
canRepresent(QName typeName)
@NotNull RefinedObjectClassDefinitionImpl
clone()
Does a shallow clone of this definition (i.e.PrismObject<ShadowType>
createBlankShadow(RefinedObjectClassDefinition definition, String tag)
ObjectQuery
createShadowSearchQuery(String resourceOid)
String
debugDump(int indent)
static String
debugDump(int indent, LayerType layer, RefinedObjectClassDefinition _this)
@NotNull RefinedObjectClassDefinition
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.<ID extends ItemDefinition>
IDfindItemDefinition(@NotNull ItemPath path, @NotNull Class<ID> clazz)
<ID extends ItemDefinition>
IDfindLocalItemDefinition(@NotNull QName name, @NotNull Class<ID> clazz, boolean caseInsensitive)
<ID extends ItemDefinition>
IDfindNamedItemDefinition(@NotNull QName firstName, @NotNull ItemPath rest, @NotNull Class<ID> clazz)
LayerRefinedObjectClassDefinition
forLayer(@NotNull LayerType layerType)
Creates a derived version of this ROCD for a given layer.void
freeze()
ResourceBidirectionalMappingType
getActivationBidirectionalMappingType(QName propertyName)
AttributeFetchStrategyType
getActivationFetchStrategy(QName propertyName)
ResourceActivationDefinitionType
getActivationSchemaHandling()
<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()
Returns configured capabilities for given refined object class definition.@Nullable Class<?>
getCompileTimeClass()
Returns compile-time class, if this type has any.String
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.@Nullable 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.List<ItemDiagramSpecification>
getDiagrams()
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)
@Nullable 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()
String
getPlannedRemoval()
Version of data model in which the item is likely to be removed.@NotNull Collection<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<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.@Nullable 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()
boolean
hasSubstitutions()
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
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
isShared()
Is this definition shared, i.e.boolean
isXsdAnyMarker()
True if the complex type definition contains xsd:any (directly or indirectly).boolean
matches(ShadowType shadow)
Do not use.void
merge(ComplexTypeDefinition otherComplexTypeDef)
Copies cloned definitions from the other type definition into this one.static RefinedObjectClassDefinition
parseFromSchema(ObjectClassComplexTypeDefinition objectClassDef, ResourceType resourceType, RefinedResourceSchema rSchema, PrismContext prismContext, String contextDescription)
void
revive(PrismContext prismContext)
<A> void
setAnnotation(QName qname, A value)
void
setIntent(String intent)
void
setKind(ShadowKindType kind)
void
setSearchHierarchyScope(SearchHierarchyScope searchHierarchyScope)
Optional<ItemDefinition<?>>
substitution(QName name)
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, itemOrSubstitution
-
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
findAttributeDefinition, hasIndexOnlyAttributes, isIdentifier, isPrimaryIdentifier, isSecondaryIdentifier, toResourceAttributeContainerDefinition, toResourceAttributeContainerDefinition
-
Methods inherited from interface com.evolveum.midpoint.common.refinery.RefinedObjectClassDefinition
containsAttributeDefinition, containsAttributeDefinition, createBlankShadow, findAttributeDefinition, getAllIdentifiers
-
Methods inherited from interface com.evolveum.midpoint.prism.TypeDefinition
isAssignableFrom
-
-
-
-
Method Detail
-
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
-
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
-
getNamesOfAttributesWithOutboundExpressions
public Collection<? extends QName> getNamesOfAttributesWithOutboundExpressions()
- Specified by:
getNamesOfAttributesWithOutboundExpressions
in interfaceRefinedObjectClassDefinition
-
getNamesOfAttributesWithInboundExpressions
public Collection<? extends QName> getNamesOfAttributesWithInboundExpressions()
- Specified by:
getNamesOfAttributesWithInboundExpressions
in interfaceRefinedObjectClassDefinition
-
findLocalItemDefinition
public <ID extends ItemDefinition> ID findLocalItemDefinition(@NotNull @NotNull QName name, @NotNull @NotNull Class<ID> clazz, boolean caseInsensitive)
- Specified by:
findLocalItemDefinition
in interfaceLocalDefinitionStore
-
getPrimaryIdentifiers
@NotNull public @NotNull Collection<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<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
-
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
-
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
-
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
-
findAssociationDefinition
public RefinedAssociationDefinition findAssociationDefinition(QName name)
- Specified by:
findAssociationDefinition
in interfaceRefinedObjectClassDefinition
-
getNamesOfAssociations
public Collection<QName> getNamesOfAssociations()
- Specified by:
getNamesOfAssociations
in interfaceRefinedObjectClassDefinition
-
getNamesOfAssociationsWithOutboundExpressions
public Collection<? extends QName> getNamesOfAssociationsWithOutboundExpressions()
- Specified by:
getNamesOfAssociationsWithOutboundExpressions
in interfaceRefinedObjectClassDefinition
-
getNamesOfAssociationsWithInboundExpressions
public Collection<? extends QName> getNamesOfAssociationsWithInboundExpressions()
- Specified by:
getNamesOfAssociationsWithInboundExpressions
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
-
getObjectClassDefinition
public ObjectClassComplexTypeDefinition getObjectClassDefinition()
- Specified by:
getObjectClassDefinition
in interfaceRefinedObjectClassDefinition
-
getResourceOid
public String getResourceOid()
- Specified by:
getResourceOid
in interfaceRefinedObjectClassDefinition
-
isDefault
public boolean isDefault()
- Specified by:
isDefault
in interfaceRefinedObjectClassDefinition
-
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.
-
getBaseContext
public ResourceObjectReferenceType getBaseContext()
- Specified by:
getBaseContext
in interfaceRefinedObjectClassDefinition
-
getSearchHierarchyScope
public SearchHierarchyScope getSearchHierarchyScope()
- Specified by:
getSearchHierarchyScope
in interfaceRefinedObjectClassDefinition
-
setSearchHierarchyScope
public void setSearchHierarchyScope(SearchHierarchyScope searchHierarchyScope)
-
getIntent
public String getIntent()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO: THIS SHOULD NOT BE HERE- Specified by:
getIntent
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
setIntent
public void setIntent(String intent)
-
getKind
public ShadowKindType getKind()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO: THIS SHOULD NOT BE HERE- Specified by:
getKind
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
setKind
public void setKind(ShadowKindType kind)
-
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
-
canRepresent
public boolean canRepresent(QName typeName)
- Specified by:
canRepresent
in interfaceTypeDefinition
-
getObjectDefinition
public PrismObjectDefinition<ShadowType> getObjectDefinition()
- Specified by:
getObjectDefinition
in interfaceRefinedObjectClassDefinition
-
createBlankShadow
public PrismObject<ShadowType> createBlankShadow(RefinedObjectClassDefinition definition, String tag)
- Specified by:
createBlankShadow
in interfaceRefinedObjectClassDefinition
-
getShadowDiscriminator
public ResourceShadowDiscriminator getShadowDiscriminator()
- Specified by:
getShadowDiscriminator
in interfaceRefinedObjectClassDefinition
-
matches
public boolean matches(ShadowType shadow)
Description copied from interface:ObjectClassComplexTypeDefinition
Do not use. Unclear semantics. For synchronization tasks usecom.evolveum.midpoint.model.impl.sync.SynchronizationObjectsFilter
class instead.- Specified by:
matches
in interfaceObjectClassComplexTypeDefinition
- Specified by:
matches
in interfaceRefinedObjectClassDefinition
-
createShadowSearchQuery
public ObjectQuery createShadowSearchQuery(String resourceOid) throws SchemaException
- Specified by:
createShadowSearchQuery
in interfaceObjectClassComplexTypeDefinition
- Throws:
SchemaException
-
getAuxiliaryObjectClassDefinitions
@NotNull public @NotNull Collection<RefinedObjectClassDefinition> getAuxiliaryObjectClassDefinitions()
- Specified by:
getAuxiliaryObjectClassDefinitions
in interfaceRefinedObjectClassDefinition
-
hasAuxiliaryObjectClass
public boolean hasAuxiliaryObjectClass(QName expectedObjectClassName)
- Specified by:
hasAuxiliaryObjectClass
in interfaceRefinedObjectClassDefinition
-
getAuxiliaryObjectClassMappings
public ResourceBidirectionalMappingAndDefinitionType getAuxiliaryObjectClassMappings()
- Specified by:
getAuxiliaryObjectClassMappings
in interfaceRefinedObjectClassDefinition
-
getProtectedObjectPatterns
public Collection<ResourceObjectPattern> getProtectedObjectPatterns()
- Specified by:
getProtectedObjectPatterns
in interfaceRefinedObjectClassDefinition
-
getPasswordDefinition
public ResourcePasswordDefinitionType getPasswordDefinition()
- Specified by:
getPasswordDefinition
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
-
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
-
getCapabilities
public CapabilitiesType getCapabilities()
Description copied from interface:RefinedObjectClassDefinition
Returns configured capabilities for given refined object class definition. Returned object is freely modifiable copy of the original information.- 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
-
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 RefinedObjectClassDefinitionImpl 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
-
deepClone
@NotNull public @NotNull RefinedObjectClassDefinition 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.
-
forLayer
public LayerRefinedObjectClassDefinition forLayer(@NotNull @NotNull LayerType layerType)
Creates a derived version of this ROCD for a given layer. TODO clone if necessary/if specified (currently there is no cloning)- Specified by:
forLayer
in interfaceRefinedObjectClassDefinition
-
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
-
isAuxiliary
public boolean isAuxiliary()
Description copied from interface:ObjectClassComplexTypeDefinition
TODO- Specified by:
isAuxiliary
in interfaceObjectClassComplexTypeDefinition
- Returns:
-
getPrismContext
public PrismContext getPrismContext()
- Specified by:
getPrismContext
in interfacePrismContextSensitive
-
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
-
getCompileTimeClass
@Nullable public @Nullable 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
-
getExtensionForType
@Nullable public @Nullable 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
-
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
-
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
-
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
-
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
-
findItemDefinition
public <ID extends ItemDefinition> ID findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<ID> clazz)
- Specified by:
findItemDefinition
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
-
getDefaultNamespace
@Nullable public @Nullable 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
-
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
-
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
-
getSuperType
@Nullable public @Nullable 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
-
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
-
revive
public void revive(PrismContext prismContext)
- Specified by:
revive
in interfaceComplexTypeDefinition
- Specified by:
revive
in interfaceRevivable
-
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
-
getDiagrams
public List<ItemDiagramSpecification> getDiagrams()
- Specified by:
getDiagrams
in interfaceDefinition
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interfaceDefinition
-
isEmpty
public boolean isEmpty()
Description copied from interface:ComplexTypeDefinition
Returns true if there are no item definitions.- Specified by:
isEmpty
in interfaceComplexTypeDefinition
-
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
-
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
-
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
-
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
-
getDocumentation
public String getDocumentation()
- Specified by:
getDocumentation
in interfaceDefinition
-
getDocumentationPreview
public String getDocumentationPreview()
Description copied from interface:Definition
Returns only a first sentence of documentation.- Specified by:
getDocumentationPreview
in interfaceDefinition
-
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
-
instantiate
public ResourceAttributeContainer instantiate(QName elementName)
- Specified by:
instantiate
in interfaceObjectClassComplexTypeDefinition
-
isListMarker
public boolean isListMarker()
- Specified by:
isListMarker
in interfaceComplexTypeDefinition
-
parseFromSchema
public static RefinedObjectClassDefinition parseFromSchema(ObjectClassComplexTypeDefinition objectClassDef, ResourceType resourceType, RefinedResourceSchema rSchema, PrismContext prismContext, String contextDescription) throws SchemaException
- Throws:
SchemaException
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDump
public static String debugDump(int indent, LayerType layer, RefinedObjectClassDefinition _this)
-
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
-
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
-
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
-
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
-
isImmutable
public boolean isImmutable()
- Specified by:
isImmutable
in interfaceFreezable
-
hasSubstitutions
public boolean hasSubstitutions()
- Specified by:
hasSubstitutions
in interfaceComplexTypeDefinition
-
substitution
public Optional<ItemDefinition<?>> substitution(QName name)
- Specified by:
substitution
in interfaceComplexTypeDefinition
-
-