Class RestoredArtifact

  • All Implemented Interfaces:
    Comparable<org.apache.maven.artifact.Artifact>, org.apache.maven.artifact.Artifact

    public class RestoredArtifact
    extends org.apache.maven.artifact.DefaultArtifact
    Overrides default file behavior with async file holder to restore files from cache lazy. Similar to AttachedArtifact
    • Constructor Summary

      Constructors 
      Constructor Description
      RestoredArtifact​(org.apache.maven.artifact.Artifact parent, Future<File> fileFuture, String type, String classifier, org.apache.maven.artifact.handler.ArtifactHandler handler, Function<File,​File> restoreToDiskConsumer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      File getFile()
      Returns file using caller thread to download it if necessary
      void setFile​(File destination)  
      • Methods inherited from class org.apache.maven.artifact.DefaultArtifact

        addMetadata, compareTo, equals, getArtifactHandler, getArtifactId, getAvailableVersions, getBaseVersion, getBaseVersionInternal, getClassifier, getDependencyConflictId, getDependencyFilter, getDependencyTrail, getDownloadUrl, getGroupId, getId, getMetadataList, getRepository, getScope, getSelectedVersion, getType, getVersion, getVersionRange, hasClassifier, hashCode, isOptional, isRelease, isResolved, isSelectedVersionKnown, isSnapshot, selectVersion, setArtifactHandler, setArtifactId, setAvailableVersions, setBaseVersion, setBaseVersionInternal, setDependencyFilter, setDependencyTrail, setDownloadUrl, setGroupId, setOptional, setRelease, setRepository, setResolved, setResolvedVersion, setScope, setVersion, setVersionRange, toString, updateVersion
    • Field Detail

      • MSG_INTERRUPTED_WHILE_RETRIEVING_ARTIFACT_FILE

        public static final String MSG_INTERRUPTED_WHILE_RETRIEVING_ARTIFACT_FILE
        See Also:
        Constant Field Values
    • Constructor Detail

      • RestoredArtifact

        public RestoredArtifact​(org.apache.maven.artifact.Artifact parent,
                                Future<File> fileFuture,
                                String type,
                                String classifier,
                                org.apache.maven.artifact.handler.ArtifactHandler handler,
                                Function<File,​File> restoreToDiskConsumer)
    • Method Detail

      • getFile

        public File getFile()
        Returns file using caller thread to download it if necessary
        Specified by:
        getFile in interface org.apache.maven.artifact.Artifact
        Overrides:
        getFile in class org.apache.maven.artifact.DefaultArtifact
      • setFile

        public void setFile​(File destination)
        Specified by:
        setFile in interface org.apache.maven.artifact.Artifact
        Overrides:
        setFile in class org.apache.maven.artifact.DefaultArtifact