public Collection<Export> getProducts() { return getExports(); }
public Collection<Export> getProducts() { return getExports(); }
public Collection<Export> getProducts() { return getExports(); }
public Collection<Export> getProducts() { return getExports(); }
public static void addExport(ApplicationContext appContext, Export export) { Exports exports = getExports(appContext); exports.addExport(export); }
public static void addExport(ApplicationContext appContext, Export export) { Exports exports = getExports(appContext); exports.addExport(export); }
public static void addExport(ApplicationContext appContext, Export export) { Exports exports = getExports(appContext); exports.addExport(export); }
public static void addExport(ApplicationContext appContext, Export export) { Exports exports = getExports(appContext); exports.addExport(export); }
private void init(SmooksTransformModel model) { Exports exports = Exports.getExports(_smooks.getApplicationContext()); // Must define 1 exported result type if (exports == null) { _log.debug("Smooks configuration '" + model.getConfig() + "'will not make updates to the Exchange Message payload because it does not define any <core:exports>. See Smooks User Guide."); return; } if (exports.getExports().size() != 1) { throw TransformMessages.MESSAGES.smooksConfigurationNoExports(); } _export = exports.getExports().iterator().next(); // Only support String (character based) or Java Results for now... Class<?> exportType = _export.getType(); if (StringResult.class.isAssignableFrom(exportType)) { return; } else if (JavaResult.class.isAssignableFrom(exportType)) { return; } throw TransformMessages.MESSAGES.unsupportedSmooksExport(exportType.getName()); }
private void init(SmooksTransformModel model) { Exports exports = Exports.getExports(_smooks.getApplicationContext()); // Must define 1 exported result type if (exports == null) { _log.debug("Smooks configuration '" + model.getConfig() + "'will not make updates to the Exchange Message payload because it does not define any <core:exports>. See Smooks User Guide."); return; } if (exports.getExports().size() != 1) { throw TransformMessages.MESSAGES.smooksConfigurationNoExports(); } _export = exports.getExports().iterator().next(); // Only support String (character based) or Java Results for now... Class<?> exportType = _export.getType(); if (StringResult.class.isAssignableFrom(exportType)) { return; } else if (JavaResult.class.isAssignableFrom(exportType)) { return; } throw TransformMessages.MESSAGES.unsupportedSmooksExport(exportType.getName()); }
/** * Unmarshals the fromStream to an Object. * </p> * The Camel framework will call this method from {@link UnMarshalProcessor#process(Exchange)} * and it will take care of setting the returned Object on the Out Message's body. * * @param exchange The Camel {@link Exchange}. * @param fromStream The InputStream that will be unmarshalled into an Object instance. */ public Object unmarshal(final Exchange exchange, final InputStream fromStream) throws Exception { final ExecutionContext execContext = smooks.createExecutionContext(); final Exports exports = Exports.getExports(smooks.getApplicationContext()); final Result[] results = exports.createResults(); smooks.filterSource(execContext, new StreamSource(fromStream), results); return getResult(exports, results, exchange); }
setupSmooksReporting(executionContext); final Exports exports = Exports.getExports(smooks.getApplicationContext()); if (exports.hasExports())