Class DummyPropertyImpl<T>
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.item.DummyItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>,PrismProperty<T>>
-
- com.evolveum.midpoint.prism.impl.item.DummyPropertyImpl<T>
-
- All Implemented Interfaces:
Freezable,Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>,Itemable,ParentVisitable,PathVisitable,PrismContextSensitive,PrismProperty<T>,Revivable,Visitable,DebugDumpable,Serializable
public class DummyPropertyImpl<T> extends DummyItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>,PrismProperty<T>> implements PrismProperty<T>
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description DummyPropertyImpl(PrismProperty<T> realProperty, @NotNull ItemPath path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRealValue(T valueToAdd)voidaddRealValues(T... valuesToAdd)voidaddRealValueSkipUniquenessCheck(T valueToAdd)voidaddValue(PrismPropertyValue<T> pValueToAdd)voidaddValues(Collection<PrismPropertyValue<T>> pValuesToAdd)PrismProperty<T>clone()Literal clone.PrismProperty<T>cloneComplex(CloneStrategy strategy)Complex clone with different cloning strategies.PropertyDelta<T>createDelta()Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g.PropertyDelta<T>createDelta(ItemPath path)PrismProperty<T>createImmutableClone()booleandeleteValue(PrismPropertyValue<T> pValueToDelete)booleandeleteValues(Collection<PrismPropertyValue<T>> pValuesToDelete)PropertyDelta<T>diff(PrismProperty<T> other)PropertyDelta<T>diff(PrismProperty<T> other, ParameterizedEquivalenceStrategy strategy)<IV extends PrismValue,ID extends ItemDefinition>
PartiallyResolvedItem<IV,ID>findPartial(ItemPath path)TgetAnyRealValue()StringgetHelp()Returns help message defined for the item.TgetRealValue()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<T>getRealValues()Returns (potentially empty) collection of "real values".<X> Collection<X>getRealValues(Class<X> type)Type override, also for compatibility.<X> X[]getRealValuesArray(Class<X> type)Type override, also for compatibility.PrismPropertyValue<T>getValue()Returns the value, if there is only one.<X> PrismPropertyValue<X>getValue(Class<X> type)Type override, also for compatibility.Class<T>getValueClass()<X> List<PrismPropertyValue<X>>getValues(Class<X> type)Type override, also for compatibility.booleanhasRealValue(PrismPropertyValue<T> value)voidreplaceValues(Collection<PrismPropertyValue<T>> valuesToReplace)voidsetRealValue(T realValue)voidsetRealValues(T... realValues)voidsetValue(PrismPropertyValue<T> value)Means as a short-hand for setting just a value for single-valued attributes.StringtoHumanReadableString()-
Methods inherited from class com.evolveum.midpoint.prism.impl.item.DummyItem
accept, accept, acceptParentVisitor, add, add, add, addAll, addAll, addAll, applyDefinition, applyDefinition, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, contains, contains, contains, containsEquivalentValue, containsEquivalentValue, debugDump, delegate, diff, equals, equals, equals, filterValues, find, findValue, freeze, getAllValues, getAnyValue, getClonedValues, getDefinition, getDisplayName, getElementName, getHighestId, getParent, getPath, getPrismContext, getPrismContextLocal, getUserData, getUserData, getValues, hasCompleteDefinition, hashCode, hashCode, hashCode, hasNoValues, hasRaw, isEmpty, isImmutable, isIncomplete, isOperational, isRaw, isSingleValue, merge, normalize, recomputeAllValues, remove, remove, removeAll, replace, replaceAll, revive, setDefinition, setElementName, setIncomplete, setParent, setPrismContext, setUserData, size, toString, valuesEqual
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, 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, add, addAll, addAll, addAll, applyDefinition, applyDefinition, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, contains, contains, contains, containsEquivalentValue, containsEquivalentValue, diff, diff, equals, equals, equals, filterValues, find, findValue, getAllValues, getAnyValue, getAnyValue, getClonedValues, getDefinition, getDisplayName, getElementName, getHighestId, getParent, getPath, getPrismContextLocal, getRealValuesOrRawTypes, getUserData, getUserData, getValues, hasCompleteDefinition, hashCode, hashCode, hashCode, hasNoValues, hasRaw, isEmpty, isIncomplete, isOperational, isRaw, isSingleValue, merge, normalize, recomputeAllValues, remove, remove, removeAll, replace, replaceAll, revive, setDefinition, setElementName, setIncomplete, setParent, setPrismContext, setUserData, size, valuesEqual
-
Methods inherited from interface com.evolveum.midpoint.prism.PathVisitable
accept
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
-
-
-
Constructor Detail
-
DummyPropertyImpl
public DummyPropertyImpl(PrismProperty<T> realProperty, @NotNull @NotNull ItemPath path)
-
-
Method Detail
-
getValues
public <X> List<PrismPropertyValue<X>> getValues(Class<X> type)
Description copied from interface:PrismPropertyType override, also for compatibility.- Specified by:
getValuesin interfacePrismProperty<T>
-
getValue
public PrismPropertyValue<T> 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<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
-
getRealValues
@NotNull public @NotNull Collection<T> getRealValues()
Description copied from interface:ItemReturns (potentially empty) collection of "real values".- Specified by:
getRealValuesin interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Specified by:
getRealValuesin interfacePrismProperty<T>
-
getRealValues
public <X> Collection<X> getRealValues(Class<X> type)
Description copied from interface:PrismPropertyType override, also for compatibility.- Specified by:
getRealValuesin interfacePrismProperty<T>
-
getAnyRealValue
public T getAnyRealValue()
- Specified by:
getAnyRealValuein interfacePrismProperty<T>
-
getRealValue
public T 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<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Specified by:
getRealValuein interfacePrismProperty<T>
-
getRealValue
public <X> X getRealValue(Class<X> type)
Description copied from interface:ItemType override, also for compatibility.- Specified by:
getRealValuein interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
-
getRealValuesArray
public <X> X[] getRealValuesArray(Class<X> type)
Description copied from interface:ItemType override, also for compatibility.- Specified by:
getRealValuesArrayin interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
-
getValue
public <X> PrismPropertyValue<X> getValue(Class<X> type)
Description copied from interface:PrismPropertyType override, also for compatibility.- Specified by:
getValuein interfacePrismProperty<T>
-
setValue
public void setValue(PrismPropertyValue<T> value)
Description copied from interface:PrismPropertyMeans as a short-hand for setting just a value for single-valued attributes. Will remove all existing values.- Specified by:
setValuein interfacePrismProperty<T>
-
setRealValue
public void setRealValue(T realValue)
- Specified by:
setRealValuein interfacePrismProperty<T>
-
setRealValues
public void setRealValues(T... realValues)
- Specified by:
setRealValuesin interfacePrismProperty<T>
-
addValues
public void addValues(Collection<PrismPropertyValue<T>> pValuesToAdd)
- Specified by:
addValuesin interfacePrismProperty<T>
-
addValue
public void addValue(PrismPropertyValue<T> pValueToAdd)
- Specified by:
addValuein interfacePrismProperty<T>
-
addRealValue
public void addRealValue(T valueToAdd)
- Specified by:
addRealValuein interfacePrismProperty<T>
-
addRealValueSkipUniquenessCheck
public void addRealValueSkipUniquenessCheck(T valueToAdd)
- Specified by:
addRealValueSkipUniquenessCheckin interfacePrismProperty<T>
-
addRealValues
public void addRealValues(T... valuesToAdd)
- Specified by:
addRealValuesin interfacePrismProperty<T>
-
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<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Returns:
- help message for the item
-
deleteValues
public boolean deleteValues(Collection<PrismPropertyValue<T>> pValuesToDelete)
- Specified by:
deleteValuesin interfacePrismProperty<T>
-
deleteValue
public boolean deleteValue(PrismPropertyValue<T> pValueToDelete)
- Specified by:
deleteValuein interfacePrismProperty<T>
-
replaceValues
public void replaceValues(Collection<PrismPropertyValue<T>> valuesToReplace)
- Specified by:
replaceValuesin interfacePrismProperty<T>
-
hasRealValue
public boolean hasRealValue(PrismPropertyValue<T> value)
- Specified by:
hasRealValuein interfacePrismProperty<T>
-
getValueClass
public Class<T> getValueClass()
- Specified by:
getValueClassin interfacePrismProperty<T>
-
createDelta
public PropertyDelta<T> 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<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Specified by:
createDeltain interfacePrismProperty<T>
-
createDelta
public PropertyDelta<T> createDelta(ItemPath path)
- Specified by:
createDeltain interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Specified by:
createDeltain interfacePrismProperty<T>
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
- Specified by:
findPartialin interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Specified by:
findPartialin interfacePrismProperty<T>
-
diff
public PropertyDelta<T> diff(PrismProperty<T> other)
- Specified by:
diffin interfacePrismProperty<T>
-
diff
public PropertyDelta<T> diff(PrismProperty<T> other, ParameterizedEquivalenceStrategy strategy)
- Specified by:
diffin interfacePrismProperty<T>
-
clone
public PrismProperty<T> clone()
Description copied from interface:ItemLiteral clone.- Specified by:
clonein interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Specified by:
clonein interfacePrismProperty<T>- Specified by:
clonein classDummyItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>,PrismProperty<T>>
-
createImmutableClone
public PrismProperty<T> createImmutableClone()
- Specified by:
createImmutableClonein interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Specified by:
createImmutableClonein interfacePrismProperty<T>
-
cloneComplex
public PrismProperty<T> cloneComplex(CloneStrategy strategy)
Description copied from interface:ItemComplex clone with different cloning strategies.- Specified by:
cloneComplexin interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>- Specified by:
cloneComplexin interfacePrismProperty<T>- See Also:
CloneStrategy
-
toHumanReadableString
public String toHumanReadableString()
- Specified by:
toHumanReadableStringin interfacePrismProperty<T>
-
-