public abstract class Item<V extends PrismValue,D extends ItemDefinition> extends Object implements Itemable, DebugDumpable, Visitable, PathVisitable, Serializable, Revivable
Modifier and Type | Field and Description |
---|---|
protected D |
definition |
protected QName |
elementName |
protected PrismValue |
parent |
protected PrismContext |
prismContext |
INDENT_STRING
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor) |
void |
accept(Visitor visitor,
ItemPath path,
boolean recursive) |
boolean |
add(V newValue) |
boolean |
add(V newValue,
boolean checkUniqueness) |
boolean |
addAll(Collection<V> newValues) |
void |
applyDefinition(D definition) |
void |
applyDefinition(D definition,
boolean force) |
void |
assertDefinitions() |
void |
assertDefinitions(boolean tolarateRawValues,
String sourceDescription) |
void |
assertDefinitions(String sourceDescription) |
void |
checkConsistence() |
void |
checkConsistence(boolean requireDefinitions,
boolean prohibitRaw) |
void |
checkConsistence(boolean requireDefinitions,
boolean prohibitRaw,
ConsistencyCheckScope scope) |
void |
checkConsistence(boolean requireDefinitions,
ConsistencyCheckScope scope) |
void |
checkConsistence(ConsistencyCheckScope scope) |
void |
checkConsistenceInternal(Itemable rootItem,
boolean requireDefinitions,
boolean prohibitRaw,
ConsistencyCheckScope scope) |
protected abstract void |
checkDefinition(D def) |
void |
clear() |
abstract Item |
clone() |
static <T extends Item> |
cloneCollection(Collection<T> items) |
boolean |
contains(V value) |
boolean |
contains(V value,
boolean ignoreMetadata) |
boolean |
contains(V value,
boolean ignoreMetadata,
Comparator<V> comparator) |
boolean |
containsEquivalentValue(V value) |
boolean |
containsRealValue(V value) |
protected void |
copyValues(Item clone) |
abstract ItemDelta<V,D> |
createDelta()
Creates specific subclass of ItemDelta appropriate for type of item that this definition
represents (e.g.
|
abstract ItemDelta<V,D> |
createDelta(ItemPath path) |
static <T extends Item> |
createNewDefinitionlessItem(QName name,
Class<T> type,
PrismContext prismContext) |
String |
debugDump()
Provide terse and readable dump of the object suitable for log (at debug level).
|
String |
debugDump(int indent) |
ItemDelta<V,D> |
diff(Item<V,D> other) |
ItemDelta<V,D> |
diff(Item<V,D> other,
boolean ignoreMetadata,
boolean isLiteral) |
protected void |
diffInternal(Item<V,D> other,
Collection<? extends ItemDelta> deltas,
boolean ignoreMetadata,
boolean isLiteral) |
boolean |
equals(Object obj) |
boolean |
equalsRealValue(Object obj) |
abstract Object |
find(ItemPath path) |
abstract <IV extends PrismValue,ID extends ItemDefinition> |
findPartial(ItemPath path) |
PrismValue |
findValue(PrismValue value,
boolean ignoreMetadata)
Returns value that is equal or equivalent to the provided value.
|
protected ItemDelta<V,D> |
fixupDelta(ItemDelta<V,D> delta,
Item<V,D> other,
boolean ignoreMetadata) |
Collection<V> |
getClonedValues() |
protected String |
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.
|
D |
getDefinition()
Returns applicable property definition.
|
String |
getDisplayName()
Returns a display name for the property type.
|
QName |
getElementName()
Returns the name of the property.
|
String |
getHelp()
Returns help message defined for the property type.
|
PrismValue |
getNextValue(PrismValue value)
Returns values that is following the specified value.
|
PrismValue |
getParent() |
ItemPath |
getPath() |
PrismValue |
getPreviousValue(PrismValue value)
Returns value that is previous to the specified value.
|
PrismContext |
getPrismContext() |
Map<String,Object> |
getUserData() |
Object |
getUserData(String key) |
V |
getValue(int index) |
List<V> |
getValues() |
boolean |
hasCompleteDefinition() |
int |
hashCode() |
boolean |
hasRaw()
Returns true is at least one of the values is raw.
|
boolean |
hasRealValue(PrismValue value) |
boolean |
hasValue(PrismValue value) |
boolean |
hasValue(PrismValue value,
boolean ignoreMetadata) |
boolean |
isEmpty() |
boolean |
isRaw()
Returns true is all the values are raw.
|
boolean |
isSingleValue() |
boolean |
match(Object obj) |
void |
merge(Item<V,D> otherItem)
Merge all the values of other item to this item.
|
void |
normalize() |
protected void |
propagateDeepCloneDefinition(boolean ultraDeep,
D clonedDefinition) |
V |
remove(int index) |
boolean |
remove(V newValue) |
boolean |
removeAll(Collection<V> newValues) |
void |
replace(V newValue) |
void |
replaceAll(Collection<V> newValues) |
static <T extends Item> |
resetParentCollection(Collection<T> items)
Sets all parents to null.
|
void |
revive(PrismContext prismContext) |
void |
setDefinition(D definition)
Sets applicable property definition.
|
void |
setElementName(QName elementName)
Sets the name of the property.
|
void |
setParent(PrismValue parentValue) |
void |
setPrismContext(PrismContext prismContext) |
void |
setUserData(String key,
Object value) |
int |
size() |
String |
toString() |
protected QName elementName
protected PrismValue parent
protected D extends ItemDefinition definition
protected transient PrismContext prismContext
public D getDefinition()
getDefinition
in interface Itemable
public boolean hasCompleteDefinition()
public QName getElementName()
getElementName
in interface Itemable
public void setElementName(QName elementName)
name
- the name to setpublic void setDefinition(D definition)
definition
- the definition to setpublic String getDisplayName()
public String getHelp()
public PrismContext getPrismContext()
getPrismContext
in interface Itemable
public void setPrismContext(PrismContext prismContext)
public PrismValue getParent()
public void setParent(PrismValue parentValue)
public V getValue(int index)
public boolean hasValue(PrismValue value, boolean ignoreMetadata)
public boolean hasValue(PrismValue value)
public boolean hasRealValue(PrismValue value)
public boolean isSingleValue()
public PrismValue findValue(PrismValue value, boolean ignoreMetadata)
public PrismValue getPreviousValue(PrismValue value)
public PrismValue getNextValue(PrismValue value)
public Collection<V> getClonedValues()
public boolean contains(V value)
public boolean containsEquivalentValue(V value)
public boolean contains(V value, boolean ignoreMetadata, Comparator<V> comparator)
public boolean contains(V value, boolean ignoreMetadata)
public boolean containsRealValue(V value)
public int size()
public boolean addAll(Collection<V> newValues) throws SchemaException
SchemaException
public boolean add(V newValue) throws SchemaException
SchemaException
public boolean add(V newValue, boolean checkUniqueness) throws SchemaException
SchemaException
public boolean removeAll(Collection<V> newValues)
public boolean remove(V newValue)
public V remove(int index)
public void replaceAll(Collection<V> newValues) throws SchemaException
SchemaException
public void replace(V newValue)
public void clear()
public void normalize()
public void merge(Item<V,D> otherItem) throws SchemaException
SchemaException
public abstract <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
protected void diffInternal(Item<V,D> other, Collection<? extends ItemDelta> deltas, boolean ignoreMetadata, boolean isLiteral)
protected ItemDelta<V,D> fixupDelta(ItemDelta<V,D> delta, Item<V,D> other, boolean ignoreMetadata)
public abstract ItemDelta<V,D> createDelta()
public void accept(Visitor visitor, ItemPath path, boolean recursive)
accept
in interface PathVisitable
public void applyDefinition(D definition) throws SchemaException
SchemaException
public void applyDefinition(D definition, boolean force) throws SchemaException
SchemaException
public void revive(PrismContext prismContext) throws SchemaException
revive
in interface Revivable
SchemaException
protected void copyValues(Item clone)
protected void propagateDeepCloneDefinition(boolean ultraDeep, D clonedDefinition)
public static <T extends Item> Collection<T> cloneCollection(Collection<T> items)
public static <T extends Item> Collection<T> resetParentCollection(Collection<T> items)
public static <T extends Item> T createNewDefinitionlessItem(QName name, Class<T> type, PrismContext prismContext)
public void checkConsistence(boolean requireDefinitions, ConsistencyCheckScope scope)
public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw)
public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
public void checkConsistence()
public void checkConsistence(ConsistencyCheckScope scope)
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
protected abstract void checkDefinition(D def)
public void assertDefinitions() throws SchemaException
SchemaException
public void assertDefinitions(String sourceDescription) throws SchemaException
SchemaException
public void assertDefinitions(boolean tolarateRawValues, String sourceDescription) throws SchemaException
SchemaException
public boolean isRaw()
public boolean hasRaw()
public boolean isEmpty()
public boolean equalsRealValue(Object obj)
public boolean match(Object obj)
public String debugDump()
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
protected String getDebugDumpClassName()
Copyright © 2016 evolveum. All rights reserved.