|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.prism.Item<PrismContainerValue<V>>
com.evolveum.midpoint.prism.PrismContainer<V>
public class PrismContainer<V extends Containerable>
Property container groups properties into logical blocks.The reason for grouping may be as simple as better understandability of data structure. But the group usually means different meaning, source or structure of the data. For example, the property container is frequently used to hold properties that are dynamic, not fixed by a static schema. Such grouping also naturally translates to XML and helps to "quarantine" such properties to avoid Unique Particle Attribute problems.
Property Container contains a set of (potentially multi-valued) properties or inner property containers. The order of properties is not significant, regardless of the fact that it may be fixed in the XML representation. In the XML representation, each element inside Property Container must be either Property or a Property Container.
Property Container is mutable.
Field Summary | |
---|---|
protected Class<V> |
compileTimeClass
|
Fields inherited from class com.evolveum.midpoint.prism.Item |
---|
definition, name, parent, prismContext |
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable |
---|
INDENT_STRING |
Constructor Summary | |
---|---|
|
PrismContainer(QName name)
|
|
PrismContainer(QName name,
Class<V> compileTimeClass)
|
protected |
PrismContainer(QName name,
PrismContainerDefinition<V> definition,
PrismContext prismContext)
|
Method Summary | ||
---|---|---|
void |
add(Item<?> item)
Convenience method. |
|
protected String |
additionalDumpDescription()
|
|
void |
applyDefinition(ItemDefinition definition)
|
|
void |
assertDefinitions(boolean tolarateRaw,
String sourceDescription)
|
|
boolean |
canRepresent(Class<?> compileTimeClass)
Returns true if this object can represent specified compile-time class. |
|
void |
checkConsistenceInternal(Itemable rootItem,
ItemPath path,
boolean requireDefinitions,
boolean prohibitRaw)
|
|
protected void |
checkDefinition(ItemDefinition def)
|
|
PrismContainer<V> |
clone()
|
|
boolean |
containsEquivalentValue(PrismContainerValue<V> value)
|
|
protected void |
copyValues(PrismContainer<V> clone)
|
|
ContainerDelta<V> |
createDelta(ItemPath path)
Creates specific sublcass of ItemDelta appropriate for type of item that this definition represents (e.g. |
|
PrismContainerValue<V> |
createNewValue()
|
|
String |
debugDump(int indent)
|
|
String |
dump()
Show the content of the object intended for diagnostics by developer. |
|
boolean |
equals(Object obj)
|
|
boolean |
equivalent(Object obj)
this method ignores some part of the object during comparison (e.g. |
|
|
findContainer(ItemPath path)
|
|
|
findContainer(QName containerName)
|
|
|
findItem(ItemPath propPath)
|
|
|
findItem(ItemPath propPath,
Class<I> type)
|
|
Item<?> |
findItem(QName itemQName)
|
|
|
findItem(QName itemQName,
Class<I> type)
|
|
|
findOrCreateContainer(ItemPath containerPath)
|
|
|
findOrCreateContainer(QName containerName)
|
|
|
findOrCreateItem(ItemPath containerPath,
Class<T> type)
|
|
|
findOrCreateItem(ItemPath containerPath,
Class<T> type,
ItemDefinition definition)
|
|
|
findOrCreateProperty(ItemPath propertyPath)
|
|
|
findOrCreateProperty(QName propertyName)
|
|
PrismReference |
findOrCreateReference(ItemPath propertyPath)
|
|
PrismReference |
findOrCreateReference(QName propertyName)
|
|
|
findProperty(ItemPath path)
|
|
|
findProperty(QName propertyQName)
|
|
PrismReference |
findReference(ItemPath path)
|
|
PrismReference |
findReference(QName referenceQName)
|
|
PrismReference |
findReferenceByCompositeObjectElementName(QName elementName)
|
|
Class<V> |
getCompileTimeClass()
|
|
protected String |
getDebugDumpClassName()
Return a human readable name of this class suitable for logs. |
|
PrismContainerDefinition<V> |
getDefinition()
Returns applicable property container definition. |
|
PrismContainerValue<V> |
getNextValue(PrismValue value)
Returns values that is following the specified value. |
|
PrismContainerValue<V> |
getPreviousValue(PrismValue value)
Returns value that is previous to the specified value. |
|
|
getPropertyRealValue(QName propertyName,
Class<T> type)
|
|
PrismContainerValue<V> |
getValue()
|
|
PrismContainerValue<V> |
getValue(String id)
|
|
List<PrismContainerValue<V>> |
getValues()
|
|
boolean |
hasCompleteDefinition()
Returns true if the object and all contained prisms have proper definition. |
|
int |
hashCode()
|
|
boolean |
isEmpty()
|
|
void |
mergeValue(PrismContainerValue<V> otherValue)
|
|
void |
mergeValues(Collection<PrismContainerValue<V>> otherValues)
|
|
void |
mergeValues(PrismContainer<V> other)
|
|
void |
remove(Item<?> item)
Convenience method. |
|
void |
removeContainer(ItemPath path)
|
|
void |
removeContainer(QName containerQName)
|
|
|
removeItem(ItemPath path,
Class<I> itemType)
|
|
void |
removeProperty(ItemPath path)
|
|
void |
removeProperty(QName propertyQName)
|
|
void |
removeReference(ItemPath path)
|
|
void |
removeReference(QName referenceQName)
|
|
void |
setDefinition(PrismContainerDefinition<V> definition)
Sets applicable property container definition. |
|
void |
setPropertyRealValue(QName propertyName,
Object realValue)
|
|
void |
setValue(PrismContainerValue<V> value)
|
|
String |
toString()
|
|
void |
trim()
Remove all empty values |
Methods inherited from class com.evolveum.midpoint.prism.Item |
---|
accept, add, addAll, applyDefinition, asDomElements, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, clear, cloneCollection, contains, contains, containsRealValue, copyValues, createNewDefinitionlessItem, debugDump, diff, diff, diff, diffInternal, equalsRealValue, findValue, fixupDelta, getClonedValues, getDisplayName, getHelp, getName, getParent, getPath, getPrismContext, getUserData, getUserData, getValue, hasRaw, hasRealValue, hasValue, hasValue, isRaw, normalize, remove, remove, removeAll, replace, replaceAll, resetParentCollection, revive, setDefinition, setName, setParent, setPrismContext, setUserData, size |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.evolveum.midpoint.prism.Itemable |
---|
getName, getPath, getPrismContext |
Field Detail |
---|
protected Class<V extends Containerable> compileTimeClass
Constructor Detail |
---|
public PrismContainer(QName name)
public PrismContainer(QName name, Class<V> compileTimeClass)
protected PrismContainer(QName name, PrismContainerDefinition<V> definition, PrismContext prismContext)
Method Detail |
---|
public Class<V> getCompileTimeClass()
getCompileTimeClass
in interface PrismContainerable<V extends Containerable>
public boolean canRepresent(Class<?> compileTimeClass)
public List<PrismContainerValue<V>> getValues()
getValues
in class Item<PrismContainerValue<V extends Containerable>>
public PrismContainerValue<V> getValue()
public void setValue(PrismContainerValue<V> value) throws SchemaException
SchemaException
public PrismContainerValue<V> getPreviousValue(PrismValue value)
Item
getPreviousValue
in class Item<PrismContainerValue<V extends Containerable>>
public PrismContainerValue<V> getNextValue(PrismValue value)
Item
getNextValue
in class Item<PrismContainerValue<V extends Containerable>>
public PrismContainerValue<V> getValue(String id)
public void setPropertyRealValue(QName propertyName, Object realValue) throws SchemaException
SchemaException
public <T> T getPropertyRealValue(QName propertyName, Class<T> type)
public void add(Item<?> item) throws SchemaException
SchemaException
public PrismContainerValue<V> createNewValue()
public void mergeValues(PrismContainer<V> other) throws SchemaException
SchemaException
public void mergeValues(Collection<PrismContainerValue<V>> otherValues) throws SchemaException
SchemaException
public void mergeValue(PrismContainerValue<V> otherValue) throws SchemaException
SchemaException
public void trim()
public PrismContainerDefinition<V> getDefinition()
getDefinition
in interface Itemable
getDefinition
in interface PrismContainerable<V extends Containerable>
getDefinition
in class Item<PrismContainerValue<V extends Containerable>>
public void setDefinition(PrismContainerDefinition<V> definition)
definition
- the definition to setpublic void applyDefinition(ItemDefinition definition) throws SchemaException
applyDefinition
in class Item<PrismContainerValue<V extends Containerable>>
SchemaException
public <I extends Item<?>> I findItem(QName itemQName, Class<I> type)
public boolean hasCompleteDefinition()
hasCompleteDefinition
in class Item<PrismContainerValue<V extends Containerable>>
public Item<?> findItem(QName itemQName)
public <I extends Item<?>> I findItem(ItemPath propPath, Class<I> type)
public <X extends PrismValue> Item<X> findItem(ItemPath propPath)
public <T extends Containerable> PrismContainer<T> findContainer(ItemPath path)
public <T extends Containerable> PrismContainer<T> findContainer(QName containerName)
public <T> PrismProperty<T> findProperty(ItemPath path)
public <T> PrismProperty<T> findProperty(QName propertyQName)
public PrismReference findReference(ItemPath path)
public PrismReference findReference(QName referenceQName)
public PrismReference findReferenceByCompositeObjectElementName(QName elementName)
public <T extends Item<?>> T findOrCreateItem(ItemPath containerPath, Class<T> type) throws SchemaException
SchemaException
public <T extends Item<?>> T findOrCreateItem(ItemPath containerPath, Class<T> type, ItemDefinition definition) throws SchemaException
SchemaException
public <T extends Containerable> PrismContainer<T> findOrCreateContainer(ItemPath containerPath) throws SchemaException
SchemaException
public <T extends Containerable> PrismContainer<T> findOrCreateContainer(QName containerName) throws SchemaException
SchemaException
public <T> PrismProperty<T> findOrCreateProperty(ItemPath propertyPath) throws SchemaException
SchemaException
public <T> PrismProperty<T> findOrCreateProperty(QName propertyName) throws SchemaException
SchemaException
public PrismReference findOrCreateReference(ItemPath propertyPath) throws SchemaException
SchemaException
public PrismReference findOrCreateReference(QName propertyName) throws SchemaException
SchemaException
public void remove(Item<?> item)
public void removeProperty(QName propertyQName)
public void removeProperty(ItemPath path)
public void removeContainer(QName containerQName)
public void removeContainer(ItemPath path)
public void removeReference(QName referenceQName)
public void removeReference(ItemPath path)
public <I extends Item<?>> void removeItem(ItemPath path, Class<I> itemType)
public ContainerDelta<V> createDelta(ItemPath path)
Item
createDelta
in class Item<PrismContainerValue<V extends Containerable>>
public boolean isEmpty()
isEmpty
in class Item<PrismContainerValue<V extends Containerable>>
protected void checkDefinition(ItemDefinition def)
checkDefinition
in class Item<PrismContainerValue<V extends Containerable>>
public void checkConsistenceInternal(Itemable rootItem, ItemPath path, boolean requireDefinitions, boolean prohibitRaw)
checkConsistenceInternal
in class Item<PrismContainerValue<V extends Containerable>>
public void assertDefinitions(boolean tolarateRaw, String sourceDescription) throws SchemaException
assertDefinitions
in class Item<PrismContainerValue<V extends Containerable>>
SchemaException
public PrismContainer<V> clone()
clone
in class Item<PrismContainerValue<V extends Containerable>>
protected void copyValues(PrismContainer<V> clone)
public boolean containsEquivalentValue(PrismContainerValue<V> value)
containsEquivalentValue
in class Item<PrismContainerValue<V extends Containerable>>
public int hashCode()
hashCode
in class Item<PrismContainerValue<V extends Containerable>>
public boolean equals(Object obj)
equals
in class Item<PrismContainerValue<V extends Containerable>>
public boolean equivalent(Object obj)
public String toString()
toString
in class Item<PrismContainerValue<V extends Containerable>>
public String dump()
Dumpable
dump
in interface Dumpable
dump
in class Item<PrismContainerValue<V extends Containerable>>
public String debugDump(int indent)
debugDump
in interface DebugDumpable
debugDump
in class Item<PrismContainerValue<V extends Containerable>>
protected String additionalDumpDescription()
protected String getDebugDumpClassName()
getDebugDumpClassName
in class Item<PrismContainerValue<V extends Containerable>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |