org.gcube.vremanagement.softwaregateway.impl.is
Class ISManager

java.lang.Object
  extended by org.gcube.vremanagement.softwaregateway.impl.is.ISManager
Direct Known Subclasses:
ISCache, ISProxy

public abstract class ISManager
extends Object

Manages the interactions with InformationSystem service

Author:
Roberto Cirillo (ISTI - CNR)

Field Summary
protected  boolean cacheEnabled
           
protected  org.gcube.common.core.utils.logging.GCUBELog logger
           
 
Constructor Summary
ISManager(org.gcube.common.core.scope.GCUBEScope gCubeScope)
           
 
Method Summary
protected  org.gcube.common.core.informationsystem.client.queries.GCUBEServiceQuery buildServiceQuery(String serviceName, String serviceClass, String serviceVersion, org.gcube.common.core.informationsystem.client.queries.GCUBEServiceQuery serviceQuery)
          prepare a query for Information System.
 String checkResourceOnIS(org.gcube.common.core.resources.GCUBEService resource)
          Check if the resource is present on Information system service
abstract  List<URL> getMavenConfiguration()
           
abstract  MavenCoordinates getMavenCoordinates(Coordinates gcubeC)
          If not found a Element in cache, query the IS in order to harvest the profile matching such gCube coordinates
abstract  List<MavenPackage> getMavenPackagesCoordinates(GCubeCoordinates gcubeC)
          If not found a Element in cache, query the IS in order to harvest the profile matching such gCube coordinates
abstract  List<GCubePackage> getPluginCoordinates(Coordinates gcubeC)
          If not found a Element in cache, query the IS in order to harvest the profile matching such gCube coordinates
 String publicResourceIS(org.gcube.common.core.resources.GCUBEService resource, org.gcube.common.core.scope.GCUBEScope scope)
          Publish a resource in the InformationSystem service, in the scope specified in input.
 void publicResourceIS(org.gcube.common.core.resources.GCUBEService newResource, List<org.gcube.common.core.resources.service.Package> packageToRemove)
          updates and publics a new resource on the IS
 GCubeCoordinates queryGCubeCoordinates(String groupId, String artifactId, String version)
          Query to IS for converts Maven Coordinates in GCube Coordinates
protected  List<GCubePackage> queryGCubePackagesCoordinates(String serviceName, String serviceClass, String serviceVersion, String packageName, String packageVersion)
          build a query to the IS for retrieving a List of gCube Coordinates
protected  MavenCoordinates queryMavenCoordinates(String serviceName, String serviceClass, String serviceVersion, String packageName, String packageVersion)
          build a query to the IS for retrieving mavenCoordinates
protected  List<MavenPackage> queryMavenPackagesCoordinates(String serviceName, String serviceClass, String serviceVersion, String packageName, String packageVersion)
          build a query to the IS for retrieving a List of Maven Coordinates
 List<org.gcube.common.core.resources.service.Package> queryPackagesCoordinates(String serviceName, String serviceClass, String serviceVersion)
          build a query to the IS for retrieving a List of Package
protected  List<GCubePackage> queryPluginCoordinates(String serviceName, String serviceClass, String serviceVersion, String packageName, String packageVersion)
          build a query to the IS for retrieving a List of gCube Coordinates
protected  MavenCoordinates querySAMavenCoordinates(String serviceName, String serviceClass, String serviceVersion, String packageName, String packageVersion)
          build a query to the IS for retrieving SA mavenCoordinates
 List<GCubePackage> updatePackageResource(String serviceName, String serviceClass, String serviceVersion, String packageName, String packageVersion)
          Remove package that matches with input coordinates from a profile.
abstract  void updateProfile(String xml)
          update the profile in the IS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheEnabled

protected boolean cacheEnabled

logger

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

ISManager

public ISManager(org.gcube.common.core.scope.GCUBEScope gCubeScope)
Method Detail

getMavenCoordinates

public abstract MavenCoordinates getMavenCoordinates(Coordinates gcubeC)
                                              throws org.gcube.common.core.informationsystem.ISException
If not found a Element in cache, query the IS in order to harvest the profile matching such gCube coordinates

Parameters:
gcubeC -
Returns:
maven coordinated if founded
Throws:
org.gcube.common.core.informationsystem.ISException

getMavenPackagesCoordinates

public abstract List<MavenPackage> getMavenPackagesCoordinates(GCubeCoordinates gcubeC)
                                                        throws org.gcube.common.core.informationsystem.ISException
If not found a Element in cache, query the IS in order to harvest the profile matching such gCube coordinates

Parameters:
gcubeC -
Returns:
a List of mavenCoordinates if founded
Throws:
org.gcube.common.core.informationsystem.ISException

updateProfile

public abstract void updateProfile(String xml)
update the profile in the IS

Parameters:
xml -

getMavenConfiguration

public abstract List<URL> getMavenConfiguration()
Returns:

getPluginCoordinates

public abstract List<GCubePackage> getPluginCoordinates(Coordinates gcubeC)
                                                 throws org.gcube.common.core.informationsystem.ISException
If not found a Element in cache, query the IS in order to harvest the profile matching such gCube coordinates

Parameters:
gcubeC -
Returns:
a list of gCube coordinates if founded in the IS
Throws:
org.gcube.common.core.informationsystem.ISException

queryMavenCoordinates

protected MavenCoordinates queryMavenCoordinates(String serviceName,
                                                 String serviceClass,
                                                 String serviceVersion,
                                                 String packageName,
                                                 String packageVersion)
                                          throws org.gcube.common.core.informationsystem.ISException
build a query to the IS for retrieving mavenCoordinates

Parameters:
serviceName -
serviceClass -
serviceVersion -
packageName -
packageVersion -
Returns:
Throws:
org.gcube.common.core.informationsystem.ISException

querySAMavenCoordinates

protected MavenCoordinates querySAMavenCoordinates(String serviceName,
                                                   String serviceClass,
                                                   String serviceVersion,
                                                   String packageName,
                                                   String packageVersion)
                                            throws org.gcube.common.core.informationsystem.ISException
build a query to the IS for retrieving SA mavenCoordinates

Parameters:
serviceName -
serviceClass -
serviceVersion -
packageName -
packageVersion -
Returns:
Throws:
org.gcube.common.core.informationsystem.ISException

queryPluginCoordinates

protected List<GCubePackage> queryPluginCoordinates(String serviceName,
                                                    String serviceClass,
                                                    String serviceVersion,
                                                    String packageName,
                                                    String packageVersion)
                                             throws org.gcube.common.core.informationsystem.ISException
build a query to the IS for retrieving a List of gCube Coordinates

Parameters:
serviceName -
serviceClass -
serviceVersion -
packageName -
packageVersion -
Returns:
Throws:
org.gcube.common.core.informationsystem.ISException

queryMavenPackagesCoordinates

protected List<MavenPackage> queryMavenPackagesCoordinates(String serviceName,
                                                           String serviceClass,
                                                           String serviceVersion,
                                                           String packageName,
                                                           String packageVersion)
                                                    throws org.gcube.common.core.informationsystem.ISException
build a query to the IS for retrieving a List of Maven Coordinates

Parameters:
serviceName -
serviceClass -
serviceVersion -
packageName -
packageVersion -
Returns:
Throws:
org.gcube.common.core.informationsystem.ISException

queryGCubePackagesCoordinates

protected List<GCubePackage> queryGCubePackagesCoordinates(String serviceName,
                                                           String serviceClass,
                                                           String serviceVersion,
                                                           String packageName,
                                                           String packageVersion)
                                                    throws org.gcube.common.core.informationsystem.ISException
build a query to the IS for retrieving a List of gCube Coordinates

Parameters:
serviceName -
serviceClass -
serviceVersion -
packageName -
packageVersion -
Returns:
Throws:
org.gcube.common.core.informationsystem.ISException

queryPackagesCoordinates

public List<org.gcube.common.core.resources.service.Package> queryPackagesCoordinates(String serviceName,
                                                                                      String serviceClass,
                                                                                      String serviceVersion)
                                                                               throws org.gcube.common.core.informationsystem.ISException
build a query to the IS for retrieving a List of Package

Parameters:
serviceName -
serviceClass -
serviceVersion -
packageName -
packageVersion -
Returns:
Throws:
org.gcube.common.core.informationsystem.ISException

updatePackageResource

public List<GCubePackage> updatePackageResource(String serviceName,
                                                String serviceClass,
                                                String serviceVersion,
                                                String packageName,
                                                String packageVersion)
                                         throws org.gcube.common.core.informationsystem.ISException
Remove package that matches with input coordinates from a profile. Public the new profile on IS

Parameters:
serviceName -
serviceClass -
serviceVersion -
packageName -
packageVersion -
Returns:
Throws:
org.gcube.common.core.informationsystem.ISException

publicResourceIS

public void publicResourceIS(org.gcube.common.core.resources.GCUBEService newResource,
                             List<org.gcube.common.core.resources.service.Package> packageToRemove)
                      throws Exception,
                             org.gcube.common.core.informationsystem.publisher.ISPublisherException
updates and publics a new resource on the IS

Parameters:
newResource -
Throws:
Exception
org.gcube.common.core.informationsystem.publisher.ISPublisherException

publicResourceIS

public String publicResourceIS(org.gcube.common.core.resources.GCUBEService resource,
                               org.gcube.common.core.scope.GCUBEScope scope)
                        throws Exception,
                               org.gcube.common.core.informationsystem.publisher.ISPublisherException
Publish a resource in the InformationSystem service, in the scope specified in input.

Parameters:
resource -
scope - a gCube scope
Returns:
If the resource is not present in IS return the new ID else return null
Throws:
Exception
org.gcube.common.core.informationsystem.publisher.ISPublisherException

checkResourceOnIS

public String checkResourceOnIS(org.gcube.common.core.resources.GCUBEService resource)
                         throws org.gcube.common.core.informationsystem.ISException
Check if the resource is present on Information system service

Parameters:
resource -
Returns:
id if present otherwise null
Throws:
org.gcube.common.core.informationsystem.ISException

queryGCubeCoordinates

public GCubeCoordinates queryGCubeCoordinates(String groupId,
                                              String artifactId,
                                              String version)
                                       throws org.gcube.common.core.informationsystem.ISException,
                                              BadCoordinatesException
Query to IS for converts Maven Coordinates in GCube Coordinates

Parameters:
groupId -
artifactId -
version -
Returns:
Throws:
org.gcube.common.core.informationsystem.ISException
BadCoordinatesException

buildServiceQuery

protected org.gcube.common.core.informationsystem.client.queries.GCUBEServiceQuery buildServiceQuery(String serviceName,
                                                                                                     String serviceClass,
                                                                                                     String serviceVersion,
                                                                                                     org.gcube.common.core.informationsystem.client.queries.GCUBEServiceQuery serviceQuery)
prepare a query for Information System. Searches resources with this 3 gcube coordinates

Parameters:
serviceName -
serviceClass -
serviceVersion -
serviceQuery -
Returns:


Copyright © 2013. All Rights Reserved.