|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.schema.processor.Definition
com.evolveum.midpoint.schema.processor.ItemDefinition
com.evolveum.midpoint.schema.processor.PropertyContainerDefinition
public class PropertyContainerDefinition
Definition of a property container.
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. 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. This class represents schema definition for property container. SeeDefinition
for more details.
Field Summary | |
---|---|
protected ComplexTypeDefinition |
complexTypeDefinition
|
protected boolean |
isRuntimeSchema
This means that the property container is not defined by fixed (compile-time) schema. |
protected Schema |
schema
|
Fields inherited from class com.evolveum.midpoint.schema.processor.ItemDefinition |
---|
name |
Fields inherited from class com.evolveum.midpoint.schema.processor.Definition |
---|
defaultName, displayName, help, ignored, typeName |
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable |
---|
INDENT_STRING |
Method Summary | ||
---|---|---|
PropertyContainerDefinition |
clone()
Shallow clone |
|
protected void |
copyDefinitionData(PropertyContainerDefinition clone)
|
|
PropertyDefinition |
createPropertyDefinition(javax.xml.namespace.QName name)
|
|
PropertyDefinition |
createPropertyDefinition(javax.xml.namespace.QName name,
javax.xml.namespace.QName typeName)
Creates new instance of property definition and adds it to the container. |
|
PropertyDefinition |
createPropertyDefinition(javax.xml.namespace.QName name,
javax.xml.namespace.QName typeName,
int minOccurs,
int maxOccurs)
Creates new instance of property definition and adds it to the container. |
|
PropertyDefinition |
createPropertyDefinition(java.lang.String localName,
javax.xml.namespace.QName typeName)
Creates new instance of property definition and adds it to the container. |
|
PropertyDefinition |
createPropertyDefinition(java.lang.String localName,
java.lang.String localTypeName)
Creates new instance of property definition and adds it to the container. |
|
PropertyDefinition |
createPropertyDefinition(java.lang.String localName,
java.lang.String localTypeName,
int minOccurs,
int maxOccurs)
Creates new instance of property definition and adds it to the container. |
|
java.lang.String |
debugDump(int indent)
|
|
protected void |
fillProperties(java.lang.Object instance,
PropertyContainer source)
used for MidPoint -> JAXB conversion |
|
|
findItemDefinition(PropertyPath path,
java.lang.Class<T> clazz)
|
|
ItemDefinition |
findItemDefinition(javax.xml.namespace.QName name)
|
|
|
findItemDefinition(javax.xml.namespace.QName name,
java.lang.Class<T> clazz)
|
|
PropertyContainerDefinition |
findPropertyContainerDefinition(PropertyPath path)
Finds an inner PropertyContainerDefinition by following the property container path. |
|
PropertyContainerDefinition |
findPropertyContainerDefinition(javax.xml.namespace.QName name)
Finds an inner PropertyContainerDefinition by looking at the property container name. |
|
PropertyDefinition |
findPropertyDefinition(PropertyPath propertyPath)
|
|
PropertyDefinition |
findPropertyDefinition(javax.xml.namespace.QName name)
Finds a PropertyDefinition by looking at the property name. |
|
ComplexTypeDefinition |
getComplexTypeDefinition()
|
|
java.util.Collection<ItemDefinition> |
getDefinitions()
Returns set of property definitions. |
|
java.util.Set<PropertyDefinition> |
getPropertyDefinitions()
Returns set of property definitions. |
|
protected java.lang.String |
getSchemaNamespace()
|
|
PropertyContainer |
instantiate(PropertyPath parentPath)
Create property container instance with a default name. |
|
PropertyContainer |
instantiate(javax.xml.namespace.QName name,
java.lang.Object element,
PropertyPath parentPath)
Create property container instance with a specified name and element. |
|
PropertyContainer |
instantiate(javax.xml.namespace.QName name,
PropertyPath parentPath)
Create property container instance with a specified name. |
|
protected
|
instantiateJaxbClass(java.lang.Class<T> clazz)
|
|
boolean |
isEmpty()
|
|
boolean |
isRuntimeSchema()
|
|
boolean |
isWildcard()
|
|
protected
|
parseAsContent(javax.xml.namespace.QName name,
java.util.List<java.lang.Object> contentElements,
java.lang.Class<T> type,
PropertyPath parentPath)
|
|
PropertyContainer |
parseAsContent(javax.xml.namespace.QName name,
java.util.List<java.lang.Object> contentElements,
PropertyPath parentPath)
|
|
PropertyContainer |
parseItem(java.util.List<java.lang.Object> elements,
PropertyPath parentPath)
Creates new property container from DOM or JAXB representation (multiple elements). |
|
PropertyContainer |
parseItem(java.lang.Object element)
Assumes top-level element (null parentPath) |
|
protected
|
parseItem(java.lang.Object element,
java.lang.Class<T> type,
PropertyPath parentPath)
Creates new property container from DOM or JAXB representation (multiple elements). |
|
PropertyContainer |
parseItem(java.lang.Object element,
PropertyPath parentPath)
Creates new property container from DOM or JAXB representation (single element). |
|
protected
|
parseItemFromJaxbElement(javax.xml.bind.JAXBElement jaxbElement,
java.lang.Class<T> type,
PropertyPath parentPath)
|
|
protected
|
parseItemFromJaxbObject(java.lang.Object jaxbObject,
java.lang.Class<T> type,
PropertyPath parentPath)
|
|
PropertyContainer |
parseItemFromJaxbObject(java.lang.Object jaxbObject,
PropertyPath parentPath)
|
|
protected
|
parseItemFromJaxbObject(java.lang.Object jaxbObject,
javax.xml.namespace.QName elementName,
java.lang.Class<T> type,
PropertyPath parentPath)
|
|
java.util.Collection<? extends Item> |
parseItems(java.util.List<java.lang.Object> elements,
PropertyPath parentPath)
Parses items from a list of elements. |
|
protected java.util.Collection<? extends Item> |
parseItems(java.util.List<java.lang.Object> elements,
PropertyPath parentPath,
java.util.Collection<? extends ItemDefinition> selection)
Parses items from a list of elements. |
|
void |
setComplexTypeDefinition(ComplexTypeDefinition complexTypeDefinition)
|
|
void |
setRuntimeSchema(boolean isRuntimeSchema)
|
Methods inherited from class com.evolveum.midpoint.schema.processor.ItemDefinition |
---|
copyDefinitionData, equals, getName, getNameOrDefaultName, hashCode, setName, toString |
Methods inherited from class com.evolveum.midpoint.schema.processor.Definition |
---|
copyDefinitionData, debugDump, dump, getDefaultName, getDisplayName, getHelp, getTypeName, isIgnored, setDisplayName, setHelp, setIgnored |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ComplexTypeDefinition complexTypeDefinition
protected Schema schema
protected boolean isRuntimeSchema
Method Detail |
---|
protected java.lang.String getSchemaNamespace()
public ComplexTypeDefinition getComplexTypeDefinition()
public void setComplexTypeDefinition(ComplexTypeDefinition complexTypeDefinition)
public boolean isWildcard()
public <T extends ItemDefinition> T findItemDefinition(javax.xml.namespace.QName name, java.lang.Class<T> clazz)
public <T extends ItemDefinition> T findItemDefinition(PropertyPath path, java.lang.Class<T> clazz)
public ItemDefinition findItemDefinition(javax.xml.namespace.QName name)
public PropertyDefinition findPropertyDefinition(javax.xml.namespace.QName name)
name
- property definition name
public PropertyDefinition findPropertyDefinition(PropertyPath propertyPath)
public PropertyContainerDefinition findPropertyContainerDefinition(javax.xml.namespace.QName name)
name
- property container definition name
public PropertyContainerDefinition findPropertyContainerDefinition(PropertyPath path)
path
- property container path
public java.util.Collection<ItemDefinition> getDefinitions()
public java.util.Set<PropertyDefinition> getPropertyDefinitions()
public boolean isRuntimeSchema()
public void setRuntimeSchema(boolean isRuntimeSchema)
public PropertyContainer instantiate(PropertyPath parentPath)
instantiate
in class ItemDefinition
public PropertyContainer instantiate(javax.xml.namespace.QName name, PropertyPath parentPath)
instantiate
in class ItemDefinition
public PropertyContainer instantiate(javax.xml.namespace.QName name, java.lang.Object element, PropertyPath parentPath)
instantiate
in class ItemDefinition
public PropertyContainerDefinition clone()
clone
in class java.lang.Object
protected void copyDefinitionData(PropertyContainerDefinition clone)
public PropertyDefinition createPropertyDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName typeName)
name
- name of the property (element name)typeName
- XSD type of the property
public PropertyDefinition createPropertyDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName typeName, int minOccurs, int maxOccurs)
name
- name of the property (element name)typeName
- XSD type of the propertyminOccurs
- minimal number of occurrencesmaxOccurs
- maximal number of occurrences (-1 means unbounded)
public PropertyDefinition createPropertyDefinition(javax.xml.namespace.QName name)
public PropertyDefinition createPropertyDefinition(java.lang.String localName, javax.xml.namespace.QName typeName)
localName
- name of the property (element name) relative to the schema namespacetypeName
- XSD type of the property
public PropertyDefinition createPropertyDefinition(java.lang.String localName, java.lang.String localTypeName)
localName
- name of the property (element name) relative to the schema namespacelocalTypeName
- XSD type of the property
public PropertyDefinition createPropertyDefinition(java.lang.String localName, java.lang.String localTypeName, int minOccurs, int maxOccurs)
localName
- name of the property (element name) relative to the schema namespacelocalTypeName
- XSD type of the propertyminOccurs
- minimal number of occurrencesmaxOccurs
- maximal number of occurrences (-1 means unbounded)
public PropertyContainer parseItem(java.lang.Object element, PropertyPath parentPath) throws SchemaException
element
- DOM representation of property containerparentPath
-
SchemaException
- error parsing the elementpublic PropertyContainer parseItem(java.lang.Object element) throws SchemaException
SchemaException
public PropertyContainer parseItem(java.util.List<java.lang.Object> elements, PropertyPath parentPath) throws SchemaException
parseItem
in class ItemDefinition
elements
- DOM or JAXB representation of property container
SchemaException
- error parsing the elementsprotected <T extends PropertyContainer> T parseItem(java.lang.Object element, java.lang.Class<T> type, PropertyPath parentPath) throws SchemaException
T
- subclass of property container to returnelement
- JAXB or DOM element representing the containertype
- subclass of property container to return
SchemaException
- error parsing the elementspublic PropertyContainer parseAsContent(javax.xml.namespace.QName name, java.util.List<java.lang.Object> contentElements, PropertyPath parentPath) throws SchemaException
SchemaException
protected <T extends PropertyContainer> T parseAsContent(javax.xml.namespace.QName name, java.util.List<java.lang.Object> contentElements, java.lang.Class<T> type, PropertyPath parentPath) throws SchemaException
SchemaException
public java.util.Collection<? extends Item> parseItems(java.util.List<java.lang.Object> elements, PropertyPath parentPath) throws SchemaException
elements
- list of elements with serialized properties
SchemaException
- error parsing the elementsprotected java.util.Collection<? extends Item> parseItems(java.util.List<java.lang.Object> elements, PropertyPath parentPath, java.util.Collection<? extends ItemDefinition> selection) throws SchemaException
SchemaException
public PropertyContainer parseItemFromJaxbObject(java.lang.Object jaxbObject, PropertyPath parentPath) throws SchemaException
parseItemFromJaxbObject
in class ItemDefinition
SchemaException
protected <T extends PropertyContainer> T parseItemFromJaxbElement(javax.xml.bind.JAXBElement jaxbElement, java.lang.Class<T> type, PropertyPath parentPath) throws SchemaException
SchemaException
protected <T extends PropertyContainer> T parseItemFromJaxbObject(java.lang.Object jaxbObject, java.lang.Class<T> type, PropertyPath parentPath) throws SchemaException
SchemaException
protected <T extends PropertyContainer> T parseItemFromJaxbObject(java.lang.Object jaxbObject, javax.xml.namespace.QName elementName, java.lang.Class<T> type, PropertyPath parentPath) throws SchemaException
SchemaException
protected void fillProperties(java.lang.Object instance, PropertyContainer source) throws SchemaException
SchemaException
protected <T> T instantiateJaxbClass(java.lang.Class<T> clazz)
public java.lang.String debugDump(int indent)
debugDump
in interface DebugDumpable
debugDump
in class Definition
public boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |