Class DummyReferenceImpl
java.lang.Object
com.evolveum.midpoint.prism.impl.item.DummyItem<PrismReferenceValue,PrismReferenceDefinition,PrismReference>
com.evolveum.midpoint.prism.impl.item.DummyReferenceImpl
- All Implemented Interfaces:
Freezable
,Item<PrismReferenceValue,
,PrismReferenceDefinition> Itemable
,ParentVisitable
,PathVisitable
,PrismReference
,Revivable
,Visitable
,DebugDumpable
,Serializable
public class DummyReferenceImpl
extends DummyItem<PrismReferenceValue,PrismReferenceDefinition,PrismReference>
implements PrismReference
- Author:
- semancik
- See Also:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
Fields inherited from interface com.evolveum.midpoint.prism.Item
KEY_NAMESPACE_CONTEXT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddIgnoringEquivalents
(@NotNull PrismReferenceValue newValue) Adds a value, not looking for equivalent values.clone()
Literal clone.cloneComplex
(CloneStrategy strategy) Complex clone with different cloning strategies.Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g.createDelta
(ItemPath path) <IV extends PrismValue,
ID extends ItemDefinition<?>>
PartiallyResolvedItem<IV,ID> findPartial
(ItemPath path) <I extends Item<?,
?>>
IfindReferencedItem
(ItemPath dereferencePath, Class<I> type) Tries to find referenced path (path starting with object derefence) in-memory.findValueByOid
(String oid) getHelp()
Returns help message defined for the item.getOid()
Returns the "real value" (content) of this item: - value contained in PrismPropertyValue - Referencable in PrismReferenceValue - Containerable in PrismContainerValue - Objectable in PrismObjectValue Note that the real value can contain operational items.<X> X
getRealValue
(Class<X> type) Type override, also for compatibility.@NotNull Collection<Referencable>
Returns (potentially empty) collection of "real values".<X> X[]
getRealValuesArray
(Class<X> type) Type override, also for compatibility.getValue()
Returns the value, if there is only one.boolean
merge
(PrismReferenceValue value) Methods inherited from class com.evolveum.midpoint.prism.impl.item.DummyItem
accept, accept, acceptParentVisitor, add, addAll, addRespectingMetadataAndCloning, applyDefinition, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, debugDump, delegate, diff, equals, equals, equals, find, freeze, getAllItems, getAllValues, getDefinition, getDisplayName, getElementName, getHighestId, getParent, getPath, getUserData, getUserData, getValues, hasCompleteDefinition, hashCode, hashCode, hashCode, isEmpty, isImmutable, isIncomplete, merge, normalize, recomputeAllValues, remove, removeAll, removeRespectingMetadata, replace, replaceAll, revive, setDefinition, setElementName, setIncomplete, setParent, setUserData, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
Methods inherited from interface com.evolveum.midpoint.prism.Item
acceptParentVisitor, add, add, addAll, addAll, addRespectingMetadataAndCloning, applyDefinition, applyDefinition, applyDefinitionIfMissing, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, contains, contains, copy, diff, diff, equals, equals, equals, filterValues, filterYields, find, findValue, findValue, getAllItems, getAllValues, getAnyValue, getAnyValue, getClonedValues, getDefinition, getDisplayName, getElementName, getHighestId, getNamespaceContext, getParent, getPath, getRealValues, getRealValuesOrRawTypes, getUserData, getUserData, getValues, hasAnyValue, hasCompleteDefinition, hashCode, hashCode, hashCode, hasNoValues, hasRaw, isEmpty, isIncomplete, isOperational, isRaw, isSingleValue, isSingleValueByDefinition, merge, normalize, recomputeAllValues, remove, remove, removeAll, removeIf, removeRespectingMetadata, replace, replaceAll, setDefinition, setElementName, setIncomplete, setParent, setUserData, size, valuesStream
Methods inherited from interface com.evolveum.midpoint.prism.PathVisitable
accept
Methods inherited from interface com.evolveum.midpoint.prism.PrismReference
debugDump, toString
-
Constructor Details
-
DummyReferenceImpl
-
-
Method Details
-
getRealValue
Description copied from interface:Item
Returns the "real value" (content) of this item: - value contained in PrismPropertyValue - Referencable in PrismReferenceValue - Containerable in PrismContainerValue - Objectable in PrismObjectValue Note that the real value can contain operational items. It can also contain container IDs (although they are not considered to be part of the real value). It does not contain information about item element name nor other metadata like origin, definition, etc. (Although e.g. Containerable can be converted back into PrismContainerValue that can be used to retrieve this information.)- Specified by:
getRealValue
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Specified by:
getRealValue
in interfacePrismReference
-
getRealValue
Description copied from interface:Item
Type override, also for compatibility.- Specified by:
getRealValue
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition>
-
getRealValuesArray
Description copied from interface:Item
Type override, also for compatibility.- Specified by:
getRealValuesArray
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition>
-
getRealValues
Description copied from interface:Item
Returns (potentially empty) collection of "real values". The list itself is detached, freely modifiable. (Note that the values can still embed a parent, e.g., for containers and references.)- Specified by:
getRealValues
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Specified by:
getRealValues
in interfacePrismReference
- See Also:
-
addIgnoringEquivalents
public ItemModifyResult<PrismReferenceValue> addIgnoringEquivalents(@NotNull @NotNull PrismReferenceValue newValue) throws SchemaException Description copied from interface:Item
Adds a value, not looking for equivalent values. (This means that the new value is always added, if possible.) Note that we check the cardinality of the item according to its definition, i.e. we do not allow single-valued item to contain more than one value.- Specified by:
addIgnoringEquivalents
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Throws:
SchemaException
-
merge
- Specified by:
merge
in interfacePrismReference
-
getOid
- Specified by:
getOid
in interfacePrismReference
-
getTargetName
- Specified by:
getTargetName
in interfacePrismReference
-
findValueByOid
- Specified by:
findValueByOid
in interfacePrismReference
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) - Specified by:
findPartial
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Specified by:
findPartial
in interfacePrismReference
-
createDelta
Description copied from interface:Item
Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g. PropertyDelta, ContainerDelta, ...)- Specified by:
createDelta
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Specified by:
createDelta
in interfacePrismReference
-
createDelta
- Specified by:
createDelta
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Specified by:
createDelta
in interfacePrismReference
-
clone
Description copied from interface:Item
Literal clone.- Specified by:
clone
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Specified by:
clone
in interfacePrismReference
- Specified by:
clone
in classDummyItem<PrismReferenceValue,
PrismReferenceDefinition, PrismReference>
-
createImmutableClone
- Specified by:
createImmutableClone
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Specified by:
createImmutableClone
in interfacePrismReference
-
cloneComplex
Description copied from interface:Item
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Specified by:
cloneComplex
in interfacePrismReference
- See Also:
-
getValue
Description copied from interface:Item
Returns the value, if there is only one. Throws exception if there are more values. If there is no value, this method either: - returns null (for properties) - throws an exception (for items that can hold multiple values) - creates an empty value (for containers and references). TODO think again whether getOrCreateValue would not be better- Specified by:
getValue
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition>
-
getHelp
Description copied from interface:Item
Returns help message defined for the item.Returns null if the help message cannot be determined.
The help message is fetched from the definition. If no definition (schema) is available, the help message will not be returned.
- Specified by:
getHelp
in interfaceItem<PrismReferenceValue,
PrismReferenceDefinition> - Returns:
- help message for the item
-
findReferencedItem
Description copied from interface:PrismReference
Tries to find referenced path (path starting with object derefence) in-memory. This works only for single-value references, whose value also contains embedded object. The search is performed on embedded object.- Specified by:
findReferencedItem
in interfacePrismReference
-