git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application/perform-service@176314 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
51577389a5
commit
eb77600697
|
@ -21,4 +21,8 @@ public interface ServiceConstants {
|
|||
public static final String EXCEL_FILE_PARAMETER="source";
|
||||
}
|
||||
|
||||
|
||||
public static interface Performance{
|
||||
public static final String PATH="performance";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ public class ImporterImpl implements Importer {
|
|||
private static final String ORPHAN_IMPORTS="";
|
||||
private static final String ACQUIRE_PS="";
|
||||
private static final String GET_BY_ID="";
|
||||
private static final String INSERT_ROUTINE="";
|
||||
|
||||
|
||||
private static ISQueryDescriptor isQueryDescriptor=null;
|
||||
|
||||
|
@ -107,10 +109,22 @@ public class ImporterImpl implements Importer {
|
|||
}
|
||||
|
||||
private ComputationId submit(ImportRequest request) {
|
||||
|
||||
throw new RuntimeException("IMPLEMENT THIS SHIT");
|
||||
}
|
||||
|
||||
private ImportRoutineDescriptor register(ComputationId computationId,ImportRequest request) {
|
||||
private ImportRoutineDescriptor register(ComputationId computationId,ImportRequest request) throws SQLException {
|
||||
|
||||
ImportRoutineDescriptor toReturn=new ImportRoutineDescriptor();
|
||||
// SET FIELDS into OBJECT
|
||||
|
||||
|
||||
|
||||
DataBaseManager db=DataBaseManager.get(getISQueryDescriptor());
|
||||
Connection conn=db.getConnection();
|
||||
PreparedStatement ps=conn.prepareStatement(INSERT_ROUTINE);
|
||||
// set fields
|
||||
|
||||
throw new RuntimeException("IMPLEMENT THIS SHIT");
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,17 @@ import org.gcube.smartgears.annotations.ManagedBy;
|
|||
@Path(ServiceConstants.Import.PATH)
|
||||
|
||||
@ManagedBy(PerformServiceManager.class)
|
||||
public class Execution {
|
||||
public class Import {
|
||||
|
||||
|
||||
/**
|
||||
* Launches DM Import
|
||||
*
|
||||
*
|
||||
* @param batchType
|
||||
* @param farmid
|
||||
* @param sourceFile
|
||||
*/
|
||||
@POST
|
||||
public void importExcel(@QueryParam(ServiceConstants.Import.BATCH_TYPE_PARAMETER)String batchType,
|
||||
@QueryParam(ServiceConstants.Import.FARM_ID_PARAMETER)Long farmid,
|
||||
|
@ -28,7 +37,12 @@ public class Execution {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns all Import routine per farm id
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("{"+ServiceConstants.Import.FARM_ID_PARAMETER+"}")
|
||||
public List<ImportRoutineDescriptor> getAll(){
|
|
@ -33,7 +33,16 @@ public class Mappings {
|
|||
|
||||
@Inject
|
||||
private MappingManager mappings;
|
||||
|
||||
|
||||
/**
|
||||
* Returns Complete Batch Bean
|
||||
*
|
||||
* @param name
|
||||
* @param type
|
||||
* @param farmid
|
||||
* @return
|
||||
*/
|
||||
|
||||
@GET
|
||||
@Path(ServiceConstants.Mappings.BATCHES_METHOD)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
@ -63,7 +72,13 @@ public class Mappings {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns complete FARM Bean
|
||||
*
|
||||
* @param farmid
|
||||
* @param farmuuid
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path(ServiceConstants.Mappings.FARM_METHOD)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package org.gcube.application.perform.service.rest;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.gcube.application.perform.service.PerformServiceManager;
|
||||
import org.gcube.application.perform.service.ServiceConstants;
|
||||
import org.gcube.smartgears.annotations.ManagedBy;
|
||||
|
||||
@Path(ServiceConstants.Import.PATH)
|
||||
|
||||
@ManagedBy(PerformServiceManager.class)
|
||||
public class Performance {
|
||||
|
||||
/**
|
||||
* Creates CSV file representing a dataset with
|
||||
*
|
||||
* deanonimized labels
|
||||
* filter based on selection
|
||||
*
|
||||
*
|
||||
* @return Storage ID (Volatile)
|
||||
*/
|
||||
@GET
|
||||
public String getPerformance(){
|
||||
throw new WebApplicationException("Not YET Implemented", Response.Status.NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue