Class 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 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.
      • getCompileTimeClass

        public <T> Class<T> getCompileTimeClass​(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
      • 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
      • 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
      • marshalWrap

        public static String marshalWrap​(Object jaxbObject)
                                  throws javax.xml.bind.JAXBException
        Deprecated.
        Throws:
        javax.xml.bind.JAXBException