com.evolveum.midpoint.schema.util
Class ObjectTypeUtil

java.lang.Object
  extended by com.evolveum.midpoint.schema.util.ObjectTypeUtil

public class ObjectTypeUtil
extends java.lang.Object

Methods that would belong to the ObjectType class but cannot go there because of JAXB. There are also useful methods that would belong to other classes. But we don't want to create new class for every method ... if this goes beyond a reasonable degree, please refactor accordingly.

Author:
Radovan Semancik

Constructor Summary
ObjectTypeUtil()
           
 
Method Summary
static ObjectModificationType createModificationReplaceProperty(java.lang.String oid, javax.xml.namespace.QName propertyName, java.lang.Object propertyValue)
           
static ObjectReferenceType createObjectRef(ObjectType objectType)
           
static PropertyModificationType createPropertyModificationType(PropertyModificationTypeType changeType, XPathHolder xpathType, java.lang.Object element)
           
static PropertyModificationType createPropertyModificationType(PropertyModificationTypeType changetype, XPathHolder xpath, javax.xml.namespace.QName property, java.lang.Object value)
           
static XPathHolder createXPathHolder(javax.xml.namespace.QName property)
           
static java.lang.String dump(Extension extension)
           
static java.lang.String dump(ObjectType object)
           
static java.util.List<java.lang.String> extractOids(java.util.List<? extends ObjectType> objects, java.util.List<? extends ObjectReferenceType> refs)
           
static ObjectReferenceType findRef(java.lang.String oid, java.util.List<ObjectReferenceType> refs)
           
static org.w3c.dom.Element findXsdElement(XmlSchemaType xmlSchemaType)
          Returns the <xsd:schema> element from the XmlSchemaType.
static javax.xml.namespace.QName getElementName(PropertyModificationType propertyModification)
           
static PropertyModificationType getPropertyModification(ObjectModificationType objectChange, XPathHolder path, javax.xml.namespace.QName propertyName)
           
static
<T> T
getPropertyNewValue(ObjectModificationType objectChange, java.lang.String pathSegment, java.lang.String propertyName, java.lang.Class<T> propertyClass)
          common-1.xsd namespace is assumed single value and "replace" modification are assumed
static
<T> T
getPropertyNewValue(ObjectModificationType objectChange, XPathHolder path, javax.xml.namespace.QName propertyName, java.lang.Class<T> propertyClass)
          single value and "replace" modification are assumed
static boolean isEmpty(ObjectModificationType objectModification)
           
static boolean isModificationOf(PropertyModificationType modification, javax.xml.namespace.QName elementName)
           
static boolean isModificationOf(PropertyModificationType modification, javax.xml.namespace.QName elementName, XPathHolder path)
           
static java.lang.String toShortString(AssignmentType assignment)
           
static java.lang.Object toShortString(ObjectReferenceType objectRef)
           
static java.lang.String toShortString(ObjectType object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectTypeUtil

public ObjectTypeUtil()
Method Detail

extractOids

public static java.util.List<java.lang.String> extractOids(java.util.List<? extends ObjectType> objects,
                                                           java.util.List<? extends ObjectReferenceType> refs)

findRef

public static ObjectReferenceType findRef(java.lang.String oid,
                                          java.util.List<ObjectReferenceType> refs)

createPropertyModificationType

public static PropertyModificationType createPropertyModificationType(PropertyModificationTypeType changeType,
                                                                      XPathHolder xpathType,
                                                                      java.lang.Object element)

createPropertyModificationType

public static PropertyModificationType createPropertyModificationType(PropertyModificationTypeType changetype,
                                                                      XPathHolder xpath,
                                                                      javax.xml.namespace.QName property,
                                                                      java.lang.Object value)

createModificationReplaceProperty

public static ObjectModificationType createModificationReplaceProperty(java.lang.String oid,
                                                                       javax.xml.namespace.QName propertyName,
                                                                       java.lang.Object propertyValue)

toShortString

public static java.lang.String toShortString(ObjectType object)

toShortString

public static java.lang.String toShortString(AssignmentType assignment)

dump

public static java.lang.String dump(ObjectType object)

toShortString

public static java.lang.Object toShortString(ObjectReferenceType objectRef)

createObjectRef

public static ObjectReferenceType createObjectRef(ObjectType objectType)

dump

public static java.lang.String dump(Extension extension)
Parameters:
extension -
Returns:

findXsdElement

public static org.w3c.dom.Element findXsdElement(XmlSchemaType xmlSchemaType)
Returns the <xsd:schema> element from the XmlSchemaType.


getPropertyNewValue

public static <T> T getPropertyNewValue(ObjectModificationType objectChange,
                                        java.lang.String pathSegment,
                                        java.lang.String propertyName,
                                        java.lang.Class<T> propertyClass)
common-1.xsd namespace is assumed single value and "replace" modification are assumed


createXPathHolder

public static XPathHolder createXPathHolder(javax.xml.namespace.QName property)

getPropertyNewValue

public static <T> T getPropertyNewValue(ObjectModificationType objectChange,
                                        XPathHolder path,
                                        javax.xml.namespace.QName propertyName,
                                        java.lang.Class<T> propertyClass)
single value and "replace" modification are assumed


getPropertyModification

public static PropertyModificationType getPropertyModification(ObjectModificationType objectChange,
                                                               XPathHolder path,
                                                               javax.xml.namespace.QName propertyName)

isModificationOf

public static boolean isModificationOf(PropertyModificationType modification,
                                       javax.xml.namespace.QName elementName)

isModificationOf

public static boolean isModificationOf(PropertyModificationType modification,
                                       javax.xml.namespace.QName elementName,
                                       XPathHolder path)

getElementName

public static javax.xml.namespace.QName getElementName(PropertyModificationType propertyModification)

isEmpty

public static boolean isEmpty(ObjectModificationType objectModification)


Copyright © 2011 evolveum. All Rights Reserved.