registerResources(uri, resource); logger.debug("[" + uri + "] Loaded."); } catch (IllegalArgumentException e) {
registerResources(uri, resource); logger.debug("[" + uri + "] Loaded."); } catch (IllegalArgumentException e) {
registerResources(uri, resource); logger.debug("[" + uri + "] Loaded."); } catch (IllegalArgumentException e) {
registerResources(uri, resource); logger.debug("[" + uri + "] Loaded."); } catch (IllegalArgumentException e) {
/** * Register the pre-installed CDU Creator classes. * @param resourceFile Installed (internal) resource config file. */ private void registerInstalledResources(String resourceFile) { InputStream resource = ClassUtil.getResourceAsStream(resourceFile, getClass()); if(resource == null) { throw new IllegalStateException("Failed to load " + resourceFile + ". Expected to be in the same package as " + getClass().getName()); } try { SmooksResourceConfigurationList resourceList = registerResources(resourceFile, resource); for(int i = 0; i < resourceList.size(); i++) { resourceList.get(i).setDefaultResource(true); } resourceList.setSystemConfigList(true); } catch (Exception e) { throw new IllegalStateException("Error processing resource file '" + resourceFile + "'.", e); } }
/** * Register the pre-installed CDU Creator classes. * @param resourceFile Installed (internal) resource config file. */ private void registerInstalledResources(String resourceFile) { InputStream resource = ClassUtil.getResourceAsStream(resourceFile, getClass()); if(resource == null) { throw new IllegalStateException("Failed to load " + resourceFile + ". Expected to be in the same package as " + getClass().getName()); } try { SmooksResourceConfigurationList resourceList = registerResources(resourceFile, resource); for(int i = 0; i < resourceList.size(); i++) { resourceList.get(i).setDefaultResource(true); } resourceList.setSystemConfigList(true); } catch (Exception e) { throw new IllegalStateException("Error processing resource file '" + resourceFile + "'.", e); } }
/** * Register the pre-installed CDU Creator classes. * @param resourceFile Installed (internal) resource config file. */ private void registerInstalledResources(String resourceFile) { InputStream resource = ClassUtil.getResourceAsStream(resourceFile, getClass()); if(resource == null) { throw new IllegalStateException("Failed to load " + resourceFile + ". Expected to be in the same package as " + getClass().getName()); } try { SmooksResourceConfigurationList resourceList = registerResources(resourceFile, resource); for(int i = 0; i < resourceList.size(); i++) { resourceList.get(i).setDefaultResource(true); } resourceList.setSystemConfigList(true); } catch (Exception e) { throw new IllegalStateException("Error processing resource file '" + resourceFile + "'.", e); } }
/** * Register the pre-installed CDU Creator classes. * @param resourceFile Installed (internal) resource config file. */ private void registerInstalledResources(String resourceFile) { InputStream resource = ClassUtil.getResourceAsStream(resourceFile, getClass()); if(resource == null) { throw new IllegalStateException("Failed to load " + resourceFile + ". Expected to be in the same package as " + getClass().getName()); } try { SmooksResourceConfigurationList resourceList = registerResources(resourceFile, resource); for(int i = 0; i < resourceList.size(); i++) { resourceList.get(i).setDefaultResource(true); } resourceList.setSystemConfigList(true); } catch (Exception e) { throw new IllegalStateException("Error processing resource file '" + resourceFile + "'.", e); } }
/** * Add a set of resource configurations to this Smooks instance. * * These configurations do not overwrite previously added configurations. * They are added to the list of configurations on this Smooks instance. * * The base URI is required for resolving resource imports. Just specify * the location of the resource file. * * @param baseURI The base URI string for the resource configuration list. See * {@link org.milyn.resource.URIResourceLocator}. * @param resourceConfigStream The resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(String baseURI, InputStream resourceConfigStream) throws SAXException, IOException { assertIsConfigurable(); AssertArgument.isNotNullAndNotEmpty(baseURI, "baseURI"); AssertArgument.isNotNull(resourceConfigStream, "resourceConfigStream"); try { context.getStore().registerResources(baseURI, resourceConfigStream); } catch (URISyntaxException e) { throw new IOException("Failed to read resource configuration. Invalid 'baseURI'."); } }
/** * Add a set of resource configurations to this Smooks instance. * <p/> * These configurations do not overwrite previously added configurations. * They are added to the list of configurations on this Smooks instance. * <p/> * The base URI is required for resolving resource imports. Just specify * the location of the resource file. * * @param baseURI The base URI string for the resource configuration list. See * {@link org.milyn.resource.URIResourceLocator}. * @param resourceConfigStream The resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(String baseURI, InputStream resourceConfigStream) throws SAXException, IOException { assertIsConfigurable(); AssertArgument.isNotNullAndNotEmpty(baseURI, "baseURI"); AssertArgument.isNotNull(resourceConfigStream, "resourceConfigStream"); try { context.getStore().registerResources(baseURI, resourceConfigStream); } catch (URISyntaxException e) { throw new IOException("Failed to read resource configuration. Invalid 'baseURI'."); } }
/** * Add a set of resource configurations to this Smooks instance. * <p/> * These configurations do not overwrite previously added configurations. * They are added to the list of configurations on this Smooks instance. * <p/> * The base URI is required for resolving resource imports. Just specify * the location of the resource file. * * @param baseURI The base URI string for the resource configuration list. See * {@link org.milyn.resource.URIResourceLocator}. * @param resourceConfigStream The resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(String baseURI, InputStream resourceConfigStream) throws SAXException, IOException { assertIsConfigurable(); AssertArgument.isNotNullAndNotEmpty(baseURI, "baseURI"); AssertArgument.isNotNull(resourceConfigStream, "resourceConfigStream"); try { context.getStore().registerResources(baseURI, resourceConfigStream); } catch (URISyntaxException e) { throw new IOException("Failed to read resource configuration. Invalid 'baseURI'."); } }
/** * Add a set of resource configurations to this Smooks instance. * <p/> * These configurations do not overwrite previously added configurations. * They are added to the list of configurations on this Smooks instance. * <p/> * The base URI is required for resolving resource imports. Just specify * the location of the resource file. * * @param baseURI The base URI string for the resource configuration list. See * {@link org.milyn.resource.URIResourceLocator}. * @param resourceConfigStream The resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. */ public void addConfigurations(String baseURI, InputStream resourceConfigStream) throws SAXException, IOException { assertIsConfigurable(); AssertArgument.isNotNullAndNotEmpty(baseURI, "baseURI"); AssertArgument.isNotNull(resourceConfigStream, "resourceConfigStream"); try { context.getStore().registerResources(baseURI, resourceConfigStream); } catch (URISyntaxException e) { throw new IOException("Failed to read resource configuration. Invalid 'baseURI'."); } }