/** * Add a nested {@code <library>} element. * * @param libraries the configured Resources object represented as {@code <library>}. */ @SuppressWarnings("unchecked") public void addConfiguredLibrary(UseableResources libraries) { if (!libraries.shouldUse()) { log("Skipping library as it is configured to be unused.", Project.MSG_DEBUG); return; } try { for (Iterator<Resource> iterator = libraries.iterator(); iterator.hasNext(); ) { Resource library = iterator.next(); userArgs.addLibrary(library.getInputStream(), library.toString()); } } catch (Exception e) { handleError(e); } }
/** * Add a nested {@code <library>} element. * * @param libraries the configured Resources object represented as {@code <library>}. */ @SuppressWarnings("unchecked") public void addConfiguredLibrary(UseableResources libraries) { if (!libraries.shouldUse()) { log("Skipping library as it is configured to be unused.", Project.MSG_DEBUG); return; } try { for (Iterator<Resource> iterator = libraries.iterator(); iterator.hasNext(); ) { Resource library = iterator.next(); userArgs.addLibrary(library.getInputStream(), library.toString()); } } catch (Exception e) { handleError(e); } }
/** * Add a nested <pipeline> element. * * @param pipeline the configured Resources object represented as <pipeline>. */ public void addConfiguredPipeline(UseableResources pipeline) { if (!pipeline.shouldUse()) { log("Skipping pipeline as it is configured to be unused.", Project.MSG_DEBUG); return; } if (pipeline.size() == 0) { return; } if (pipeline.size() > 1) { handleError("The pipeline element must be specified with at most one nested resource."); } setPipeline((Resource) pipeline.iterator().next()); }
/** * Add a nested {@code <config>} element. * * @param config the configured Resources object represented as {@code <config>} */ public void addConfiguredConfig(UseableResources config) { if (!config.shouldUse()) { log("Skipping config as it is configured to be unused.", Project.MSG_DEBUG); return; } if (config.size() == 0) { return; } if (config.size() > 1) { handleError("The config element must be specified with at most one nested resource."); } setConfigFile((Resource) config.iterator().next()); }
/** * Add a nested <pipeline> element. * * @param pipeline the configured Resources object represented as <pipeline>. */ public void addConfiguredPipeline(UseableResources pipeline) { if (!pipeline.shouldUse()) { log("Skipping pipeline as it is configured to be unused.", Project.MSG_DEBUG); return; } if (pipeline.size() == 0) { return; } if (pipeline.size() > 1) { handleError("The pipeline element must be specified with at most one nested resource."); } setPipeline((Resource) pipeline.iterator().next()); }
/** * Add a nested {@code <profile>} element. * * @param profile the configured Resources object represented as {@code <profile>} */ public void addConfiguredProfile(UseableResources profile) { if (!profile.shouldUse()) { log("Skipping profile as it is configured to be unused.", Project.MSG_DEBUG); return; } if (profile.size() == 0) { return; } if (profile.size() > 1) { handleError("The profile element must be specified with at most one nested resource."); } setProfileFile((Resource) profile.iterator().next()); }
/** * Add a nested {@code <config>} element. * * @param config the configured Resources object represented as {@code <config>} */ public void addConfiguredConfig(UseableResources config) { if (!config.shouldUse()) { log("Skipping config as it is configured to be unused.", Project.MSG_DEBUG); return; } if (config.size() == 0) { return; } if (config.size() > 1) { handleError("The config element must be specified with at most one nested resource."); } setConfigFile((Resource) config.iterator().next()); }
/** * Add a nested {@code <saxonConfig>} element. * * @param saxonConfig the configured Resources object represented as {@code <saxonConfig>} */ public void addConfiguredSaxonConfig(UseableResources saxonConfig) { if (!saxonConfig.shouldUse()) { log("Skipping saxonConfig as it is configured to be unused.", Project.MSG_DEBUG); return; } if (saxonConfig.size() == 0) { return; } if (saxonConfig.size() > 1) { handleError("The saxonConfig element must be specified with at most one nested resource."); } setSaxonConfigFile((Resource) saxonConfig.iterator().next()); }
/** * Add a nested {@code <profile>} element. * * @param profile the configured Resources object represented as {@code <profile>} */ public void addConfiguredProfile(UseableResources profile) { if (!profile.shouldUse()) { log("Skipping profile as it is configured to be unused.", Project.MSG_DEBUG); return; } if (profile.size() == 0) { return; } if (profile.size() > 1) { handleError("The profile element must be specified with at most one nested resource."); } setProfileFile((Resource) profile.iterator().next()); }
/** * Add a nested {@code <saxonConfig>} element. * * @param saxonConfig the configured Resources object represented as {@code <saxonConfig>} */ public void addConfiguredSaxonConfig(UseableResources saxonConfig) { if (!saxonConfig.shouldUse()) { log("Skipping saxonConfig as it is configured to be unused.", Project.MSG_DEBUG); return; } if (saxonConfig.size() == 0) { return; } if (saxonConfig.size() > 1) { handleError("The saxonConfig element must be specified with at most one nested resource."); } setSaxonConfigFile((Resource) saxonConfig.iterator().next()); }