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
,PrismContextSensitive
,PrismReference
,Revivable
,Visitable
,DebugDumpable
,Serializable
public class DummyReferenceImpl extends DummyItem<PrismReferenceValue,PrismReferenceDefinition,PrismReference> implements PrismReference
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description DummyReferenceImpl(PrismReference realReference, @NotNull ItemPath path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIgnoringEquivalents(@NotNull PrismReferenceValue newValue)
Adds a value, not looking for equivalent values.PrismReference
clone()
Literal clone.PrismReference
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.ReferenceDelta
createDelta()
Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g.ReferenceDelta
createDelta(ItemPath path)
PrismReference
createImmutableClone()
<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.PrismReferenceValue
findValueByOid(String oid)
String
getHelp()
Returns help message defined for the item.String
getOid()
Referencable
getRealValue()
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>
getRealValues()
Returns (potentially empty) collection of "real values".<X> X[]
getRealValuesArray(Class<X> type)
Type override, also for compatibility.PolyString
getTargetName()
PrismReferenceValue
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, applyDefinition, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, debugDump, delegate, diff, equals, equals, equals, find, freeze, getAllValues, getDefinition, getDisplayName, getElementName, getHighestId, getParent, getPath, getPrismContext, getPrismContextLocal, getUserData, getUserData, getValues, hasCompleteDefinition, hashCode, hashCode, hashCode, isEmpty, isImmutable, isIncomplete, merge, normalize, recomputeAllValues, remove, removeAll, removeRespectingMetadata, replace, replaceAll, revive, setDefinition, setElementName, setIncomplete, setParent, setPrismContext, 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, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, contains, contains, copy, diff, diff, equals, equals, equals, filterValues, filterYields, find, findValue, findValue, getAllValues, getAnyValue, getAnyValue, getClonedValues, getDefinition, getDisplayName, getElementName, getHighestId, getParent, getPath, getPrismContextLocal, 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, setPrismContext, setUserData, size, valuesStream
-
Methods inherited from interface com.evolveum.midpoint.prism.PathVisitable
accept
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismReference
debugDump, toString
-
-
-
-
Constructor Detail
-
DummyReferenceImpl
public DummyReferenceImpl(PrismReference realReference, @NotNull @NotNull ItemPath path)
-
-
Method Detail
-
getRealValue
public Referencable 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
public <X> X getRealValue(Class<X> type)
Description copied from interface:Item
Type override, also for compatibility.- Specified by:
getRealValue
in interfaceItem<PrismReferenceValue,PrismReferenceDefinition>
-
getRealValuesArray
public <X> X[] getRealValuesArray(Class<X> type)
Description copied from interface:Item
Type override, also for compatibility.- Specified by:
getRealValuesArray
in interfaceItem<PrismReferenceValue,PrismReferenceDefinition>
-
getRealValues
@NotNull public @NotNull Collection<Referencable> getRealValues()
Description copied from interface:Item
Returns (potentially empty) collection of "real values".- Specified by:
getRealValues
in interfaceItem<PrismReferenceValue,PrismReferenceDefinition>
- Specified by:
getRealValues
in interfacePrismReference
-
addIgnoringEquivalents
public void 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
public boolean merge(PrismReferenceValue value)
- Specified by:
merge
in interfacePrismReference
-
getOid
public String getOid()
- Specified by:
getOid
in interfacePrismReference
-
getTargetName
public PolyString getTargetName()
- Specified by:
getTargetName
in interfacePrismReference
-
findValueByOid
public PrismReferenceValue findValueByOid(String oid)
- 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
public ReferenceDelta 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
public ReferenceDelta createDelta(ItemPath path)
- Specified by:
createDelta
in interfaceItem<PrismReferenceValue,PrismReferenceDefinition>
- Specified by:
createDelta
in interfacePrismReference
-
clone
public PrismReference 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
public PrismReference createImmutableClone()
- Specified by:
createImmutableClone
in interfaceItem<PrismReferenceValue,PrismReferenceDefinition>
- Specified by:
createImmutableClone
in interfacePrismReference
-
cloneComplex
public PrismReference cloneComplex(CloneStrategy strategy)
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:
CloneStrategy
-
getValue
public PrismReferenceValue 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
public String 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
public <I extends Item<?,?>> I findReferencedItem(ItemPath dereferencePath, Class<I> type)
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
-
-