/** * Add a set of resource configurations to this Smooks instance. * <p/> * Calls {@link #addConfigurations(String, java.io.InputStream)} with a baseURI of "./", * which is the default base URI on all {@link org.milyn.resource.URIResourceLocator} * instances. * * @param resourceConfigStream The resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(InputStream resourceConfigStream) throws SAXException, IOException { addConfigurations("./", resourceConfigStream); }
/** * Add a set of resource configurations to this Smooks instance. * <p/> * Calls {@link #addConfigurations(String, java.io.InputStream)} with a baseURI of "./", * which is the default base URI on all {@link org.milyn.resource.URIResourceLocator} * instances. * * @param resourceConfigStream The resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(InputStream resourceConfigStream) throws SAXException, IOException { addConfigurations("./", resourceConfigStream); }
/** * Add a set of resource configurations to this Smooks instance. * <p/> * Calls {@link #addConfigurations(String, java.io.InputStream)} with a baseURI of "./", * which is the default base URI on all {@link org.milyn.resource.URIResourceLocator} * instances. * * @param resourceConfigStream The resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(InputStream resourceConfigStream) throws SAXException, IOException { addConfigurations("./", resourceConfigStream); }
/** * Add a set of resource configurations to this Smooks instance. * * Calls {@link #addConfigurations(String, java.io.InputStream)} with a baseURI of "./", * which is the default base URI on all {@link org.milyn.resource.URIResourceLocator} * instances. * * @param resourceConfigStream The resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(InputStream resourceConfigStream) throws SAXException, IOException { addConfigurations("./", resourceConfigStream); }
/** * Add Smooks binding configurations to the binding instance. * * @param smooksConfigURI Smooks configuration. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public AbstractBinding add(String smooksConfigURI) throws IOException, SAXException { assertNotAllConfigsAdded(); assertNotInitialized(); smooks.addConfigurations(smooksConfigURI); return this; }
/** * Add Smooks binding configurations to the binding instance. * * @param smooksConfigURI Smooks configuration. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public AbstractBinding add(String smooksConfigURI) throws IOException, SAXException { assertNotAllConfigsAdded(); assertNotInitialized(); smooks.addConfigurations(smooksConfigURI); return this; }
/** * Add Smooks binding configurations to the binding instance. * * @param smooksConfigStream Smooks configuration. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public AbstractBinding add(InputStream smooksConfigStream) throws IOException, SAXException { assertNotAllConfigsAdded(); assertNotInitialized(); smooks.addConfigurations(smooksConfigStream); return this; }
/** * Add Smooks binding configurations to the binding instance. * * @param smooksConfigURI Smooks configuration. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public AbstractBinding add(String smooksConfigURI) throws IOException, SAXException { assertNotAllConfigsAdded(); assertNotInitialized(); smooks.addConfigurations(smooksConfigURI); return this; }
/** * Add Smooks binding configurations to the binding instance. * * @param smooksConfigStream Smooks configuration. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public AbstractBinding add(InputStream smooksConfigStream) throws IOException, SAXException { assertNotAllConfigsAdded(); assertNotInitialized(); smooks.addConfigurations(smooksConfigStream); return this; }
/** * Add Smooks binding configurations to the binding instance. * * @param smooksConfigStream Smooks configuration. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public AbstractBinding add(InputStream smooksConfigStream) throws IOException, SAXException { assertNotAllConfigsAdded(); assertNotInitialized(); smooks.addConfigurations(smooksConfigStream); return this; }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(java.io.InputStream)}. * <p/> * Additional resource configurations can be added through calls to * <code>addConfigurations</code> method set. * * @param resourceConfigStream XML resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(InputStream resourceConfigStream) throws IOException, SAXException { this(); context.setResourceLocator(new URIResourceLocator()); addConfigurations(resourceConfigStream); }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(java.io.InputStream)}. * <p/> * Additional resource configurations can be added through calls to * <code>addConfigurations</code> method set. * * @param resourceConfigStream XML resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(InputStream resourceConfigStream) throws IOException, SAXException { this(); context.setResourceLocator(new URIResourceLocator()); addConfigurations(resourceConfigStream); }
/** * Public constructor. * * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(java.io.InputStream)}. * * Additional resource configurations can be added through calls to * <code>addConfigurations</code> method set. * * @param resourceConfigStream XML resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(InputStream resourceConfigStream) throws IOException, SAXException { this(); context.setResourceLocator(new URIResourceLocator()); addConfigurations(resourceConfigStream); }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(java.io.InputStream)}. * <p/> * Additional resource configurations can be added through calls to * <code>addConfigurations</code> method set. * * @param resourceConfigStream XML resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(InputStream resourceConfigStream) throws IOException, SAXException { this(); context.setResourceLocator(new URIResourceLocator()); addConfigurations(resourceConfigStream); }
/** * Add a set of resource configurations to this Smooks instance. * <p/> * Uses the {@link org.milyn.resource.URIResourceLocator} class to load the resource. * <p/> * These configurations do not overwrite previously added configurations. * They are added to the list of configurations on this Smooks instance. * * @param resourceURI The URI string for the resource configuration list. See * {@link org.milyn.resource.URIResourceLocator}. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(String resourceURI) throws IOException, SAXException { AssertArgument.isNotNullAndNotEmpty(resourceURI, "resourceURI"); InputStream resourceConfigStream; URIResourceLocator resourceLocator = new URIResourceLocator(); resourceConfigStream = resourceLocator.getResource(resourceURI); try { URI resourceURIObj = new URI(resourceURI); addConfigurations(URIUtil.getParent(resourceURIObj).toString(), resourceConfigStream); } catch (URISyntaxException e) { logger.error("Failed to load Smooks resource configuration '" + resourceURI + "'.", e); } finally { resourceConfigStream.close(); } }
public void start() throws Exception { if (smooks == null) { smooks = createSmooks(configUri); if (configUri != null) { smooks.addConfigurations(configUri); } } smooks.getApplicationContext().setAttribute(CamelContext.class, camelContext); addAppenders(smooks, visitorAppenders); addVisitors(smooks, selectorVisitorMap); log.info(this + " Started"); }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(String)} method, * which resolves the resourceURI parameter using a {@link org.milyn.resource.URIResourceLocator}. * <p/> * Additional resource configurations can be added through calls to * {@link #addConfigurations(String)} or {@link #addConfigurations(String,java.io.InputStream)}. * * @param resourceURI XML resource configuration stream URI. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(String resourceURI) throws IOException, SAXException { this(); URIResourceLocator resourceLocator = new URIResourceLocator(); resourceLocator.setBaseURI(URIResourceLocator.extractBaseURI(resourceURI)); context.setResourceLocator(resourceLocator); addConfigurations(resourceURI); }
/** * Public constructor. * * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(String)} method, * which resolves the resourceURI parameter using a {@link org.milyn.resource.URIResourceLocator}. * * Additional resource configurations can be added through calls to * {@link #addConfigurations(String)} or {@link #addConfigurations(String,java.io.InputStream)}. * * @param resourceURI XML resource configuration stream URI. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(String resourceURI) throws IOException, SAXException { this(); URIResourceLocator resourceLocator = new URIResourceLocator(); resourceLocator.setBaseURI(URIResourceLocator.extractBaseURI(resourceURI)); context.setResourceLocator(resourceLocator); addConfigurations(resourceURI); }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(String)} method, * which resolves the resourceURI parameter using a {@link org.milyn.resource.URIResourceLocator}. * <p/> * Additional resource configurations can be added through calls to * {@link #addConfigurations(String)} or {@link #addConfigurations(String,java.io.InputStream)}. * * @param resourceURI XML resource configuration stream URI. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(String resourceURI) throws IOException, SAXException { this(); URIResourceLocator resourceLocator = new URIResourceLocator(); resourceLocator.setBaseURI(URIResourceLocator.extractBaseURI(resourceURI)); context.setResourceLocator(resourceLocator); addConfigurations(resourceURI); }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(String)} method, * which resolves the resourceURI parameter using a {@link org.milyn.resource.URIResourceLocator}. * <p/> * Additional resource configurations can be added through calls to * {@link #addConfigurations(String)} or {@link #addConfigurations(String,java.io.InputStream)}. * * @param resourceURI XML resource configuration stream URI. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(String resourceURI) throws IOException, SAXException { this(); URIResourceLocator resourceLocator = new URIResourceLocator(); resourceLocator.setBaseURI(URIResourceLocator.extractBaseURI(resourceURI)); context.setResourceLocator(resourceLocator); addConfigurations(resourceURI); }