Class DefaultFileMarkerHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.maven.artifact.Artifact artifact
      The artifact.
      protected java.io.File markerFilesDirectory
      The marker directory.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultFileMarkerHandler​(java.io.File theMarkerFilesDirectory)  
      DefaultFileMarkerHandler​(org.apache.maven.artifact.Artifact theArtifact, java.io.File theMarkerFilesDirectory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean clearMarker()
      Deletes the file or directory denoted by this abstract pathname.
      org.apache.maven.artifact.Artifact getArtifact()  
      protected java.io.File getMarkerFile()
      Returns properly formatted File
      java.io.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​(java.io.File markerFilesDirectory)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • artifact

        protected org.apache.maven.artifact.Artifact artifact
        The artifact.
      • markerFilesDirectory

        protected java.io.File markerFilesDirectory
        The marker directory.
    • Constructor Detail

      • DefaultFileMarkerHandler

        public DefaultFileMarkerHandler​(java.io.File theMarkerFilesDirectory)
        Parameters:
        theMarkerFilesDirectory - The marker directory.
      • DefaultFileMarkerHandler

        public DefaultFileMarkerHandler​(org.apache.maven.artifact.Artifact theArtifact,
                                        java.io.File theMarkerFilesDirectory)
        Parameters:
        theArtifact - Artifact
        theMarkerFilesDirectory - The marker directory.
    • Method Detail

      • getMarkerFile

        protected java.io.File getMarkerFile()
        Returns properly formatted File
        Returns:
        File object for marker. The file is not guaranteed to exist.
      • isMarkerSet

        public boolean isMarkerSet()
                            throws org.apache.maven.plugin.MojoExecutionException
        Tests whether the file or directory denoted by this abstract pathname exists.
        Specified by:
        isMarkerSet in interface MarkerHandler
        Returns:
        true if and only if the file or directory denoted by this abstract pathname exists; false otherwise
        Throws:
        java.lang.SecurityException - If a security manager exists and its SecurityManager.checkRead(java.lang.String) method denies read access to the file or directory
        org.apache.maven.plugin.MojoExecutionException - in case of an error.
      • isMarkerOlder

        public boolean isMarkerOlder​(org.apache.maven.artifact.Artifact artifact1)
                              throws org.apache.maven.plugin.MojoExecutionException
        Specified by:
        isMarkerOlder in interface MarkerHandler
        Parameters:
        artifact1 - Artifact
        Returns:
        true/false.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - in case of an error.
      • setMarker

        public void setMarker()
                       throws org.apache.maven.plugin.MojoExecutionException
        Specified by:
        setMarker in interface MarkerHandler
        Throws:
        org.apache.maven.plugin.MojoExecutionException - in case of an error.
      • clearMarker

        public boolean clearMarker()
                            throws org.apache.maven.plugin.MojoExecutionException
        Deletes 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:
        clearMarker in interface MarkerHandler
        Returns:
        true if and only if the file or directory is successfully deleted; false otherwise
        Throws:
        java.lang.SecurityException - If a security manager exists and its SecurityManager.checkDelete(java.lang.String) method denies delete access to the file
        org.apache.maven.plugin.MojoExecutionException - in case of an error.
      • getArtifact

        public org.apache.maven.artifact.Artifact getArtifact()
        Returns:
        Returns the artifact.
      • setArtifact

        public void setArtifact​(org.apache.maven.artifact.Artifact artifact)
        Specified by:
        setArtifact in interface MarkerHandler
        Parameters:
        artifact - The artifact to set.
      • getMarkerFilesDirectory

        public java.io.File getMarkerFilesDirectory()
        Returns:
        Returns the markerFilesDirectory.
      • setMarkerFilesDirectory

        public void setMarkerFilesDirectory​(java.io.File markerFilesDirectory)
        Parameters:
        markerFilesDirectory - The markerFilesDirectory to set.