public class PrismContainerValue<T extends Containerable> extends PrismValue implements Dumpable, DebugDumpable
domElement
INDENT_STRING
Constructor and Description |
---|
PrismContainerValue() |
PrismContainerValue(OriginType type,
Objectable source,
PrismContainerable container,
Long id) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor) |
void |
accept(Visitor visitor,
ItemPath path,
boolean recursive) |
void |
add(Item<?> item)
Adds an item to a property container.
|
void |
addAll(Collection<? extends Item<?>> itemsToAdd)
Adds a collection of items to a property container.
|
void |
addAllReplaceExisting(Collection<? extends Item<?>> itemsToAdd)
Adds a collection of items to a property container.
|
void |
addReplaceExisting(Item<?> item)
Adds an item to a property container.
|
void |
applyDefinition(ItemDefinition definition,
boolean force) |
void |
applyDefinition(PrismContainerDefinition definition,
boolean force) |
T |
asContainerable() |
T |
asContainerable(Class<T> clazz) |
void |
assertDefinitions(boolean tolerateRaw,
String sourceDescription) |
void |
assertDefinitions(String sourceDescription) |
void |
checkConsistenceInternal(Itemable rootItem,
boolean requireDefinitions,
boolean prohibitRaw) |
void |
clear() |
PrismContainerValue<T> |
clone() |
boolean |
contains(Item item) |
protected void |
copyValues(PrismContainerValue<T> clone) |
<X extends Containerable> |
createContainer(QName containerName) |
protected Element |
createDomElement() |
<X> PrismProperty<X> |
createProperty(PrismPropertyDefinition propertyDefinition) |
<X> PrismProperty<X> |
createProperty(QName propertyName) |
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator.
|
String |
debugDump(int indent) |
String |
dump()
Show the content of the object intended for diagnostics by developer.
|
boolean |
equals(Object obj) |
boolean |
equalsComplex(PrismContainerValue<?> other,
boolean ignoreMetadata,
boolean isLiteral) |
boolean |
equalsComplex(PrismValue other,
boolean ignoreMetadata,
boolean isLiteral) |
boolean |
equivalent(PrismContainerValue<?> other) |
Object |
find(ItemPath path) |
<X extends Containerable> |
findContainer(QName containerName) |
<I extends Item<?>> |
findItem(ItemDefinition itemDefinition,
Class<I> type) |
Item<?> |
findItem(ItemPath itemPath) |
Item<?> |
findItem(QName itemName) |
<I extends Item<?>> |
findItem(QName itemName,
Class<I> type) |
<T extends Containerable> |
findOrCreateContainer(QName containerName) |
<X extends Item> |
findOrCreateItem(ItemPath path,
Class<X> type,
ItemDefinition definition) |
Item<?> |
findOrCreateItem(QName containerName) |
<X extends Item> |
findOrCreateItem(QName containerName,
Class<X> type) |
<X> PrismProperty<X> |
findOrCreateProperty(PrismPropertyDefinition propertyDef) |
<X> PrismProperty<X> |
findOrCreateProperty(QName propertyQName) |
PrismReference |
findOrCreateReference(QName referenceName) |
<X extends PrismValue> |
findPartial(ItemPath path) |
<X> PrismProperty<X> |
findProperty(ItemPath propertyPath) |
<X> PrismProperty<X> |
findProperty(PrismPropertyDefinition propertyDefinition)
Finds a specific property in the container by definition.
|
<X> PrismProperty<X> |
findProperty(QName propertyQName) |
PrismReference |
findReference(QName elementName) |
PrismReference |
findReferenceByCompositeObjectElementName(QName elementName) |
PrismContainer<T> |
getContainer() |
Long |
getId() |
List<Item<?>> |
getItems()
Returns a set of items that the property container contains.
|
Item<?> |
getNextItem(Item<?> referenceItem) |
PrismContainerable<T> |
getParent() |
ItemPath |
getPath() |
Item<?> |
getPreviousItem(Item<?> referenceItem) |
Set<PrismProperty<?>> |
getProperties()
Returns a set of properties that the property container contains.
|
Collection<QName> |
getPropertyNames() |
<T> T |
getPropertyRealValue(QName propertyName,
Class<T> type) |
List<Object> |
getRawElements() |
T |
getValue() |
boolean |
hasCompleteDefinition() |
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isRaw()
Returns true if the value is raw.
|
boolean |
match(PrismValue otherValue) |
void |
normalize() |
void |
recompute(PrismContext prismContext) |
void |
remove(Item<?> item) |
void |
removeAll() |
void |
removeContainer(ItemPath itemPath) |
void |
removeContainer(QName containerName) |
void |
removeProperty(ItemPath propertyPath) |
void |
removeProperty(QName propertyName) |
void |
replace(Item<?> oldItem,
Item<?> newItem) |
boolean |
representsSameValue(PrismContainerValue<T> other) |
boolean |
representsSameValue(PrismValue other)
Returns true if this and other value represent the same value.
|
void |
revive(PrismContext prismContext) |
void |
setId(Long id) |
void |
setPropertyRealValue(QName propertyName,
Object realValue) |
String |
toHumanReadableString()
Returns a short (one-line) representation of the real value stored in this object.
|
String |
toString() |
applyDefinition, asDomElement, clearDomElement, cloneCollection, cloneValues, containsRealValue, copyValues, diff, diff, equals, equals, equalsRealValue, equalsRealValue, getOriginObject, getOriginType, getPrismContext, getRealValuesOfCollection, recompute, resetParentCollection, setOriginObject, setOriginType, setParent
public PrismContainerValue()
public PrismContainerValue(OriginType type, Objectable source, PrismContainerable container, Long id)
public List<Item<?>> getItems()
public Set<PrismProperty<?>> getProperties()
public Long getId()
public void setId(Long id)
public PrismContainerable<T> getParent()
getParent
in class PrismValue
public PrismContainer<T> getContainer()
public ItemPath getPath()
getPath
in class PrismValue
public T getValue()
public T asContainerable()
public Collection<QName> getPropertyNames()
public void add(Item<?> item) throws SchemaException
item
- item to add.SchemaException
IllegalArgumentException
- an attempt to add value that already existspublic void addReplaceExisting(Item<?> item) throws SchemaException
item
- item to add.SchemaException
public void remove(Item<?> item)
public void removeAll()
public void addAll(Collection<? extends Item<?>> itemsToAdd) throws SchemaException
itemsToAdd
- items to addIllegalArgumentException
- an attempt to add value that already existsSchemaException
public void addAllReplaceExisting(Collection<? extends Item<?>> itemsToAdd)
itemsToAdd
- items to addpublic void replace(Item<?> oldItem, Item<?> newItem) throws SchemaException
SchemaException
public void clear()
public boolean contains(Item item)
public Object find(ItemPath path)
find
in class PrismValue
public <X extends PrismValue> PartiallyResolvedValue<X> findPartial(ItemPath path)
findPartial
in class PrismValue
public <X> PrismProperty<X> findProperty(QName propertyQName)
public <X> PrismProperty<X> findProperty(ItemPath propertyPath)
public <X> PrismProperty<X> findProperty(PrismPropertyDefinition propertyDefinition)
propertyDefinition
- property definition to find.public <X extends Containerable> PrismContainer<X> findContainer(QName containerName)
public PrismReference findReference(QName elementName)
public PrismReference findReferenceByCompositeObjectElementName(QName elementName)
public <I extends Item<?>> I findItem(ItemDefinition itemDefinition, Class<I> type)
public <T extends Containerable> PrismContainer<T> findOrCreateContainer(QName containerName) throws SchemaException
SchemaException
public PrismReference findOrCreateReference(QName referenceName) throws SchemaException
SchemaException
public Item<?> findOrCreateItem(QName containerName) throws SchemaException
SchemaException
public <X extends Item> X findOrCreateItem(QName containerName, Class<X> type) throws SchemaException
SchemaException
public <X extends Item> X findOrCreateItem(ItemPath path, Class<X> type, ItemDefinition definition) throws SchemaException
SchemaException
public <X> PrismProperty<X> findOrCreateProperty(QName propertyQName) throws SchemaException
SchemaException
public <X> PrismProperty<X> findOrCreateProperty(PrismPropertyDefinition propertyDef) throws SchemaException
SchemaException
public <X extends Containerable> PrismContainer<X> createContainer(QName containerName) throws SchemaException
SchemaException
public <X> PrismProperty<X> createProperty(QName propertyName) throws SchemaException
SchemaException
public <X> PrismProperty<X> createProperty(PrismPropertyDefinition propertyDefinition) throws SchemaException
SchemaException
public void removeProperty(QName propertyName)
public void removeProperty(ItemPath propertyPath)
public void removeContainer(QName containerName)
public void removeContainer(ItemPath itemPath)
public void setPropertyRealValue(QName propertyName, Object realValue) throws SchemaException
SchemaException
public void recompute(PrismContext prismContext)
recompute
in class PrismValue
public void accept(Visitor visitor)
accept
in interface Visitable
accept
in class PrismValue
public void accept(Visitor visitor, ItemPath path, boolean recursive)
accept
in interface PathVisitable
accept
in class PrismValue
public boolean hasCompleteDefinition()
protected Element createDomElement()
createDomElement
in class PrismValue
public boolean representsSameValue(PrismValue other)
PrismValue
representsSameValue
in class PrismValue
public boolean representsSameValue(PrismContainerValue<T> other)
public boolean isRaw()
PrismValue
isRaw
in class PrismValue
public void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
applyDefinition
in class PrismValue
SchemaException
public void applyDefinition(PrismContainerDefinition definition, boolean force) throws SchemaException
SchemaException
public void revive(PrismContext prismContext)
revive
in class PrismValue
public boolean isEmpty()
isEmpty
in class PrismValue
public void normalize()
normalize
in class PrismValue
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw)
checkConsistenceInternal
in class PrismValue
public void assertDefinitions(String sourceDescription) throws SchemaException
SchemaException
public void assertDefinitions(boolean tolerateRaw, String sourceDescription) throws SchemaException
SchemaException
public PrismContainerValue<T> clone()
clone
in class PrismValue
protected void copyValues(PrismContainerValue<T> clone)
public boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral)
equalsComplex
in class PrismValue
public boolean equalsComplex(PrismContainerValue<?> other, boolean ignoreMetadata, boolean isLiteral)
public boolean equivalent(PrismContainerValue<?> other)
public boolean equals(Object obj)
equals
in class PrismValue
public int hashCode()
hashCode
in class PrismValue
public String dump()
Dumpable
public String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
public boolean match(PrismValue otherValue)
match
in class PrismValue
public String toHumanReadableString()
PrismValue
toHumanReadableString
in class PrismValue
Copyright © 2013 evolveum. All rights reserved.