git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application/perform-service@176442 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0624deba6b
commit
3b3e6bf616
83
pom.xml
83
pom.xml
|
@ -28,9 +28,16 @@
|
|||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
<version>1.8.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
|
@ -46,6 +53,15 @@
|
|||
<artifactId>common-encryption</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- AUTH LAYER -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-dbcp2</artifactId>
|
||||
|
@ -65,13 +81,7 @@
|
|||
<version>2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.14.8</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- weld -->
|
||||
|
@ -95,7 +105,64 @@
|
|||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!-- <plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>aspectj-maven-plugin</artifactId>
|
||||
<versionRange>[1.0,)</versionRange>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<execute />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin> -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>aspectj-maven-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<configuration>
|
||||
<complianceLevel>1.8</complianceLevel>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<aspectLibraries>
|
||||
<aspectLibrary>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>authorization-control-library</artifactId>
|
||||
</aspectLibrary>
|
||||
</aspectLibraries>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
|
||||
|
||||
</project>
|
|
@ -3,13 +3,14 @@ package org.gcube.application.perform.service;
|
|||
import java.net.URL;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.Synchronized;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class LocalConfiguration {
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(LocalConfiguration.class);
|
||||
|
||||
public static final String POOL_MAX_IDLE="db.pools.max_idle";
|
||||
public static final String POOL_MAX_TOTAL="db.pools.max_total";
|
||||
public static final String POOL_MIN_IDLE="db.pools.min_total";
|
||||
|
@ -28,8 +29,8 @@ public class LocalConfiguration {
|
|||
static LocalConfiguration instance=null;
|
||||
|
||||
|
||||
@Synchronized
|
||||
public static LocalConfiguration init(URL propertiesURL){
|
||||
|
||||
public synchronized static LocalConfiguration init(URL propertiesURL){
|
||||
if(instance==null)
|
||||
instance=new LocalConfiguration(propertiesURL);
|
||||
return instance;
|
||||
|
|
|
@ -5,13 +5,15 @@ import java.net.URL;
|
|||
import org.gcube.smartgears.ApplicationManager;
|
||||
import org.gcube.smartgears.ContextProvider;
|
||||
import org.gcube.smartgears.context.application.ApplicationContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class PerformServiceManager implements ApplicationManager{
|
||||
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(PerformServiceManager.class);
|
||||
|
||||
@Override
|
||||
public void onInit() {
|
||||
try {
|
||||
|
|
|
@ -19,25 +19,13 @@ import org.gcube.application.perform.service.engine.model.DatabaseConnectionDesc
|
|||
import org.gcube.application.perform.service.engine.model.ISQueryDescriptor;
|
||||
import org.gcube.application.perform.service.engine.model.InternalException;
|
||||
import org.gcube.application.perform.service.engine.utils.ISUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.Synchronized;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class DataBaseManagerImpl implements DataBaseManager{
|
||||
|
||||
|
||||
// private static final ConcurrentHashMap<DBType,DataBaseManagerImpl> instanceMap=new ConcurrentHashMap<>();
|
||||
//
|
||||
// @Synchronized
|
||||
// public static final DataBaseManagerImpl get(ISQueryDescriptor desc) {
|
||||
// if(!instanceMap.containsKey(desc.getType())){
|
||||
// return instanceMap.put(desc.getType(), new DataBaseManagerImpl(desc));
|
||||
// }
|
||||
//
|
||||
// return instanceMap.get(desc.getType());
|
||||
// }
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(DataBaseManagerImpl.class);
|
||||
|
||||
// ************************************** INSTANCE
|
||||
|
||||
|
@ -72,8 +60,8 @@ public class DataBaseManagerImpl implements DataBaseManager{
|
|||
return ds.getConnection();
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
private DataSource getDataSource() throws InternalException {
|
||||
|
||||
private synchronized DataSource getDataSource() throws InternalException {
|
||||
DatabaseConnectionDescriptor dbDescriptor=getDB();
|
||||
|
||||
if(!datasources.containsKey(dbDescriptor.getUrl())) {
|
||||
|
|
|
@ -29,21 +29,20 @@ import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.Compu
|
|||
import org.gcube.smartgears.ContextProvider;
|
||||
import org.gcube.smartgears.configuration.container.ContainerConfiguration;
|
||||
import org.gcube.smartgears.context.application.ApplicationContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.Synchronized;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class ImporterImpl implements Importer {
|
||||
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(ImporterImpl.class);
|
||||
|
||||
|
||||
private static ISQueryDescriptor isQueryDescriptor=null;
|
||||
|
||||
|
||||
@Synchronized
|
||||
private ISQueryDescriptor getISQueryDescriptor() {
|
||||
|
||||
private static synchronized ISQueryDescriptor getISQueryDescriptor() {
|
||||
if(isQueryDescriptor==null) {
|
||||
isQueryDescriptor=
|
||||
new ISQueryDescriptor(
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.sql.Connection;
|
|||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.application.perform.service.LocalConfiguration;
|
||||
import org.gcube.application.perform.service.engine.model.BeanNotFound;
|
||||
|
@ -12,23 +11,21 @@ import org.gcube.application.perform.service.engine.model.DBField;
|
|||
import org.gcube.application.perform.service.engine.model.DBQueryDescriptor;
|
||||
import org.gcube.application.perform.service.engine.model.ISQueryDescriptor;
|
||||
import org.gcube.application.perform.service.engine.model.InternalException;
|
||||
import org.gcube.application.perform.service.engine.model.InvalidRequestException;
|
||||
import org.gcube.application.perform.service.engine.model.anagraphic.Batch;
|
||||
import org.gcube.application.perform.service.engine.model.anagraphic.Farm;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.Synchronized;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class MappingManagerImpl implements MappingManager {
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(MappingManagerImpl.class);
|
||||
|
||||
private static ISQueryDescriptor isQueryDescriptor=null;
|
||||
|
||||
|
||||
|
||||
|
||||
@Synchronized
|
||||
private static ISQueryDescriptor getISQueryDescriptor() {
|
||||
private static synchronized ISQueryDescriptor getISQueryDescriptor() {
|
||||
if(isQueryDescriptor==null) {
|
||||
isQueryDescriptor=
|
||||
new ISQueryDescriptor(
|
||||
|
|
|
@ -10,12 +10,14 @@ import org.gcube.data.analysis.dataminermanagercl.server.monitor.DMMonitorListen
|
|||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class DMUtils {
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(DMUtils.class);
|
||||
|
||||
public static SClient getClient() throws DMException {
|
||||
try {
|
||||
return new DataMinerService().getClient();
|
||||
|
|
|
@ -4,17 +4,24 @@ import org.gcube.application.perform.service.engine.model.ISQueryDescriptor;
|
|||
import org.gcube.application.perform.service.engine.model.importer.ImportRoutineDescriptor;
|
||||
import org.gcube.application.perform.service.engine.model.importer.ImportStatus;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.monitor.DMMonitorListener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class ImporterMonitor implements DMMonitorListener {
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(ImporterMonitor.class);
|
||||
|
||||
private static final String UPDATE_ROUTINE="";
|
||||
|
||||
|
||||
public ImporterMonitor(ImportRoutineDescriptor routine, ISQueryDescriptor isQuery) {
|
||||
super();
|
||||
this.routine = routine;
|
||||
this.isQuery = isQuery;
|
||||
}
|
||||
|
||||
|
||||
private ImportRoutineDescriptor routine;
|
||||
private ISQueryDescriptor isQuery;
|
||||
|
||||
|
|
|
@ -4,11 +4,7 @@ import java.sql.Types;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public class DBField {
|
||||
|
||||
public static class Batch{
|
||||
|
@ -97,6 +93,19 @@ public class DBField {
|
|||
|
||||
|
||||
|
||||
public DBField(int type, String fieldName) {
|
||||
super();
|
||||
this.type = type;
|
||||
this.fieldName = fieldName;
|
||||
}
|
||||
|
||||
public String getFieldName() {
|
||||
return fieldName;
|
||||
}
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
private int type;
|
||||
private String fieldName;
|
||||
@Override
|
||||
|
|
|
@ -3,17 +3,26 @@ package org.gcube.application.perform.service.engine.model;
|
|||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DBQueryDescriptor {
|
||||
|
||||
private Map<DBField,Object> condition;
|
||||
|
||||
public DBQueryDescriptor() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public Map<DBField, Object> getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
|
||||
public DBQueryDescriptor(Map<DBField, Object> condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
StringBuilder builder=new StringBuilder();
|
||||
|
|
|
@ -1,14 +1,32 @@
|
|||
package org.gcube.application.perform.service.engine.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class DatabaseConnectionDescriptor {
|
||||
|
||||
private String username;
|
||||
private String url;
|
||||
private String password;
|
||||
|
||||
|
||||
|
||||
public DatabaseConnectionDescriptor(String username, String url, String password) {
|
||||
super();
|
||||
this.username = username;
|
||||
this.url = url;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,17 +1,46 @@
|
|||
package org.gcube.application.perform.service.engine.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
@ToString
|
||||
public class ISQueryDescriptor {
|
||||
|
||||
// private DBType type;
|
||||
|
||||
private String resourceName;
|
||||
private String platformName;
|
||||
private String category;
|
||||
|
||||
public ISQueryDescriptor() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ISQueryDescriptor(String resourceName, String platformName, String category) {
|
||||
super();
|
||||
this.resourceName = resourceName;
|
||||
this.platformName = platformName;
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getResourceName() {
|
||||
return resourceName;
|
||||
}
|
||||
public void setResourceName(String resourceName) {
|
||||
this.resourceName = resourceName;
|
||||
}
|
||||
public String getPlatformName() {
|
||||
return platformName;
|
||||
}
|
||||
public void setPlatformName(String platformName) {
|
||||
this.platformName = platformName;
|
||||
}
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,52 @@
|
|||
package org.gcube.application.perform.service.engine.model.anagraphic;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Batch {
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
public Long getFarmId() {
|
||||
return farmId;
|
||||
}
|
||||
public void setFarmId(Long farmId) {
|
||||
this.farmId = farmId;
|
||||
}
|
||||
|
||||
public Batch() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
public Batch(Long id, String uuid, String name, String type, Long farmId) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.uuid = uuid;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.farmId = farmId;
|
||||
}
|
||||
private Long id;
|
||||
private String uuid;
|
||||
private String name;
|
||||
|
|
|
@ -1,17 +1,57 @@
|
|||
package org.gcube.application.perform.service.engine.model.anagraphic;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Farm {
|
||||
|
||||
|
||||
public Farm() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
public Long getAssociationId() {
|
||||
return associationId;
|
||||
}
|
||||
public void setAssociationId(Long associationId) {
|
||||
this.associationId = associationId;
|
||||
}
|
||||
public String getUUID() {
|
||||
return UUID;
|
||||
}
|
||||
public void setUUID(String uUID) {
|
||||
UUID = uUID;
|
||||
}
|
||||
public String getCompanyUUID() {
|
||||
return companyUUID;
|
||||
}
|
||||
public void setCompanyUUID(String companyUUID) {
|
||||
this.companyUUID = companyUUID;
|
||||
}
|
||||
public String getAssociationUUID() {
|
||||
return associationUUID;
|
||||
}
|
||||
public void setAssociationUUID(String associationUUID) {
|
||||
this.associationUUID = associationUUID;
|
||||
}
|
||||
public Farm(Long id, Long companyId, Long associationId, String uUID, String companyUUID, String associationUUID) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.companyId = companyId;
|
||||
this.associationId = associationId;
|
||||
UUID = uUID;
|
||||
this.companyUUID = companyUUID;
|
||||
this.associationUUID = associationUUID;
|
||||
}
|
||||
private Long id;
|
||||
private Long companyId;
|
||||
private Long associationId;
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
package org.gcube.application.perform.service.engine.model.importer;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
@ToString
|
||||
|
||||
public class ImportRequest {
|
||||
|
||||
private String source;
|
||||
|
@ -15,4 +10,44 @@ public class ImportRequest {
|
|||
private Long farmId;
|
||||
|
||||
|
||||
public ImportRequest() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
public ImportRequest(String source, String version, String batchType, Long farmId) {
|
||||
super();
|
||||
this.source = source;
|
||||
this.version = version;
|
||||
this.batchType = batchType;
|
||||
this.farmId = farmId;
|
||||
}
|
||||
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
public String getBatchType() {
|
||||
return batchType;
|
||||
}
|
||||
public void setBatchType(String batchType) {
|
||||
this.batchType = batchType;
|
||||
}
|
||||
public Long getFarmId() {
|
||||
return farmId;
|
||||
}
|
||||
public void setFarmId(Long farmId) {
|
||||
this.farmId = farmId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,21 +2,38 @@ package org.gcube.application.perform.service.engine.model.importer;
|
|||
|
||||
import java.time.Instant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class ImportRoutineDescriptor {
|
||||
|
||||
|
||||
public ImportRoutineDescriptor() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ImportRoutineDescriptor(Long id, Long farmId, String batch_type, String sourceUrl, String sourceVersion,
|
||||
Instant startTime, Instant endTime, ImportStatus status, String lock, String caller, String computationId,
|
||||
String computationUrl, String computationOperator, String computationOperatorName,
|
||||
String computationRequest) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.farmId = farmId;
|
||||
this.batch_type = batch_type;
|
||||
this.sourceUrl = sourceUrl;
|
||||
this.sourceVersion = sourceVersion;
|
||||
this.startTime = startTime;
|
||||
this.endTime = endTime;
|
||||
this.status = status;
|
||||
this.lock = lock;
|
||||
this.caller = caller;
|
||||
this.computationId = computationId;
|
||||
this.computationUrl = computationUrl;
|
||||
this.computationOperator = computationOperator;
|
||||
this.computationOperatorName = computationOperatorName;
|
||||
this.computationRequest = computationRequest;
|
||||
}
|
||||
|
||||
|
||||
private Long id;
|
||||
private Long farmId;
|
||||
private String batch_type;
|
||||
|
@ -36,4 +53,101 @@ public class ImportRoutineDescriptor {
|
|||
private String computationOperatorName;
|
||||
private String computationRequest;
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Long getFarmId() {
|
||||
return farmId;
|
||||
}
|
||||
public void setFarmId(Long farmId) {
|
||||
this.farmId = farmId;
|
||||
}
|
||||
public String getBatch_type() {
|
||||
return batch_type;
|
||||
}
|
||||
public void setBatch_type(String batch_type) {
|
||||
this.batch_type = batch_type;
|
||||
}
|
||||
public String getSourceUrl() {
|
||||
return sourceUrl;
|
||||
}
|
||||
public void setSourceUrl(String sourceUrl) {
|
||||
this.sourceUrl = sourceUrl;
|
||||
}
|
||||
public String getSourceVersion() {
|
||||
return sourceVersion;
|
||||
}
|
||||
public void setSourceVersion(String sourceVersion) {
|
||||
this.sourceVersion = sourceVersion;
|
||||
}
|
||||
public Instant getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
public void setStartTime(Instant startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
public Instant getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
public void setEndTime(Instant endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
public ImportStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(ImportStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
public String getLock() {
|
||||
return lock;
|
||||
}
|
||||
public void setLock(String lock) {
|
||||
this.lock = lock;
|
||||
}
|
||||
public String getCaller() {
|
||||
return caller;
|
||||
}
|
||||
public void setCaller(String caller) {
|
||||
this.caller = caller;
|
||||
}
|
||||
public String getComputationId() {
|
||||
return computationId;
|
||||
}
|
||||
public void setComputationId(String computationId) {
|
||||
this.computationId = computationId;
|
||||
}
|
||||
public String getComputationUrl() {
|
||||
return computationUrl;
|
||||
}
|
||||
public void setComputationUrl(String computationUrl) {
|
||||
this.computationUrl = computationUrl;
|
||||
}
|
||||
public String getComputationOperator() {
|
||||
return computationOperator;
|
||||
}
|
||||
public void setComputationOperator(String computationOperator) {
|
||||
this.computationOperator = computationOperator;
|
||||
}
|
||||
public String getComputationOperatorName() {
|
||||
return computationOperatorName;
|
||||
}
|
||||
public void setComputationOperatorName(String computationOperatorName) {
|
||||
this.computationOperatorName = computationOperatorName;
|
||||
}
|
||||
public String getComputationRequest() {
|
||||
return computationRequest;
|
||||
}
|
||||
public void setComputationRequest(String computationRequest) {
|
||||
this.computationRequest = computationRequest;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -12,12 +12,12 @@ import org.gcube.common.resources.gcore.ServiceEndpoint;
|
|||
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
|
||||
import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
||||
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class ISUtils {
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(ISUtils.class);
|
||||
|
||||
public static DatabaseConnectionDescriptor queryForDatabase(ISQueryDescriptor desc) throws InternalException {
|
||||
|
||||
|
|
|
@ -5,13 +5,16 @@ import static org.gcube.common.authorization.client.Constants.authorizationServi
|
|||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
|
||||
@Slf4j
|
||||
public class ScopeUtils {
|
||||
|
||||
private static final Logger log= LoggerFactory.getLogger(ScopeUtils.class);
|
||||
|
||||
|
||||
|
||||
public static String getCurrentScope(){
|
||||
// try{
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.gcube.smartgears.annotations.ManagedBy;
|
|||
|
||||
@ManagedBy(PerformServiceManager.class)
|
||||
|
||||
@AuthorizationControl(allowed={"lucio.lelii"}, exception=MyAuthException.class)
|
||||
public class Mappings {
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.gcube.application.perform.service.engine.model.DBQueryDescriptor;
|
|||
public class MiscTests {
|
||||
|
||||
public static void main(String[] args) {
|
||||
HashMap<DBField,String> condition=new HashMap<DBField,String>();
|
||||
HashMap<DBField,Object> condition=new HashMap<DBField,Object>();
|
||||
|
||||
condition.put(DBField.Farm.fields.get(DBField.Farm.FARM_ID), "suca");
|
||||
condition.put(DBField.Farm.fields.get(DBField.Farm.UUID), "boh");
|
||||
|
|
Loading…
Reference in New Issue