|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gridsystems.maven.furabuild.ResourceValidator
public class ResourceValidator
Checks the given resource tree (File), checks that it is valid, and removes it if it is not.
The resource tree is considered valid if it is older than a given source file set.
Constructor Summary | |
---|---|
ResourceValidator()
|
Method Summary | |
---|---|
protected long |
getLastModified(java.io.File f)
Gets the last modified timestamp of a file. |
boolean |
isValid(java.util.Collection<java.io.File> resources,
java.util.Collection<java.io.File> sources,
boolean purge)
Checks that a resource is older than a set of sources. |
boolean |
isValid(java.io.File resource,
java.util.Collection<java.io.File> sources,
boolean purge)
Checks that a resource is older than a set of sources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceValidator()
Method Detail |
---|
public boolean isValid(java.util.Collection<java.io.File> resources, java.util.Collection<java.io.File> sources, boolean purge)
resources
- File to checksources
- Collection of files to compare withpurge
- Whether to remove invalid resources or not
public boolean isValid(java.io.File resource, java.util.Collection<java.io.File> sources, boolean purge)
resource
- File to checksources
- Collection of files to compare withpurge
- Whether to remove invalid resources or not
protected long getLastModified(java.io.File f)
f
- The file or directory to process
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |