public class DefaultFileMarkerHandler extends Object implements MarkerHandler
Modifier and Type | Field and Description |
---|---|
protected org.apache.maven.artifact.Artifact |
artifact
The artifact.
|
protected File |
markerFilesDirectory
The marker directory.
|
Constructor and Description |
---|
DefaultFileMarkerHandler(org.apache.maven.artifact.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.
|
org.apache.maven.artifact.Artifact |
getArtifact() |
protected File |
getMarkerFile()
Returns properly formatted File
|
File |
getMarkerFilesDirectory() |
boolean |
isMarkerOlder(org.apache.maven.artifact.Artifact artifact1) |
boolean |
isMarkerSet()
Tests whether the file or directory denoted by this abstract pathname exists.
|
void |
setArtifact(org.apache.maven.artifact.Artifact artifact) |
void |
setMarker() |
void |
setMarkerFilesDirectory(File markerFilesDirectory) |
protected org.apache.maven.artifact.Artifact artifact
protected File markerFilesDirectory
public DefaultFileMarkerHandler(File theMarkerFilesDirectory)
theMarkerFilesDirectory
- The marker directory.public DefaultFileMarkerHandler(org.apache.maven.artifact.Artifact theArtifact, File theMarkerFilesDirectory)
theArtifact
- Artifact
theMarkerFilesDirectory
- The marker directory.protected File getMarkerFile()
public boolean isMarkerSet() throws org.apache.maven.plugin.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
directoryorg.apache.maven.plugin.MojoExecutionException
- in case of an error.public boolean isMarkerOlder(org.apache.maven.artifact.Artifact artifact1) throws org.apache.maven.plugin.MojoExecutionException
isMarkerOlder
in interface MarkerHandler
artifact1
- Artifact
org.apache.maven.plugin.MojoExecutionException
- in case of an error.public void setMarker() throws org.apache.maven.plugin.MojoExecutionException
setMarker
in interface MarkerHandler
org.apache.maven.plugin.MojoExecutionException
- in case of an error.public boolean clearMarker() throws org.apache.maven.plugin.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 fileorg.apache.maven.plugin.MojoExecutionException
- in case of an error.public org.apache.maven.artifact.Artifact getArtifact()
public void setArtifact(org.apache.maven.artifact.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–2024 The Apache Software Foundation. All rights reserved.