001
014
015 package com.liferay.portal.lar.xstream;
016
017 import com.liferay.portal.kernel.lar.xstream.XStreamConverter;
018 import com.liferay.portal.kernel.lar.xstream.XStreamMarshallingContext;
019
020 import com.thoughtworks.xstream.converters.MarshallingContext;
021
022 import java.util.Iterator;
023
024
027 public class XStreamMarshallingContextAdapter
028 implements XStreamMarshallingContext {
029
030 public XStreamMarshallingContextAdapter(
031 MarshallingContext marshallingContext) {
032
033 _marshallingContext = marshallingContext;
034 }
035
036 @Override
037 public void convertAnother(Object object) {
038 _marshallingContext.convertAnother(object);
039 }
040
041 @Override
042 public void convertAnother(
043 Object object, XStreamConverter xStreamConverter) {
044
045 _marshallingContext.convertAnother(
046 object, new ConverterAdapter(xStreamConverter));
047 }
048
049 @Override
050 public Object get(Object key) {
051 return _marshallingContext.get(key);
052 }
053
054 @Override
055 public Iterator<String> keys() {
056 return _marshallingContext.keys();
057 }
058
059 @Override
060 public void put(Object key, Object value) {
061 _marshallingContext.put(key, value);
062 }
063
064 private final MarshallingContext _marshallingContext;
065
066 }