congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FilterChain
Code IndexAdd Tabnine to your IDE (free)

How to use
FilterChain
in
org.apache.tools.ant.types

Best Java code snippets using org.apache.tools.ant.types.FilterChain (Showing top 20 results out of 315)

Refine searchRefine arrow

  • Vector
origin: org.apache.ant/ant

FilterChain fc = new FilterChain();
fc.add(filter);
fcv = new Vector<>(1);
fcv.add(fc);
origin: org.apache.ant/ant

/**
 * Create the redirector to use, if any.
 *
 * @return a configured RedirectorElement.
 */
private RedirectorElement createRedirector() {
  RedirectorElement result = new RedirectorElement();
  if (storepass != null) {
    StringBuilder input = new StringBuilder(storepass).append('\n');
    if (keypass != null) {
      input.append(keypass).append('\n');
    }
    result.setInputString(input.toString());
    result.setLogInputString(false);
    // Try to avoid showing password prompts on log output, as they would be confusing.
    LineContainsRegExp filter = new LineContainsRegExp();
    RegularExpression rx = new RegularExpression();
    // TODO only handles English locale, not ja or zh_CN
    rx.setPattern("^(Enter Passphrase for keystore: |Enter key password for .+: )$");
    filter.addConfiguredRegexp(rx);
    filter.setNegate(true);
    result.createErrorFilterChain().addLineContainsRegExp(filter);
  }
  return result;
}
origin: org.apache.ant/ant

/**
 * Return the filters.
 *
 * @return a <code>Vector</code> value containing the filters
 */
public Vector<Object> getFilterReaders() {
  if (isReference()) {
    return ((FilterChain) getCheckedRef()).getFilterReaders();
  }
  dieOnCircularReference();
  return filterReaders;
}
origin: org.apache.ant/ant

/**
 * 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;
}
origin: org.apache.ant/ant

/**
 * Add a FilterChain.
 * @return a filter chain object.
 */
public FilterChain createFilterChain() {
  final FilterChain filterChain = new FilterChain();
  filterChains.addElement(filterChain);
  return filterChain;
}
origin: codehaus-cargo/cargo

/**
 * 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;
}
origin: org.codehaus.cargo/cargo-core-container-jo

/**
 * @return an Ant filter chain containing implementation for the filter tokens used in the Orion
 * configuration files
 * @throws MalformedURLException if the document base cannot be determined
 */
private FilterChain createJoFilterChain() throws MalformedURLException
{
  FilterChain filterChain = getFilterChain();
  // TODO: Add token filters for adding users and roles
  // Add application deployment tokens
  filterChain.addReplaceTokens(createWebappToken());
  // set virtual hostname
  filterChain.addReplaceTokens(createHostnameToken());
  // set port
  filterChain.addReplaceTokens(createPortToken());
  // set loglevel
  filterChain.addReplaceTokens(createLogLevelToken());
  // set metaserver port
  filterChain.addReplaceTokens(createMetaserverPortToken());
  // set war dir
  filterChain.addReplaceTokens(createWarDirToken());
  return filterChain;
}
origin: org.apache.ivy/ivy

  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);
  }
}
origin: org.apache.ant/ant

/**
 * verify our jar files
 * @throws BuildException on error.
 */
@Override
public void execute() throws BuildException {
  //validation logic
  final boolean hasJar = jar != null;
  if (!hasJar && !hasResources()) {
    throw new BuildException(ERROR_NO_SOURCE);
  }
  beginExecution();
  //patch the redirector to save output to a file
  RedirectorElement redirector = getRedirector();
  redirector.setAlwaysLog(true);
  FilterChain outputFilterChain = redirector.createOutputFilterChain();
  outputFilterChain.add(outputCache);
  try {
    Path sources = createUnifiedSourcePath();
    for (Resource r : sources) {
      FileProvider fr = r.as(FileProvider.class);
      verifyOneJar(fr.getFile());
    }
  } finally {
    endExecution();
  }
}
origin: org.apache.ant/ant

/**
 * 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;
}
origin: lookfirst/sardine

/**
 * Add a FilterChain.
 *
 * @return a filter chain object.
 */
public FilterChain createFilterChain() {
  FilterChain filterChain = new FilterChain();
  filterChains.addElement(filterChain);
  return filterChain;
}
origin: codehaus-cargo/cargo

    wsadminlibFile, new FilterChain(), null);
configurationScript.add(0, ((WebSphereConfiguration) getConfiguration()).
    getFactory().importWsadminlibScript(wsadminlibFile.getAbsolutePath()));
origin: codehaus-cargo/cargo

/**
 * @return an Ant filter chain containing implementation for the filter tokens used in the Orion
 * configuration files
 * @throws MalformedURLException if the document base cannot be determined
 */
private FilterChain createJoFilterChain() throws MalformedURLException
{
  FilterChain filterChain = getFilterChain();
  // TODO: Add token filters for adding users and roles
  // Add application deployment tokens
  filterChain.addReplaceTokens(createWebappToken());
  // set virtual hostname
  filterChain.addReplaceTokens(createHostnameToken());
  // set port
  filterChain.addReplaceTokens(createPortToken());
  // set loglevel
  filterChain.addReplaceTokens(createLogLevelToken());
  // set metaserver port
  filterChain.addReplaceTokens(createMetaserverPortToken());
  // set war dir
  filterChain.addReplaceTokens(createWarDirToken());
  return filterChain;
}
origin: org.apache.ant/ant

/**
 * 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;
}
origin: stackoverflow.com

filterHolder.getFilter().doFilter(request, response, new FilterChain() {
  @Override
  public void doFilter(ServletRequest request, ServletResponse response)
origin: codehaus-cargo/cargo

/**
 * Add a token to an existing filter chain.
 * 
 * @param filterChain the filter chain to augment
 * @param key the token key
 * @param value the token value
 */
public void addTokenToFilterChain(FilterChain filterChain, String key,
  String value)
{
  ReplaceTokens replaceToken = new ReplaceTokens();
  ReplaceTokens.Token token = new ReplaceTokens.Token();
  token.setKey(key);
  token.setValue(value);
  replaceToken.addConfiguredToken(token);
  filterChain.addReplaceTokens(replaceToken);
}
origin: codehaus-cargo/cargo

/**
 * @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);
  }
}
origin: com.atlassian.maven.plugins/maven-amps-plugin

/**
 * Add a token to an existing filter chain.
 *
 * @param filterChain the filter chain to augment
 * @param key the token key
 * @param value the token value
 */
public void addTokenToFilterChain(FilterChain filterChain, String key,
  String value)
{
  ReplaceTokens replaceToken = new ReplaceTokens();
  ReplaceTokens.Token token = new ReplaceTokens.Token();
  token.setKey(key);
  token.setValue(value);
  replaceToken.addConfiguredToken(token);
  filterChain.addReplaceTokens(replaceToken);
}
origin: codehaus-cargo/cargo

FilterChain filterChain = new FilterChain();
getAntUtils().addTokenToFilterChain(filterChain, "moduleName", moduleName);
getAntUtils().addTokenToFilterChain(
origin: com.atlassian.maven.plugins/amps-maven-plugin

/**
 * Add a token to an existing filter chain.
 *
 * @param filterChain the filter chain to augment
 * @param key the token key
 * @param value the token value
 */
public void addTokenToFilterChain(FilterChain filterChain, String key,
  String value)
{
  ReplaceTokens replaceToken = new ReplaceTokens();
  ReplaceTokens.Token token = new ReplaceTokens.Token();
  token.setKey(key);
  token.setValue(value);
  replaceToken.addConfiguredToken(token);
  filterChain.addReplaceTokens(replaceToken);
}
org.apache.tools.ant.typesFilterChain

Javadoc

FilterChain may contain a chained set of filter readers.

Most used methods

  • <init>
  • addReplaceTokens
    Add a ReplaceTokens filter.
  • add
    Add a chainfilter filter.
  • addLineContainsRegExp
    Add a LineContainsRegExp filter.
  • dieOnCircularReference
  • getCheckedRef
  • getFilterReaders
    Return the filters.
  • isChecked
  • isReference
  • noChildrenAllowed
  • pushAndInvokeCircularReferenceCheck
  • setChecked
  • pushAndInvokeCircularReferenceCheck,
  • setChecked,
  • setProject,
  • tooManyAttributes

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now