public class DefaultFileMarkerHandler extends Object implements MarkerHandler
Modifier and Type | Field and Description |
---|---|
protected Artifact |
artifact |
protected File |
markerFilesDirectory |
Constructor and Description |
---|
DefaultFileMarkerHandler(Artifact theArtifact,
File theMarkerFilesDirectory) |
DefaultFileMarkerHandler(File theMarkerFilesDirectory) |
Modifier and Type | Method and Description |
---|---|
boolean |
clearMarker()
Deletes the file or directory denoted by this abstract pathname.
|
Artifact |
getArtifact() |
protected File |
getMarkerFile()
Returns properly formatted File
|
File |
getMarkerFilesDirectory() |
boolean |
isMarkerOlder(Artifact artifact1) |
boolean |
isMarkerSet()
Tests whether the file or directory denoted by this abstract pathname
exists.
|
void |
setArtifact(Artifact artifact) |
void |
setMarker() |
void |
setMarkerFilesDirectory(File markerFilesDirectory) |
protected Artifact artifact
protected File markerFilesDirectory
public DefaultFileMarkerHandler(File theMarkerFilesDirectory)
protected File getMarkerFile()
public boolean isMarkerSet() throws MojoExecutionException
isMarkerSet
in interface MarkerHandler
true
if and only if the file or directory denoted
by this abstract pathname exists; false
otherwiseSecurityException
- If a security manager exists and its SecurityManager.checkRead(java.lang.String)
method denies read access to the file or directoryMojoExecutionException
public boolean isMarkerOlder(Artifact artifact1) throws MojoExecutionException
isMarkerOlder
in interface MarkerHandler
MojoExecutionException
public void setMarker() throws MojoExecutionException
setMarker
in interface MarkerHandler
MojoExecutionException
public boolean clearMarker() throws MojoExecutionException
clearMarker
in interface MarkerHandler
true
if and only if the file or directory is
successfully deleted; false
otherwiseSecurityException
- If a security manager exists and its SecurityManager.checkDelete(java.lang.String)
method denies delete access to the fileMojoExecutionException
public Artifact getArtifact()
public void setArtifact(Artifact artifact)
setArtifact
in interface MarkerHandler
artifact
- The artifact to set.public File getMarkerFilesDirectory()
public void setMarkerFilesDirectory(File markerFilesDirectory)
markerFilesDirectory
- The markerFilesDirectory to set.Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.