org.gcube.vremanagement.softwaregateway.impl.repositorymanager
Class NexusRepositoryManager

java.lang.Object
  extended by org.gcube.vremanagement.softwaregateway.impl.repositorymanager.RepositoryManager
      extended by org.gcube.vremanagement.softwaregateway.impl.repositorymanager.NexusRepositoryManager

public class NexusRepositoryManager
extends RepositoryManager


Field Summary
 NexusCache cache
           
protected  org.gcube.common.core.utils.logging.GCUBELog logger
           
static NexusRepositoryManager singleton
           
static String TEMPORARY_SA_FILE_NAME
           
 
Fields inherited from class org.gcube.vremanagement.softwaregateway.impl.repositorymanager.RepositoryManager
cacheEnabled, servers, SERVICE_ARCHIVE_IDENTIFIER
 
Constructor Summary
NexusRepositoryManager(String[] mavenServerList, boolean cacheEnabled)
           
 
Method Summary
 String extractDepsFromMavenEmb(String url)
          Download pom file and extract Dependencies from maven repositories
 String get(Object mavenC, String extension, String classifier)
          Return the URL for download a maven object (pom, tar.gz, jar) that corresponds to the maven coordinates in input
 String getSALocation(File tmpTargetDirectory, List<MavenCoordinates> mcList, Coordinates coordinates)
          Get location of software archive
 String searchArtifact(String baseUrl, String groupName, String artifact, String extension, String ver, boolean pom, String classifier)
          Search a maven object (pom, jar, tar.gz) from a maven repository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPORARY_SA_FILE_NAME

public static final String TEMPORARY_SA_FILE_NAME
See Also:
Constant Field Values

logger

protected final org.gcube.common.core.utils.logging.GCUBELog logger

cache

public NexusCache cache

singleton

public static NexusRepositoryManager singleton
Constructor Detail

NexusRepositoryManager

public NexusRepositoryManager(String[] mavenServerList,
                              boolean cacheEnabled)
Method Detail

get

public String get(Object mavenC,
                  String extension,
                  String classifier)
           throws MalformedURLException,
                  ServiceNotAvaiableFault
Description copied from class: RepositoryManager
Return the URL for download a maven object (pom, tar.gz, jar) that corresponds to the maven coordinates in input

Specified by:
get in class RepositoryManager
Returns:
Throws:
MalformedURLException
ServiceNotAvaiableFault

extractDepsFromMavenEmb

public String extractDepsFromMavenEmb(String url)
                               throws ServiceNotAvaiableFault
Download pom file and extract Dependencies from maven repositories

Specified by:
extractDepsFromMavenEmb in class RepositoryManager
Parameters:
url: - url of the pom file
Returns:
Throws:
BadCoordinatesException
ServiceNotAvaiableFault

searchArtifact

public String searchArtifact(String baseUrl,
                             String groupName,
                             String artifact,
                             String extension,
                             String ver,
                             boolean pom,
                             String classifier)
                      throws MalformedURLException
Search a maven object (pom, jar, tar.gz) from a maven repository

Specified by:
searchArtifact in class RepositoryManager
Parameters:
baseUrl - base url of a maven repository
groupName - groupID
artifact - artifactID
extension - type of extension: jar, pom, tar.gz
ver - version of the maven object
pom - true if the maven object searched is a pom file
Returns:
the url of the maven object if founded otherwise null
Throws:
MalformedURLException

getSALocation

public String getSALocation(File tmpTargetDirectory,
                            List<MavenCoordinates> mcList,
                            Coordinates coordinates)
                     throws MalformedURLException,
                            ServiceNotAvaiableFault,
                            IOException,
                            Exception
Description copied from class: RepositoryManager
Get location of software archive

Specified by:
getSALocation in class RepositoryManager
Parameters:
tmpTargetDirectory -
mcList -
Returns:
Throws:
MalformedURLException
ServiceNotAvaiableFault
IOException
Exception


Copyright © 2013. All Rights Reserved.