no message
This commit is contained in:
parent
8892c62791
commit
bf10c0c31c
|
@ -0,0 +1,5 @@
|
|||
FROM openjdk:8-jdk-alpine
|
||||
VOLUME /tmp
|
||||
ARG JAR_FILE
|
||||
ADD ${JAR_FILE} app.jar
|
||||
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
|
|
@ -1,16 +1,11 @@
|
|||
package eu.eudat;
|
||||
|
||||
import eu.eudat.handlers.PrincipalArgumentResolver;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SpringBootApplication
|
||||
public class EuDatApplication extends SpringBootServletInitializer {
|
||||
|
|
|
@ -4,9 +4,6 @@ import eu.eudat.builders.Builder;
|
|||
import eu.eudat.entities.Credential;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
|
@ -3,11 +3,7 @@ package eu.eudat.builders.entity;
|
|||
import eu.eudat.builders.Builder;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.entities.DatasetProfile;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.OneToMany;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -5,9 +5,7 @@ import eu.eudat.entities.Credential;
|
|||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.entities.UserRole;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
|
|
@ -4,10 +4,6 @@ import eu.eudat.builders.Builder;
|
|||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.entities.UserRole;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,10 +4,6 @@ import eu.eudat.builders.Builder;
|
|||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.entities.UserToken;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package eu.eudat.builders.model.criteria;
|
||||
|
||||
import eu.eudat.builders.Builder;
|
||||
import eu.eudat.entities.Registry;
|
||||
import eu.eudat.models.criteria.RegistryCriteria;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
package eu.eudat.cache;
|
||||
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cache.guava.GuavaCache;
|
||||
import org.springframework.cache.support.SimpleCacheManager;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cache.support.SimpleCacheManager;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.cache.guava.GuavaCache;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
|
||||
|
||||
|
||||
@Component
|
||||
@EnableCaching
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
|||
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.sql.DataSource;
|
||||
import java.util.Properties;
|
||||
|
|
|
@ -3,14 +3,9 @@ package eu.eudat.configurations;
|
|||
import eu.eudat.handlers.PrincipalArgumentResolver;
|
||||
import eu.eudat.services.AuthenticationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
|
||||
import org.springframework.boot.web.servlet.ErrorPage;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -21,6 +16,7 @@ public class WebMVCConfiguration extends WebMvcConfigurerAdapter {
|
|||
|
||||
@Autowired
|
||||
AuthenticationService authenticationService;
|
||||
|
||||
@Override
|
||||
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
|
||||
argumentResolvers.add(new PrincipalArgumentResolver(this.authenticationService));
|
||||
|
|
|
@ -1,32 +1,20 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.entities.*;
|
||||
import eu.eudat.managers.DashBoardManager;
|
||||
import eu.eudat.models.dashboard.DashBoardStatistics;
|
||||
import eu.eudat.managers.AdminManager;
|
||||
import eu.eudat.models.admin.composite.DatasetProfile;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.security.claims.ClaimedAuthorities;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
import eu.eudat.types.Authorities;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import eu.eudat.managers.AdminManager;
|
||||
import eu.eudat.models.admin.composite.DatasetProfile;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
import javax.validation.Valid;
|
||||
import java.util.UUID;
|
||||
|
||||
import static eu.eudat.types.Authorities.ADMIN;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ import eu.eudat.validators.DataManagementPlanTableRequestValidator;
|
|||
import eu.eudat.validators.DatasetProfileValidator;
|
||||
import eu.eudat.validators.ProjectModelValidator;
|
||||
import eu.eudat.validators.ProjectTableRequestValidator;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
|
||||
|
@ -25,10 +23,14 @@ public abstract class BaseController {
|
|||
|
||||
@InitBinder()
|
||||
protected void initBinder(WebDataBinder binder) {
|
||||
if (binder.getTarget() != null && DataManagementPlanTableRequestValidator.supportsType((binder.getTarget().getClass()))) binder.addValidators(this.apiContext.getApplicationContext().getBean("dataManagementPlanTableRequestValidator",DataManagementPlanTableRequestValidator.class));
|
||||
if (binder.getTarget() != null && ProjectTableRequestValidator.supportsType((binder.getTarget().getClass()))) binder.addValidators(this.apiContext.getApplicationContext().getBean("projectTableRequestValidator",ProjectTableRequestValidator.class));
|
||||
if (binder.getTarget() != null && DatasetProfileValidator.supportsType((binder.getTarget().getClass()))) binder.addValidators(this.apiContext.getApplicationContext().getBean("datasetProfileValidator",DatasetProfileValidator.class));
|
||||
if (binder.getTarget() != null && ProjectModelValidator.supportsType((binder.getTarget().getClass()))) binder.addValidators(this.apiContext.getApplicationContext().getBean("projectModelValidator",ProjectModelValidator.class));
|
||||
if (binder.getTarget() != null && DataManagementPlanTableRequestValidator.supportsType((binder.getTarget().getClass())))
|
||||
binder.addValidators(this.apiContext.getApplicationContext().getBean("dataManagementPlanTableRequestValidator", DataManagementPlanTableRequestValidator.class));
|
||||
if (binder.getTarget() != null && ProjectTableRequestValidator.supportsType((binder.getTarget().getClass())))
|
||||
binder.addValidators(this.apiContext.getApplicationContext().getBean("projectTableRequestValidator", ProjectTableRequestValidator.class));
|
||||
if (binder.getTarget() != null && DatasetProfileValidator.supportsType((binder.getTarget().getClass())))
|
||||
binder.addValidators(this.apiContext.getApplicationContext().getBean("datasetProfileValidator", DatasetProfileValidator.class));
|
||||
if (binder.getTarget() != null && ProjectModelValidator.supportsType((binder.getTarget().getClass())))
|
||||
binder.addValidators(this.apiContext.getApplicationContext().getBean("projectModelValidator", ProjectModelValidator.class));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.exceptions.datamanagementplan.DMPWithDatasetsException;
|
||||
import eu.eudat.managers.DataManagementPlanManager;
|
||||
import eu.eudat.models.dmp.DataManagementPlan;
|
||||
import eu.eudat.models.dmp.DataManagementPlanCriteriaRequest;
|
||||
import eu.eudat.models.dmp.DataManagementPlanTableRequest;
|
||||
import eu.eudat.models.helpers.common.DataTableData;
|
||||
import eu.eudat.models.helpers.responses.*;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.listingmodels.DataManagementPlanListingModel;
|
||||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.services.ApiContext;
|
||||
|
@ -19,11 +16,12 @@ import eu.eudat.types.ApiMessageCode;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import eu.eudat.managers.DataManagementPlanManager;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@RestController
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import eu.eudat.managers.DashBoardManager;
|
||||
import eu.eudat.models.dashboard.DashBoardStatistics;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.services.ApiContext;
|
||||
|
@ -12,12 +14,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import eu.eudat.dao.entities.DMPDao;
|
||||
import eu.eudat.dao.entities.DatasetDao;
|
||||
import eu.eudat.dao.entities.ProjectDao;
|
||||
import eu.eudat.managers.DashBoardManager;
|
||||
import eu.eudat.models.dashboard.DashBoardStatistics;
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
@RequestMapping(value = {"/api"})
|
||||
|
@ -34,8 +30,7 @@ public class DashBoardController extends BaseController{
|
|||
DashBoardStatistics statistics = new DashBoardManager().getStatistics(this.getApiContext().getDatabaseRepository().getDatasetDao(), this.getApiContext().getDatabaseRepository().getDmpDao()
|
||||
, this.getApiContext().getDatabaseRepository().getProjectDao());
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DashBoardStatistics>().status(ApiMessageCode.NO_MESSAGE).payload(statistics));
|
||||
}
|
||||
catch(Exception ex) {
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<DashBoardStatistics>().status(ApiMessageCode.DEFAULT_ERROR_MESSAGE).message(ex.getMessage()));
|
||||
}
|
||||
|
@ -47,8 +42,7 @@ public class DashBoardController extends BaseController{
|
|||
DashBoardStatistics statistics = new DashBoardManager().getMeStatistics(this.getApiContext().getDatabaseRepository().getDatasetDao(), this.getApiContext().getDatabaseRepository().getDmpDao()
|
||||
, this.getApiContext().getDatabaseRepository().getProjectDao(), principal);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DashBoardStatistics>().status(ApiMessageCode.NO_MESSAGE).payload(statistics));
|
||||
}
|
||||
catch(Exception ex) {
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<DashBoardStatistics>().status(ApiMessageCode.DEFAULT_ERROR_MESSAGE).message(ex.getMessage()));
|
||||
}
|
||||
|
|
|
@ -1,23 +1,17 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
|
@ -31,15 +25,14 @@ public class DataRepositories extends BaseController{
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/external/datarepos"}, produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<List<Map<String,String>>>> listExternalDataRepositories(@RequestParam(value="query", required=false) String query ){
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<List<Map<String, String>>>> listExternalDataRepositories(@RequestParam(value = "query", required = false) String query) {
|
||||
try {
|
||||
List<Map<String, String>> remoteRepos = this.getApiContext().getRemoteFetcher().getRepositories(query);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<Map<String, String>>>().status(ApiMessageCode.NO_MESSAGE).payload(remoteRepos));
|
||||
}
|
||||
catch(NoURLFound ex) {
|
||||
} catch (NoURLFound ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<List<Map<String, String>>>().status(ApiMessageCode.ERROR_MESSAGE).message(ex.getMessage()).payload(null));
|
||||
}
|
||||
catch(HugeResultSet ex) {
|
||||
} catch (HugeResultSet ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<List<Map<String, String>>>().status(ApiMessageCode.ERROR_MESSAGE).message(ex.getMessage()).payload(null));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.managers.UserManager;
|
||||
import eu.eudat.models.components.commons.datafield.AutoCompleteData;
|
||||
import eu.eudat.models.helpers.common.AutoCompleteLookupItem;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.user.composite.DatasetProfile;
|
||||
import eu.eudat.models.properties.PropertiesModel;
|
||||
import eu.eudat.models.user.composite.PagedDatasetProfile;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
|
@ -17,16 +13,13 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import eu.eudat.managers.UserManager;
|
||||
import eu.eudat.models.helpers.common.AutoCompleteLookupItem;
|
||||
import eu.eudat.models.properties.PropertiesModel;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.eudat.managers.DatasetProfileManager;
|
||||
import eu.eudat.models.datasetprofile.DatasetProfileAutocompleteItem;
|
||||
import eu.eudat.models.datasetprofile.DatasetProfileAutocompleteRequest;
|
||||
|
@ -14,12 +12,9 @@ import eu.eudat.types.ApiMessageCode;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@RestController
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.managers.DatasetManager;
|
||||
import eu.eudat.models.dataset.DatasetTableRequest;
|
||||
import eu.eudat.models.helpers.common.DataTableData;
|
||||
import eu.eudat.models.helpers.responses.*;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.listingmodels.DatasetListingModel;
|
||||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.services.ApiContext;
|
||||
|
@ -16,13 +13,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@RestController
|
||||
|
|
|
@ -28,7 +28,8 @@ public class ExternalDatasets extends BaseController{
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, value = {"/externaldatasets/getPaged"}, consumes = "application/json", produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<DataTableData<ExternalDatasetListingModel>>> getPaged(@RequestBody ExternalDatasetTableRequest datasetTableRequest, Principal principal) {
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<DataTableData<ExternalDatasetListingModel>>> getPaged(@RequestBody ExternalDatasetTableRequest datasetTableRequest, Principal principal) {
|
||||
try {
|
||||
DataTableData<ExternalDatasetListingModel> dataTable = new ExternalDatasetManager().getPaged(this.getApiContext(), datasetTableRequest);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DataTableData<ExternalDatasetListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable));
|
||||
|
@ -40,7 +41,8 @@ public class ExternalDatasets extends BaseController{
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/external/datasets"}, produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<List<ExternalDatasetListingModel>>> getWithExternal(@RequestParam(value = "query", required = false) String query, Principal principal) {
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<List<ExternalDatasetListingModel>>> getWithExternal(@RequestParam(value = "query", required = false) String query, Principal principal) {
|
||||
try {
|
||||
List<ExternalDatasetListingModel> dataTable = new ExternalDatasetManager().getWithExternal(this.getApiContext(), query, this.getApiContext().getRemoteFetcher());
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<ExternalDatasetListingModel>>().payload(dataTable).status(ApiMessageCode.NO_MESSAGE));
|
||||
|
@ -51,7 +53,8 @@ public class ExternalDatasets extends BaseController{
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, value = {"/externaldatasets/getSingle/{id}"}, consumes = "application/json", produces = "application/json")
|
||||
public @ResponseBody ResponseItem<ExternalDatasetListingModel> getWithExternal(@PathVariable UUID id, Principal principal) {
|
||||
public @ResponseBody
|
||||
ResponseItem<ExternalDatasetListingModel> getWithExternal(@PathVariable UUID id, Principal principal) {
|
||||
try {
|
||||
ExternalDatasetListingModel externalDatasetModel = new ExternalDatasetManager().getSingle(this.getApiContext().getDatabaseRepository().getExternalDatasetDao(), id);
|
||||
return new ResponseItem<ExternalDatasetListingModel>().payload(externalDatasetModel).status(ApiMessageCode.NO_MESSAGE);
|
||||
|
|
|
@ -2,8 +2,8 @@ package eu.eudat.controllers;
|
|||
|
||||
import eu.eudat.exceptions.security.UnauthorisedException;
|
||||
import eu.eudat.managers.UserManager;
|
||||
import eu.eudat.models.login.Credentials;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.login.Credentials;
|
||||
import eu.eudat.models.login.LoginInfo;
|
||||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.security.CustomAuthenticationProvider;
|
||||
|
|
|
@ -1,24 +1,18 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import eu.eudat.models.external.OrganisationsExternalSourcesModel;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
|
@ -32,16 +26,15 @@ public class Organisations extends BaseController{
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/external/organisations"}, produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<OrganisationsExternalSourcesModel>> listExternalOrganisations(@RequestParam(value="query", required=false) String query ){
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<OrganisationsExternalSourcesModel>> listExternalOrganisations(@RequestParam(value = "query", required = false) String query) {
|
||||
try {
|
||||
List<Map<String, String>> remoteRepos = this.getApiContext().getRemoteFetcher().getOrganisations(query);
|
||||
OrganisationsExternalSourcesModel projectsExternalSourcesModel = new OrganisationsExternalSourcesModel().fromExternalItem(remoteRepos);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<OrganisationsExternalSourcesModel>().payload(projectsExternalSourcesModel).status(ApiMessageCode.SUCCESS_MESSAGE));
|
||||
}
|
||||
catch(NoURLFound ex) {
|
||||
} catch (NoURLFound ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<OrganisationsExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message("External Url Not Found"));
|
||||
}
|
||||
catch(HugeResultSet ex) {
|
||||
} catch (HugeResultSet ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<OrganisationsExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message("Huge Result Set"));
|
||||
} catch (Exception ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<OrganisationsExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message(ex.getMessage()));
|
||||
|
|
|
@ -1,41 +1,27 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import eu.eudat.entities.Project;
|
||||
import eu.eudat.managers.ProjectManager;
|
||||
import eu.eudat.models.external.ProjectsExternalSourcesModel;
|
||||
import eu.eudat.models.helpers.responses.*;
|
||||
import eu.eudat.models.helpers.common.DataTableData;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.project.ProjectCriteriaRequest;
|
||||
import eu.eudat.models.project.ProjectListingModel;
|
||||
import eu.eudat.models.project.ProjectTableRequest;
|
||||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.security.claims.ClaimedAuthorities;
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import eu.eudat.entities.Project;
|
||||
|
||||
import eu.eudat.managers.ProjectManager;
|
||||
import eu.eudat.models.helpers.common.DataTableData;
|
||||
import eu.eudat.models.project.ProjectTableRequest;
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
|
||||
import static eu.eudat.types.Authorities.ADMIN;
|
||||
import static eu.eudat.types.Authorities.USER;
|
||||
import javax.transaction.Transactional;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
|
|
|
@ -1,24 +1,18 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import eu.eudat.models.external.RegistriesExternalSourcesModel;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
|
@ -32,17 +26,16 @@ public class Registries extends BaseController{
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/external/registries"}, produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<RegistriesExternalSourcesModel>> listExternalRegistries(@RequestParam(value="query", required=false) String query ){
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<RegistriesExternalSourcesModel>> listExternalRegistries(@RequestParam(value = "query", required = false) String query) {
|
||||
try {
|
||||
List<Map<String, String>> remoteRepos = this.getApiContext().getRemoteFetcher().getRegistries(query);
|
||||
RegistriesExternalSourcesModel registriesExternalSourcesModel = new RegistriesExternalSourcesModel().fromExternalItem(remoteRepos);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<RegistriesExternalSourcesModel>().payload(registriesExternalSourcesModel).status(ApiMessageCode.NO_MESSAGE));
|
||||
}
|
||||
catch(NoURLFound ex) {
|
||||
} catch (NoURLFound ex) {
|
||||
ex.printStackTrace();
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<RegistriesExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message("External Url Not Found"));
|
||||
}
|
||||
catch(HugeResultSet ex) {
|
||||
} catch (HugeResultSet ex) {
|
||||
ex.printStackTrace();
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<RegistriesExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message("Huge Result Set"));
|
||||
} catch (Exception ex) {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import eu.eudat.exceptions.security.UnauthorisedException;
|
||||
import eu.eudat.managers.ResearcherManager;
|
||||
import eu.eudat.models.dmp.Researcher;
|
||||
import eu.eudat.models.external.ResearchersExternalSourcesModel;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -17,8 +16,8 @@ import org.springframework.http.ResponseEntity;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
|
@ -33,16 +32,15 @@ public class Researchers extends BaseController{
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/external/researchers"}, produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<ResearchersExternalSourcesModel>> listExternalResearchers(@RequestParam(value="query", required=false) String query ){
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<ResearchersExternalSourcesModel>> listExternalResearchers(@RequestParam(value = "query", required = false) String query) {
|
||||
try {
|
||||
List<Map<String, String>> remoteRepos = this.getApiContext().getRemoteFetcher().getResearchers(query);
|
||||
ResearchersExternalSourcesModel researchersExternalSourcesModel = new ResearchersExternalSourcesModel().fromExternalItem(remoteRepos);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<ResearchersExternalSourcesModel>().payload(researchersExternalSourcesModel).status(ApiMessageCode.NO_MESSAGE));
|
||||
}
|
||||
catch(NoURLFound ex) {
|
||||
} catch (NoURLFound ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<ResearchersExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message("External Url Not Found"));
|
||||
}
|
||||
catch(HugeResultSet ex) {
|
||||
} catch (HugeResultSet ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<ResearchersExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message("Huge Result Set"));
|
||||
} catch (Exception ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<ResearchersExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message(ex.getMessage()));
|
||||
|
@ -51,15 +49,15 @@ public class Researchers extends BaseController{
|
|||
|
||||
@Transactional
|
||||
@RequestMapping(method = RequestMethod.POST, value = {"/researchers/create"}, consumes = "application/json", produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<Researcher>> create(@RequestBody eu.eudat.models.researcher.Researcher researcher, Principal principal) {
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<Researcher>> create(@RequestBody eu.eudat.models.researcher.Researcher researcher, Principal principal) {
|
||||
try {
|
||||
ResearcherManager.create(this.getApiContext(), researcher);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<Researcher>().status(ApiMessageCode.SUCCESS_MESSAGE));
|
||||
} catch (UnauthorisedException e) {
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<Researcher>().status(ApiMessageCode.SUCCESS_MESSAGE).message(e.getMessage()));
|
||||
}
|
||||
|
|
|
@ -1,24 +1,18 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import eu.eudat.models.external.ServiceExternalSourcesModel;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
|
@ -32,16 +26,15 @@ public class Services extends BaseController{
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/external/services"}, produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<ServiceExternalSourcesModel>> listExternalServices(@RequestParam(value="query", required=false) String query ){
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<ServiceExternalSourcesModel>> listExternalServices(@RequestParam(value = "query", required = false) String query) {
|
||||
try {
|
||||
List<Map<String, String>> remoteRepos = this.getApiContext().getRemoteFetcher().getServices(query);
|
||||
ServiceExternalSourcesModel serviceExternalSourcesModel = new ServiceExternalSourcesModel().fromExternalItem(remoteRepos);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<ServiceExternalSourcesModel>().payload(serviceExternalSourcesModel).status(ApiMessageCode.NO_MESSAGE));
|
||||
}
|
||||
catch(NoURLFound ex) {
|
||||
} catch (NoURLFound ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<ServiceExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message("External Url Not Found"));
|
||||
}
|
||||
catch(HugeResultSet ex) {
|
||||
} catch (HugeResultSet ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<ServiceExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message("Huge Result Set"));
|
||||
} catch (Exception ex) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<ServiceExternalSourcesModel>().status(ApiMessageCode.ERROR_MESSAGE).message(ex.getMessage()));
|
||||
|
|
|
@ -31,7 +31,8 @@ public class UserInvitationController extends BaseController{
|
|||
|
||||
@Transactional
|
||||
@RequestMapping(method = RequestMethod.POST, value = {"/users"}, consumes = "application/json", produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<Invitation>> users(@RequestBody Invitation invitation, Principal principal) {
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<Invitation>> users(@RequestBody Invitation invitation, Principal principal) {
|
||||
try {
|
||||
InvitationsManager.inviteUsers(this.getApiContext(), invitation, principal);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<Invitation>().status(ApiMessageCode.SUCCESS_MESSAGE).message("Users have beeen invited"));
|
||||
|
@ -43,22 +44,23 @@ public class UserInvitationController extends BaseController{
|
|||
|
||||
@Transactional
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/exchange/{invitationID}"}, produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<UUID>> exchange(@PathVariable UUID invitationID, Principal principal) {
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<UUID>> exchange(@PathVariable UUID invitationID, Principal principal) {
|
||||
try {
|
||||
UUID dmpId = InvitationsManager.assignUserAcceptedInvitation(this.getApiContext(), invitationID, principal);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<UUID>().status(ApiMessageCode.SUCCESS_MESSAGE).payload(dmpId));
|
||||
} catch (UnauthorisedException e) {
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<UUID>().status(ApiMessageCode.SUCCESS_MESSAGE).message(e.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, value = {"/getUsers"}, consumes = "application/json", produces = "application/json")
|
||||
public @ResponseBody ResponseEntity<ResponseItem<List<UserInfoInvitationModel>>> getUsers(@RequestBody UserInfoRequestItem userInfoRequestItem) {
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<List<UserInfoInvitationModel>>> getUsers(@RequestBody UserInfoRequestItem userInfoRequestItem) {
|
||||
try {
|
||||
List<UserInfoInvitationModel> users = InvitationsManager.getUsers(this.getApiContext(), userInfoRequestItem);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<UserInfoInvitationModel>>().status(ApiMessageCode.SUCCESS_MESSAGE).payload(users));
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
package eu.eudat.controllers;
|
||||
|
||||
import eu.eudat.managers.ProjectManager;
|
||||
import eu.eudat.managers.UserManager;
|
||||
import eu.eudat.models.helpers.common.DataTableData;
|
||||
import eu.eudat.models.helpers.responses.ResponseItem;
|
||||
import eu.eudat.models.project.ProjectListingModel;
|
||||
import eu.eudat.models.project.ProjectTableRequest;
|
||||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.models.userinfo.UserInfoTableRequestItem;
|
||||
import eu.eudat.models.userinfo.UserListingModel;
|
||||
|
@ -21,7 +18,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
import javax.validation.Valid;
|
||||
|
||||
import static eu.eudat.types.Authorities.ADMIN;
|
||||
import static eu.eudat.types.Authorities.USER;
|
||||
|
||||
|
||||
@RestController
|
||||
|
|
|
@ -7,12 +7,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.persistence.criteria.CriteriaBuilder;
|
||||
import javax.persistence.criteria.CriteriaQuery;
|
||||
import javax.persistence.criteria.Root;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.PersistenceContext;
|
||||
|
||||
|
||||
@Repository("databaseCtx")
|
||||
|
|
|
@ -6,10 +6,8 @@ import eu.eudat.entities.DataEntity;
|
|||
import eu.eudat.queryable.QueryableList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Service("databaseService")
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
|
@ -9,6 +7,8 @@ import eu.eudat.models.criteria.DataManagementPlanCriteria;
|
|||
import eu.eudat.models.datasetwizard.DatasetWizardAutocompleteRequest;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface DMPDao extends DatabaseAccessLayer<DMP, UUID> {
|
||||
|
||||
QueryableList<DMP> getWithCriteria(DataManagementPlanCriteria criteria);
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.entities.DatasetProfile;
|
||||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.criteria.DataManagementPlanCriteria;
|
||||
import eu.eudat.models.datasetwizard.DatasetWizardAutocompleteRequest;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.queryable.types.FieldSelectionType;
|
||||
import eu.eudat.queryable.types.SelectionField;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("dMPDao")
|
||||
public class DMPDaoImpl extends DatabaseAccess<DMP> implements DMPDao {
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.DataRepository;
|
||||
import eu.eudat.models.criteria.DataRepositoryCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface DataRepositoryDao extends DatabaseAccessLayer<DataRepository, UUID> {
|
||||
QueryableList<DataRepository> getWithCriteria(DataRepositoryCriteria criteria);
|
||||
}
|
|
@ -1,16 +1,15 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.DataRepository;
|
||||
import eu.eudat.models.criteria.DataRepositoryCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import eu.eudat.entities.DataRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("dataRepositoryDao")
|
||||
public class DataRepositoryDaoImpl extends DatabaseAccess<DataRepository> implements DataRepositoryDao {
|
||||
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.DataRepository;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.criteria.DatasetCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public interface DatasetDao extends DatabaseAccessLayer<Dataset, UUID> {
|
||||
|
||||
|
|
|
@ -1,21 +1,18 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.DataRepository;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.criteria.DatasetCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
import eu.eudat.queryable.types.FieldSelectionType;
|
||||
import eu.eudat.queryable.types.SelectionField;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Component("datasetDao")
|
||||
public class DatasetDaoImpl extends DatabaseAccess<Dataset> implements DatasetDao {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.DatasetProfile;
|
||||
import eu.eudat.models.criteria.DatasetProfileCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface DatasetProfileDao extends DatabaseAccessLayer<DatasetProfile, UUID> {
|
||||
|
||||
QueryableList<DatasetProfile> getWithCriteria(DatasetProfileCriteria criteria);
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.entities.DatasetProfile;
|
||||
import eu.eudat.models.criteria.DatasetProfileCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("datasetProfileDao")
|
||||
public class DatasetProfileDaoImpl extends DatabaseAccess<DatasetProfile> implements DatasetProfileDao {
|
||||
|
||||
|
@ -22,7 +21,8 @@ public class DatasetProfileDaoImpl extends DatabaseAccess<DatasetProfile> implem
|
|||
@Override
|
||||
public QueryableList<DatasetProfile> getWithCriteria(DatasetProfileCriteria criteria) {
|
||||
QueryableList<DatasetProfile> query = getDatabaseService().getQueryable(DatasetProfile.class);
|
||||
if(criteria.getLike()!=null&&!criteria.getLike().isEmpty())query.where((builder, root) -> builder.like(root.get("label"),"%"+criteria.getLike()+"%"));
|
||||
if (criteria.getLike() != null && !criteria.getLike().isEmpty())
|
||||
query.where((builder, root) -> builder.like(root.get("label"), "%" + criteria.getLike() + "%"));
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.entities.ExternalDataset;
|
||||
import eu.eudat.entities.Invitation;
|
||||
import eu.eudat.models.criteria.ExternalDatasetCriteria;
|
||||
import eu.eudat.models.criteria.InvitationCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.DatasetProfile;
|
||||
import eu.eudat.entities.ExternalDataset;
|
||||
import eu.eudat.entities.Project;
|
||||
import eu.eudat.models.criteria.ExternalDatasetCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,7 +22,8 @@ public class ExternalDatasetDaoImpl extends DatabaseAccess<ExternalDataset> impl
|
|||
@Override
|
||||
public QueryableList<ExternalDataset> getWithCriteria(ExternalDatasetCriteria criteria) {
|
||||
QueryableList<ExternalDataset> query = this.getDatabaseService().getQueryable(ExternalDataset.class);
|
||||
if (criteria.getLike() != null && !criteria.getLike().isEmpty()) query.where((builder, root) -> builder.like(root.get("label"), "%" + criteria.getLike() + "%"));
|
||||
if (criteria.getLike() != null && !criteria.getLike().isEmpty())
|
||||
query.where((builder, root) -> builder.like(root.get("label"), "%" + criteria.getLike() + "%"));
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.entities.ExternalDataset;
|
||||
import eu.eudat.entities.Invitation;
|
||||
import eu.eudat.models.criteria.DatasetCriteria;
|
||||
import eu.eudat.models.criteria.InvitationCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ package eu.eudat.dao.entities;
|
|||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.entities.ExternalDataset;
|
||||
import eu.eudat.entities.Invitation;
|
||||
import eu.eudat.models.criteria.InvitationCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Invitation;
|
||||
import eu.eudat.entities.Organisation;
|
||||
import eu.eudat.models.criteria.OrganisationCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface OrganisationDao extends DatabaseAccessLayer<Organisation, UUID> {
|
||||
|
||||
QueryableList<Organisation> getWithCriteria(OrganisationCriteria criteria);
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Invitation;
|
||||
import eu.eudat.entities.Organisation;
|
||||
import eu.eudat.models.criteria.OrganisationCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import eu.eudat.entities.Organisation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("organisationDao")
|
||||
public class OrganisationDaoImpl extends DatabaseAccess<Organisation> implements OrganisationDao {
|
||||
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.entities.Organisation;
|
||||
import eu.eudat.entities.Project;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.criteria.ProjectCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface ProjectDao extends DatabaseAccessLayer<Project, UUID> {
|
||||
|
||||
QueryableList<Project> getWithCriteria(ProjectCriteria criteria);
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.*;
|
||||
import eu.eudat.entities.Project;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.criteria.ProjectCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("projectDao")
|
||||
public class ProjectDaoImpl extends DatabaseAccess<Project> implements ProjectDao {
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Project;
|
||||
import eu.eudat.entities.Registry;
|
||||
import eu.eudat.models.criteria.RegistryCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface RegistryDao extends DatabaseAccessLayer<Registry, UUID> {
|
||||
|
||||
QueryableList<Registry> getWithCriteria(RegistryCriteria criteria);
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Organisation;
|
||||
import eu.eudat.entities.Registry;
|
||||
import eu.eudat.models.criteria.RegistryCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import eu.eudat.entities.Registry;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("registryDao")
|
||||
public class RegistryDaoImpl extends DatabaseAccess<Registry> implements RegistryDao {
|
||||
|
||||
|
@ -23,7 +21,8 @@ public class RegistryDaoImpl extends DatabaseAccess<Registry> implements Registr
|
|||
@Override
|
||||
public QueryableList<Registry> getWithCriteria(RegistryCriteria criteria) {
|
||||
QueryableList<Registry> query = this.getDatabaseService().getQueryable(Registry.class);
|
||||
if(criteria.getLike()!=null) query.where((builder, root) -> builder.equal(root.get("reference"),criteria.getLike()));
|
||||
if (criteria.getLike() != null)
|
||||
query.where((builder, root) -> builder.equal(root.get("reference"), criteria.getLike()));
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Registry;
|
||||
import eu.eudat.entities.Researcher;
|
||||
import eu.eudat.models.criteria.ResearcherCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface ResearcherDao extends DatabaseAccessLayer<Researcher, UUID> {
|
||||
|
||||
QueryableList<Researcher> getWithCriteria(ResearcherCriteria criteria);
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Organisation;
|
||||
import eu.eudat.entities.Researcher;
|
||||
import eu.eudat.models.criteria.ResearcherCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import eu.eudat.entities.Researcher;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("researcherDao")
|
||||
public class ResearcherDaoImpl extends DatabaseAccess<Researcher> implements ResearcherDao {
|
||||
|
||||
|
@ -23,7 +21,8 @@ public class ResearcherDaoImpl extends DatabaseAccess<Researcher> implements Res
|
|||
@Override
|
||||
public QueryableList<Researcher> getWithCriteria(ResearcherCriteria criteria) {
|
||||
QueryableList<Researcher> query = this.getDatabaseService().getQueryable(Researcher.class);
|
||||
if(criteria.getLike()!=null) query.where((builder, root) -> builder.equal(root.get("reference"),criteria.getLike()));
|
||||
if (criteria.getLike() != null)
|
||||
query.where((builder, root) -> builder.equal(root.get("reference"), criteria.getLike()));
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Researcher;
|
||||
import eu.eudat.entities.Service;
|
||||
import eu.eudat.models.criteria.ServiceCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface ServiceDao extends DatabaseAccessLayer<Service, UUID> {
|
||||
|
||||
QueryableList<Service> getWithCriteria(ServiceCriteria criteria);
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Organisation;
|
||||
import eu.eudat.entities.Service;
|
||||
import eu.eudat.models.criteria.ServiceCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import eu.eudat.entities.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("serviceDao")
|
||||
public class ServiceDaoImpl extends DatabaseAccess<Service> implements ServiceDao {
|
||||
|
||||
|
@ -23,7 +21,8 @@ public class ServiceDaoImpl extends DatabaseAccess<Service> implements ServiceDa
|
|||
@Override
|
||||
public QueryableList<Service> getWithCriteria(ServiceCriteria criteria) {
|
||||
QueryableList<Service> query = this.getDatabaseService().getQueryable(Service.class);
|
||||
if(criteria.getLike()!=null) query.where((builder, root) -> builder.equal(root.get("reference"),criteria.getLike()));
|
||||
if (criteria.getLike() != null)
|
||||
query.where((builder, root) -> builder.equal(root.get("reference"), criteria.getLike()));
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Service;
|
||||
import eu.eudat.entities.UserDMP;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Service;
|
||||
import eu.eudat.entities.UserDMP;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Service;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.criteria.UserInfoCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface UserInfoDao extends DatabaseAccessLayer<UserInfo, UUID> {
|
||||
|
||||
QueryableList<UserInfo> getWithCriteria(UserInfoCriteria criteria);
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Organisation;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.criteria.UserInfoCriteria;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component("userInfoDao")
|
||||
public class UserInfoDaoImpl extends DatabaseAccess<UserInfo> implements UserInfoDao {
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package eu.eudat.dao.entities;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.entities.UserRole;
|
||||
|
|
|
@ -2,7 +2,6 @@ package eu.eudat.dao.entities.security;
|
|||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Credential;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.models.login.Credentials;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -3,7 +3,6 @@ package eu.eudat.dao.entities.security;
|
|||
import eu.eudat.dao.DatabaseAccess;
|
||||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.Credential;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.login.Credentials;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
import eu.eudat.security.validators.TokenValidatorFactoryImpl;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package eu.eudat.dao.entities.security;
|
||||
|
||||
import eu.eudat.dao.DatabaseAccessLayer;
|
||||
import eu.eudat.entities.Credential;
|
||||
import eu.eudat.entities.UserToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
import eu.eudat.types.Authorities;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,19 +1,11 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,24 +1,13 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
import javax.persistence.Tuple;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public interface DataEntity<T> {
|
||||
void update(T entity);
|
||||
|
||||
|
|
|
@ -1,26 +1,14 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name = "\"DataRepository\"")
|
||||
|
@ -49,7 +37,6 @@ public class DataRepository implements Serializable,DataEntity<DataRepository> {
|
|||
private String definition;
|
||||
|
||||
|
||||
|
||||
@OneToMany(fetch = FetchType.LAZY)
|
||||
@JoinTable(name = "\"DatasetDataRepository\"",
|
||||
joinColumns = {@JoinColumn(name = "\"DataRepository\"", referencedColumnName = "\"ID\"")},
|
||||
|
@ -98,7 +85,6 @@ public class DataRepository implements Serializable,DataEntity<DataRepository> {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
import eu.eudat.models.project.*;
|
||||
import eu.eudat.models.project.Project;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.util.*;
|
||||
|
||||
@Entity
|
||||
@Table(name = "\"Dataset\"")
|
||||
|
|
|
@ -7,7 +7,6 @@ import javax.persistence.*;
|
|||
import java.util.UUID;
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Table(name = "\"DatasetExternalDataset\"")
|
||||
public class DatasetExternalDataset {
|
||||
|
|
|
@ -1,26 +1,14 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
@ -98,7 +86,6 @@ public class DatasetProfile implements Serializable,DataEntity<DatasetProfile> {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
@ -116,7 +103,6 @@ public class DatasetProfile implements Serializable,DataEntity<DatasetProfile> {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public String getDefinition() {
|
||||
return definition;
|
||||
}
|
||||
|
@ -126,7 +112,6 @@ public class DatasetProfile implements Serializable,DataEntity<DatasetProfile> {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public Set<Dataset> getDataset() {
|
||||
return dataset;
|
||||
}
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
@ -64,5 +54,4 @@ public class DatasetProfileRuleset implements Serializable {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,22 +1,11 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
@ -24,7 +13,6 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
|||
public class DatasetProfileViewstyle {
|
||||
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
|
|
@ -4,7 +4,6 @@ import org.hibernate.annotations.GenericGenerator;
|
|||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
|
|
|
@ -1,26 +1,14 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
@ -59,7 +47,6 @@ public class Organisation implements Serializable,DataEntity<Organisation> {
|
|||
private Set<DMP> dMPs;
|
||||
|
||||
|
||||
|
||||
@Column(name = "\"Status\"", nullable = false)
|
||||
private Short status;
|
||||
|
||||
|
|
|
@ -1,29 +1,16 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,26 +1,13 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
@ -59,7 +46,6 @@ public class Registry implements DataEntity<Registry> {
|
|||
private Set<Dataset> datasets;
|
||||
|
||||
|
||||
|
||||
@Column(name = "\"Status\"", nullable = false)
|
||||
private Short status;
|
||||
|
||||
|
|
|
@ -1,26 +1,13 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,26 +1,13 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
import eu.eudat.types.ApiMessageCode;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name = "\"UserDMP\"")
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -3,7 +3,6 @@ package eu.eudat.entities;
|
|||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package eu.eudat.entities.xmlmodels.datasetprofiledefinition;
|
||||
|
||||
import eu.eudat.models.components.commons.DefaultValue;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import eu.eudat.models.components.commons.ViewStyle;
|
||||
import eu.eudat.models.components.commons.Visibility;
|
||||
import eu.eudat.models.components.commons.datafield.FieldData;
|
||||
import eu.eudat.utilities.XmlSerializable;
|
||||
import eu.eudat.utilities.builders.ModelBuilder;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
|
@ -27,18 +27,23 @@ public class Field implements DatabaseViewStyleDefinition,XmlSerializable<Field>
|
|||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getOrdinal() {
|
||||
return ordinal;
|
||||
}
|
||||
|
||||
public void setOrdinal(int ordinal) {
|
||||
this.ordinal = ordinal;
|
||||
}
|
||||
|
||||
public ViewStyle getViewStyle() {
|
||||
return viewStyle;
|
||||
}
|
||||
|
||||
public void setViewStyle(ViewStyle viewStyle) {
|
||||
this.viewStyle = viewStyle;
|
||||
}
|
||||
|
@ -46,6 +51,7 @@ public class Field implements DatabaseViewStyleDefinition,XmlSerializable<Field>
|
|||
public FieldData getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(FieldData data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
@ -61,6 +67,7 @@ public class Field implements DatabaseViewStyleDefinition,XmlSerializable<Field>
|
|||
public Visibility getVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(Visibility visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
@ -103,6 +110,7 @@ public class Field implements DatabaseViewStyleDefinition,XmlSerializable<Field>
|
|||
if (this.data != null) rootElement.appendChild(this.data.toXml(doc));
|
||||
return rootElement;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field fromXml(Element element) {
|
||||
this.id = element.getAttribute("id");
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package eu.eudat.entities.xmlmodels.datasetprofiledefinition;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import eu.eudat.models.components.commons.Multiplicity;
|
||||
import eu.eudat.utilities.XmlSerializable;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import eu.eudat.utilities.XmlSerializable;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class FieldSet implements DatabaseViewStyleDefinition, XmlSerializable<FieldSet> {
|
||||
private String id;
|
||||
|
@ -22,6 +21,7 @@ public class FieldSet implements DatabaseViewStyleDefinition,XmlSerializable<Fie
|
|||
private Multiplicity multiplicity;
|
||||
private boolean hasCommentField;
|
||||
private String commentFieldValue;
|
||||
|
||||
public List<Field> getFields() {
|
||||
return fields;
|
||||
}
|
||||
|
@ -117,7 +117,6 @@ public class FieldSet implements DatabaseViewStyleDefinition,XmlSerializable<Fie
|
|||
commentField.setAttribute("commentFieldValue", this.commentFieldValue);
|
||||
|
||||
|
||||
|
||||
Element fieldsElement = doc.createElement("fields");
|
||||
for (Field field : fields) {
|
||||
fieldsElement.appendChild(field.toXml(doc));
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package eu.eudat.entities.xmlmodels.datasetprofiledefinition;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import eu.eudat.utilities.XmlSerializable;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import eu.eudat.utilities.XmlSerializable;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class Section implements DatabaseViewStyleDefinition, XmlSerializable<Section> {
|
||||
private String id;
|
||||
|
@ -21,45 +20,59 @@ public class Section implements DatabaseViewStyleDefinition,XmlSerializable<Sect
|
|||
private String extendedDescription;
|
||||
private List<Section> sections;
|
||||
private List<FieldSet> fieldSets;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getOrdinal() {
|
||||
return ordinal;
|
||||
}
|
||||
|
||||
public void setOrdinal(int ordinal) {
|
||||
this.ordinal = ordinal;
|
||||
}
|
||||
|
||||
public boolean isDefaultVisibility() {
|
||||
return defaultVisibility;
|
||||
}
|
||||
|
||||
public void setDefaultVisibility(boolean defaultVisibility) {
|
||||
this.defaultVisibility = defaultVisibility;
|
||||
}
|
||||
|
||||
public String getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(String page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<Section> getSections() {
|
||||
return sections;
|
||||
}
|
||||
|
||||
public void setSections(List<Section> sections) {
|
||||
this.sections = sections;
|
||||
}
|
||||
|
@ -75,6 +88,7 @@ public class Section implements DatabaseViewStyleDefinition,XmlSerializable<Sect
|
|||
public String getExtendedDescription() {
|
||||
return extendedDescription;
|
||||
}
|
||||
|
||||
public void setExtendedDescription(String extendedDescription) {
|
||||
this.extendedDescription = extendedDescription;
|
||||
}
|
||||
|
@ -118,6 +132,7 @@ public class Section implements DatabaseViewStyleDefinition,XmlSerializable<Sect
|
|||
|
||||
return rootElement;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Section fromXml(Element element) {
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package eu.eudat.entities.xmlmodels.datasetprofiledefinition;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import eu.eudat.utilities.XmlSerializable;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import eu.eudat.utilities.XmlSerializable;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class ViewStyleModel implements XmlSerializable<ViewStyleModel> {
|
||||
private List<Section> sections;
|
||||
|
|
|
@ -9,12 +9,15 @@ public class UnauthorisedException extends RuntimeException{
|
|||
public UnauthorisedException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public UnauthorisedException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public UnauthorisedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public UnauthorisedException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,10 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
|||
import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
public final class PrincipalArgumentResolver implements HandlerMethodArgumentResolver {
|
||||
|
@ -39,7 +42,8 @@ public final class PrincipalArgumentResolver implements HandlerMethodArgumentRes
|
|||
|
||||
Principal principal = this.authenticationService.Touch(authToken);
|
||||
if (principal == null) throw new UnauthorisedException("Authentication Information Missing");
|
||||
if (!principal.isAuthorized(claimList)) throw new UnauthorisedException("You are not Authorized For this Action");
|
||||
if (!principal.isAuthorized(claimList))
|
||||
throw new UnauthorisedException("You are not Authorized For this Action");
|
||||
return principal;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,18 @@
|
|||
package eu.eudat.managers;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import eu.eudat.builders.entity.DatasetProfileBuilder;
|
||||
import eu.eudat.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel;
|
||||
import eu.eudat.models.admin.composite.DatasetProfile;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.utilities.builders.ModelBuilder;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
||||
|
||||
import eu.eudat.entities.DatasetProfileViewstyle;
|
||||
import eu.eudat.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel;
|
||||
import eu.eudat.models.admin.components.datasetprofile.FieldSet;
|
||||
import eu.eudat.models.admin.composite.DatasetProfile;
|
||||
import eu.eudat.utilities.builders.ModelBuilder;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import eu.eudat.utilities.helpers.ModelBuilderCollector;
|
||||
import java.util.Date;
|
||||
|
||||
public class AdminManager {
|
||||
|
||||
|
||||
public static eu.eudat.entities.DatasetProfile generateViewStyleDefinition(DatasetProfile profile, ApiContext apiContext) {
|
||||
ViewStyleModel viewStyleModel = new ViewStyleModel();
|
||||
viewStyleModel.setSections(new ModelBuilder().toViewStyleDefinition(profile.getSections(), eu.eudat.entities.xmlmodels.datasetprofiledefinition.Section.class));
|
||||
|
@ -40,12 +31,11 @@ public class AdminManager {
|
|||
|
||||
public static eu.eudat.models.admin.composite.DatasetProfile generateDatasetProfileModel(eu.eudat.entities.DatasetProfile profile) {
|
||||
Document viewStyleDoc = XmlBuilder.fromXml(profile.getDefinition());
|
||||
Element root = (Element) viewStyleDoc.getDocumentElement();
|
||||
Element root = viewStyleDoc.getDocumentElement();
|
||||
eu.eudat.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewstyle = new eu.eudat.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel().fromXml(root);
|
||||
|
||||
eu.eudat.models.admin.composite.DatasetProfile datasetprofile = new eu.eudat.models.admin.composite.DatasetProfile();
|
||||
datasetprofile.buildProfile(viewstyle);
|
||||
|
||||
return datasetprofile;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,16 +3,10 @@ package eu.eudat.managers;
|
|||
import eu.eudat.dao.entities.DMPDao;
|
||||
import eu.eudat.dao.entities.DatasetDao;
|
||||
import eu.eudat.dao.entities.ProjectDao;
|
||||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.entities.Dataset;
|
||||
import eu.eudat.entities.Project;
|
||||
import eu.eudat.entities.UserInfo;
|
||||
import eu.eudat.models.dashboard.DashBoardStatistics;
|
||||
import eu.eudat.models.security.Principal;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class DashBoardManager {
|
||||
|
||||
public DashBoardStatistics getStatistics(DatasetDao datasetRepository, DMPDao dataManagementPlanRepository, ProjectDao projectRepository) {
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package eu.eudat.managers;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import eu.eudat.builders.entity.UserInfoBuilder;
|
||||
import eu.eudat.dao.entities.*;
|
||||
import eu.eudat.entities.*;
|
||||
|
@ -25,6 +21,13 @@ import eu.eudat.queryable.QueryableList;
|
|||
import eu.eudat.services.ApiContext;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class DataManagementPlanManager {
|
||||
|
||||
public DataTableData<DataManagementPlanListingModel> getPaged(ApiContext apiContext, DataManagementPlanTableRequest dataManagementPlanTableRequest, Principal principal) throws Exception {
|
||||
|
|
|
@ -11,7 +11,6 @@ import eu.eudat.models.dmp.DataManagementPlan;
|
|||
import eu.eudat.models.security.Principal;
|
||||
import eu.eudat.queryable.QueryableList;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
|
@ -5,9 +5,9 @@ import eu.eudat.builders.model.models.DataTableDataBuilder;
|
|||
import eu.eudat.dao.entities.ExternalDatasetDao;
|
||||
import eu.eudat.entities.ExternalDataset;
|
||||
import eu.eudat.models.criteria.ExternalDatasetCriteria;
|
||||
import eu.eudat.models.externaldataset.ExternalDatasetListingModel;
|
||||
import eu.eudat.models.externaldataset.ExternalDatasetTableRequest;
|
||||
import eu.eudat.models.helpers.common.DataTableData;
|
||||
import eu.eudat.models.externaldataset.ExternalDatasetListingModel;
|
||||
import eu.eudat.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.proxy.config.exceptions.NoURLFound;
|
||||
import eu.eudat.proxy.fetching.RemoteFetcher;
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package eu.eudat.managers;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import eu.eudat.builders.model.models.ProjectBuilder;
|
||||
import eu.eudat.dao.entities.ProjectDao;
|
||||
import eu.eudat.dao.entities.UserInfoDao;
|
||||
|
@ -25,6 +18,13 @@ import eu.eudat.proxy.fetching.RemoteFetcher;
|
|||
import eu.eudat.queryable.QueryableList;
|
||||
import eu.eudat.services.ApiContext;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ProjectManager {
|
||||
|
||||
public DataTableData<eu.eudat.models.project.ProjectListingModel> getPaged(ProjectDao projectRepository, ProjectTableRequest projectTableRequest) throws Exception {
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.managers;
|
|||
import eu.eudat.entities.Researcher;
|
||||
import eu.eudat.services.ApiContext;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 2/5/2018.
|
||||
*/
|
||||
|
|
|
@ -12,11 +12,10 @@ import eu.eudat.models.userinfo.UserListingModel;
|
|||
import eu.eudat.queryable.QueryableList;
|
||||
import eu.eudat.services.ApiContext;
|
||||
import eu.eudat.services.AuthenticationService;
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import eu.eudat.utilities.builders.XmlBuilder;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import eu.eudat.entities.DataEntity;
|
|||
|
||||
public interface DataModel<T extends DataEntity, M extends DataModel> {
|
||||
M fromDataModel(T entity);
|
||||
|
||||
T toDataModel() throws Exception;
|
||||
|
||||
String getHint();
|
||||
}
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
package eu.eudat.models.admin.components.datasetprofile;
|
||||
|
||||
import eu.eudat.entities.xmlmodels.modeldefinition.*;
|
||||
import eu.eudat.models.project.Project;
|
||||
import eu.eudat.utilities.ModelDefinition;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
|
||||
import eu.eudat.models.components.commons.DefaultValue;
|
||||
import eu.eudat.models.components.commons.Multiplicity;
|
||||
import eu.eudat.models.components.commons.ViewStyle;
|
||||
import eu.eudat.models.components.commons.Visibility;
|
||||
import eu.eudat.utilities.ViewStyleDefinition;
|
||||
import eu.eudat.utilities.builders.ModelBuilder;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -20,8 +15,15 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
public enum ValidationType {
|
||||
NONE((short) 0), REQUIRED((short) 1);
|
||||
private short value;
|
||||
private ValidationType(short value) { this.value = value; }
|
||||
public short getValue(){return value;}
|
||||
|
||||
private ValidationType(short value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public short getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static ValidationType fromInteger(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -32,6 +34,7 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
throw new RuntimeException("Unsupported Project Status");
|
||||
}
|
||||
}
|
||||
|
||||
public static List<ValidationType> fromIntegers(List<Integer> values) {
|
||||
return values.stream().map(ValidationType::fromInteger).collect(Collectors.toList());
|
||||
}
|
||||
|
@ -47,9 +50,11 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
private Object data;
|
||||
private Visibility visible;
|
||||
private List<ValidationType> validations;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
@ -61,21 +66,27 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
public void setOrdinal(int ordinal) {
|
||||
this.ordinal = ordinal;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public ViewStyle getViewStyle() {
|
||||
return viewStyle;
|
||||
}
|
||||
|
||||
public void setViewStyle(ViewStyle viewStyle) {
|
||||
this.viewStyle = viewStyle;
|
||||
}
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
@ -83,12 +94,15 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
public DefaultValue getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public void setDefaultValue(DefaultValue defaultValue) {
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
public String getDatatype() {
|
||||
return datatype;
|
||||
}
|
||||
|
||||
public void setDatatype(String datatype) {
|
||||
this.datatype = datatype;
|
||||
}
|
||||
|
@ -97,6 +111,7 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
@ -105,6 +120,7 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
public Visibility getVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(Visibility visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
@ -130,6 +146,7 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
field.setValidations(this.validations);
|
||||
return field;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromDatabaseDefinition(eu.eudat.entities.xmlmodels.datasetprofiledefinition.Field item) {
|
||||
this.id = item.getId();
|
||||
|
@ -140,6 +157,7 @@ public class Field implements ViewStyleDefinition<eu.eudat.entities.xmlmodels.da
|
|||
this.defaultValue = item.getDefaultValue();
|
||||
this.validations = item.getValidations();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object o) {
|
||||
return this.ordinal.compareTo(((Field) o).ordinal);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue