com.edugility.jpa.maven.plugin
Class URLFilter

java.lang.Object
  extended by com.edugility.jpa.maven.plugin.URLFilter

public class URLFilter
extends Object

A filter that can cull a Collection of URLs.

Since:
1.0-SNAPSHOT
Version:
1.0-SNAPSHOT
Author:
Laird Nelson

Field Summary
private  Set<String> excludes
          The Plexus FileUtils-compatible Set of exclusion Strings.
private  Set<String> includes
          The Plexus FileUtils-compatible Set of inclusion Strings.
 
Constructor Summary
URLFilter()
          Creates a new URLFilter.
 
Method Summary
 boolean accept(URL url)
          Returns true if the supplied URL should be accepted.
 Set<String> getExcludes()
          Returns the Plexus FileUtils-compatible Set of exclusion Strings.
 Set<String> getIncludes()
          Returns the Plexus FileUtils-compatible Set of inclusion Strings.
 void setExcludes(Set<String> excludes)
          Sets the Plexus FileUtils-compatible Set of exclusion Strings.
 void setIncludes(Set<String> includes)
          Sets the Plexus FileUtils-compatible Set of inclusion Strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

includes

private Set<String> includes
The Plexus FileUtils-compatible Set of inclusion Strings.

This field may be null at any point.


excludes

private Set<String> excludes
The Plexus FileUtils-compatible Set of exclusion Strings.

This field may be null at any point.

Constructor Detail

URLFilter

public URLFilter()
Creates a new URLFilter.

Method Detail

accept

public boolean accept(URL url)
Returns true if the supplied URL should be accepted. This implementation returns true if the supplied URL is non-null.

Note: inclusion and exclusion does not yet work.

Parameters:
url - the URL to accept; may be null
Returns:
true if the supplied URL should be accepted; false otherwise

setIncludes

public void setIncludes(Set<String> includes)
Sets the Plexus FileUtils-compatible Set of inclusion Strings.

Parameters:
includes - the Set of Strings to set; may be null

getIncludes

public Set<String> getIncludes()
Returns the Plexus FileUtils-compatible Set of inclusion Strings.

This method may return null.

Returns:
the Plexus FileUtils-compatible Set of inclusion Strings, or null

setExcludes

public void setExcludes(Set<String> excludes)
Sets the Plexus FileUtils-compatible Set of exclusion Strings.

Parameters:
excludes - the Set of Strings to set; may be null

getExcludes

public Set<String> getExcludes()
Returns the Plexus FileUtils-compatible Set of exclusion Strings.

This method may return null.

Returns:
the Plexus FileUtils-compatible Set of exclusion Strings, or null


Copyright © 2011-2013 Laird Nelson. All Rights Reserved.