org.gcube.dataanalysis.dataminer.poolmanager.rest

## Class RestPoolManager

- java.lang.Object
- - org.gcube.dataanalysis.dataminer.poolmanager.rest.RestPoolManager

All Implemented Interfaces:
  PoolManager

    @Path(value="/")
    public class RestPoolManager
    extends Object
    implements PoolManager

### Constructor Summary

Constructors
Constructor and Description
`RestPoolManager()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`String` `addAlgorithmToHost(Algorithm algo, String host, boolean test)`
`String` `addAlgorithmToVRE(Algorithm algo, String vre, boolean test)`
`void` `addAlgToIs(Algorithm algo)`
`Algorithm` `extractAlgorithm(String url)`
`Set<Algorithm>` `getAlgoFromIs()`
`String` `getLogById(String logUrl)`
`void` `getLogId(Algorithm algo, String vre)`
`String` `getMonitorById(String logUrl)`
`String` `getScriptFromURL(URL logId)`
`URL` `getURLfromWorkerLog(String logUrl)`
`static void` `main(String[] args)`
`String` `publishAlgorithm(String algorithmPackageURL, String targetVREToken, String targetVRE)`
`String` `publishAlgorithm(String algorithmPackageURL, String targetVRE, String category, String algorithm_type)`
`String` `stageAlgorithm(String algorithmPackageURL)`
`String` `stageAlgorithm(String algorithmPackageURL, String targetVRE, String category, String algorithm_type)`
`List<String>` `updateSVN(String file, List<String> ldep)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RestPoolManager

    public RestPoolManager()

### Method Detail

#### stageAlgorithm

    @GET
     @Path(value="/algorithm/stage")
     @Produces(value="text/plain")
    public String stageAlgorithm(@QueryParam(value="algorithmPackageURL")
                                                                                                      String algorithmPackageURL,
                                                                                                      @QueryParam(value="targetVRE")
                                                                                                      String targetVRE,
                                                                                                      @QueryParam(value="category")
                                                                                                      String category,
                                                                                                      @QueryParam(value="algorithm_type")
                                                                                                      String algorithm_type)
                                                                                               throws IOException,
                                                                                                      InterruptedException

Throws:
  `IOException`
  `InterruptedException`

#### publishAlgorithm

    @GET
     @Path(value="/algorithm/add")
     @Produces(value="text/plain")
    public String publishAlgorithm(@QueryParam(value="algorithmPackageURL")
                                                                                                      String algorithmPackageURL,
                                                                                                      @QueryParam(value="targetVRE")
                                                                                                      String targetVRE,
                                                                                                      @QueryParam(value="category")
                                                                                                      String category,
                                                                                                      @QueryParam(value="algorithm_type")
                                                                                                      String algorithm_type)
                                                                                               throws IOException,
                                                                                                      InterruptedException

Throws:
  `IOException`
  `InterruptedException`

#### getLogById

    @GET
     @Path(value="/log")
     @Produces(value="text/plain")
    public String getLogById(@QueryParam(value="logUrl")
                                                                                      String logUrl)
                                                                               throws IOException

Specified by:
  `getLogById` in interface `PoolManager`
Throws:
  `IOException`

#### getMonitorById

    @GET
     @Path(value="/monitor")
     @Produces(value="text/plain")
    public String getMonitorById(@QueryParam(value="logUrl")
                                                                                              String logUrl)
                                                                                       throws IOException

Throws:
  `IOException`

#### extractAlgorithm

    public Algorithm extractAlgorithm(String url)
                               throws IOException

Specified by:
  `extractAlgorithm` in interface `PoolManager`
Throws:
  `IOException`

#### main

    public static void main(String[] args)
                     throws org.gcube.common.authorization.client.exceptions.ObjectNotFound,
                            Exception

Throws:
  `org.gcube.common.authorization.client.exceptions.ObjectNotFound`
  `Exception`

#### getLogId

    public void getLogId(Algorithm algo,
                         String vre)

Specified by:
  `getLogId` in interface `PoolManager`

#### getScriptFromURL

    public String getScriptFromURL(URL logId)
                            throws IOException

Specified by:
  `getScriptFromURL` in interface `PoolManager`
Throws:
  `IOException`

#### getURLfromWorkerLog

    public URL getURLfromWorkerLog(String logUrl)
                            throws MalformedURLException,
                                   UnknownHostException

Specified by:
  `getURLfromWorkerLog` in interface `PoolManager`
Throws:
  `MalformedURLException`
  `UnknownHostException`

#### addAlgToIs

    public void addAlgToIs(Algorithm algo)

Specified by:
  `addAlgToIs` in interface `PoolManager`

#### getAlgoFromIs

    public Set<Algorithm> getAlgoFromIs()

Specified by:
  `getAlgoFromIs` in interface `PoolManager`

#### updateSVN

    public List<String> updateSVN(String file,
                                  List<String> ldep)
                           throws org.tmatesoft.svn.core.SVNException

Specified by:
  `updateSVN` in interface `PoolManager`
Throws:
  `org.tmatesoft.svn.core.SVNException`

#### addAlgorithmToHost

    public String addAlgorithmToHost(Algorithm algo,
                                     String host,
                                     boolean test)
                              throws IOException,
                                     InterruptedException

Specified by:
  `addAlgorithmToHost` in interface `PoolManager`
Throws:
  `IOException`
  `InterruptedException`

#### addAlgorithmToVRE

    public String addAlgorithmToVRE(Algorithm algo,
                                    String vre,
                                    boolean test)
                             throws IOException,
                                    InterruptedException

Specified by:
  `addAlgorithmToVRE` in interface `PoolManager`
Throws:
  `IOException`
  `InterruptedException`

#### stageAlgorithm

    public String stageAlgorithm(String algorithmPackageURL)
                          throws IOException,
                                 InterruptedException

Specified by:
  `stageAlgorithm` in interface `PoolManager`
Throws:
  `IOException`
  `InterruptedException`

#### publishAlgorithm

    public String publishAlgorithm(String algorithmPackageURL,
                                   String targetVREToken,
                                   String targetVRE)
                            throws IOException,
                                   InterruptedException

Specified by:
  `publishAlgorithm` in interface `PoolManager`
Throws:
  `IOException`
  `InterruptedException`