org.gcube.vremanagement.softwarerepository.repository.impl.maven
Class MavenRepository

java.lang.Object
  extended by org.gcube.vremanagement.softwarerepository.repository.impl.maven.MavenRepository
All Implemented Interfaces:
Repository

public class MavenRepository
extends java.lang.Object
implements Repository

Author:
Luca Frosini (ISTI-CNR)

Constructor Summary
MavenRepository()
           
 
Method Summary
 java.lang.String getArtifact(Artifact artifact)
          Get URL where to download the Artifact
 java.util.List<Artifact> getDependendenciesList(Artifact artifact)
          Calculate the dependencies List of the given Artifact
 ArtifactTreeNode getDependendenciesTree(Artifact artifact)
          Calculate the dependencies tree the given Artifact
 java.util.List<Artifact> getReverseDependendenciesList(Artifact artifact)
          Calculate the reverse dependencies list of the given Artifact
 void storeArtifact(Artifact artifact)
          Store an Artifact on Backend Repository
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenRepository

public MavenRepository()
Method Detail

getArtifact

public java.lang.String getArtifact(Artifact artifact)
                             throws java.lang.Exception
Get URL where to download the Artifact

Specified by:
getArtifact in interface Repository
Parameters:
artifact - to retrieve
Returns:
String representation of URL where download the Artifact
Throws:
java.lang.Exception - if fails

getDependendenciesList

public java.util.List<Artifact> getDependendenciesList(Artifact artifact)
                                                throws java.lang.Exception
Calculate the dependencies List of the given Artifact

Specified by:
getDependendenciesList in interface Repository
Parameters:
artifact - to resolve the dependency
Returns:
List of Artifact dependencies
Throws:
java.lang.Exception - if fails

storeArtifact

public void storeArtifact(Artifact artifact)
                   throws java.lang.Exception
Store an Artifact on Backend Repository

Specified by:
storeArtifact in interface Repository
Parameters:
artifact - to store
Throws:
java.lang.Exception - if fails

getReverseDependendenciesList

public java.util.List<Artifact> getReverseDependendenciesList(Artifact artifact)
                                                       throws java.lang.Exception
Calculate the reverse dependencies list of the given Artifact

Specified by:
getReverseDependendenciesList in interface Repository
Parameters:
artifact - to resolve the dependency
Returns:
List of Artifact dependencies
Throws:
java.lang.Exception - if fails

getDependendenciesTree

public ArtifactTreeNode getDependendenciesTree(Artifact artifact)
                                        throws java.lang.Exception
Calculate the dependencies tree the given Artifact

Specified by:
getDependendenciesTree in interface Repository
Parameters:
artifact - to resolve the dependency
Returns:
Tree of Artifact
Throws:
java.lang.Exception - if fails