public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException { return new RealRawData(data, data.getContext()); }
public <T> T convertInbound(Class<T> paramType, RawData rawData) throws ConversionException { RealRawData realRawData = (RealRawData) rawData; InboundVariable inboundVariable = realRawData.getInboundVariable(); return convertInbound(paramType, inboundVariable, null); }
/** * Convert from {@link RawData} to the type that this {@link StoreProvider} * supports. * @param rawData The data from the Internet * @return An object of the type supported by this store */ protected Object convert(RawData rawData, Class<?> toType) { if ((rawData == null) || (toType == null)) { return null; } if (converterManager == null) { converterManager = ServerContextFactory.get().getContainer().getBean(ConverterManager.class); } RealRawData realRawData = (RealRawData) rawData; InboundVariable inboundVariable = realRawData.getInboundVariable(); Object value = converterManager.convertInbound(toType, inboundVariable, null); return value; }
/** * Convert from {@link RawData} to the type that this {@link StoreProvider} * supports. * @param rawData The data from the Internet * @return An object of the type supported by this store */ protected T convert(RawData rawData) { if (rawData == null) { return null; } if (converterManager == null) { converterManager = ServerContextFactory.get().getContainer().getBean(ConverterManager.class); } RealRawData realRawData = (RealRawData) rawData; InboundVariable inboundVariable = realRawData.getInboundVariable(); T value = converterManager.convertInbound(type, inboundVariable, null); return value; }
InboundVariable iv = data.getInboundVariable(); Object callbackData = converterManager.convertInbound(type, iv, property);