no message

This commit is contained in:
Ioannis Kalyvas 2018-02-01 11:08:06 +02:00
parent 2f462495a1
commit 86db30e5f3
128 changed files with 126 additions and 388 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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

View File

@ -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{

View File

@ -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")

View File

@ -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

View File

@ -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 {

View File

@ -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;

View File

@ -1,8 +1,6 @@
package eu.eudat.dao;
/**
* Created by ikalyvas on 1/25/2018.
*/
public interface DatabaseAccessLayer<T, I> {
T createOrUpdate(T item);

View File

@ -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

View File

@ -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>> {

View File

@ -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);

View File

@ -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 {

View File

@ -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);

View File

@ -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{

View File

@ -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);

View File

@ -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{

View File

@ -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);

View File

@ -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 {

View File

@ -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);

View File

@ -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 {

View File

@ -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;

View File

@ -1,5 +1,6 @@
package eu.eudat.entities;
import javax.persistence.Tuple;
import java.util.Map;
import java.util.Set;

View File

@ -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\"")

View File

@ -64,5 +64,5 @@ public class DatasetProfileRuleset implements Serializable {
}
}

View File

@ -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>{

View File

@ -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>{

View File

@ -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> {

View File

@ -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>{

View File

@ -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;

View File

@ -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() {

View File

@ -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;

View File

@ -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 {

View File

@ -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{

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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);

View File

@ -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) {

View File

@ -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;

View File

@ -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

View File

@ -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) {

View File

@ -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;

View File

@ -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>{
}

View File

@ -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;

View File

@ -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>{
}

View File

@ -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> {
}

View File

@ -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>{
}

View File

@ -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;

View File

@ -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> {
}

View File

@ -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;

View File

@ -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> {
}

View File

@ -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;

View File

@ -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> {
}

View File

@ -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;

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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;

View File

@ -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;

View File

@ -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>{
}

View File

@ -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() {

View File

@ -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) {

View File

@ -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);
}

View File

@ -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> {
}

View File

@ -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;

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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;

View File

@ -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> {
}

View File

@ -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;

View File

@ -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

View File

@ -1,8 +1,6 @@
package eu.eudat.models.helpers.common;
/**
* Created by ikalyvas on 1/31/2018.
*/
public class SelectionFields {
private String[] fields;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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>{
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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>{
}

View File

@ -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> {
}

View File

@ -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;

View File

@ -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;

View File

@ -35,7 +35,5 @@ public interface QueryableList<T extends DataEntity<T>> {
QueryableList<T> withHint(String hint);
QueryableList<T> withFields(List<String> fields);
Long count();
}

View File

@ -1,8 +1,6 @@
package eu.eudat.queryable.exceptions;
/**
* Created by ikalyvas on 1/30/2018.
*/
public class NotSingleResultException extends RuntimeException{
public NotSingleResultException() {
super();

View File

@ -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);

View File

@ -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 {

Some files were not shown because too many files have changed in this diff Show More