org.gcube.vremanagement.softwaregateway.impl.repositorymanager.cache
Class NexusCache

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

public class NexusCache
extends RepositoryManager


Field Summary
static String CACHE_STRING_SEPARATOR
           
protected  org.gcube.common.core.utils.logging.GCUBELog logger
           
 
Fields inherited from class org.gcube.vremanagement.softwaregateway.impl.repositorymanager.RepositoryManager
cacheEnabled, servers, SERVICE_ARCHIVE_IDENTIFIER
 
Method Summary
 String buildGCubeCoordinatesCacheInputString(Coordinates coordinates, String extension, String classifier)
          Build a cache input string
 String buildMavenCoordinatesCacheInputString(Coordinates coordinates, String extension, String classifier)
          Build a cache input string
 String extractDepsFromMavenEmb(String url)
           
 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
static NexusCache getInstance(String[] mavenServerList)
           
 String getSALocation(File tmpTargetDirectory, List<MavenCoordinates> mcList, Coordinates coordinates)
          Get location of software archive
 void put(Object key, Object value)
          Put a new element in the cache
 void remove(String cacheElement)
           
 String searchArtifact(String baseUrl, String groupName, String artifact, String extension, String ver, boolean pom, String classifier)
          Get location artifact
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

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

CACHE_STRING_SEPARATOR

public static final String CACHE_STRING_SEPARATOR
See Also:
Constant Field Values
Method Detail

getInstance

public static NexusCache getInstance(String[] mavenServerList)

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
Specified by:
extractDepsFromMavenEmb in class RepositoryManager
Parameters:
url - the url of the remote pom
Returns:
Throws:
BadCoordinatesException
ServiceNotAvaiableFault

searchArtifact

public String searchArtifact(String baseUrl,
                             String groupName,
                             String artifact,
                             String extension,
                             String ver,
                             boolean pom,
                             String classifier)
                      throws MalformedURLException
Description copied from class: RepositoryManager
Get location artifact

Specified by:
searchArtifact in class RepositoryManager
Returns:
Throws:
MalformedURLException

put

public void put(Object key,
                Object value)
Put a new element in the cache

Parameters:
key -
value -

remove

public void remove(String cacheElement)

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
Returns:
Throws:
MalformedURLException
ServiceNotAvaiableFault
IOException
Exception

buildGCubeCoordinatesCacheInputString

public String buildGCubeCoordinatesCacheInputString(Coordinates coordinates,
                                                    String extension,
                                                    String classifier)
Build a cache input string

Parameters:
coordinates -

buildMavenCoordinatesCacheInputString

public String buildMavenCoordinatesCacheInputString(Coordinates coordinates,
                                                    String extension,
                                                    String classifier)
Build a cache input string

Parameters:
coordinates -


Copyright © 2013. All Rights Reserved.