public class PrismContainerValue<C extends Containerable> extends PrismValue implements DebugDumpable
domElement
INDENT_STRING
Constructor and Description |
---|
PrismContainerValue() |
PrismContainerValue(OriginType type,
Objectable source,
PrismContainerable container,
Long id,
QName concreteType,
PrismContext prismContext) |
PrismContainerValue(PrismContext prismContext) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor) |
void |
accept(Visitor visitor,
ItemPath path,
boolean recursive) |
<IV extends PrismValue,ID extends ItemDefinition> |
add(Item<IV,ID> item) |
<IV extends PrismValue,ID extends ItemDefinition> |
add(Item<IV,ID> item,
boolean checkUniquness)
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.
|
boolean |
addRawElement(Object element) |
<IV extends PrismValue,ID extends ItemDefinition> |
addReplaceExisting(Item<IV,ID> item)
Adds an item to a property container.
|
void |
applyDefinition(ItemDefinition definition,
boolean force) |
void |
applyDefinition(PrismContainerDefinition<C> containerDef,
boolean force) |
C |
asContainerable() |
C |
asContainerable(Class<C> defaultClazz) |
void |
assertDefinitions(boolean tolerateRaw,
String sourceDescription) |
void |
assertDefinitions(String sourceDescription) |
void |
checkConsistenceInternal(Itemable rootItem,
boolean requireDefinitions,
boolean prohibitRaw,
ConsistencyCheckScope scope) |
void |
clear() |
PrismContainerValue<C> |
clone() |
boolean |
contains(Item item) |
boolean |
contains(QName itemName) |
static void |
copyDefinition(Containerable aClone,
Containerable original) |
protected void |
copyValues(PrismContainerValue<C> clone) |
<X extends Containerable> |
createContainer(QName containerName) |
<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) |
protected void |
deepCloneDefinition(boolean ultraDeep,
PrismContainerDefinition<C> clonedContainerDef) |
boolean |
deleteRawElement(Object element) |
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) |
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
findItem(ItemDefinition itemDefinition,
Class<I> type) |
<IV extends PrismValue,ID extends ItemDefinition> |
findItem(ItemPath itemPath) |
<IV extends PrismValue,ID extends ItemDefinition> |
findItem(QName itemName) |
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
findItem(QName itemName,
Class<I> type) |
<T extends Containerable> |
findOrCreateContainer(QName containerName) |
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
findOrCreateItem(ItemPath path,
Class<I> type,
ID definition) |
<IV extends PrismValue,ID extends ItemDefinition> |
findOrCreateItem(QName containerName) |
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
findOrCreateItem(QName containerName,
Class<I> type) |
<X> PrismProperty<X> |
findOrCreateProperty(ItemPath propertyPath) |
<X> PrismProperty<X> |
findOrCreateProperty(PrismPropertyDefinition propertyDef) |
<X> PrismProperty<X> |
findOrCreateProperty(QName propertyQName) |
PrismReference |
findOrCreateReference(QName referenceName) |
<IV extends PrismValue,ID extends ItemDefinition> |
findPartial(ItemPath path) |
<X> PrismProperty<X> |
findProperty(ItemPath propertyPath) |
<X> PrismProperty<X> |
findProperty(PrismPropertyDefinition<X> propertyDefinition)
Finds a specific property in the container by definition.
|
<X> PrismProperty<X> |
findProperty(QName propertyQName) |
PrismReference |
findReference(QName elementName) |
PrismReference |
findReferenceByCompositeObjectElementName(QName elementName) |
static <T extends Containerable> |
fromPcvList(List<PrismContainerValue<T>> values) |
QName |
getConcreteType() |
PrismContainerDefinition |
getConcreteTypeDefinition() |
PrismContainer<C> |
getContainer() |
protected PrismContainerDefinition<C> |
getDefinition() |
Long |
getId() |
List<Item<?,?>> |
getItems()
Returns a set of items that the property container contains.
|
Item<?,?> |
getNextItem(Item<?,?> referenceItem) |
PrismContainerable<C> |
getParent() |
ItemPath |
getPath() |
Item<?,?> |
getPreviousItem(Item<?,?> referenceItem) |
PrismContext |
getPrismContext() |
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() |
MapXNode |
getRawXNode() |
C |
getValue() |
boolean |
hasCompleteDefinition() |
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isRaw()
Returns true if the value is raw.
|
boolean |
match(PrismValue otherValue) |
<IV extends PrismValue,ID extends ItemDefinition> |
merge(Item<IV,ID> item)
Merges the provided item into this item.
|
void |
normalize() |
void |
recompute(PrismContext prismContext) |
<IV extends PrismValue,ID extends ItemDefinition> |
remove(Item<IV,ID> item) |
void |
removeAll() |
void |
removeContainer(ItemPath itemPath) |
void |
removeContainer(QName containerName) |
void |
removeProperty(ItemPath propertyPath) |
void |
removeProperty(QName propertyName) |
boolean |
removeRawElement(Object element) |
void |
removeReference(ItemPath path) |
void |
removeReference(QName name) |
<IV extends PrismValue,ID extends ItemDefinition> |
replace(Item<IV,ID> oldItem,
Item<IV,ID> newItem) |
boolean |
representsSameValue(PrismContainerValue<C> other) |
boolean |
representsSameValue(PrismValue other)
Returns true if this and other value represent the same value.
|
void |
revive(PrismContext prismContext) |
void |
setConcreteType(QName concreteType) |
void |
setId(Long id) |
void |
setPropertyRealValue(QName propertyName,
Object realValue,
PrismContext prismContext) |
<IV extends PrismValue,ID extends ItemDefinition> |
substract(Item<IV,ID> item)
Substract the provided item from this item.
|
String |
toHumanReadableString()
Returns a short (one-line) representation of the real value stored in this object.
|
static <T extends Containerable> |
toPcvList(List<T> beans) |
String |
toString() |
appendOriginDump, applyDefinition, clearParent, clearParent, cloneCollection, cloneValues, containsRealValue, copyValues, diff, diff, equals, equals, equalsRealValue, equalsRealValue, equalsRealValues, getOriginObject, getOriginType, getRealValuesOfCollection, getUserData, getUserData, recompute, resetParentCollection, setOriginObject, setOriginType, setParent, setUserData
public PrismContainerValue()
public PrismContainerValue(PrismContext prismContext)
public PrismContainerValue(OriginType type, Objectable source, PrismContainerable container, Long id, QName concreteType, PrismContext prismContext)
public PrismContext getPrismContext()
getPrismContext
in class PrismValue
public List<Item<?,?>> getItems()
public Set<PrismProperty<?>> getProperties()
public Long getId()
public void setId(Long id)
public PrismContainerable<C> getParent()
getParent
in class PrismValue
public PrismContainer<C> getContainer()
public ItemPath getPath()
getPath
in class PrismValue
public C getValue()
public C asContainerable()
public Collection<QName> getPropertyNames()
public <IV extends PrismValue,ID extends ItemDefinition> boolean add(Item<IV,ID> item) throws SchemaException
SchemaException
public <IV extends PrismValue,ID extends ItemDefinition> boolean add(Item<IV,ID> item, boolean checkUniquness) throws SchemaException
item
- item to add.SchemaException
IllegalArgumentException
- an attempt to add value that already existspublic <IV extends PrismValue,ID extends ItemDefinition> boolean merge(Item<IV,ID> item) throws SchemaException
SchemaException
public <IV extends PrismValue,ID extends ItemDefinition> boolean substract(Item<IV,ID> item) throws SchemaException
SchemaException
public <IV extends PrismValue,ID extends ItemDefinition> void addReplaceExisting(Item<IV,ID> item) throws SchemaException
item
- item to add.SchemaException
public <IV extends PrismValue,ID extends ItemDefinition> void remove(Item<IV,ID> 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) throws SchemaException
itemsToAdd
- items to addSchemaException
public <IV extends PrismValue,ID extends ItemDefinition> void replace(Item<IV,ID> oldItem, Item<IV,ID> newItem) throws SchemaException
SchemaException
public void clear()
public boolean contains(Item item)
public boolean contains(QName itemName)
public Object find(ItemPath path)
find
in class PrismValue
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> 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<X> 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 <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findItem(QName itemName, Class<I> type)
public <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> findItem(QName itemName)
public <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> findItem(ItemPath itemPath)
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> 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 <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> findOrCreateItem(QName containerName) throws SchemaException
SchemaException
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOrCreateItem(QName containerName, Class<I> type) throws SchemaException
SchemaException
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOrCreateItem(ItemPath path, Class<I> type, ID definition) throws SchemaException
SchemaException
public <X> PrismProperty<X> findOrCreateProperty(QName propertyQName) throws SchemaException
SchemaException
public <X> PrismProperty<X> findOrCreateProperty(ItemPath propertyPath) 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 removeReference(QName name)
public void removeReference(ItemPath path)
public void setPropertyRealValue(QName propertyName, Object realValue, PrismContext prismContext) 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()
public boolean representsSameValue(PrismValue other)
PrismValue
representsSameValue
in class PrismValue
public boolean representsSameValue(PrismContainerValue<C> other)
public boolean isRaw()
PrismValue
isRaw
in class PrismValue
public MapXNode getRawXNode()
public boolean addRawElement(Object element) throws SchemaException
SchemaException
public boolean deleteRawElement(Object element) throws SchemaException
SchemaException
public boolean removeRawElement(Object element)
protected PrismContainerDefinition<C> getDefinition()
getDefinition
in class PrismValue
public void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
applyDefinition
in class PrismValue
SchemaException
public void applyDefinition(PrismContainerDefinition<C> containerDef, boolean force) throws SchemaException
SchemaException
public void revive(PrismContext prismContext) throws SchemaException
revive
in interface Revivable
revive
in class PrismValue
SchemaException
public boolean isEmpty()
isEmpty
in class PrismValue
public void normalize()
normalize
in class PrismValue
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
checkConsistenceInternal
in class PrismValue
public void assertDefinitions(String sourceDescription) throws SchemaException
SchemaException
public void assertDefinitions(boolean tolerateRaw, String sourceDescription) throws SchemaException
SchemaException
public PrismContainerValue<C> clone()
clone
in class PrismValue
protected void copyValues(PrismContainerValue<C> clone)
protected void deepCloneDefinition(boolean ultraDeep, PrismContainerDefinition<C> clonedContainerDef)
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 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
public static void copyDefinition(Containerable aClone, Containerable original)
public QName getConcreteType()
public void setConcreteType(QName concreteType)
public PrismContainerDefinition getConcreteTypeDefinition()
public static <T extends Containerable> List<PrismContainerValue<T>> toPcvList(List<T> beans)
public static <T extends Containerable> List<T> fromPcvList(List<PrismContainerValue<T>> values)
Copyright © 2016 evolveum. All rights reserved.