public abstract class Item<V extends PrismValue> extends Object implements Itemable, Dumpable, DebugDumpable, Visitable, PathVisitable, Serializable
Modifier and Type | Field and Description |
---|---|
protected ItemDefinition |
definition |
protected QName |
name |
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 |
addAll(Collection<V> newValues) |
void |
applyDefinition(ItemDefinition definition) |
void |
applyDefinition(ItemDefinition definition,
boolean force) |
List<Element> |
asDomElements() |
void |
assertDefinitions() |
void |
assertDefinitions(boolean tolarateRawValues,
String sourceDescription) |
void |
assertDefinitions(String sourceDescription) |
void |
checkConsistence() |
void |
checkConsistence(boolean requireDefinitions) |
void |
checkConsistence(boolean requireDefinitions,
boolean prohibitRaw) |
void |
checkConsistenceInternal(Itemable rootItem,
boolean requireDefinitions,
boolean prohibitRaw) |
protected abstract void |
checkDefinition(ItemDefinition 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 |
containsEquivalentValue(V value) |
boolean |
containsRealValue(V value) |
protected void |
copyValues(Item clone) |
abstract ItemDelta<V> |
createDelta()
Creates specific subclass of ItemDelta appropriate for type of item that this definition
represents (e.g.
|
abstract ItemDelta<V> |
createDelta(ItemPath path) |
static <T extends Item> |
createNewDefinitionlessItem(QName name,
Class<T> type) |
String |
debugDump()
Provide terse and readable dump of the object suitable for log (at debug level).
|
String |
debugDump(int indent) |
Collection<? extends ItemDelta> |
diff(Item<V> other) |
Collection<? extends ItemDelta> |
diff(Item<V> other,
boolean ignoreMetadata,
boolean isLiteral) |
protected void |
diffInternal(Item<V> other,
Collection<? extends ItemDelta> deltas,
boolean ignoreMetadata,
boolean isLiteral) |
String |
dump()
Show the content of the object intended for diagnostics by developer.
|
boolean |
equals(Object obj) |
boolean |
equalsRealValue(Object obj) |
abstract Object |
find(ItemPath path) |
abstract <X extends PrismValue> |
findPartial(ItemPath path) |
PrismValue |
findValue(PrismValue value,
boolean ignoreMetadata)
Returns value that is equal or equivalent to the provided value.
|
protected ItemDelta<V> |
fixupDelta(ItemDelta<V> delta,
Item<V> other,
boolean ignoreMetadata) |
Collection<V> |
getClonedValues() |
protected String |
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.
|
ItemDefinition |
getDefinition()
Returns applicable property definition.
|
String |
getDisplayName()
Returns a display name for the property type.
|
String |
getHelp()
Returns help message defined for the property type.
|
QName |
getName()
Returns the name of the property.
|
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 |
normalize() |
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(ItemDefinition definition)
Sets applicable property definition.
|
void |
setName(QName name)
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 name
protected PrismValue parent
protected ItemDefinition definition
protected transient PrismContext prismContext
public ItemDefinition getDefinition()
getDefinition
in interface Itemable
public boolean hasCompleteDefinition()
public QName getName()
public void setName(QName name)
name
- the name to setpublic void setDefinition(ItemDefinition 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)
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 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 abstract <X extends PrismValue> PartiallyResolvedValue<X> findPartial(ItemPath path)
public Collection<? extends ItemDelta> diff(Item<V> other)
public Collection<? extends ItemDelta> diff(Item<V> other, boolean ignoreMetadata, boolean isLiteral)
protected void diffInternal(Item<V> other, Collection<? extends ItemDelta> deltas, boolean ignoreMetadata, boolean isLiteral)
protected ItemDelta<V> fixupDelta(ItemDelta<V> delta, Item<V> other, boolean ignoreMetadata)
public abstract ItemDelta<V> createDelta()
public void accept(Visitor visitor, ItemPath path, boolean recursive)
accept
in interface PathVisitable
public void applyDefinition(ItemDefinition definition) throws SchemaException
SchemaException
public void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
SchemaException
public void revive(PrismContext prismContext)
protected void copyValues(Item clone)
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)
public void checkConsistence(boolean requireDefinitions)
public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw)
public void checkConsistence()
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw)
protected abstract void checkDefinition(ItemDefinition 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 dump()
Dumpable
public String debugDump()
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
protected String getDebugDumpClassName()
Copyright © 2013 evolveum. All rights reserved.