View Javadoc
1   /*
2    * REPOWEB, repository manager.
3    *
4    * Terms of license - http://opensource.org/licenses/apachepl.php
5    */
6   package org.repoweb.model;
7   import java.io.IOException;
8   import java.io.InputStream;
9   import org.repoweb.pom.ArtifactInfo;
10  /***
11   * Represent a maven's artifact. A maven artifact file can be
12   * jar, xml, etc..
13   */
14  public interface Artifact extends ArtifactInfo {
15      /***
16       * Return an id for an artifact.
17       *
18       * @return A unique (version independent) of an artifact (e.g.
19       *         'struts:struts-legacy').
20       */
21      public String getId();
22  
23  
24      /***
25       * Retrieve the Project Object Model for this artifact.
26       *
27       * @return POM artifact (e.g. 'junit-3.8.1.pom')
28       */
29      public Artifact getPom();
30  
31  
32      //--------------------- TO DO EXTRACT INTO AN INTERFACE : Ressource
33  
34      /***
35       * Retrieve the artifact length.
36       *
37       * @return length in byte.
38       */
39      public long getLength();
40  
41  
42      /***
43       * Returns an input stream on this artifact.
44       *
45       * @return an input stream.
46       * @throws IOException read error.
47       */
48      public InputStream getInputStream() throws IOException;
49  
50      //--------------------- END: Ressource
51  }