Skip to content

Commit

Permalink
Merge pull request #742 from OHDSI/merge_qa_1.8.0_to_master
Browse files Browse the repository at this point in the history
Merge qa 1.8.0 to master
  • Loading branch information
dmitrys-odysseus authored Aug 10, 2021
2 parents c6706f4 + e4eedb0 commit de63ba2
Show file tree
Hide file tree
Showing 73 changed files with 681 additions and 517 deletions.
6 changes: 0 additions & 6 deletions .idea/copyright/copyright.xml

This file was deleted.

100 changes: 30 additions & 70 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,34 @@

<artifactId>portal</artifactId>
<groupId>com.odysseusinc.arachne</groupId>
<version>1.17.1</version>
<version>1.18.0</version>
<packaging>jar</packaging>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.22.RELEASE</version>
<version>2.1.18.RELEASE</version>
<relativePath/>
</parent>

<properties>
<spring.boot.version>1.5.22.RELEASE</spring.boot.version>
<spring.boot.version>2.1.18.RELEASE</spring.boot.version>
<start-class>com.odysseusinc.arachne.portal.PortalStarter</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<jjwt.version>0.10.8</jjwt.version>
<activemq.version>5.15.14</activemq.version>
<assertj.version>3.13.2</assertj.version>
<assertj.version>3.19.0</assertj.version>
<build.id>${BUILD_TIMESTAMP}</build.id>
<build.number>${BUILD_NUMBER}</build.number>
<clamav.version>2.0.1</clamav.version>
<commons.fileupload.version>1.4</commons.fileupload.version>
<commons.io.version>2.8.0</commons.io.version>
<commons.lang3.version>3.11</commons.lang3.version>
<commonsCsv.version>1.7</commonsCsv.version>
<dockerImagePrefix>hub.odysseusinc.com</dockerImagePrefix>
<ehcache.version>1.3.0</ehcache.version>
<gson.version>2.7</gson.version>
<hibernate.version>5.2.12.Final</hibernate.version>
<hikaricp.version>2.6.3</hikaricp.version>
<jackson.version>2.10.5.20201202</jackson.version>
<jodConverter.version>4.2.0</jodConverter.version>
<postgresql.version>42.2.15</postgresql.version>
<jodConverter.version>4.3.0</jodConverter.version>
<postgresql.version>42.2.19</postgresql.version>
<springRetryVersion>1.2.4.RELEASE</springRetryVersion>
<bcprov-jdk15on.version>1.68</bcprov-jdk15on.version>
</properties>
Expand Down Expand Up @@ -97,26 +92,11 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<dependency>
<artifactId>solr-solrj</artifactId>
<groupId>org.apache.solr</groupId>
<version>7.7.3</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.ohdsi</groupId>
<artifactId>authenticator</artifactId>
Expand All @@ -125,7 +105,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down Expand Up @@ -159,12 +138,6 @@
<artifactId>arachne-sys-settings</artifactId>
<groupId>com.odysseusinc.arachne</groupId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.odysseusinc.arachne</groupId>
Expand All @@ -175,32 +148,26 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring.boot.version}</version>
<exclusions>
<exclusion>
<groupId>org.assertj</groupId>
Expand All @@ -211,7 +178,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
Expand All @@ -221,12 +187,15 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
</dependency>

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand All @@ -235,7 +204,6 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons.lang3.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
Expand Down Expand Up @@ -290,12 +258,8 @@
<groupId>org.apache.solr</groupId>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

<dependency>
Expand All @@ -315,17 +279,12 @@
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>${hikaricp.version}</version>
</dependency>

<dependency>
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.5.3</version>
<version>2.7.0</version>
<type>jar</type>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -365,7 +324,7 @@
<dependency>
<groupId>com.cosium.spring.data</groupId>
<artifactId>spring-data-jpa-entity-graph</artifactId>
<version>1.11.03</version>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.jodconverter</groupId>
Expand Down Expand Up @@ -473,6 +432,7 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
Expand All @@ -485,7 +445,7 @@
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<version>1.2.2</version>
<configuration>
<imageName>${dockerImagePrefix}/${project.artifactId}</imageName>
<imageTags>
Expand Down Expand Up @@ -566,8 +526,8 @@

<repositories>
<repository>
<id>odysseus.community.snapshots</id>
<name>Odysseus community snapshots</name>
<id>community-libs-snapshot-local</id>
<name>community-libs-snapshot-local</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
Expand All @@ -576,11 +536,11 @@
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<url>http://repo.odysseusinc.com/artifactory/community-libs-snapshot-local</url>
<url>https://nexus.odysseusinc.com/repository/community-libs-snapshot-local</url>
</repository>
<repository>
<id>odysseus.community.releases</id>
<name>Odysseus community releases</name>
<id>community-libs-release-local</id>
<name>community-libs-release-local</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
Expand All @@ -589,7 +549,7 @@
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<url>http://repo.odysseusinc.com/artifactory/community-libs-release-local</url>
<url>https://nexus.odysseusinc.com/repository/community-libs-release-local</url>
</repository>
<repository>
<id>ohdsi</id>
Expand All @@ -616,14 +576,14 @@

<distributionManagement>
<snapshotRepository>
<id>artifactory</id>
<name>Odysseus community snapshots</name>
<url>http://repo.odysseusinc.com/artifactory/community-libs-snapshot-local</url>
<id>community-libs-snapshot-local</id>
<name>community-libs-snapshot-local</name>
<url>https://nexus.odysseusinc.com/repository/community-libs-snapshot-local</url>
</snapshotRepository>
<repository>
<id>artifactory</id>
<name>Odysseus community releases</name>
<url>http://repo.odysseusinc.com/artifactory/community-libs-release-local</url>
<id>community-libs-release-local</id>
<name>community-libs-release-local</name>
<url>https://nexus.odysseusinc.com/repository/community-libs-release-local</url>
</repository>
</distributionManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import com.cosium.spring.data.jpa.entity.graph.repository.support.EntityGraphJpaRepositoryFactoryBean;
import com.odysseusinc.arachne.system.settings.config.SpringPropertiesConfig;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
Expand All @@ -34,20 +35,21 @@
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;

@Configuration
@ComponentScan(
basePackages = {"com.odysseusinc.arachne.*", "org.ohdsi.authenticator.*"},
excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = "com.odysseusinc.arachne.system.settings.config.SpringPropertiesConfig")
)

@EnableAutoConfiguration
@EnableScheduling
@EnableJpaRepositories(
repositoryFactoryBeanClass = EntityGraphJpaRepositoryFactoryBean.class,
basePackages = {"com.odysseusinc.arachne.*"}
)
@EnableAspectJAutoProxy
@EnableEncryptableProperties
@EnableJms
@EntityScan(basePackages = {"com.odysseusinc.arachne.*"})
public class PortalStarter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public ResponseEntity<List<CommonAchillesReportDTO>> listReports() throws NotExi

protected DS checkDataSource(Long datasourceId) throws NotExistException {

DS dataSource = rawDataSourceRepository.findOne(datasourceId);
DS dataSource = rawDataSourceRepository.getOne(datasourceId);
if (dataSource == null) {
String message = String.format("Datasource with id: '%s' not found", datasourceId);
throw new NotExistException(message, dataSourceClass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public Page<DeletableUserWithTenantsDTO> getAll(

final Page<U> users = userService.getPage(pageable, userSearch);
final DeletableUserWithTenantsListDTO userDtoList = conversionService.convert(users.getContent(), DeletableUserWithTenantsListDTO.class);
return new CustomPageImpl<>(userDtoList, new PageRequest(pageable.getPageNumber() - 1, pageable.getPageSize()), users.getTotalElements());
return new CustomPageImpl<>(userDtoList, PageRequest.of(pageable.getPageNumber() - 1, pageable.getPageSize()), users.getTotalElements());
}

@ApiOperation("Register new users")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public JsonResult<SubmissionInsightDTO> getSubmissionInsight(
}
final SubmissionInsight insight = submissionInsightService.getSubmissionInsight(submissionId);
final SubmissionInsightDTO insightDTO = conversionService.convert(insight, SubmissionInsightDTO.class);
final Set<CommentTopic> recentTopics = submissionInsightService.getInsightComments(insight, size, new Sort(order, "id"));
final Set<CommentTopic> recentTopics = submissionInsightService.getInsightComments(insight, size, Sort.by(order, "id"));
final List<Commentable> recentCommentables = getRecentCommentables(conversionService, recentTopics, insightDTO);
insightDTO.setRecentCommentEntities(recentCommentables);
final JsonResult<SubmissionInsightDTO> result = new JsonResult<>(NO_ERROR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,13 @@ public List<SubmissionInsightDTO> getStudyInsights(

List<SubmissionInsightDTO> submissionInsightDTOS = new ArrayList<>();

Pageable pageRequest = new PageRequest(0, size, new Sort(order, "created"));
Pageable pageRequest = PageRequest.of(0, size, Sort.by(order, "created"));
final Page<SubmissionInsight> page = submissionInsightService.getInsightsByStudyId(studyId, pageRequest);
final List<SubmissionInsight> insights = page.getContent();
for (int i = 0; i < insights.size(); i++) {
final SubmissionInsight insight = insights.get(i);
final Set<CommentTopic> recentTopics = submissionInsightService.getInsightComments(insight,
commentsPerInsight, new Sort(Sort.Direction.DESC, "id"));
commentsPerInsight, Sort.by(Sort.Direction.DESC, "id"));
final SubmissionInsightDTO insightDTO = conversionService.convert(insight, SubmissionInsightDTO.class);
final List<Commentable> recentCommentables = getRecentCommentables(conversionService, recentTopics,
insightDTO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,17 @@ public void downloadAllSubmissionResultFiles(
@PathVariable("submissionId") Long submissionId,
HttpServletResponse response) throws PermissionDeniedException, NotExistException, IOException {

String archiveName = "submission_result_" + submissionId + "_"
+ System.currentTimeMillis()
+ ".zip";
final Submission submission = submissionService.getSubmissionById(submissionId);
final String analysisTypeCode = submission.getSubmissionGroup().getAnalysis().getType().getCode();
final String archiveName = String.format("%s_submission_result_%s_%s.zip", analysisTypeCode, submissionId,
System.currentTimeMillis());

String contentType = "application/zip, application/octet-stream";
response.setContentType(contentType);
response.setHeader("Content-type", contentType);
response.setHeader("Content-Disposition",
"attachment; filename=" + archiveName);

Submission submission = submissionService.getSubmissionById(submissionId);
IUser user = userService.getByUsername(principal.getName());
submissionService
.getSubmissionResultAllFiles(user, submission.getSubmissionGroup().getAnalysis().getId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@

package com.odysseusinc.arachne.portal.api.v1.dto;

import com.odysseusinc.arachne.portal.api.v1.dto.converters.study.StudyTitle;
import com.odysseusinc.arachne.portal.model.StudyKind;
import java.util.LinkedList;
import java.util.List;

public class CommonStudyDTO {
public Long id;

@StudyTitle
private String title;

private List<DataSourceDTO> dataSources = new LinkedList<>();
Expand Down
Loading

0 comments on commit de63ba2

Please sign in to comment.