no message
This commit is contained in:
parent
2f462495a1
commit
86db30e5f3
|
@ -11,9 +11,7 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
@SpringBootApplication
|
||||
public class EuDatApplication extends SpringBootServletInitializer {
|
||||
private static final Logger logger = LoggerFactory.getLogger(EuDatApplication.class);
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.configurations;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
|
|
@ -14,9 +14,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
public class WebMVCConfiguration extends WebMvcConfigurerAdapter {
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ import org.springframework.context.ApplicationContext;
|
|||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/2/2018.
|
||||
*/
|
||||
|
||||
public abstract class BaseController {
|
||||
|
||||
private ApiContext apiContext;
|
||||
|
|
|
@ -20,9 +20,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import javax.transaction.Transactional;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
|
|
|
@ -16,9 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
public class ExternalDatasets extends BaseController{
|
||||
|
|
|
@ -18,9 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
@RequestMapping(value = "/auth")
|
||||
|
|
|
@ -18,9 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
@RequestMapping("invite/")
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
|
|
|
@ -16,9 +16,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/22/2017.
|
||||
*/
|
||||
|
||||
@ControllerAdvice
|
||||
public class ControllerErrorHandler {
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.dao;
|
|||
import eu.eudat.dao.databaselayer.service.DatabaseService;
|
||||
import eu.eudat.entities.DataEntity;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/25/2018.
|
||||
*/
|
||||
|
||||
public class DatabaseAccess<T extends DataEntity<T>> {
|
||||
private DatabaseService<T> databaseService;
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.dao;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/25/2018.
|
||||
*/
|
||||
|
||||
public interface DatabaseAccessLayer<T, I> {
|
||||
T createOrUpdate(T item);
|
||||
|
||||
|
|
|
@ -14,9 +14,7 @@ import javax.persistence.criteria.Root;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by giannis on 7/16/2017.
|
||||
*/
|
||||
|
||||
@Repository("databaseCtx")
|
||||
public class DatabaseContext<T extends DataEntity<T>> {
|
||||
@Autowired
|
||||
|
|
|
@ -10,9 +10,7 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by giannis on 7/17/2017.
|
||||
*/
|
||||
|
||||
@Service("databaseService")
|
||||
public class DatabaseService<T extends DataEntity<T>> {
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ import eu.eudat.queryable.QueryableList;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
public interface ExternalDatasetDao extends DatabaseAccessLayer<ExternalDataset, UUID> {
|
||||
|
||||
QueryableList<ExternalDataset> getWithCriteria(ExternalDatasetCriteria criteria);
|
||||
|
|
|
@ -11,9 +11,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
@Component("externalDatasetDao")
|
||||
public class ExternalDatasetDaoImpl extends DatabaseAccess<ExternalDataset> implements ExternalDatasetDao {
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ import eu.eudat.queryable.QueryableList;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
public interface InvitationDao extends DatabaseAccessLayer<Invitation, UUID> {
|
||||
|
||||
QueryableList<Invitation> getWithCriteria(InvitationCriteria criteria);
|
||||
|
|
|
@ -11,9 +11,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
@Service("invitationDao")
|
||||
public class InvitationDaoImpl extends DatabaseAccess<Invitation> implements InvitationDao{
|
||||
|
||||
|
|
|
@ -7,9 +7,7 @@ import eu.eudat.entities.UserRole;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/30/2018.
|
||||
*/
|
||||
|
||||
public interface UserRoleDao extends DatabaseAccessLayer<UserRole, UUID> {
|
||||
|
||||
List<UserRole> getUserRoles(UserInfo userInfo);
|
||||
|
|
|
@ -11,9 +11,7 @@ import org.springframework.stereotype.Component;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/30/2018.
|
||||
*/
|
||||
|
||||
@Component("userRoleDao")
|
||||
public class UserRoleDaoImpl extends DatabaseAccess<UserRole> implements UserRoleDao{
|
||||
|
||||
|
|
|
@ -7,9 +7,7 @@ import eu.eudat.models.login.Credentials;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public interface CredentialDao extends DatabaseAccessLayer<Credential,UUID> {
|
||||
|
||||
Credential getLoggedInCredentials(Credentials credentials);
|
||||
|
|
|
@ -11,9 +11,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
@Component("credentialDao")
|
||||
public class CredentialDaoImpl extends DatabaseAccess<Credential> implements CredentialDao {
|
||||
|
||||
|
|
|
@ -4,9 +4,7 @@ import eu.eudat.entities.UserToken;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public interface UserTokenDao {
|
||||
|
||||
UserToken createOrUpdate(UserToken item);
|
||||
|
|
|
@ -8,9 +8,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
@Component("userTokenDao")
|
||||
public class UserTokenDaoImpl extends DatabaseAccess<UserToken> implements UserTokenDao {
|
||||
|
||||
|
|
|
@ -6,16 +6,12 @@ import javax.persistence.*;
|
|||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
@Entity
|
||||
@Table(name = "\"Credential\"")
|
||||
public class Credential implements DataEntity<Credential> {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
||||
@Column(name = "\"Id\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
||||
private UUID id;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package eu.eudat.entities;
|
||||
|
||||
import javax.persistence.Tuple;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
|
|
@ -6,9 +6,7 @@ import org.hibernate.annotations.Type;
|
|||
import javax.persistence.*;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
|
||||
@Entity
|
||||
@Table(name="\"DatasetExternalDataset\"")
|
||||
|
|
|
@ -9,9 +9,7 @@ import java.util.Date;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
@Entity
|
||||
@Table(name="\"ExternalDataset\"")
|
||||
public class ExternalDataset implements DataEntity<ExternalDataset>{
|
||||
|
|
|
@ -7,9 +7,7 @@ import javax.persistence.*;
|
|||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
@Entity
|
||||
@Table(name="\"Invitation\"")
|
||||
public class Invitation implements DataEntity<Invitation>{
|
||||
|
|
|
@ -6,9 +6,7 @@ import javax.persistence.*;
|
|||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/30/2018.
|
||||
*/
|
||||
|
||||
@Entity
|
||||
@Table(name = "\"UserRole\"")
|
||||
public class UserRole implements DataEntity<UserRole> {
|
||||
|
|
|
@ -4,9 +4,7 @@ import javax.persistence.*;
|
|||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
@Entity
|
||||
@Table(name="\"UserToken\"")
|
||||
public class UserToken implements DataEntity<UserToken>{
|
||||
|
|
|
@ -4,9 +4,7 @@ import eu.eudat.utilities.XmlSerializable;
|
|||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/19/2018.
|
||||
*/
|
||||
|
||||
public class Page implements DatabaseViewStyleDefinition,XmlSerializable<Page> {
|
||||
private String id;
|
||||
private int ordinal;
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.exceptions;
|
|||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/18/2017.
|
||||
*/
|
||||
|
||||
@ResponseStatus(value = HttpStatus.UNAUTHORIZED)
|
||||
public class UnauthorisedException extends RuntimeException{
|
||||
public UnauthorisedException() {
|
||||
|
|
|
@ -16,9 +16,7 @@ import java.util.*;
|
|||
|
||||
import static eu.eudat.types.Authorities.USER;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public final class PrincipalArgumentResolver implements HandlerMethodArgumentResolver {
|
||||
|
||||
private AuthenticationService authenticationService;
|
||||
|
|
|
@ -24,9 +24,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public class DatasetManager {
|
||||
|
||||
public DataTableData<DatasetListingModel> getPaged(ApiContext apiContext, DatasetTableRequest datasetTableRequest, Principal principal) throws Exception {
|
||||
|
|
|
@ -12,9 +12,7 @@ import eu.eudat.utilities.builders.DomainModelConverter;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetProfileManager {
|
||||
|
||||
public static List<DatasetProfileAutocompleteItem> getWithCriteria(DatasetProfileDao datasetProfileRepository, DatasetProfileAutocompleteRequest datasetProfileAutocompleteRequest) throws IllegalAccessException, InstantiationException{
|
||||
|
|
|
@ -21,9 +21,7 @@ import java.util.List;
|
|||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetWizardManager {
|
||||
|
||||
public static List<DataManagentPlanListingModel> getUserDmps(DMPDao dmpRepository, DatasetWizardAutocompleteRequest datasetWizardAutocompleteRequest, Principal principal) throws InstantiationException, IllegalAccessException {
|
||||
|
|
|
@ -15,9 +15,7 @@ import eu.eudat.utilities.builders.DomainModelConverter;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
public class ExternalDatasetManager {
|
||||
|
||||
public DataTableData<ExternalDatasetListingModel> getPaged(ExternalDatasetDao externalDatasetDao, ExternalDatasetTableRequest externalDatasetTableRequest) throws Exception {
|
||||
|
|
|
@ -17,9 +17,7 @@ import java.util.List;
|
|||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
public class InvitationsManager {
|
||||
|
||||
public static void inviteUsers(ApiContext apiContext, Invitation invitation, Principal principal) throws Exception {
|
||||
|
|
|
@ -38,9 +38,6 @@ public class UserManager {
|
|||
public static DataTableData<UserListingModel> getPaged(UserInfoDao userInfoDao, UserInfoTableRequestItem userInfoTableRequestItem) throws Exception {
|
||||
QueryableList<eu.eudat.entities.UserInfo> users = userInfoDao.getWithCriteria(userInfoTableRequestItem.getCriteria());
|
||||
QueryableList<eu.eudat.entities.UserInfo> pagedUsers = PaginationManager.applyPaging(users, userInfoTableRequestItem);
|
||||
if (userInfoTableRequestItem.getSelection() != null && userInfoTableRequestItem.getSelection().getFields() != null) {
|
||||
pagedUsers.withFields(Arrays.asList(userInfoTableRequestItem.getSelection().getFields()));
|
||||
}
|
||||
List<UserListingModel> modelUsers = new DomainModelConverter<eu.eudat.entities.UserInfo, UserListingModel>().fromDataModel(pagedUsers.toList(), UserListingModel.class);
|
||||
DataTableData<UserListingModel> dataTableData = new DataTableData<>();
|
||||
dataTableData.setData(modelUsers);
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.models;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/18/2018.
|
||||
*/
|
||||
|
||||
public class HintedModelFactory {
|
||||
|
||||
public static <T extends DataModel> String getHint(Class<T> clazz) {
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.models.admin.components.datasetprofile;
|
|||
import eu.eudat.entities.xmlmodels.datasetprofiledefinition.*;
|
||||
import eu.eudat.utilities.ViewStyleDefinition;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/19/2018.
|
||||
*/
|
||||
|
||||
public class Page implements Comparable,ViewStyleDefinition<eu.eudat.entities.xmlmodels.datasetprofiledefinition.Page> {
|
||||
private String id;
|
||||
private Integer ordinal;
|
||||
|
|
|
@ -6,9 +6,7 @@ import org.w3c.dom.Element;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/3/2018.
|
||||
*/
|
||||
|
||||
public class FreeTextData extends FieldData<FreeTextData> {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,9 +5,7 @@ import org.w3c.dom.Element;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/3/2018.
|
||||
*/
|
||||
|
||||
public class TextAreaData extends FieldData<TextAreaData>{
|
||||
@Override
|
||||
public TextAreaData fromData(Object data) {
|
||||
|
|
|
@ -6,9 +6,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public class DatasetCriteria extends Criteria<Dataset>{
|
||||
private Integer status;
|
||||
private Date periodStart;
|
||||
|
|
|
@ -2,8 +2,6 @@ package eu.eudat.models.criteria;
|
|||
|
||||
import eu.eudat.entities.DatasetProfile;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetProfileCriteria extends Criteria<DatasetProfile>{
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ import eu.eudat.entities.DatasetProfile;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetProfileWizardCriteria extends Criteria<DatasetProfile> {
|
||||
private UUID id;
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.models.criteria;
|
|||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.models.dmp.DataManagementPlan;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetWizardUserDmpCriteria extends Criteria<DMP>{
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ package eu.eudat.models.criteria;
|
|||
|
||||
import eu.eudat.entities.ExternalDataset;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
public class ExternalDatasetCriteria extends Criteria<ExternalDataset> {
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ package eu.eudat.models.criteria;
|
|||
|
||||
import eu.eudat.entities.Invitation;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
public class InvitationCriteria extends Criteria<Invitation>{
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@ package eu.eudat.models.criteria;
|
|||
|
||||
import eu.eudat.entities.UserInfo;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
public class UserInfoCriteria extends Criteria<UserInfo> {
|
||||
private String email;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ import eu.eudat.models.criteria.ProjectCriteria;
|
|||
import eu.eudat.models.helpers.requests.RequestItem;
|
||||
import eu.eudat.models.helpers.requests.TableRequest;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public class DatasetTableRequest extends TableRequest<DatasetCriteria> {
|
||||
}
|
||||
|
|
|
@ -5,9 +5,7 @@ import eu.eudat.models.DataModel;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetProfileAutocompleteItem implements DataModel<DatasetProfile> {
|
||||
|
||||
private UUID id;
|
||||
|
|
|
@ -5,8 +5,6 @@ import eu.eudat.models.criteria.DatasetProfileWizardCriteria;
|
|||
import eu.eudat.models.criteria.DatasetWizardUserDmpCriteria;
|
||||
import eu.eudat.models.helpers.requests.RequestItem;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetProfileAutocompleteRequest extends RequestItem<DatasetProfileCriteria> {
|
||||
}
|
||||
|
|
|
@ -13,9 +13,7 @@ import java.util.Date;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public class DatasetProfileListingModel implements DataModel<DatasetProfile> {
|
||||
|
||||
private UUID id;
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.models.datasetprofile;
|
|||
import eu.eudat.models.criteria.DatasetProfileCriteria;
|
||||
import eu.eudat.models.helpers.requests.TableRequest;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/2/2018.
|
||||
*/
|
||||
|
||||
public class DatasetProfileTableRequestItem extends TableRequest<DatasetProfileCriteria> {
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.models.datasetwizard;
|
|||
import eu.eudat.entities.DMP;
|
||||
import eu.eudat.models.DataModel;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DataManagentPlanListingModel implements DataModel<DMP>{
|
||||
|
||||
private String id;
|
||||
|
|
|
@ -4,8 +4,6 @@ import eu.eudat.models.criteria.DatasetProfileWizardCriteria;
|
|||
import eu.eudat.models.datasetprofile.DatasetProfileAutocompleteRequest;
|
||||
import eu.eudat.models.helpers.requests.RequestItem;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetProfileWizardAutocompleteRequest extends RequestItem<DatasetProfileWizardCriteria> {
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.models.datasetwizard;
|
|||
import eu.eudat.models.criteria.DatasetWizardUserDmpCriteria;
|
||||
import eu.eudat.models.helpers.requests.RequestItem;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class DatasetWizardAutocompleteRequest extends RequestItem<DatasetWizardUserDmpCriteria> {
|
||||
}
|
||||
|
|
|
@ -19,9 +19,7 @@ import eu.eudat.utilities.builders.DomainModelConverter;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/22/2017.
|
||||
*/
|
||||
|
||||
public class DatasetWizardModel implements DataModel<Dataset> {
|
||||
|
||||
private UUID id;
|
||||
|
|
|
@ -6,9 +6,7 @@ import org.w3c.dom.Element;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/20/2017.
|
||||
*/
|
||||
|
||||
public class AssociatedProfile implements XmlSerializable<AssociatedProfile>{
|
||||
private UUID id;
|
||||
private String label;
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.models.dmp;
|
|||
import eu.eudat.models.criteria.DataManagementPlanCriteria;
|
||||
import eu.eudat.models.helpers.requests.RequestItem;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class DataManagementPlanCriteriaRequest extends RequestItem<DataManagementPlanCriteria>{
|
||||
}
|
||||
|
|
|
@ -5,9 +5,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/22/2017.
|
||||
*/
|
||||
|
||||
public class ValidationErrorContext extends HashMap<String,String>{
|
||||
|
||||
public ValidationErrorContext() {
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.models.external;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
public class ExternalDatasetModel extends ExternalListingItem<ExternalDatasetModel> {
|
||||
@Override
|
||||
public ExternalDatasetModel fromExternalItem(List<Map<String, String>> values) {
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.models.external;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public interface ExternalItem<T> {
|
||||
T fromExternalItem(List<Map<String,String>> values);
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.models.external;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public abstract class ExternalListingItem<T> extends ArrayList<ExternalSourcesItemModel> implements ExternalItem<T> {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.models.external;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class ExternalSourcesItemModel{
|
||||
private String id;
|
||||
private String name;
|
||||
|
|
|
@ -4,9 +4,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class OrganisationsExternalSourcesModel extends ExternalListingItem<OrganisationsExternalSourcesModel>{
|
||||
@Override
|
||||
public OrganisationsExternalSourcesModel fromExternalItem(List<Map<String,String>> values) {
|
||||
|
|
|
@ -4,9 +4,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class ProjectsExternalSourcesModel extends ExternalListingItem<ProjectsExternalSourcesModel> {
|
||||
@Override
|
||||
public ProjectsExternalSourcesModel fromExternalItem(List<Map<String,String>> values) {
|
||||
|
|
|
@ -4,9 +4,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class RegistriesExternalSourcesModel extends ExternalListingItem<RegistriesExternalSourcesModel> {
|
||||
@Override
|
||||
public RegistriesExternalSourcesModel fromExternalItem(List<Map<String,String>> values) {
|
||||
|
|
|
@ -4,9 +4,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class ResearchersExternalSourcesModel extends ExternalListingItem<ResearchersExternalSourcesModel> {
|
||||
@Override
|
||||
public ResearchersExternalSourcesModel fromExternalItem(List<Map<String,String>> values) {
|
||||
|
|
|
@ -4,9 +4,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class ServiceExternalSourcesModel extends ExternalListingItem<ServiceExternalSourcesModel> {
|
||||
@Override
|
||||
public ServiceExternalSourcesModel fromExternalItem(List<Map<String,String>> values) {
|
||||
|
|
|
@ -7,9 +7,7 @@ import javax.persistence.Column;
|
|||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
public class ExternalDatasetListingModel implements DataModel<ExternalDataset> {
|
||||
|
||||
private UUID id;
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.models.externaldataset;
|
|||
import eu.eudat.models.criteria.ExternalDatasetCriteria;
|
||||
import eu.eudat.models.helpers.requests.TableRequest;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
public class ExternalDatasetTableRequest extends TableRequest<ExternalDatasetCriteria> {
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.models.helpers.common;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/25/2018.
|
||||
*/
|
||||
|
||||
public class ColumnOrderings {
|
||||
|
||||
private String[] fields;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.models.helpers.common;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/25/2018.
|
||||
*/
|
||||
|
||||
public class Ordering {
|
||||
public enum OrderByType {
|
||||
ASC, DESC
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.models.helpers.common;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/31/2018.
|
||||
*/
|
||||
|
||||
public class SelectionFields {
|
||||
|
||||
private String[] fields;
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.models.helpers.responses;
|
|||
import eu.eudat.types.ApiMessageCode;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public class ResponseItem<T> {
|
||||
private Integer statusCode;
|
||||
private String message;
|
||||
|
|
|
@ -6,9 +6,7 @@ import eu.eudat.models.userinfo.UserInfoInvitationModel;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
public class Invitation {
|
||||
private UUID dataManagementPlan;
|
||||
private List<UserInfoInvitationModel> users;
|
||||
|
|
|
@ -12,9 +12,7 @@ import eu.eudat.utilities.helpers.LabelGenerator;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class DataManagementPlanListingModel implements DataModel<DMP> {
|
||||
private String id;
|
||||
private String label;
|
||||
|
|
|
@ -21,9 +21,7 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/19/2017.
|
||||
*/
|
||||
|
||||
public class DatasetListingModel implements DataModel<Dataset> {
|
||||
private String id;
|
||||
private String label;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.models.login;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public class Credentials {
|
||||
private String username;
|
||||
private String secret;
|
||||
|
|
|
@ -2,9 +2,7 @@ package eu.eudat.models.login;
|
|||
|
||||
import eu.eudat.security.validators.TokenValidatorFactoryImpl;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/18/2017.
|
||||
*/
|
||||
|
||||
public class LoginInfo {
|
||||
private String ticket;
|
||||
private TokenValidatorFactoryImpl.LoginProvider provider;
|
||||
|
|
|
@ -2,9 +2,7 @@ package eu.eudat.models.loginprovider;
|
|||
|
||||
import eu.eudat.security.validators.TokenValidatorFactoryImpl;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/9/2018.
|
||||
*/
|
||||
|
||||
public class LoginProviderUser {
|
||||
private String name;
|
||||
private String email;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.models.mail;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/5/2018.
|
||||
*/
|
||||
|
||||
public class SimpleMail {
|
||||
private String from;
|
||||
private String to;
|
||||
|
|
|
@ -6,9 +6,7 @@ import eu.eudat.models.DataModel;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/15/2018.
|
||||
*/
|
||||
|
||||
public class ProjectCriteriaModel implements DataModel<eu.eudat.entities.Project> {
|
||||
private UUID id;
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.models.project;
|
|||
import eu.eudat.models.criteria.ProjectCriteria;
|
||||
import eu.eudat.models.helpers.requests.RequestItem;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/18/2017.
|
||||
*/
|
||||
|
||||
public class ProjectCriteriaRequest extends RequestItem<ProjectCriteria>{
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ import eu.eudat.models.user.components.datasetprofile.*;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/19/2018.
|
||||
*/
|
||||
|
||||
public class DatasetProfilePage {
|
||||
private Integer ordinal;
|
||||
private String title;
|
||||
|
|
|
@ -7,9 +7,7 @@ import eu.eudat.types.Authorities;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 12/15/2017.
|
||||
*/
|
||||
|
||||
public class Principal {
|
||||
private UUID id;
|
||||
private UUID token;
|
||||
|
|
|
@ -3,9 +3,7 @@ package eu.eudat.models.user.composite;
|
|||
import eu.eudat.models.user.components.datasetprofile.Section;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/19/2018.
|
||||
*/
|
||||
|
||||
public class DatasetProfilePage {
|
||||
private Integer ordinal;
|
||||
private String title;
|
||||
|
|
|
@ -9,9 +9,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/19/2018.
|
||||
*/
|
||||
|
||||
public class PagedDatasetProfile implements PropertiesGenerator {
|
||||
private List<DatasetProfilePage> pages;
|
||||
private List<Rule> rules;
|
||||
|
|
|
@ -6,9 +6,7 @@ import eu.eudat.models.DataModel;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
public class UserInfoInvitationModel implements DataModel<eu.eudat.entities.UserInfo>{
|
||||
private UUID id;
|
||||
private String email;
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.models.userinfo;
|
|||
import eu.eudat.models.criteria.UserInfoCriteria;
|
||||
import eu.eudat.models.helpers.requests.RequestItem;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/4/2018.
|
||||
*/
|
||||
|
||||
public class UserInfoRequestItem extends RequestItem<UserInfoCriteria>{
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@ package eu.eudat.models.userinfo;
|
|||
import eu.eudat.models.criteria.UserInfoCriteria;
|
||||
import eu.eudat.models.helpers.requests.TableRequest;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/31/2018.
|
||||
*/
|
||||
|
||||
public class UserInfoTableRequestItem extends TableRequest<UserInfoCriteria> {
|
||||
}
|
||||
|
|
|
@ -9,9 +9,7 @@ import java.util.List;
|
|||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/31/2018.
|
||||
*/
|
||||
|
||||
public class UserListingModel implements DataModel<eu.eudat.entities.UserInfo> {
|
||||
|
||||
private UUID id;
|
||||
|
|
|
@ -7,9 +7,7 @@ import javax.xml.bind.annotation.XmlElement;
|
|||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/17/2018.
|
||||
*/
|
||||
|
||||
public class DatasetUrls {
|
||||
List<UrlConfig> urls;
|
||||
FetchStrategy fetchMode;
|
||||
|
|
|
@ -35,7 +35,5 @@ public interface QueryableList<T extends DataEntity<T>> {
|
|||
|
||||
QueryableList<T> withHint(String hint);
|
||||
|
||||
QueryableList<T> withFields(List<String> fields);
|
||||
|
||||
Long count();
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.queryable.exceptions;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/30/2018.
|
||||
*/
|
||||
|
||||
public class NotSingleResultException extends RuntimeException{
|
||||
public NotSingleResultException() {
|
||||
super();
|
||||
|
|
|
@ -24,7 +24,7 @@ public class QueryableHibernateList<T extends DataEntity<T>> implements Queryabl
|
|||
private Root<T> root;
|
||||
private List<Predicate> predicates = new LinkedList<Predicate>();
|
||||
private List<Order> orderings = new LinkedList<>();
|
||||
private List<Selection<?>> fields = new LinkedList<>();
|
||||
private List<Selection> fields = new LinkedList<>();
|
||||
private Integer length;
|
||||
private Integer offset;
|
||||
private Set<String> hints;
|
||||
|
@ -103,14 +103,6 @@ public class QueryableHibernateList<T extends DataEntity<T>> implements Queryabl
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryableList<T> withFields(List<String> fields) {
|
||||
for (String field : fields) {
|
||||
this.fields.add(this.root.get(field));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long count() {
|
||||
CriteriaBuilder criteriaBuilder = this.manager.getCriteriaBuilder();
|
||||
CriteriaQuery<Long> criteriaQuery = criteriaBuilder.createQuery(Long.class);
|
||||
|
@ -123,8 +115,6 @@ public class QueryableHibernateList<T extends DataEntity<T>> implements Queryabl
|
|||
|
||||
this.query.where(this.predicates.toArray(new Predicate[this.predicates.size()]));
|
||||
if (!this.orderings.isEmpty()) this.query.orderBy(this.orderings);
|
||||
if (this.fields != null && !this.fields.isEmpty()) this.query.multiselect(this.fields);
|
||||
|
||||
TypedQuery<T> typedQuery = this.manager.createQuery(this.query);
|
||||
if (this.offset != null) typedQuery.setFirstResult(this.offset);
|
||||
if (this.length != null) typedQuery.setMaxResults(this.length);
|
||||
|
|
|
@ -10,9 +10,7 @@ import java.lang.annotation.Target;
|
|||
|
||||
import static eu.eudat.types.Authorities.USER;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/30/2018.
|
||||
*/
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.PARAMETER)
|
||||
public @interface ClaimedAuthorities {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package eu.eudat.security.validators;
|
||||
|
||||
/**
|
||||
* Created by ikalyvas on 1/9/2018.
|
||||
*/
|
||||
|
||||
public interface TokenValidatorFactory {
|
||||
TokenValidator getProvider(TokenValidatorFactoryImpl.LoginProvider provider);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue