Class AbstractResourceObjectDefinitionImpl
- java.lang.Object
-
- com.evolveum.midpoint.prism.AbstractFreezable
-
- com.evolveum.midpoint.schema.processor.AbstractResourceObjectDefinitionImpl
-
- All Implemented Interfaces:
ComplexTypeDefinition
,Definition
,Freezable
,LocalItemDefinitionStore
,PrismContextSensitive
,Revivable
,SmartVisitable<Definition>
,TypeDefinition
,Visitable<Definition>
,AssociationDefinitionStore
,AttributeDefinitionStore
,IdentifiersDefinitionStore
,LayeredDefinition
,ResourceObjectDefinition
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
ResourceObjectClassDefinitionImpl
,ResourceObjectTypeDefinitionImpl
public abstract class AbstractResourceObjectDefinitionImpl extends AbstractFreezable implements ResourceObjectDefinition
Common implementation for bothResourceObjectClassDefinition
andResourceObjectTypeDefinition
. Note about not inheriting fromComplexTypeDefinitionImpl
: As we do not inherit from that class, we have to provide our own implementation of various methods likegetExtensionForType()
,isContainerMarker()
, and so on. This is basically no problem, as this information is not available from a resource connector, so we are OK with the default values. Should this change, we would need to reconsider this design. The current implementation is more straightforward, less entangled with a hierarchy of ancestor implementations.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull DeeplyFreezableList<ResourceAttributeDefinition<?>>
attributeDefinitions
Definition of attributes.protected @NotNull FreezableList<QName>
primaryIdentifiersNames
Names of primary identifiers.protected @NotNull FreezableList<QName>
secondaryIdentifiersNames
Names of secondary identifiers.-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor<Definition> visitor)
boolean
accept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)
void
add(ItemDefinition<?> definition)
protected void
addDebugDumpHeaderExtension(StringBuilder sb)
@NotNull ResourceAttributeDefinition<?>
addInternal(@NotNull ItemDefinition<?> definition)
boolean
canRepresent(QName typeName)
abstract @NotNull AbstractResourceObjectDefinitionImpl
clone()
Does a shallow clone of this definition (i.e.protected abstract AbstractResourceObjectDefinitionImpl
cloneInLayer(@NotNull LayerType layer)
@NotNull PrismObjectDefinition<ShadowType>
computePrismObjectDefinition()
protected void
copyDefinitionDataFrom(@NotNull LayerType layer, @NotNull ResourceObjectDefinition source)
PrismObject<ShadowType>
createBlankShadow(String resourceOid, String tag)
Creates a blankShadowType
object, with the attributes container having appropriate definition.String
debugDump(int indent)
static String
debugDump(int indent, LayerType layer, AbstractResourceObjectDefinitionImpl _this)
boolean
equals(Object o)
<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).ResourceObjectDefinition
forLayer(@NotNull LayerType layer)
Creates a layer-specific version of this definition.<A> A
getAnnotation(QName qname)
Returns generic definition annotation.@Nullable Map<QName,Object>
getAnnotations()
Returns all annotations, as unmodifiable map.@NotNull List<? extends ResourceAttributeDefinition<?>>
getAttributeDefinitions()
Returns all attribute definitions as an unmodifiable collection.@Nullable Class<?>
getCompileTimeClass()
Returns compile-time class, if this type has any.Collection<QName>
getConfiguredAuxiliaryObjectClassNames()
Returns the names of auxiliary object classes that are "statically" defined for this object type (or object class, in the future).@NotNull LayerType
getCurrentLayer()
Gets the current point-of-view: on which layer do we look at the data?@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()
List<ItemDiagramSpecification>
getDiagrams()
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.@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.@NotNull List<String>
getIgnoredNamespaces()
When resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored.Integer
getInstantiationOrder()
String
getPlannedRemoval()
Version of data model in which the item is likely to be removed.@NotNull Collection<ResourceAttributeDefinition<?>>
getPrimaryIdentifiers()
Returns the definition of primary identifier attributes of a resource object.@NotNull List<QName>
getPrimaryIdentifiersNames()
Names of primary identifiers.PrismContext
getPrismContext()
PrismObjectDefinition<ShadowType>
getPrismObjectDefinition()
Returns a prism definition for the prism object/objects carrying the resource object/objects.ItemProcessing
getProcessing()
Level of processing (ignore, minimal, auto, full) for this item/type.List<SchemaMigration>
getSchemaMigrations()
@NotNull Collection<ResourceAttributeDefinition<?>>
getSecondaryIdentifiers()
Returns the definition of secondary identifier attributes of a resource object.@NotNull List<QName>
getSecondaryIdentifiersNames()
Names of secondary identifiers.@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.int
hashCode()
boolean
isAbstract()
For types: is the type abstract so that it should not be instantiated directly? For items: TODOboolean
isContainerMarker()
Flag indicating whether this type was marked as "container" in the original schema.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
isListMarker()
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].boolean
isObjectMarker()
Flag indicating whether this type was marked as "object" in the original schema.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
isXsdAnyMarker()
True if the complex type definition contains xsd:any (directly or indirectly).void
merge(ComplexTypeDefinition otherComplexTypeDef)
Copies cloned definitions from the other type definition into this one.protected void
performFreeze()
void
replaceDefinition(@NotNull QName itemName, @Nullable ItemDefinition<?> newDefinition)
Replaces a definition for given item name with a provided one.void
revive(PrismContext prismContext)
TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)<A> void
setAnnotation(QName qname, A value)
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 com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.schema.processor.AssociationDefinitionStore
findAssociationDefinition, findAssociationDefinitionRequired, getAssociationDefinitions, 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
-
Methods inherited from interface com.evolveum.midpoint.prism.ComplexTypeDefinition
getXmlAttributeDefinitions, hasSubstitutions, hasSubstitutions, isStrictAnyMarker, itemOrSubstitution, substitution, toMutable
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getDisplayName, 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, isPrimaryIdentifier, isSecondaryIdentifier
-
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
createShadowSearchQuery, deepClone, getActivationBidirectionalMappingType, getActivationFetchStrategy, getActivationSchemaHandling, getAuxiliaryDefinitions, getAuxiliaryObjectClassMappings, getBaseContext, getConfiguredCapabilities, getDebugDumpClassName, getDefaultInboundMappingEvaluationPhases, getDescription, getDescriptionAttribute, getDescriptionAttributeName, getDisplayNameAttribute, getDisplayNameAttributeName, getEffectiveCapability, getHumanReadableName, getNamingAttribute, getNamingAttributeName, getObjectClassDefinition, getObjectClassName, getObjectMultiplicity, getPagedSearches, getPasswordDefinition, getPasswordFetchStrategy, getPasswordInbound, getPasswordOutbound, getProjectionPolicy, getProtectedObjectPatterns, getResourceOid, getSearchHierarchyScope, getSecurityPolicyRef, getVolatility, hasAuxiliaryObjectClass, instantiate, isObjectCountingEnabled, isPagedSearchEnabled, matchesObjectClassName, replaceDefinition, toResourceAttributeContainerDefinition, toResourceAttributeContainerDefinition
-
Methods inherited from interface com.evolveum.midpoint.prism.TypeDefinition
isAssignableFrom
-
-
-
-
Field Detail
-
attributeDefinitions
@NotNull protected final @NotNull DeeplyFreezableList<ResourceAttributeDefinition<?>> attributeDefinitions
Definition of attributes. It seems that elements are strictly ofResourceAttributeDefinitionImpl
class, but this is currently not enforceable in the compile time - see e.g.copyDefinitionDataFrom(LayerType, ResourceObjectDefinition)
oraddInternal(ItemDefinition)
. TODO reconsider if it's ok this way. Frozen after creation.
-
primaryIdentifiersNames
@NotNull protected final @NotNull FreezableList<QName> primaryIdentifiersNames
Names of primary identifiers. They are the same for both raw and refined definitions. (Currently we do not support tweaking of this information.) Frozen after creation.
-
secondaryIdentifiersNames
@NotNull protected final @NotNull FreezableList<QName> secondaryIdentifiersNames
Names of secondary identifiers. The refinement using `schemaHandling` may add or remove some identifiers from the raw list. Frozen after creation.
-
-
Method Detail
-
getAttributeDefinitions
@NotNull public @NotNull List<? extends ResourceAttributeDefinition<?>> getAttributeDefinitions()
Description copied from interface:AttributeDefinitionStore
Returns all attribute definitions as an unmodifiable collection. Should be the same content as returned by `getDefinitions`. The returned value is aList
because of the contract ofComplexTypeDefinition.getDefinitions()
.- Specified by:
getAttributeDefinitions
in interfaceAttributeDefinitionStore
-
getPrimaryIdentifiers
@NotNull public @NotNull Collection<ResourceAttributeDefinition<?>> getPrimaryIdentifiers()
Description copied from interface:IdentifiersDefinitionStore
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 interfaceIdentifiersDefinitionStore
- Returns:
- definition of identifier attributes
-
getSecondaryIdentifiers
@NotNull public @NotNull Collection<ResourceAttributeDefinition<?>> getSecondaryIdentifiers()
Description copied from interface:IdentifiersDefinitionStore
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 interfaceIdentifiersDefinitionStore
- Returns:
- definition of secondary identifier attributes
-
getPrimaryIdentifiersNames
@NotNull public @NotNull List<QName> getPrimaryIdentifiersNames()
Names of primary identifiers. The list is modifiable until the whole definition is frozen.- Specified by:
getPrimaryIdentifiersNames
in interfaceIdentifiersDefinitionStore
- See Also:
IdentifiersDefinitionStore.getPrimaryIdentifiers()
-
getSecondaryIdentifiersNames
@NotNull public @NotNull List<QName> getSecondaryIdentifiersNames()
Names of secondary identifiers. The list is modifiable until the whole definition is frozen.- Specified by:
getSecondaryIdentifiersNames
in interfaceIdentifiersDefinitionStore
- See Also:
()
-
getPrismObjectDefinition
public PrismObjectDefinition<ShadowType> getPrismObjectDefinition()
Description copied from interface:ResourceObjectDefinition
Returns a prism definition for the prism object/objects carrying the resource object/objects.- Specified by:
getPrismObjectDefinition
in interfaceResourceObjectDefinition
-
computePrismObjectDefinition
@NotNull public @NotNull PrismObjectDefinition<ShadowType> computePrismObjectDefinition()
-
createBlankShadow
public PrismObject<ShadowType> createBlankShadow(String resourceOid, String tag)
Description copied from interface:ResourceObjectDefinition
Creates a blankShadowType
object, with the attributes container having appropriate definition.- Specified by:
createBlankShadow
in interfaceResourceObjectDefinition
-
clone
@NotNull public abstract @NotNull AbstractResourceObjectDefinitionImpl 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 interfaceResourceObjectDefinition
- Overrides:
clone
in classObject
-
copyDefinitionDataFrom
protected void copyDefinitionDataFrom(@NotNull @NotNull LayerType layer, @NotNull @NotNull ResourceObjectDefinition source)
-
getPrismContext
public PrismContext getPrismContext()
- Specified by:
getPrismContext
in interfacePrismContextSensitive
-
revive
public void revive(PrismContext prismContext)
Description copied from interface:Revivable
TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)
-
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
-
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
-
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
-
getInstantiationOrder
public Integer getInstantiationOrder()
- Specified by:
getInstantiationOrder
in interfaceTypeDefinition
-
canRepresent
public boolean canRepresent(QName typeName)
- Specified by:
canRepresent
in interfaceTypeDefinition
-
performFreeze
protected void performFreeze()
- Overrides:
performFreeze
in classAbstractFreezable
-
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
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDump
public static String debugDump(int indent, LayerType layer, AbstractResourceObjectDefinitionImpl _this)
-
addDebugDumpHeaderExtension
protected void addDebugDumpHeaderExtension(StringBuilder sb)
-
getDefinitions
@NotNull public @NotNull List<? extends ItemDefinition<?>> getDefinitions()
Description copied from interface:ComplexTypeDefinition
Returns 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 aList
because the ordering is significant, e.g. for serialization purposes. The list is unmodifiable.- Specified by:
getDefinitions
in interfaceComplexTypeDefinition
- Specified by:
getDefinitions
in interfaceLocalItemDefinitionStore
-
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
-
isListMarker
public boolean isListMarker()
Description copied from interface:ComplexTypeDefinition
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]. See alsoDOMUtil.IS_LIST_ATTRIBUTE_NAME
andItemDefinition.isHeterogeneousListItem()
.- Specified by:
isListMarker
in interfaceComplexTypeDefinition
-
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). Set by parsing `defaultNamespace` XSD annotation.- 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). Set by parsing `ignoredNamespace` XSD annotations.- Specified by:
getIgnoredNamespaces
in interfaceComplexTypeDefinition
-
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
-
isEmpty
public boolean isEmpty()
Description copied from interface:ComplexTypeDefinition
Returns true if there are no item definitions.- Specified by:
isEmpty
in interfaceComplexTypeDefinition
-
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
-
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
-
isAbstract
public boolean isAbstract()
Description copied from interface:Definition
For types: is the type abstract so that it should not be instantiated directly? For items: TODO- Specified by:
isAbstract
in interfaceDefinition
-
isDeprecated
public boolean isDeprecated()
- Specified by:
isDeprecated
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
-
getDeprecatedSince
public String getDeprecatedSince()
- Specified by:
getDeprecatedSince
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, subclasses of Objectable and Containerable and so on.- Specified by:
getTypeClass
in interfaceDefinition
-
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
-
getAnnotations
@Nullable public @Nullable Map<QName,Object> getAnnotations()
Description copied from interface:Definition
Returns all annotations, as unmodifiable map. Nullable by design, to avoid creating lots of empty maps.- Specified by:
getAnnotations
in interfaceDefinition
-
getSchemaMigrations
public List<SchemaMigration> getSchemaMigrations()
- Specified by:
getSchemaMigrations
in interfaceDefinition
-
getDiagrams
public List<ItemDiagramSpecification> getDiagrams()
- Specified by:
getDiagrams
in interfaceDefinition
-
findItemDefinition
public <ID extends ItemDefinition<?>> ID findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<ID> clazz)
Description copied from interface:LocalItemDefinitionStore
Returns 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:
findItemDefinition
in interfaceLocalItemDefinitionStore
-
forLayer
public ResourceObjectDefinition forLayer(@NotNull @NotNull LayerType layer)
Description copied from interface:ResourceObjectDefinition
Creates a layer-specific version of this definition.- Specified by:
forLayer
in interfaceResourceObjectDefinition
-
cloneInLayer
protected abstract AbstractResourceObjectDefinitionImpl cloneInLayer(@NotNull @NotNull LayerType layer)
-
getCurrentLayer
@NotNull public @NotNull LayerType getCurrentLayer()
Description copied from interface:LayeredDefinition
Gets the current point-of-view: on which layer do we look at the data?- Specified by:
getCurrentLayer
in interfaceLayeredDefinition
-
replaceDefinition
public void replaceDefinition(@NotNull @NotNull QName itemName, @Nullable @Nullable ItemDefinition<?> newDefinition)
Description copied from interface:ResourceObjectDefinition
Replaces a definition for given item name with a provided one.- Specified by:
replaceDefinition
in interfaceResourceObjectDefinition
-
add
public void add(ItemDefinition<?> definition)
-
addInternal
@NotNull public @NotNull ResourceAttributeDefinition<?> addInternal(@NotNull @NotNull ItemDefinition<?> definition)
-
getProcessing
public ItemProcessing getProcessing()
Description copied from interface:Definition
Level of processing (ignore, minimal, auto, full) for this item/type.- Specified by:
getProcessing
in interfaceDefinition
-
getConfiguredAuxiliaryObjectClassNames
public Collection<QName> getConfiguredAuxiliaryObjectClassNames()
Description copied from interface:ResourceObjectDefinition
Returns the names of auxiliary object classes that are "statically" defined for this object type (or object class, in the future). For dynamically composed definitions (CompositeObjectDefinition
only the statically-defined ones (i.e. those from the structural definition) are returned. TODO- Specified by:
getConfiguredAuxiliaryObjectClassNames
in interfaceResourceObjectDefinition
-
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
-
-