/** * Add a FilterChain. * @return a filter chain object. */ public FilterChain createFilterChain() { final FilterChain filterChain = new FilterChain(); filterChains.addElement(filterChain); return filterChain; }
/** * Create a nested input <code>FilterChain</code>. * @return <code>FilterChain</code>. */ public FilterChain createInputFilterChain() { if (isReference()) { throw noChildrenAllowed(); } FilterChain result = new FilterChain(); result.setProject(getProject()); inputFilterChains.add(result); setChecked(false); return result; }
/** * Create a nested output <code>FilterChain</code>. * @return <code>FilterChain</code>. */ public FilterChain createOutputFilterChain() { if (isReference()) { throw noChildrenAllowed(); } FilterChain result = new FilterChain(); result.setProject(getProject()); outputFilterChains.add(result); setChecked(false); return result; }
/** * Create a nested error <code>FilterChain</code>. * @return <code>FilterChain</code>. */ public FilterChain createErrorFilterChain() { if (isReference()) { throw noChildrenAllowed(); } FilterChain result = new FilterChain(); result.setProject(getProject()); errorFilterChains.add(result); setChecked(false); return result; }
FilterChain fc = new FilterChain(); fc.add(filter); fcv = new Vector<>(1);
/** * Add a FilterChain. * * @return a filter chain object. */ public FilterChain createFilterChain() { FilterChain filterChain = new FilterChain(); filterChains.addElement(filterChain); return filterChain; }
/** * Creates the default filter chain that should be applied while copying container configuration * files to the working directory from which the container is started. * * @return The default filter chain */ protected final FilterChain createFilterChain() { this.filterChain = new FilterChain(); // add all the token specified in the containers configuration into the filterchain getAntUtils().addTokensToFilterChain(filterChain, getProperties()); return filterChain; }
wsadminlibFile, new FilterChain(), null); configurationScript.add(0, ((WebSphereConfiguration) getConfiguration()). getFactory().importWsadminlibScript(wsadminlibFile.getAbsolutePath()));
filterHolder.getFilter().doFilter(request, response, new FilterChain() { @Override public void doFilter(ServletRequest request, ServletResponse response)
/** * @return Filtered script. */ @Override public String readScript() { FilterChain filterChain = new FilterChain(); antUtils.addTokensToFilterChain(filterChain, configuration.getProperties()); Map<String, String> propertiesMap = new Hashtable<String, String>(); addConfigurationScriptProperties(propertiesMap); antUtils.addTokensToFilterChain(filterChain, propertiesMap); String resourceName = resourcePath + getScriptRelativePath(); try { return resourceUtils.readResource(resourceName, filterChain, "UTF-8") + NEW_LINE; } catch (IOException e) { throw new CargoException("Error while reading resource [" + resourceName + "] ", e); } }
FilterChain filterChain = new FilterChain(); getAntUtils().addTokenToFilterChain(filterChain, "moduleName", moduleName); getAntUtils().addTokenToFilterChain(
FilterChain filterChain = new FilterChain(); getAntUtils().addTokenToFilterChain(filterChain, "moduleName", moduleName); getAntUtils().addTokenToFilterChain(
+ datasource.getTransactionSupport()); FilterChain filterChain = new FilterChain(); getAntUtils().addTokensToFilterChain(filterChain, replacements);
+ datasource.getTransactionSupport()); FilterChain filterChain = new FilterChain(); getAntUtils().addTokensToFilterChain(filterChain, replacements);
/** * Test file copy to a non-existing path.<br> * This has been raised by https://codehaus-cargo.atlassian.net/browse/CARGO-1004 */ public void testCopyToNonExistingPath() { String random = UUID.randomUUID().toString(); assertFalse("Subdirectory " + random + " already exists", this.fileHandler.isDirectory("target/" + random)); this.fileHandler.createFile("target/random.txt"); this.fileHandler.copyFile("target/random.txt", "target/" + random + "/random.txt", new FilterChain(), "UTF-8"); assertTrue("Subdirectory " + random + " does not exist after copy", this.fileHandler.isDirectory("target/" + random)); assertTrue("File in subdirectory " + random + " missing after copy", this.fileHandler.exists("target/" + random + "/random.txt")); }
private void configureConcat() { concat.setProject(getProject()); concat.setTaskName(getTaskName()); FilterChain filterChain = new FilterChain(); LineContainsRegExp lcre = new LineContainsRegExp(); RegularExpression regexp = new RegularExpression(); regexp.setPattern("^import .+;"); lcre.addConfiguredRegexp(regexp); filterChain.add(lcre); TokenFilter tf = new TokenFilter(); TokenFilter.ReplaceRegex rre = new TokenFilter.ReplaceRegex(); rre.setPattern("import (.+);.*"); rre.setReplace("\\1"); tf.add(rre); filterChain.add(tf); concat.addFilterChain(filterChain); } }