Class JaxbTestUtil
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.util.JaxbTestUtil
-
@Deprecated public final class JaxbTestUtil extends Object
Deprecated.DEPRECATED as of May 12, 2014. MidPoint data structures are not to be processed by JAXB any more. (The last drop was the inability to hide RawType from externally-visible model service WSDL. The solution devised, based on @Raw type, prevents JAXB from correctly parsing any structures that contain RawType elements.) So, don't use JaxbTestUtil even for testing purposes. Use PrismTestUtil instead. === Original description: JAXB testing util. Only for use in tests. DO NOT USE IN PRODUCTION CODE. This util is used to test the ablility of prism JAXB representation to be used by native (Sun) JAXB code. Note: this is what used to be PrismJaxbProcessor. Therefore there may be still a lot of junk to clean up.- Author:
- Radovan Semancik
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canConvert(Class<?> clazz)
Deprecated.boolean
canConvert(QName xsdType)
Deprecated.boolean
compareAny(List<Object> a, List<Object> b)
Deprecated.<T> T
fromElement(Object element, Class<T> type)
Deprecated.<T> Class<T>
getCompileTimeClass(QName xsdType)
Deprecated.javax.xml.bind.JAXBContext
getContext()
Deprecated.static JaxbTestUtil
getInstance()
Deprecated.PrismContext
getPrismContext()
Deprecated.javax.xml.bind.Unmarshaller
getUnmarshaller()
Deprecated.Allow for pooling and other fancy stuff.void
initialize()
Deprecated.boolean
isJaxbClass(Class<?> clazz)
Deprecated.String
marshalContainerableToString(Containerable containerable)
Deprecated.void
marshalElementToDom(javax.xml.bind.JAXBElement<?> jaxbElement, Node parentNode)
Deprecated.<T> Element
marshalElementToDom(javax.xml.bind.JAXBElement<T> jaxbElement, Document doc)
Deprecated.String
marshalElementToString(Object element)
Deprecated.String
marshalElementToString(Object element, Map<String,Object> properties)
Deprecated.Serializes DOM or JAXB element to stringString
marshalElementToString(Object element, QName elementName)
Deprecated.Serializes DOM or JAXB element to string, using specified elementName if needed.String
marshalElementToString(javax.xml.bind.JAXBElement<?> jaxbElement)
Deprecated.String
marshalElementToString(javax.xml.bind.JAXBElement<?> jaxbElement, Map<String,Object> properties)
Deprecated.<T> Element
marshalObjectToDom(T jaxbObject, QName elementQName)
Deprecated.<T> Element
marshalObjectToDom(T jaxbObject, QName elementQName, Document doc)
Deprecated.<T> void
marshalObjectToDom(T jaxbObject, QName elementQName, Element parentElement)
Deprecated.<T> String
marshalObjectToString(T jaxbObject, QName elementQName)
Deprecated.void
marshalToDom(Objectable objectable, Node parentNode)
Deprecated.String
marshalToString(Objectable objectable)
Deprecated.String
marshalToString(Objectable objectable, Map<String,Object> properties)
Deprecated.static String
marshalWrap(Object jaxbObject)
Deprecated.void
setContext(javax.xml.bind.JAXBContext context)
Deprecated.Element
toDomElement(Object element)
Deprecated.Element
toDomElement(Object jaxbElement, Document doc)
Deprecated.Element
toDomElement(Object jaxbElement, Document doc, boolean adopt, boolean clone, boolean deep)
Deprecated.<T> T
toJavaValue(Element element, Class<T> typeClass)
Deprecated.Object
toJavaValue(Element element, QName xsdType)
Deprecated.Used to convert property values from DOM<T> javax.xml.bind.JAXBElement<T>
unmarshalElement(File file, Class<T> type)
Deprecated.<T> javax.xml.bind.JAXBElement<T>
unmarshalElement(InputStream is, Class<T> type)
Deprecated.<T> javax.xml.bind.JAXBElement<T>
unmarshalElement(Reader reader, Class<T> type)
Deprecated.<T> javax.xml.bind.JAXBElement<T>
unmarshalElement(String xmlString, Class<T> type)
Deprecated.<T> javax.xml.bind.JAXBElement<T>
unmarshalElement(Node node, Class<T> type)
Deprecated.<T> T
unmarshalObject(File file, Class<T> type)
Deprecated.<T> T
unmarshalObject(InputStream input)
Deprecated.<T> T
unmarshalObject(InputStream input, Class<T> type)
Deprecated.<T> T
unmarshalObject(Object domOrJaxbElement, Class<T> type)
Deprecated.<T> T
unmarshalObject(String stringXml, Class<T> type)
Deprecated.Object
unmarshalObjects(File file)
Deprecated.<T> T
unmarshalRootObject(File file, Class<T> type)
Deprecated.<T extends Containerable>
PrismContainer<T>unmarshalSingleValueContainer(File file, Class<T> type)
Deprecated.<T extends Containerable>
PrismContainer<T>unmarshalSingleValueContainer(String stringXml, Class<T> type)
Deprecated.<T> T
unmarshalToObject(Node node, Class<T> type)
Deprecated.
-
-
-
Method Detail
-
getInstance
public static JaxbTestUtil getInstance()
Deprecated.
-
getPrismContext
public PrismContext getPrismContext()
Deprecated.
-
initialize
public void initialize()
Deprecated.
-
getContext
public javax.xml.bind.JAXBContext getContext()
Deprecated.
-
setContext
public void setContext(javax.xml.bind.JAXBContext context)
Deprecated.
-
isJaxbClass
public boolean isJaxbClass(Class<?> clazz)
Deprecated.
-
canConvert
public boolean canConvert(Class<?> clazz)
Deprecated.
-
canConvert
public boolean canConvert(QName xsdType)
Deprecated.
-
toJavaValue
public <T> T toJavaValue(Element element, Class<T> typeClass) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
toJavaValue
public Object toJavaValue(Element element, QName xsdType) throws javax.xml.bind.JAXBException
Deprecated.Used to convert property values from DOM- Throws:
javax.xml.bind.JAXBException
-
getUnmarshaller
public javax.xml.bind.Unmarshaller getUnmarshaller() throws javax.xml.bind.JAXBException
Deprecated.Allow for pooling and other fancy stuff. Now it dumb, creates in every call.- Throws:
javax.xml.bind.JAXBException
-
marshalToString
public String marshalToString(Objectable objectable) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalToString
public String marshalToString(Objectable objectable, Map<String,Object> properties) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalElementToString
public String marshalElementToString(javax.xml.bind.JAXBElement<?> jaxbElement) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalElementToString
public String marshalElementToString(javax.xml.bind.JAXBElement<?> jaxbElement, Map<String,Object> properties) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalElementToString
public String marshalElementToString(Object element) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalElementToString
public String marshalElementToString(Object element, Map<String,Object> properties) throws javax.xml.bind.JAXBException
Deprecated.Serializes DOM or JAXB element to string- Throws:
javax.xml.bind.JAXBException
-
marshalElementToString
public String marshalElementToString(Object element, QName elementName) throws javax.xml.bind.JAXBException
Deprecated.Serializes DOM or JAXB element to string, using specified elementName if needed.- Throws:
javax.xml.bind.JAXBException
-
marshalToDom
public void marshalToDom(Objectable objectable, Node parentNode) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalElementToDom
public void marshalElementToDom(javax.xml.bind.JAXBElement<?> jaxbElement, Node parentNode) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalElementToDom
public <T> Element marshalElementToDom(javax.xml.bind.JAXBElement<T> jaxbElement, Document doc) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalObjectToDom
public <T> Element marshalObjectToDom(T jaxbObject, QName elementQName) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalContainerableToString
public String marshalContainerableToString(Containerable containerable) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalObjectToString
public <T> String marshalObjectToString(T jaxbObject, QName elementQName) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalObjectToDom
public <T> Element marshalObjectToDom(T jaxbObject, QName elementQName, Document doc) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
marshalObjectToDom
public <T> void marshalObjectToDom(T jaxbObject, QName elementQName, Element parentElement) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
toDomElement
public Element toDomElement(Object element) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
toDomElement
public Element toDomElement(Object jaxbElement, Document doc) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
toDomElement
public Element toDomElement(Object jaxbElement, Document doc, boolean adopt, boolean clone, boolean deep) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
unmarshalElement
public <T> javax.xml.bind.JAXBElement<T> unmarshalElement(String xmlString, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
-
unmarshalObject
public <T> T unmarshalObject(InputStream input, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
-
unmarshalObject
public <T> T unmarshalObject(InputStream input) throws javax.xml.bind.JAXBException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
-
unmarshalElement
public <T> javax.xml.bind.JAXBElement<T> unmarshalElement(Reader reader, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
-
unmarshalToObject
public <T> T unmarshalToObject(Node node, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
-
unmarshalElement
public <T> javax.xml.bind.JAXBElement<T> unmarshalElement(Node node, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
-
unmarshalObject
public <T> T unmarshalObject(File file, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException, FileNotFoundException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
FileNotFoundException
-
unmarshalObjects
public Object unmarshalObjects(File file) throws javax.xml.bind.JAXBException
Deprecated.- Throws:
javax.xml.bind.JAXBException
-
unmarshalObject
public <T> T unmarshalObject(String stringXml, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
-
unmarshalSingleValueContainer
public <T extends Containerable> PrismContainer<T> unmarshalSingleValueContainer(File file, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException, FileNotFoundException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
FileNotFoundException
-
unmarshalSingleValueContainer
public <T extends Containerable> PrismContainer<T> unmarshalSingleValueContainer(String stringXml, Class<T> type) throws javax.xml.bind.JAXBException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
SchemaException
-
unmarshalObject
public <T> T unmarshalObject(Object domOrJaxbElement, Class<T> type) throws SchemaException
Deprecated.- Throws:
SchemaException
-
unmarshalElement
public <T> javax.xml.bind.JAXBElement<T> unmarshalElement(File file, Class<T> type) throws SchemaException, FileNotFoundException, javax.xml.bind.JAXBException
Deprecated.- Throws:
SchemaException
FileNotFoundException
javax.xml.bind.JAXBException
-
unmarshalElement
public <T> javax.xml.bind.JAXBElement<T> unmarshalElement(InputStream is, Class<T> type) throws SchemaException, FileNotFoundException, javax.xml.bind.JAXBException
Deprecated.- Throws:
SchemaException
FileNotFoundException
javax.xml.bind.JAXBException
-
unmarshalRootObject
public <T> T unmarshalRootObject(File file, Class<T> type) throws javax.xml.bind.JAXBException, FileNotFoundException, SchemaException
Deprecated.- Throws:
javax.xml.bind.JAXBException
FileNotFoundException
SchemaException
-
fromElement
public <T> T fromElement(Object element, Class<T> type) throws SchemaException
Deprecated.- Throws:
SchemaException
-
-