Class DefaultFileMarkerHandler
java.lang.Object
org.apache.maven.plugins.dependency.utils.markers.DefaultFileMarkerHandler
- All Implemented Interfaces:
- MarkerHandler
- Direct Known Subclasses:
- SourcesFileMarkerHandler,- UnpackFileMarkerHandler
- Author:
- Brian Fox
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected org.apache.maven.artifact.ArtifactThe artifact.protected FileThe marker directory.
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultFileMarkerHandler(File theMarkerFilesDirectory) DefaultFileMarkerHandler(org.apache.maven.artifact.Artifact theArtifact, File theMarkerFilesDirectory) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDeletes the file or directory denoted by this abstract pathname.org.apache.maven.artifact.Artifactprotected FileReturns properly formatted File.booleanisMarkerOlder(org.apache.maven.artifact.Artifact artifact1) booleanTests whether the file or directory denoted by this abstract pathname exists.voidsetArtifact(org.apache.maven.artifact.Artifact artifact) voidvoidsetMarkerFilesDirectory(File markerFilesDirectory) 
- 
Field Details- 
artifactprotected org.apache.maven.artifact.Artifact artifactThe artifact.
- 
markerFilesDirectoryThe marker directory.
 
- 
- 
Constructor Details- 
DefaultFileMarkerHandler- Parameters:
- theMarkerFilesDirectory- the marker directory
 
- 
DefaultFileMarkerHandlerpublic DefaultFileMarkerHandler(org.apache.maven.artifact.Artifact theArtifact, File theMarkerFilesDirectory) - Parameters:
- theArtifact-- Artifact
- theMarkerFilesDirectory- the marker directory
 
 
- 
- 
Method Details- 
getMarkerFileReturns properly formatted File.- Returns:
- file object for marker. The file is not guaranteed to exist.
 
- 
isMarkerSetpublic boolean isMarkerSet() throws org.apache.maven.plugin.MojoExecutionExceptionTests whether the file or directory denoted by this abstract pathname exists.- Specified by:
- isMarkerSetin interface- MarkerHandler
- Returns:
- trueif and only if the file or directory denoted by this abstract pathname exists;- falseotherwise
- Throws:
- SecurityException- if a security manager exists and its- SecurityManager.checkRead(java.lang.String)
- org.apache.maven.plugin.MojoExecutionException- in case of an error
 
- 
isMarkerOlderpublic boolean isMarkerOlder(org.apache.maven.artifact.Artifact artifact1) throws org.apache.maven.plugin.MojoExecutionException - Specified by:
- isMarkerOlderin interface- MarkerHandler
- Parameters:
- artifact1-- Artifact
- Returns:
- true/false
- Throws:
- org.apache.maven.plugin.MojoExecutionException- in case of an error
 
- 
setMarkerpublic void setMarker() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
- setMarkerin interface- MarkerHandler
- Throws:
- org.apache.maven.plugin.MojoExecutionException- in case of an error
 
- 
clearMarkerpublic boolean clearMarker() throws org.apache.maven.plugin.MojoExecutionExceptionDeletes the file or directory denoted by this abstract pathname. If this pathname denotes a directory, then the directory must be empty in order to be deleted.- Specified by:
- clearMarkerin interface- MarkerHandler
- Returns:
- trueif and only if the file or directory is successfully deleted;- falseotherwise
- Throws:
- SecurityException- if a security manager exists and its- SecurityManager.checkDelete(java.lang.String)
- org.apache.maven.plugin.MojoExecutionException- in case of an error
 
- 
getArtifactpublic org.apache.maven.artifact.Artifact getArtifact()- Returns:
- returns the artifact
 
- 
setArtifactpublic void setArtifact(org.apache.maven.artifact.Artifact artifact) - Specified by:
- setArtifactin interface- MarkerHandler
- Parameters:
- artifact- the artifact to set
 
- 
getMarkerFilesDirectory- Returns:
- returns the markerFilesDirectory
 
- 
setMarkerFilesDirectory- Parameters:
- markerFilesDirectory- the markerFilesDirectory to set
 
 
-