KIE Internal 6.2.0.CR2

org.kie.internal.jaxb
Class StringKeyObjectValueMapXmlAdapter

java.lang.Object
  extended by javax.xml.bind.annotation.adapters.XmlAdapter<StringKeyObjectValueMap,Map<String,Object>>
      extended by org.kie.internal.jaxb.StringKeyObjectValueMapXmlAdapter

public class StringKeyObjectValueMapXmlAdapter
extends XmlAdapter<StringKeyObjectValueMap,Map<String,Object>>

This is a XmlAdapter for mapping Map instances to classes/instances that both JAXB/XML and JSON can deal with.

The most important reason for the existence of this class is that it works well with jackson JSON! JaxbMapAdapter, on the other hand, does not!


Constructor Summary
StringKeyObjectValueMapXmlAdapter()
           
 
Method Summary
static Object deserializeObject(byte[] objBytes, String className, String key)
           
 StringKeyObjectValueMap marshal(Map<String,Object> map)
           
static byte[] serializeObject(Object obj, String key)
           
 Map<String,Object> unmarshal(StringKeyObjectValueMap xmlMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringKeyObjectValueMapXmlAdapter

public StringKeyObjectValueMapXmlAdapter()
Method Detail

marshal

public StringKeyObjectValueMap marshal(Map<String,Object> map)
                                throws Exception
Specified by:
marshal in class XmlAdapter<StringKeyObjectValueMap,Map<String,Object>>
Throws:
Exception

serializeObject

public static byte[] serializeObject(Object obj,
                                     String key)

unmarshal

public Map<String,Object> unmarshal(StringKeyObjectValueMap xmlMap)
Specified by:
unmarshal in class XmlAdapter<StringKeyObjectValueMap,Map<String,Object>>

deserializeObject

public static Object deserializeObject(byte[] objBytes,
                                       String className,
                                       String key)

KIE Internal 6.2.0.CR2

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.