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 void
addRealValue(T valueToAdd)
void
addRealValues(T... valuesToAdd)
void
addRealValueSkipUniquenessCheck(T valueToAdd)
void
addValue(PrismPropertyValue<T> pValueToAdd)
void
addValues(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()
boolean
deleteValue(PrismPropertyValue<T> pValueToDelete)
boolean
deleteValues(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)
T
getAnyRealValue()
String
getHelp()
Returns help message defined for the item.T
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<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.boolean
hasRealValue(PrismPropertyValue<T> value)
void
replaceValues(Collection<PrismPropertyValue<T>> valuesToReplace)
void
setRealValue(T realValue)
void
setRealValues(T... realValues)
void
setValue(PrismPropertyValue<T> value)
Means as a short-hand for setting just a value for single-valued attributes.String
toHumanReadableString()
-
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:PrismProperty
Type override, also for compatibility.- Specified by:
getValues
in interfacePrismProperty<T>
-
getValue
public PrismPropertyValue<T> 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<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
-
getRealValues
@NotNull public @NotNull Collection<T> getRealValues()
Description copied from interface:Item
Returns (potentially empty) collection of "real values".- Specified by:
getRealValues
in interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Specified by:
getRealValues
in interfacePrismProperty<T>
-
getRealValues
public <X> Collection<X> getRealValues(Class<X> type)
Description copied from interface:PrismProperty
Type override, also for compatibility.- Specified by:
getRealValues
in interfacePrismProperty<T>
-
getAnyRealValue
public T getAnyRealValue()
- Specified by:
getAnyRealValue
in interfacePrismProperty<T>
-
getRealValue
public T 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<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Specified by:
getRealValue
in interfacePrismProperty<T>
-
getRealValue
public <X> X getRealValue(Class<X> type)
Description copied from interface:Item
Type override, also for compatibility.- Specified by:
getRealValue
in interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
-
getRealValuesArray
public <X> X[] getRealValuesArray(Class<X> type)
Description copied from interface:Item
Type override, also for compatibility.- Specified by:
getRealValuesArray
in interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
-
getValue
public <X> PrismPropertyValue<X> getValue(Class<X> type)
Description copied from interface:PrismProperty
Type override, also for compatibility.- Specified by:
getValue
in interfacePrismProperty<T>
-
setValue
public void setValue(PrismPropertyValue<T> value)
Description copied from interface:PrismProperty
Means as a short-hand for setting just a value for single-valued attributes. Will remove all existing values.- Specified by:
setValue
in interfacePrismProperty<T>
-
setRealValue
public void setRealValue(T realValue)
- Specified by:
setRealValue
in interfacePrismProperty<T>
-
setRealValues
public void setRealValues(T... realValues)
- Specified by:
setRealValues
in interfacePrismProperty<T>
-
addValues
public void addValues(Collection<PrismPropertyValue<T>> pValuesToAdd)
- Specified by:
addValues
in interfacePrismProperty<T>
-
addValue
public void addValue(PrismPropertyValue<T> pValueToAdd)
- Specified by:
addValue
in interfacePrismProperty<T>
-
addRealValue
public void addRealValue(T valueToAdd)
- Specified by:
addRealValue
in interfacePrismProperty<T>
-
addRealValueSkipUniquenessCheck
public void addRealValueSkipUniquenessCheck(T valueToAdd)
- Specified by:
addRealValueSkipUniquenessCheck
in interfacePrismProperty<T>
-
addRealValues
public void addRealValues(T... valuesToAdd)
- Specified by:
addRealValues
in interfacePrismProperty<T>
-
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<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Returns:
- help message for the item
-
deleteValues
public boolean deleteValues(Collection<PrismPropertyValue<T>> pValuesToDelete)
- Specified by:
deleteValues
in interfacePrismProperty<T>
-
deleteValue
public boolean deleteValue(PrismPropertyValue<T> pValueToDelete)
- Specified by:
deleteValue
in interfacePrismProperty<T>
-
replaceValues
public void replaceValues(Collection<PrismPropertyValue<T>> valuesToReplace)
- Specified by:
replaceValues
in interfacePrismProperty<T>
-
hasRealValue
public boolean hasRealValue(PrismPropertyValue<T> value)
- Specified by:
hasRealValue
in interfacePrismProperty<T>
-
getValueClass
public Class<T> getValueClass()
- Specified by:
getValueClass
in interfacePrismProperty<T>
-
createDelta
public PropertyDelta<T> 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<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Specified by:
createDelta
in interfacePrismProperty<T>
-
createDelta
public PropertyDelta<T> createDelta(ItemPath path)
- Specified by:
createDelta
in interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Specified by:
createDelta
in interfacePrismProperty<T>
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
- Specified by:
findPartial
in interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Specified by:
findPartial
in interfacePrismProperty<T>
-
diff
public PropertyDelta<T> diff(PrismProperty<T> other)
- Specified by:
diff
in interfacePrismProperty<T>
-
diff
public PropertyDelta<T> diff(PrismProperty<T> other, ParameterizedEquivalenceStrategy strategy)
- Specified by:
diff
in interfacePrismProperty<T>
-
clone
public PrismProperty<T> clone()
Description copied from interface:Item
Literal clone.- Specified by:
clone
in interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Specified by:
clone
in interfacePrismProperty<T>
- Specified by:
clone
in classDummyItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>,PrismProperty<T>>
-
createImmutableClone
public PrismProperty<T> createImmutableClone()
- Specified by:
createImmutableClone
in interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Specified by:
createImmutableClone
in interfacePrismProperty<T>
-
cloneComplex
public PrismProperty<T> cloneComplex(CloneStrategy strategy)
Description copied from interface:Item
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfaceItem<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Specified by:
cloneComplex
in interfacePrismProperty<T>
- See Also:
CloneStrategy
-
toHumanReadableString
public String toHumanReadableString()
- Specified by:
toHumanReadableString
in interfacePrismProperty<T>
-
-