Skip to content

Commit

Permalink
Change project structure and pom.xml, and group.id
Browse files Browse the repository at this point in the history
* Change project structure and pom.xml, and group.id
  • Loading branch information
ramueSVA authored Apr 2, 2024
1 parent ccc5927 commit 9208b50
Show file tree
Hide file tree
Showing 283 changed files with 1,356 additions and 1,326 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<modelVersion>4.0.0</modelVersion>

<groupId>de.vitagroup.num-portal</groupId>
<groupId>org.highmed.num-portal</groupId>
<artifactId>num-portal</artifactId>
<version>1.17.0-SNAPSHOT</version>

Expand Down
6 changes: 0 additions & 6 deletions src/main/java/de/vitagroup/num/domain/model/Type.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package de.vitagroup.num;
package org.highmed;

import de.vitagroup.num.service.atna.AtnaProperties;


import org.highmed.service.atna.AtnaProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.vitagroup.num.attachment;
package org.highmed.attachment;

import de.vitagroup.num.attachment.domain.dto.AttachmentDto;
import de.vitagroup.num.attachment.domain.model.Attachment;
import org.highmed.attachment.domain.dto.AttachmentDto;
import org.highmed.attachment.domain.model.Attachment;

import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.attachment.domain.dto;
package org.highmed.attachment.domain.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.attachment.domain.dto;
package org.highmed.attachment.domain.dto;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.attachment.domain.model;
package org.highmed.attachment.domain.model;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package de.vitagroup.num.attachment.domain.repository;
package org.highmed.attachment.domain.repository;

import de.vitagroup.num.attachment.AttachmentRepository;
import de.vitagroup.num.attachment.domain.dto.AttachmentDto;
import de.vitagroup.num.attachment.domain.model.Attachment;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.highmed.attachment.AttachmentRepository;
import org.highmed.attachment.domain.dto.AttachmentDto;
import org.highmed.attachment.domain.model.Attachment;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.vitagroup.num.attachment.domain.repository;
package org.highmed.attachment.domain.repository;

import de.vitagroup.num.attachment.domain.model.Attachment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
Expand All @@ -11,22 +10,22 @@
import java.util.Optional;

@Repository
public interface AttachmentRepositoryJpa extends JpaRepository<Attachment, Long> {
public interface AttachmentRepositoryJpa extends JpaRepository<org.highmed.attachment.domain.model.Attachment, Long> {

@Query("SELECT new Attachment (atc.id, atc.name, atc.description, atc.uploadDate, atc.reviewCounter) " +
"FROM Attachment atc ")
List<Attachment> getAttachments();
List<org.highmed.attachment.domain.model.Attachment> getAttachments();

@Modifying
@Query("UPDATE Attachment atch SET atch.reviewCounter = atch.reviewCounter + 1 WHERE atch.projectId = :projectId")
void updateReviewCounterByProjectId(@Param("projectId") Long projectId);

Optional<Attachment> findByIdAndProjectId(Long id, Long projectId);
Optional<org.highmed.attachment.domain.model.Attachment> findByIdAndProjectId(Long id, Long projectId);

@Query("SELECT new Attachment (atc.id, atc.name, atc.description, atc.uploadDate, atc.reviewCounter) " +
"FROM Attachment atc " +
"WHERE atc.projectId = :projectId")
List<Attachment> findAttachmentsByProjectId(@Param("projectId") Long projectId);
List<org.highmed.attachment.domain.model.Attachment> findAttachmentsByProjectId(@Param("projectId") Long projectId);

@Modifying
@Query("DELETE FROM Attachment atch WHERE atch.projectId = :projectId")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package de.vitagroup.num.attachment.service;

import de.vitagroup.num.attachment.AttachmentRepository;
import de.vitagroup.num.attachment.domain.dto.AttachmentDto;
import de.vitagroup.num.attachment.domain.dto.LightAttachmentDto;
import de.vitagroup.num.attachment.domain.model.Attachment;
import de.vitagroup.num.domain.model.Project;
import de.vitagroup.num.domain.model.ProjectStatus;
import de.vitagroup.num.domain.templates.ExceptionsTemplate;
import de.vitagroup.num.service.ProjectService;
import de.vitagroup.num.service.exception.BadRequestException;
import de.vitagroup.num.service.exception.ForbiddenException;
import de.vitagroup.num.service.exception.ResourceNotFound;
import de.vitagroup.num.web.controller.NumAttachmentController;
package org.highmed.attachment.service;

import org.highmed.domain.model.Project;
import org.highmed.domain.model.ProjectStatus;
import org.highmed.domain.templates.ExceptionsTemplate;
import org.highmed.service.ProjectService;
import org.highmed.service.exception.BadRequestException;
import org.highmed.service.exception.ForbiddenException;
import org.highmed.service.exception.ResourceNotFound;
import org.highmed.web.controller.NumAttachmentController;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.highmed.attachment.AttachmentRepository;
import org.highmed.attachment.domain.dto.AttachmentDto;
import org.highmed.attachment.domain.dto.LightAttachmentDto;
import org.highmed.attachment.domain.model.Attachment;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
Expand All @@ -30,7 +30,7 @@
import java.util.Set;
import java.util.stream.Collectors;

import static de.vitagroup.num.domain.templates.ExceptionsTemplate.*;
import static org.highmed.domain.templates.ExceptionsTemplate.*;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.vitagroup.num.attachment.service;
package org.highmed.attachment.service;

import de.vitagroup.num.properties.ClamAVProperties;
import de.vitagroup.num.service.exception.SystemException;
import org.highmed.properties.ClamAVProperties;
import org.highmed.service.exception.SystemException;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package de.vitagroup.num.attachment.service;
package org.highmed.attachment.service;

import de.vitagroup.num.domain.templates.ExceptionsTemplate;
import de.vitagroup.num.service.exception.BadRequestException;
import de.vitagroup.num.service.exception.SystemException;
import org.highmed.domain.templates.ExceptionsTemplate;
import org.highmed.service.exception.BadRequestException;
import org.highmed.service.exception.SystemException;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.vitagroup.num.config;
package org.highmed.config;

import java.util.Arrays;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
Expand All @@ -9,7 +8,9 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static de.vitagroup.num.service.UserService.TRANSLATION_CACHE;
import java.util.Arrays;

import static org.highmed.service.UserService.TRANSLATION_CACHE;

@Configuration
@EnableCaching
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.config;
package org.highmed.config;

import lombok.RequiredArgsConstructor;
import org.ehrbase.openehr.sdk.client.openehrclient.defaultrestclient.DefaultRestClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package de.vitagroup.num.config;
package org.highmed.config;

import de.vitagroup.num.properties.EhrBaseProperties;
import java.net.URI;
import java.net.URISyntaxException;
import org.highmed.properties.EhrBaseProperties;
import lombok.RequiredArgsConstructor;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
Expand All @@ -16,6 +14,9 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

import java.net.URI;
import java.net.URISyntaxException;

@Configuration
@RequiredArgsConstructor
public class EhrBaseConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package de.vitagroup.num.config;
package org.highmed.config;

import ca.uhn.fhir.context.FhirContext;
import de.vitagroup.num.properties.FttpProperties;
import java.security.KeyStore;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import org.highmed.properties.FttpProperties;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.auth.AuthScope;
Expand All @@ -18,6 +15,10 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import java.security.KeyStore;

@Slf4j
@Configuration
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.config;
package org.highmed.config;

import org.modelmapper.ModelMapper;
import org.springframework.context.annotation.Bean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package de.vitagroup.num.config;
package org.highmed.config;

import de.vitagroup.num.properties.NumProperties;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
import javax.annotation.PostConstruct;
import org.highmed.properties.NumProperties;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.nio.charset.StandardCharsets;
import java.util.Locale;

@Component
@AllArgsConstructor
public class MessageSourceConfiguration {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.config.database;
package org.highmed.config.database;

import org.flywaydb.core.Flyway;
import org.springframework.beans.factory.annotation.Qualifier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.config.database;
package org.highmed.config.database;

import com.zaxxer.hikari.HikariDataSource;
import org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy;
Expand All @@ -24,7 +24,7 @@

@ConditionalOnProperty(prefix = "num", name = "enableAttachmentDatabase", havingValue = "true")
@Configuration
@EnableJpaRepositories(basePackages = "de.vitagroup.num.attachment",
@EnableJpaRepositories(basePackages = "org.highmed.attachment",
entityManagerFactoryRef = "attachmentEntityManagerFactory",
transactionManagerRef = "attachmentTransactionManager")
@EnableTransactionManagement
Expand All @@ -50,7 +50,7 @@ public LocalContainerEntityManagerFactoryBean attachmentEntityManagerFactory(Ent
@Qualifier("numAttachmentDatasource") DataSource dataSource) {
LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean = builder
.dataSource(dataSource)
.packages("de.vitagroup.num.attachment")
.packages("org.highmed.attachment")
.persistenceUnit("numAttachment")
.build();
localContainerEntityManagerFactoryBean.getJpaPropertyMap().put(AvailableSettings.IMPLICIT_NAMING_STRATEGY, new SpringImplicitNamingStrategy());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.config.database;
package org.highmed.config.database;

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
Expand Down Expand Up @@ -27,7 +27,7 @@
import java.util.Properties;

@Configuration
@EnableJpaRepositories(basePackages = {"de.vitagroup.num.domain", "de.vitagroup.num.service"},
@EnableJpaRepositories(basePackages = {"org.highmed.domain", "org.highmed.service"},
entityManagerFactoryRef = "numEntityManagerFactory",
transactionManagerRef = "numTransactionManager")
@EnableTransactionManagement
Expand Down Expand Up @@ -69,7 +69,7 @@ public LocalContainerEntityManagerFactoryBean numEntityManagerFactory(Configurab
@Qualifier("numPortalDatasource") DataSource dataSource) {
LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
localContainerEntityManagerFactoryBean.setDataSource(dataSource);
localContainerEntityManagerFactoryBean.setPackagesToScan("de.vitagroup.num.domain", "de.vitagroup.num.service");
localContainerEntityManagerFactoryBean.setPackagesToScan("org.highmed.domain", "org.highmed.service");
localContainerEntityManagerFactoryBean.setPersistenceUnitName("numPortal");
localContainerEntityManagerFactoryBean.getJpaPropertyMap().put(AvailableSettings.BEAN_CONTAINER, new SpringBeanContainer(beanFactory));
localContainerEntityManagerFactoryBean.getJpaPropertyMap().put(AvailableSettings.IMPLICIT_NAMING_STRATEGY, new SpringImplicitNamingStrategy());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.config.database;
package org.highmed.config.database;

import org.flywaydb.core.Flyway;
import org.springframework.beans.factory.annotation.Qualifier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package de.vitagroup.num.domain.dto;
package org.highmed.domain.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import de.vitagroup.num.domain.validation.ValidTranslatedString;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.highmed.domain.validation.ValidTranslatedString;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package de.vitagroup.num.domain.dto;
package org.highmed.domain.dto;

import de.vitagroup.num.domain.model.admin.User;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.highmed.domain.model.admin.User;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.OffsetDateTime;

@Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.domain.dto;
package org.highmed.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.vitagroup.num.domain.dto;
package org.highmed.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package de.vitagroup.num.domain.dto;
package org.highmed.domain.dto;

import de.vitagroup.num.domain.validation.ValidCohort;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.highmed.domain.validation.ValidCohort;

@Schema
@Data
Expand Down
Loading

0 comments on commit 9208b50

Please sign in to comment.