public class PrismProperty<T> extends Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
Properties may be single-valued or multi-valued
Properties may contain primitive types or complex types (defined by XSD schema)
Property values are unordered, implementation may change the order of values
Duplicate values of properties should be silently removed by implementations, but clients must be able tolerate presence of duplicate values.
Operations that modify the objects work with the granularity of properties. They add/remove/replace the values of properties, but do not "see" inside the property.
Property is mutable.
definition, elementName, immutable, incomplete, parent, prismContext, values
INDENT_STRING
Modifier | Constructor and Description |
---|---|
|
PrismProperty(QName name) |
|
PrismProperty(QName name,
PrismContext prismContext) |
protected |
PrismProperty(QName name,
PrismPropertyDefinition<T> definition,
PrismContext prismContext) |
Modifier and Type | Method and Description |
---|---|
void |
addRealValue(T valueToAdd) |
void |
addRealValues(T... valuesToAdd) |
void |
addValue(PrismPropertyValue<T> pValueToAdd) |
void |
addValues(Collection<PrismPropertyValue<T>> pValuesToAdd) |
protected void |
checkDefinition(PrismPropertyDefinition<T> def) |
PrismProperty<T> |
clone()
Literal clone.
|
PrismProperty<T> |
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.
|
static boolean |
compareCollectionRealValues(Collection<? extends PrismProperty> col1,
Collection<? extends PrismProperty> col2) |
protected void |
copyValues(CloneStrategy strategy,
PrismProperty<T> clone) |
PropertyDelta<T> |
createDelta()
Creates specific subclass of ItemDelta appropriate for type of item that this definition
represents (e.g.
|
PropertyDelta<T> |
createDelta(ItemPath path) |
static <T> PrismProperty<T> |
createRaw(XNode node,
QName itemName,
PrismContext prismContext) |
String |
debugDump(int indent) |
boolean |
deleteValue(PrismPropertyValue<T> pValueToDelete) |
boolean |
deleteValues(Collection<PrismPropertyValue<T>> pValuesToDelete) |
PropertyDelta<T> |
diff(PrismProperty<T> other) |
PropertyDelta<T> |
diff(PrismProperty<T> other,
boolean ignoreMetadata,
boolean isLiteral) |
static <T> PropertyDelta<T> |
diff(PrismProperty<T> a,
PrismProperty<T> b) |
boolean |
equals(Object obj) |
Object |
find(ItemPath path) |
<IV extends PrismValue,ID extends ItemDefinition> |
findPartial(ItemPath path) |
protected ItemDelta |
fixupDelta(ItemDelta delta,
Item otherItem,
boolean ignoreMetadata) |
T |
getAnyRealValue() |
PrismPropertyValue<T> |
getAnyValue() |
protected String |
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.
|
PrismPropertyDefinition<T> |
getDefinition()
Returns applicable property definition.
|
PrismPropertyValue<T> |
getNextValue(PrismValue value)
Returns values that is following the specified value.
|
PrismPropertyValue<T> |
getPreviousValue(PrismValue value)
Returns value that is previous to the specified value.
|
T |
getRealValue() |
<X> X |
getRealValue(Class<X> type)
Type override, also for compatibility.
|
static <T> T |
getRealValue(PrismProperty<T> property) |
Collection<T> |
getRealValues() |
<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() |
<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.
|
int |
hashCode() |
boolean |
hasRealValue(PrismPropertyValue<T> value) |
boolean |
hasValue(PrismPropertyValue<T> value) |
void |
replaceValues(Collection<PrismPropertyValue<T>> valuesToReplace) |
void |
setDefinition(PrismPropertyDefinition<T> definition)
Sets applicable property definition.
|
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() |
String |
toString() |
accept, accept, add, add, addAll, appendDebugDumpSuffix, applyDefinition, applyDefinition, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, checkImmutability, checkMutability, clear, cloneCollection, contains, contains, contains, containsEquivalentValue, containsEquivalentValue, containsRealValue, copyValues, createNewDefinitionlessItem, diff, diff, diffInternal, equalsRealValue, filterValues, findValue, findValuesIgnoreMetadata, getAllValues, getAllValues, getClonedValues, getDisplayName, getElementName, getHelp, getParent, getPath, getPrismContext, getPrismContextLocal, getUserData, getUserData, getValue, getValues, getValues, hasCompleteDefinition, hasNoValues, hasNoValues, hasRaw, hasRealValue, hasValue, hasValue, isEmpty, isImmutable, isIncomplete, isMetadata, isRaw, isSingleValue, match, merge, modifyUnfrozen, normalize, propagateDeepCloneDefinition, recomputeAllValues, remove, remove, removeAll, replace, replaceAll, resetParentCollection, revive, setElementName, setImmutable, setIncomplete, setParent, setPrismContext, setUserData, size, valuesExactMatch
finalize, getClass, notify, notifyAll, wait, wait, wait
debugDump, debugDumpLazily, debugDumpLazily
public PrismProperty(QName name)
public PrismProperty(QName name, PrismContext prismContext)
protected PrismProperty(QName name, PrismPropertyDefinition<T> definition, PrismContext prismContext)
public PrismPropertyDefinition<T> getDefinition()
May return null if no definition is applicable or the definition is not know.
getDefinition
in interface Itemable
getDefinition
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public void setDefinition(PrismPropertyDefinition<T> definition)
setDefinition
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
definition
- the definition to setpublic PrismPropertyValue<T> getValue()
public <X> List<PrismPropertyValue<X>> getValues(Class<X> type)
@NotNull public Collection<T> getRealValues()
getRealValues
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public <X> Collection<X> getRealValues(Class<X> type)
public T getAnyRealValue()
public PrismPropertyValue<T> getAnyValue()
public T getRealValue()
getRealValue
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public <X> X getRealValue(Class<X> type)
public <X> X[] getRealValuesArray(Class<X> type)
public <X> PrismPropertyValue<X> getValue(Class<X> type)
public void setValue(PrismPropertyValue<T> value)
public void setRealValue(T realValue)
public void setRealValues(T... realValues)
public void addValues(Collection<PrismPropertyValue<T>> pValuesToAdd)
public void addValue(PrismPropertyValue<T> pValueToAdd)
public void addRealValue(T valueToAdd)
public void addRealValues(T... valuesToAdd)
public boolean deleteValues(Collection<PrismPropertyValue<T>> pValuesToDelete)
public boolean deleteValue(PrismPropertyValue<T> pValueToDelete)
public void replaceValues(Collection<PrismPropertyValue<T>> valuesToReplace)
public boolean hasValue(PrismPropertyValue<T> value)
public boolean hasRealValue(PrismPropertyValue<T> value)
public PrismPropertyValue<T> getPreviousValue(PrismValue value)
Item
getPreviousValue
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public PrismPropertyValue<T> getNextValue(PrismValue value)
Item
getNextValue
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public PropertyDelta<T> createDelta()
Item
createDelta
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public PropertyDelta<T> createDelta(ItemPath path)
createDelta
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public Object find(ItemPath path)
find
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
findPartial
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public PropertyDelta<T> diff(PrismProperty<T> other)
public PropertyDelta<T> diff(PrismProperty<T> other, boolean ignoreMetadata, boolean isLiteral)
public static <T> PropertyDelta<T> diff(PrismProperty<T> a, PrismProperty<T> b)
protected void checkDefinition(PrismPropertyDefinition<T> def)
checkDefinition
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public PrismProperty<T> clone()
Item
clone
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public PrismProperty<T> cloneComplex(CloneStrategy strategy)
Item
cloneComplex
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
CloneStrategy
protected void copyValues(CloneStrategy strategy, PrismProperty<T> clone)
public int hashCode()
hashCode
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public boolean equals(Object obj)
equals
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
protected ItemDelta fixupDelta(ItemDelta delta, Item otherItem, boolean ignoreMetadata)
fixupDelta
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public static boolean compareCollectionRealValues(Collection<? extends PrismProperty> col1, Collection<? extends PrismProperty> col2)
public String toString()
toString
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public String debugDump(int indent)
debugDump
in interface DebugDumpable
debugDump
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public String toHumanReadableString()
protected String getDebugDumpClassName()
getDebugDumpClassName
in class Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
public static <T> PrismProperty<T> createRaw(@NotNull XNode node, @NotNull QName itemName, PrismContext prismContext) throws SchemaException
SchemaException
public static <T> T getRealValue(PrismProperty<T> property)
Copyright © 2019 Evolveum. All rights reserved.