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 voidaddIgnoringEquivalents(@NotNull PrismReferenceValue newValue)Adds a value, not looking for equivalent values.PrismReferenceclone()Literal clone.PrismReferencecloneComplex(CloneStrategy strategy)Complex clone with different cloning strategies.ReferenceDeltacreateDelta()Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g.ReferenceDeltacreateDelta(ItemPath path)PrismReferencecreateImmutableClone()<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.PrismReferenceValuefindValueByOid(String oid)StringgetHelp()Returns help message defined for the item.StringgetOid()ReferencablegetRealValue()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> XgetRealValue(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.PolyStringgetTargetName()PrismReferenceValuegetValue()Returns the value, if there is only one.booleanmerge(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, getAllItems, 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, getAllItems, 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:ItemReturns 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:
getRealValuein interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Specified by:
getRealValuein interfacePrismReference
-
getRealValue
public <X> X getRealValue(Class<X> type)
Description copied from interface:ItemType override, also for compatibility.- Specified by:
getRealValuein interfaceItem<PrismReferenceValue,PrismReferenceDefinition>
-
getRealValuesArray
public <X> X[] getRealValuesArray(Class<X> type)
Description copied from interface:ItemType override, also for compatibility.- Specified by:
getRealValuesArrayin interfaceItem<PrismReferenceValue,PrismReferenceDefinition>
-
getRealValues
@NotNull public @NotNull Collection<Referencable> getRealValues()
Description copied from interface:ItemReturns (potentially empty) collection of "real values".- Specified by:
getRealValuesin interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Specified by:
getRealValuesin interfacePrismReference
-
addIgnoringEquivalents
public void addIgnoringEquivalents(@NotNull @NotNull PrismReferenceValue newValue) throws SchemaExceptionDescription copied from interface:ItemAdds 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:
addIgnoringEquivalentsin interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Throws:
SchemaException
-
merge
public boolean merge(PrismReferenceValue value)
- Specified by:
mergein interfacePrismReference
-
getOid
public String getOid()
- Specified by:
getOidin interfacePrismReference
-
getTargetName
public PolyString getTargetName()
- Specified by:
getTargetNamein interfacePrismReference
-
findValueByOid
public PrismReferenceValue findValueByOid(String oid)
- Specified by:
findValueByOidin interfacePrismReference
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
- Specified by:
findPartialin interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Specified by:
findPartialin interfacePrismReference
-
createDelta
public ReferenceDelta createDelta()
Description copied from interface:ItemCreates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g. PropertyDelta, ContainerDelta, ...)- Specified by:
createDeltain interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Specified by:
createDeltain interfacePrismReference
-
createDelta
public ReferenceDelta createDelta(ItemPath path)
- Specified by:
createDeltain interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Specified by:
createDeltain interfacePrismReference
-
clone
public PrismReference clone()
Description copied from interface:ItemLiteral clone.- Specified by:
clonein interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Specified by:
clonein interfacePrismReference- Specified by:
clonein classDummyItem<PrismReferenceValue,PrismReferenceDefinition,PrismReference>
-
createImmutableClone
public PrismReference createImmutableClone()
- Specified by:
createImmutableClonein interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Specified by:
createImmutableClonein interfacePrismReference
-
cloneComplex
public PrismReference cloneComplex(CloneStrategy strategy)
Description copied from interface:ItemComplex clone with different cloning strategies.- Specified by:
cloneComplexin interfaceItem<PrismReferenceValue,PrismReferenceDefinition>- Specified by:
cloneComplexin interfacePrismReference- See Also:
CloneStrategy
-
getValue
public PrismReferenceValue getValue()
Description copied from interface:ItemReturns 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:
getValuein interfaceItem<PrismReferenceValue,PrismReferenceDefinition>
-
getHelp
public String getHelp()
Description copied from interface:ItemReturns 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:
getHelpin 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:PrismReferenceTries 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:
findReferencedItemin interfacePrismReference
-
-