|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.schema.processor.Item
com.evolveum.midpoint.schema.processor.PropertyContainer
public class PropertyContainer
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 |
---|
Fields inherited from class com.evolveum.midpoint.schema.processor.Item |
---|
definition, element, name, parentPath |
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable |
---|
INDENT_STRING |
Constructor Summary | |
---|---|
PropertyContainer(javax.xml.namespace.QName name,
PropertyContainerDefinition definition,
java.lang.Object element,
PropertyPath parentPath)
|
Method Summary | |
---|---|
void |
add(Item item)
Adds an item to a property container. |
void |
addAll(java.util.Collection<? extends Item> itemsToAdd)
Adds a collection of items to a property container. |
void |
addAllReplaceExisting(java.util.Collection<? extends Item> itemsToAdd)
Adds a collection of items to a property container. |
protected java.lang.String |
additionalDumpDescription()
|
void |
addReplaceExisting(Item item)
Adds an item to a property container. |
void |
applyModification(PropertyModification modification)
|
void |
applyModifications(java.util.List<PropertyModification> modifications)
|
PropertyContainer |
clone()
|
protected void |
copyValues(PropertyContainer clone)
|
Property |
createProperty(javax.xml.namespace.QName propertyName,
java.lang.Class<?> valueClass)
|
PropertyContainer |
createPropertyContainer(javax.xml.namespace.QName containerName)
|
java.lang.String |
debugDump(int indent)
|
java.lang.String |
dump()
Show the content of the object intended for diagnostics by developer. |
boolean |
equals(java.lang.Object obj)
|
Item |
findItem(ItemDefinition itemDefinition)
Finds a specific property in the container by definition. |
Item |
findItem(javax.xml.namespace.QName itemQName)
Finds a specific property in the container by name. |
Property |
findOrCreateProperty(PropertyPath parentPath,
javax.xml.namespace.QName propertyQName,
java.lang.Class<?> valueClass)
|
Property |
findOrCreateProperty(javax.xml.namespace.QName propertyQName,
java.lang.Class<?> valueClass)
|
PropertyContainer |
findOrCreatePropertyContainer(PropertyPath containerPath)
|
PropertyContainer |
findOrCreatePropertyContainer(javax.xml.namespace.QName containerName)
|
Property |
findProperty(PropertyDefinition propertyDefinition)
Finds a specific property in the container by definition. |
Property |
findProperty(PropertyPath propertyPath)
|
Property |
findProperty(PropertyPath parentPath,
javax.xml.namespace.QName propertyQName)
|
Property |
findProperty(javax.xml.namespace.QName propertyQName)
Finds a specific property in the container by name. |
PropertyContainer |
findPropertyContainer(PropertyPath parentPath)
|
PropertyContainer |
findPropertyContainer(javax.xml.namespace.QName name)
|
protected java.lang.String |
getDebugDumpClassName()
Return a human readable name of this class suitable for logs. |
PropertyContainerDefinition |
getDefinition()
Returns applicable property container definition. |
java.util.Set<Item> |
getItems()
Returns a set of items that the property container contains. |
java.util.Set<Property> |
getProperties()
Returns a set of properties that the property container contains. |
java.util.Collection<javax.xml.namespace.QName> |
getPropertyNames()
|
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.List<java.lang.Object> |
serializePropertiesToJaxb(org.w3c.dom.Document doc)
Serialize properties to DOM or JAXB Elements. |
void |
serializeToDom(org.w3c.dom.Node parentNode)
Serializes property to DOM or JAXB element(s). |
void |
setDefinition(PropertyContainerDefinition definition)
Sets applicable property container definition. |
java.lang.String |
toString()
|
Methods inherited from class com.evolveum.midpoint.schema.processor.Item |
---|
copyValues, debugDump, getDisplayName, getElement, getHelp, getName, getParentPath, getPath, setDefinition, setElement, setName, setParentPath |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyContainer(javax.xml.namespace.QName name, PropertyContainerDefinition definition, java.lang.Object element, PropertyPath parentPath)
Method Detail |
---|
public java.util.Set<Item> getItems()
public java.util.Set<Property> getProperties()
public java.util.Collection<javax.xml.namespace.QName> getPropertyNames()
public void add(Item item)
item
- item to add.
java.lang.IllegalArgumentException
- an attempt to add value that already existspublic void addReplaceExisting(Item item)
item
- item to add.public void addAll(java.util.Collection<? extends Item> itemsToAdd)
itemsToAdd
- items to add
java.lang.IllegalArgumentException
- an attempt to add value that already existspublic void addAllReplaceExisting(java.util.Collection<? extends Item> itemsToAdd)
itemsToAdd
- items to addpublic PropertyContainerDefinition getDefinition()
getDefinition
in class Item
public void setDefinition(PropertyContainerDefinition definition)
definition
- the definition to setpublic Property findProperty(javax.xml.namespace.QName propertyQName)
propertyQName
- property name to find.
public PropertyContainer findPropertyContainer(javax.xml.namespace.QName name)
public PropertyContainer findPropertyContainer(PropertyPath parentPath)
public Property findProperty(PropertyPath parentPath, javax.xml.namespace.QName propertyQName)
public Property findProperty(PropertyPath propertyPath)
public Item findItem(javax.xml.namespace.QName itemQName)
itemQName
- property name to find.
public Item findItem(ItemDefinition itemDefinition)
itemDefinition
- property definition to find.
public Property findProperty(PropertyDefinition propertyDefinition)
propertyDefinition
- property definition to find.
public PropertyContainer findOrCreatePropertyContainer(javax.xml.namespace.QName containerName)
public PropertyContainer findOrCreatePropertyContainer(PropertyPath containerPath)
public Property findOrCreateProperty(javax.xml.namespace.QName propertyQName, java.lang.Class<?> valueClass)
public Property findOrCreateProperty(PropertyPath parentPath, javax.xml.namespace.QName propertyQName, java.lang.Class<?> valueClass)
public PropertyContainer createPropertyContainer(javax.xml.namespace.QName containerName)
public Property createProperty(javax.xml.namespace.QName propertyName, java.lang.Class<?> valueClass)
public void serializeToDom(org.w3c.dom.Node parentNode) throws SchemaException
Item
serializeToDom
in class Item
parentNode
- DOM Document
SchemaException
- No definition or inconsistent definitionpublic java.util.List<java.lang.Object> serializePropertiesToJaxb(org.w3c.dom.Document doc) throws SchemaException
doc
- DOM Document
SchemaException
- the schema definition is missing or is inconsistentpublic boolean isEmpty()
public void applyModifications(java.util.List<PropertyModification> modifications)
public void applyModification(PropertyModification modification)
public PropertyContainer clone()
clone
in class Item
protected void copyValues(PropertyContainer clone)
public int hashCode()
hashCode
in class Item
public boolean equals(java.lang.Object obj)
equals
in class Item
public java.lang.String toString()
toString
in class Item
public java.lang.String dump()
Dumpable
dump
in interface Dumpable
dump
in class Item
public java.lang.String debugDump(int indent)
debugDump
in interface DebugDumpable
debugDump
in class Item
protected java.lang.String additionalDumpDescription()
protected java.lang.String getDebugDumpClassName()
getDebugDumpClassName
in class Item
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |