public class SourcesFileMarkerHandler extends DefaultFileMarkerHandler
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
resolved |
artifact, markerFilesDirectory
Constructor and Description |
---|
SourcesFileMarkerHandler(org.apache.maven.artifact.Artifact artifact,
java.io.File markerFilesDirectory,
boolean isResolved) |
SourcesFileMarkerHandler(java.io.File markerFilesDirectory) |
Modifier and Type | Method and Description |
---|---|
boolean |
clearMarker()
Deletes the file or directory denoted by this abstract pathname.
|
java.io.File |
getMarkerFile()
Returns properly formatted File
|
protected java.io.File |
getMarkerFile(boolean res)
Get MarkerFile, exposed for unit testing purposes
|
boolean |
isMarkerOlder(org.apache.maven.artifact.Artifact theArtifact) |
boolean |
isMarkerSet()
Tests whether the file or directory denoted by this abstract pathname exists.
|
boolean |
isResolved() |
void |
setMarker() |
void |
setResolved(boolean isResolved) |
getArtifact, getMarkerFilesDirectory, setArtifact, setMarkerFilesDirectory
public SourcesFileMarkerHandler(java.io.File markerFilesDirectory)
markerFilesDirectory
- the marker files directory.public SourcesFileMarkerHandler(org.apache.maven.artifact.Artifact artifact, java.io.File markerFilesDirectory, boolean isResolved)
artifact
- Artifact
markerFilesDirectory
- marker files directory.isResolved
- true/false.public java.io.File getMarkerFile()
getMarkerFile
in class DefaultFileMarkerHandler
protected java.io.File getMarkerFile(boolean res)
res
- resolved or not.public boolean isMarkerSet() throws org.apache.maven.plugin.MojoExecutionException
isMarkerSet
in interface MarkerHandler
isMarkerSet
in class DefaultFileMarkerHandler
true
if and only if the file or directory denoted by this abstract pathname exists;
false
otherwiseorg.apache.maven.plugin.MojoExecutionException
- If a security manager exists and its SecurityManager.checkRead(java.lang.String)
method denies read access to the file or
directorypublic boolean isMarkerOlder(org.apache.maven.artifact.Artifact theArtifact) throws org.apache.maven.plugin.MojoExecutionException
isMarkerOlder
in interface MarkerHandler
isMarkerOlder
in class DefaultFileMarkerHandler
theArtifact
- Artifact
org.apache.maven.plugin.MojoExecutionException
- in case of an error.public void setMarker() throws org.apache.maven.plugin.MojoExecutionException
setMarker
in interface MarkerHandler
setMarker
in class DefaultFileMarkerHandler
org.apache.maven.plugin.MojoExecutionException
- in case of an error.public boolean clearMarker() throws org.apache.maven.plugin.MojoExecutionException
clearMarker
in interface MarkerHandler
clearMarker
in class DefaultFileMarkerHandler
true
if and only if the file or directory is successfully deleted; false
otherwisejava.lang.SecurityException
- If a security manager exists and its SecurityManager.checkDelete(java.lang.String)
method denies delete access to the fileorg.apache.maven.plugin.MojoExecutionException
- in case of an error.public boolean isResolved()
public void setResolved(boolean isResolved)
isResolved
- The resolved to set.