diff --git a/.project b/.project new file mode 100644 index 0000000..1322a33 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + hartmann-foto_documentation + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..be45cb9 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,243 @@ +// +// Created by Patrick Verboom on 04.11.2024. +// Copyright © 2024 heyday Marketing GmbH. All rights reserved. +// + +def defaultRocketChatChannel = "#builds" +def rocketChatColor = "#e813c8" +def rocketChatEmoji = ":skunk:" + +def numOfArtifactsToKeep = env.GIT_BRANCH == "master" ? "10" : "5" + + +def result = [] + +pipeline { + agent { + label "macOS" + } + tools { + maven 'Maven Latest' + jdk 'OpenJDK-21.0.5' + + } + + environment { + PATH = "$PATH:/Users/Shared/jenkins/flutter/bin" + } + + options { + // keeps only the atifacts of the last 15 builds + buildDiscarder( + logRotator( + artifactDaysToKeepStr: '', + artifactNumToKeepStr: numOfArtifactsToKeep, + daysToKeepStr: '', + numToKeepStr: numOfArtifactsToKeep + ) + ) + } + stages { + stage ('Initialize') { + steps { + script { + def msg = "Pipeline ${env.JOB_NAME} ${env.BUILD_NUMBER} has started. \n More info at: ${env.BUILD_URL} " + try { + echo msg + rocketSend channel: defaultRocketChatChannel, message: "jenkins-${env.JOB_NAME}-${env.BUILD_NUMBER}", emoji: rocketChatEmoji, attachments: [[$class: 'MessageAttachment', color: rocketChatColor, text: msg, title: 'Build started']] + } catch (Exception e) { + echo "Exception occurred sending : " + e.toString() + "\nmessage: " + msg + throw e + } + } + + sh ''' + echo "PATH = ${PATH}" + echo "M2_HOME = ${M2_HOME}" + printenv + ''' + } + } +/* + stage ('Build Frontend') { + steps { + echo "running Frontend build for branch ${env.BRANCH_NAME}" + + dir("hartmann-foto-documentation-frontend"){ + //flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=OURBASEURL/canvaskit/ + sh 'flutter pub get' + //sh 'dart run build_runner build' + sh 'flutter build web --no-tree-shake-icons' + dir("build/web"){ + sh "cp -R . ../../../hartmann-foto-documentation-web/src/main/webapp/." + } + } + } + post { + always { + script { + def msg = "Build ${env.JOB_NAME} ${env.BUILD_NUMBER} frontend build has finished. Result: ${currentBuild.currentResult}. Took ${currentBuild.duration}.\n More info at: ${env.BUILD_URL} " + result.add( ["Stage: Build ${currentBuild.currentResult}", msg] ) + } + } + } + } + stage ('Test Frontend') { + steps { + echo "running Frontend test for branch ${env.BRANCH_NAME}" + + dir("hartmann-foto-documentation-frontend"){ + // Run tests with JSON output for Jenkins parsing + sh ''' + flutter test --coverage --reporter=json --file-reporter=json:test_results.json --reporter=expanded || true + dart test_runner.dart test_results.json test_results.xml + ''' + } + } + post { + success { + archiveArtifacts artifacts: 'hartmann-foto-documentation-frontend/coverage/lcov.info', fingerprint: true + } + always { + // Publish test results to Jenkins + junit 'hartmann-foto-documentation-frontend/test_results.xml' + + // Archive test artifacts + archiveArtifacts artifacts: 'hartmann-foto-documentation-frontend/test_results.json, hartmann-foto-documentation-frontend/test_results.xml', allowEmptyArchive: true + + script { + def msg = "Build ${env.JOB_NAME} ${env.BUILD_NUMBER} frontend test has finished. Result: ${currentBuild.currentResult}. Took ${currentBuild.duration}.\n More info at: ${env.BUILD_URL} " + result.add( ["Stage: Build ${currentBuild.currentResult}", msg] ) + } + } + } + } +*/ + stage ('Build') { + steps { + echo "running build for branch ${env.BRANCH_NAME}" + //sh 'mvn dependency:purge-local-repository clean -U -f hartmann-foto-documentation/pom.xml ' + sh 'mvn deploy -U -f pom.xml ' + } + post { + success { + junit '**/target/surefire-reports/*.xml' + archiveArtifacts artifacts: '**/target/*.war, **/target/*.zip', fingerprint: true + } + + always { + script { + def msg = "Build ${env.JOB_NAME} ${env.BUILD_NUMBER} build has finished. Result: ${currentBuild.currentResult}. Took ${currentBuild.duration}.\n More info at: ${env.BUILD_URL} " + result.add( ["Stage: Build ${currentBuild.currentResult}", msg] ) + } + } + } + } + + stage ('Tests') { + steps { + sh 'mvn deploy -P docker -f hartmann-foto-documentation-docker/pom.xml' + } + post { + success { + junit '**/target/surefire-reports/*.xml' + } + always { + script { + def msg = "Build ${env.JOB_NAME} ${env.BUILD_NUMBER} tests has finished. Result: ${currentBuild.currentResult}. Took ${currentBuild.duration}.\n More info at: ${env.BUILD_URL} " + result.add( ["Stage: Test ${currentBuild.currentResult}", msg]) + } + } + } + } + + stage ('Code Coverage') { + steps { + sh 'mvn jacoco:report-aggregate -P docker -f pom.xml' + sh 'cp hartmann-foto-documentation-docker/target/site/jacoco-aggregate/jacoco.xml hartmann-foto-documentation-app/target/site/jacoco-aggregate/jacoco.xml' + } + post { + always { + script { + def msg = "Build ${env.JOB_NAME} ${env.BUILD_NUMBER} Code coverage has finished. Result: ${currentBuild.currentResult}. Took ${currentBuild.duration}.\n More info at: ${env.BUILD_URL} " + result.add( ["Stage: Test ${currentBuild.currentResult}", msg]) + } + } + } + } + + stage ('SonarQube analysis') { + steps { + withSonarQubeEnv('heyday sonar') { + script { + def key = "${env.BRANCH_NAME.replaceAll("/", "_")}" + def projectKey = "\"marketing.heyday.hartmann:hartmann-foto-documentation:${key}\"" + echo "running sonar for branch ${projectKey}" + sh "mvn org.sonarsource.scanner.maven:sonar-maven-plugin:5.3.0.6276:sonar -f pom.xml -Dsonar.projectKey=${projectKey}" + } + } + } + post { + always { + script { + def msg = "Build ${env.JOB_NAME} ${env.BUILD_NUMBER} sonar has finished. Result: ${currentBuild.currentResult}. Took ${currentBuild.duration}.\n More info at: ${env.BUILD_URL} " + result.add(["Stage: Sonar ${currentBuild.currentResult}", msg]) + } + } + } + } + + stage ('Release') { + when { + branch 'master' + } + + steps { + sh "mvn -B -U -X -e -Dmaven.test.skip=true -Djava.awt.headless=true release:prepare release:perform -DbambooBuildNumber=${env.BUILD_NUMBER} -Dmaven.javadoc.skip=true -f pom.xml " + } + post { + success { + archiveArtifacts artifacts: '**/target/*.war, **/target/*.zip', fingerprint: true + } + always { + script { + def msg = "Build ${env.JOB_NAME} ${env.BUILD_NUMBER} release has finished. Result: ${currentBuild.currentResult}. Took ${currentBuild.duration}.\n More info at: ${env.BUILD_URL} " + result.add(["Stage: Release ${currentBuild.currentResult}",msg]) + } + } + } + } + } + + post { + always { + script { + def msg = "Build ${env.JOB_NAME} ${env.BUILD_NUMBER} Pipeline finished. Result: ${currentBuild.currentResult}. Took ${currentBuild.duration}.\n More info at: ${env.BUILD_URL} " + result.add(["Stage: Pipeline ${currentBuild.currentResult}", msg]) + try { + //echo msg + def attachements = [] + for (elem in result) { + attachements+=([$class: 'MessageAttachment', color: rocketChatColor, text: elem.get(1), title: elem.get(0)]) + } + rocketSend channel: defaultRocketChatChannel, message: "jenkins-${env.JOB_NAME}-${env.BUILD_NUMBER}", emoji: rocketChatEmoji, attachments: attachements + } catch (Exception e) { + echo "Exception occurred sending : " + e.toString() + "\nmessage: " + msg + throw e + } + } + } + + unsuccessful { + emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}", + recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']], + subject: "Failed Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}" + } + + fixed { + emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}", + recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']], + subject: "Success Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}" + } + } +} diff --git a/hartmann-foto-documentation-app/pom.xml b/hartmann-foto-documentation-app/pom.xml new file mode 100644 index 0000000..2650d2c --- /dev/null +++ b/hartmann-foto-documentation-app/pom.xml @@ -0,0 +1,343 @@ + + + + 4.0.0 + + marketing.heyday.hartmann.fotodocumentation + hartmann-foto-documentation + 1.0.0 + ../hartmann-foto-documentation/pom.xml + + hartmann-foto-documentation-app + 1.0.0-SNAPSHOT + jar + hartmann-foto-documentation app + + + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + + + org.apache.maven.plugins + maven-site-plugin + + true + true + + + + + + + + + + + + org.wildfly.security + wildfly-elytron + 2.5.2.Final + provided + + + + org.wildfly.security + wildfly-elytron-credential + 2.5.2.Final + provided + + + + + + org.apache.poi + poi + + + org.apache.poi + poi-ooxml + + + + + + org.apache.httpcomponents + fluent-hc + 4.5.1 + + + + + io.swagger.core.v3 + swagger-jaxrs2-jakarta + + + + org.webjars + swagger-ui + 3.22.2 + + + + com.github.spullara.mustache.java + compiler + 0.9.5 + + + + com.networknt + json-schema-validator + 0.1.2 + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-databind + + + io.undertow + undertow-core + + + + + + commons-logging + commons-logging + ${version.commons-logging} + + + + org.apache.commons + commons-lang3 + ${version.commons-lang3} + + + + io.javaslang + javaslang + ${version.javaslang} + + + + org.flywaydb + flyway-core + 3.1 + + + + org.jboss.ejb3 + jboss-ejb3-ext-api + ${version.org.jboss.ejb3.ext-api} + provided + + + + jakarta.platform + jakarta.jakartaee-api + provided + + + + + + org.jboss.resteasy + resteasy-core + provided + + + + org.jboss.resteasy + resteasy-core-spi + provided + + + + org.jboss.resteasy + resteasy-jackson2-provider + provided + + + + org.jboss.resteasy + resteasy-multipart-provider + provided + + + + + + commons-fileupload + commons-fileupload + ${version.commons-fileupload} + + + commons-io + commons-io + ${version.commons-io} + + + + + + org.apache.poi + poi + + + org.apache.poi + poi-ooxml + + + + + org.hibernate.orm + hibernate-core + provided + + + + + + + log4j + log4j + 1.2.15 + test + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + + + + + com.google.guava + guava + 17.0 + test + + + + xml-apis + xml-apis + 1.4.01 + test + + + org.subethamail + subethasmtp-smtp + ${subethamail.version} + test + + + javax.servlet + servlet-api + + + + + org.subethamail + subethasmtp-wiser + ${subethamail.version} + test + + + org.subethamail + subethasmtp-smtp + + + + + + org.junit.platform + junit-platform-suite-engine + test + + + org.junit.platform + junit-platform-commons + test + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.mockito + mockito-junit-jupiter + test + + + org.mockito + mockito-core + test + + + + org.junit.platform + junit-platform-launcher + test + + + org.postgresql + postgresql + test + + + + org.jacoco + org.jacoco.core + test + + + org.slf4j + slf4j-simple + 1.7.5 + test + + + + org.slf4j + slf4j-log4j12 + test + + + diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/db/migration/DbMigrator.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/db/migration/DbMigrator.java new file mode 100644 index 0000000..d2d21f8 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/db/migration/DbMigrator.java @@ -0,0 +1,48 @@ +package marketing.heyday.hartmann.fotodocumentation.core.db.migration; + +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import jakarta.ejb.Singleton; +import jakarta.ejb.Startup; +import jakarta.ejb.TransactionManagement; +import jakarta.ejb.TransactionManagementType; +import javax.sql.DataSource; + +import org.flywaydb.core.Flyway; + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ + +@Singleton +@Startup +@TransactionManagement(TransactionManagementType.BEAN) +public class DbMigrator { + + @Resource(lookup = "java:/jdbc/fotoDocumentationDS") + private DataSource dataSource; + + @PostConstruct + public void onStartup() { + Flyway flyway = getFlyway(); + flyway.setDataSource(dataSource); + flyway.setTable("DB_MIGRATION"); + flyway.setLocations(this.getClass().getPackage().getName()); + flyway.setBaselineOnMigrate(false); + flyway.setValidateOnMigrate(false); + flyway.setIgnoreFailedFutureMigration(true); + + flyway.migrate(); + } + + protected Flyway getFlyway() { + return new Flyway(); + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/AbstractDateEntity.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/AbstractDateEntity.java new file mode 100644 index 0000000..1f44060 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/AbstractDateEntity.java @@ -0,0 +1,71 @@ +package marketing.heyday.hartmann.fotodocumentation.core.model; + +import java.util.Date; + +import jakarta.persistence.*; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ +@MappedSuperclass +public abstract class AbstractDateEntity extends AbstractEntity { + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "JPA_CREATED", nullable = false) + @JsonIgnore + private Date jpaCreated; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "JPA_UPDATED", nullable = false) + @JsonIgnore + private Date jpaUpdated; + + @Column(name = "JPA_ACTIVE", nullable = false) + private boolean active = true; + + @Version + @Column(name = "JPA_VERSION", nullable = false) + private int jpaVersion = 0; + + @PrePersist + protected void onCreate() { + Date now = new Date(); + jpaCreated = now; + jpaUpdated = now; + } + + @PreUpdate + protected void onUpdate() { + jpaUpdated = new Date(); + } + + public Date getJpaCreated() { + return jpaCreated; + } + + public Date getJpaUpdated() { + return jpaUpdated; + } + + public int getJpaVersion() { + return jpaVersion; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/AbstractEntity.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/AbstractEntity.java new file mode 100644 index 0000000..b112849 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/AbstractEntity.java @@ -0,0 +1,21 @@ +package marketing.heyday.hartmann.fotodocumentation.core.model; + +import java.io.Serializable; + +import jakarta.persistence.MappedSuperclass; + + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ +@MappedSuperclass +public abstract class AbstractEntity implements Serializable { + private static final long serialVersionUID = 1L; +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Customer.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Customer.java new file mode 100644 index 0000000..c9d5a6b --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Customer.java @@ -0,0 +1,108 @@ +package marketing.heyday.hartmann.fotodocumentation.core.model; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.lang.builder.HashCodeBuilder; + +import jakarta.persistence.*; + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ + +@Entity +@Table(name = "customer") +@NamedQuery(name = Customer.FIND_BY_NUMBER, query = "select c from Customer c where c.customerNumber = :cutomerNumber") +public class Customer extends AbstractDateEntity { + private static final long serialVersionUID = 1L; + public static final String SEQUENCE = "customer_seq"; + public static final String FIND_BY_NUMBER = "Customer.findByNumber"; + public static final String PARAM_NUMBER = "cutomerNumber"; + + @Id + @Column(name = "customer_id", length = 22) + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE) + @SequenceGenerator(name = SEQUENCE, sequenceName = SEQUENCE, allocationSize = 1) + private Long customerId; + + @Column(name = "customer_number", unique = true, nullable = false) + private String customerNumber; + + @Column(name = "name", nullable = false) + private String name; + + @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true) + @JoinColumn(name = "customer_id_fk") + private Set pictures = new HashSet<>(); + + public Long getCustomerId() { + return customerId; + } + + public void setCustomerId(Long customerId) { + this.customerId = customerId; + } + + public String getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(String customerNumber) { + this.customerNumber = customerNumber; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Set getPictures() { + return pictures; + } + + public void setPictures(Set pictures) { + this.pictures = pictures; + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(customerNumber).toHashCode(); + } + + @Override + public boolean equals(Object obj) { + if (obj == null || this.getClass() != obj.getClass()) { + return false; + } + return this.customerNumber.equals(((Customer) obj).getCustomerNumber()); + } + + public static class Builder { + private Customer instance = new Customer(); + + public Builder customerNumber(String customerNumber) { + instance.setCustomerNumber(customerNumber); + return this; + } + + public Builder name(String name) { + instance.setName(name); + return this; + } + + public Customer build() { + return instance; + } + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Picture.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Picture.java new file mode 100644 index 0000000..81fbb3f --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Picture.java @@ -0,0 +1,125 @@ +package marketing.heyday.hartmann.fotodocumentation.core.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.HashCodeBuilder; + +import jakarta.persistence.*; + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ + +@Entity +@Table(name = "picture") +public class Picture extends AbstractDateEntity { + private static final long serialVersionUID = 1L; + public static final String SEQUENCE = "picture_seq"; + + @Id + @Column(name = "picture_id", length = 22) + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE) + @SequenceGenerator(name = SEQUENCE, sequenceName = SEQUENCE, allocationSize = 1) + private Long pictureId; + + // username from the person that shot the picture + @Column(name = "username") + private String username; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "picture_date", nullable = false) + private Date pictureDate; + + private String comment; + + @Column(name = "image") + private String image; + + public Long getPictureId() { + return pictureId; + } + + public void setPictureId(Long pictureId) { + this.pictureId = pictureId; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public Date getPictureDate() { + return pictureDate; + } + + public void setPictureDate(Date pictureDate) { + this.pictureDate = pictureDate; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getImage() { + return image; + } + + public void setImage(String image) { + this.image = image; + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(pictureId).toHashCode(); + } + + @Override + public boolean equals(Object obj) { + if (obj == null || this.getClass() != obj.getClass() || pictureId == null) { + return false; + } + return this.pictureId.equals(((Picture) obj).getPictureId()); + } + + public static class Builder { + private Picture instance = new Picture(); + + public Builder username(String username) { + instance.setUsername(username); + return this; + } + + public Builder pictureDate(Date pictureDate) { + instance.setPictureDate(pictureDate); + return this; + } + + public Builder comment(String comment) { + instance.setComment(comment); + return this; + } + + public Builder image(String image) { + instance.setImage(image); + return this; + } + + public Picture build() { + return instance; + } + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Right.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Right.java new file mode 100644 index 0000000..a4e6645 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/Right.java @@ -0,0 +1,95 @@ +package marketing.heyday.hartmann.fotodocumentation.core.model; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.lang3.builder.HashCodeBuilder; + +import jakarta.persistence.*; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ + +@Entity +@Table(name = "x_right") +public class Right extends AbstractDateEntity { + private static final long serialVersionUID = 1L; + public static final String SEQUENCE = "right_seq"; + + @Id + @Column(name = "right_id", length = 22) + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE) + @SequenceGenerator(name = SEQUENCE, sequenceName = SEQUENCE, allocationSize = 1) + private Long rightId; + + @Column(nullable = false, unique = true) + private String code; + + @Column(nullable = false, unique = true) + private String name; + + @ManyToMany(mappedBy = "rights") + private Set roles = new HashSet<>(); + + public Long getRightId() { + return rightId; + } + + public void setRightId(Long rightId) { + this.rightId = rightId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(code).toHashCode(); + } + + @Override + public boolean equals(Object obj) { + if (obj == null || this.getClass() != obj.getClass()) { + return false; + } + return this.code.equals(((Right) obj).getCode()); + } + + public static class Builder { + private Right instance = new Right(); + + public Builder code(String code) { + instance.setCode(code); + return this; + } + + public Builder name(String name) { + instance.setName(name); + return this; + } + + public Right build() { + return instance; + } + } +} \ No newline at end of file diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/User.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/User.java new file mode 100644 index 0000000..7b2b82d --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/model/User.java @@ -0,0 +1,179 @@ +package marketing.heyday.hartmann.fotodocumentation.core.model; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.lang.builder.HashCodeBuilder; + +import jakarta.persistence.*; + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ + +@Entity +@Table(name = "x_user") +public class User extends AbstractDateEntity { + private static final long serialVersionUID = 1L; + public static final String SEQUENCE = "user_seq"; + + @Id + @Column(name = "user_id", length = 22) + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE) + @SequenceGenerator(name = SEQUENCE, sequenceName = SEQUENCE, allocationSize = 1) + private Long userId; + + @Column(name = "username", unique = true, nullable = false) + private String username; + + @Column(nullable = false) + private String password; + + private String salt; + + @Column(name = "title") + private String title; + + @Column(nullable = false) + private String firstname; + + @Column(nullable = false) + private String lastname; + + @Column(nullable = false) + private String email; + + @ManyToMany + @JoinTable(name = "user_to_right", joinColumns = { @JoinColumn(name = "user_id_fk") }, inverseJoinColumns = { @JoinColumn(name = "right_id_fk") }) + private Set rights = new HashSet<>(); + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSalt() { + return salt; + } + + public void setSalt(String salt) { + this.salt = salt; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Set getRights() { + return rights; + } + + public void setRights(Set rights) { + this.rights = rights; + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(username).toHashCode(); + } + + @Override + public boolean equals(Object obj) { + if (obj == null || this.getClass() != obj.getClass()) { + return false; + } + return this.username.equals(((User) obj).getUsername()); + } + + public static class Builder { + private User instance = new User(); + + public Builder email(String email) { + instance.setEmail(email); + return this; + } + + public Builder firstname(String firstname) { + instance.setFirstname(firstname); + return this; + } + + public Builder lastname(String lastname) { + instance.setLastname(lastname); + return this; + } + + public Builder title(String title) { + instance.setTitle(title); + return this; + } + + public Builder username(String username) { + instance.setUsername(username); + return this; + } + + public Builder password(String password) { + instance.setPassword(password); + return this; + } + + public User build() { + return instance; + } + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/query/Param.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/query/Param.java new file mode 100644 index 0000000..a23998f --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/query/Param.java @@ -0,0 +1,16 @@ +package marketing.heyday.hartmann.fotodocumentation.core.query; + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ + +public record Param(String name, Object value) { + +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/query/QueryService.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/query/QueryService.java new file mode 100644 index 0000000..01a1603 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/query/QueryService.java @@ -0,0 +1,100 @@ +package marketing.heyday.hartmann.fotodocumentation.core.query; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Optional; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jakarta.annotation.security.PermitAll; +import jakarta.ejb.Stateless; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.Query; + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ +@Stateless +@SuppressWarnings("unchecked") +@PermitAll +public class QueryService { + private static final Log LOG = LogFactory.getLog(QueryService.class); + + @PersistenceContext + private EntityManager eManager; + + public int count(String namedQuery, Param... params) { + Query query = eManager.createNamedQuery(namedQuery); + for (Param param : params) { + query.setParameter(param.name(), param.value()); + } + return ((Number) query.getSingleResult()).intValue(); + } + + public Optional callNamedQuerySingleResult(String namedQuery, Param... params) { + return singleResult(eManager.createNamedQuery(namedQuery), Arrays.asList(params)); + } + + private Optional singleResult(Query query, Collection params) { + try { + for (Param param : params) { + query.setParameter(param.name(), param.value()); + } + return Optional.ofNullable((T) query.getSingleResult()); + } catch (NoResultException nre) { + LOG.debug("No entity found for query " + query + " with params " + params); + LOG.trace("NoResultException", nre); + return Optional.empty(); + } + } + + public T callNamedQueryList(String namedQuery, Param... objects) { + Query query = eManager.createNamedQuery(namedQuery); + for (Param param : objects) { + query.setParameter(param.name(), param.value()); + } + return (T) query.getResultList(); + } + + public Optional callQuerySingleResult(String sql, Param... objects) { + Query query = eManager.createQuery(sql); + for (Param param : objects) { + query.setParameter(param.name(), param.value()); + } + return Optional.of((T) query.getSingleResult()); + } + + public T callNativeQuery(String sql, Param... objects) { + Query query = eManager.createNativeQuery(sql); + for (Param param : objects) { + query.setParameter(param.name(), param.value()); + } + return (T) query.getResultList(); + } + + public int callNativeQueryUpdate(String sql, Param... objects) { + Query query = eManager.createNativeQuery(sql); + for (Param param : objects) { + query.setParameter(param.name(), param.value()); + } + return query.executeUpdate(); + } + + public int callNamedQueryUpdate(String namedQuery, Param... objects) { + Query query = eManager.createNamedQuery(namedQuery); + for (Param param : objects) { + query.setParameter(param.name(), param.value()); + } + return query.executeUpdate(); + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/service/CustomerPictureService.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/service/CustomerPictureService.java new file mode 100644 index 0000000..ab85205 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/core/service/CustomerPictureService.java @@ -0,0 +1,48 @@ +package marketing.heyday.hartmann.fotodocumentation.core.service; + +import java.util.Optional; + +import jakarta.ejb.EJB; +import jakarta.ejb.LocalBean; +import jakarta.ejb.Stateless; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import marketing.heyday.hartmann.fotodocumentation.core.model.Customer; +import marketing.heyday.hartmann.fotodocumentation.core.model.Picture; +import marketing.heyday.hartmann.fotodocumentation.core.query.Param; +import marketing.heyday.hartmann.fotodocumentation.core.query.QueryService; +import marketing.heyday.hartmann.fotodocumentation.rest.vo.CustomerPictureValue; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ +@Stateless +@LocalBean +public class CustomerPictureService { + + @PersistenceContext + private EntityManager entityManager; + + @EJB + private QueryService queryService; + + public boolean addCustomerPicture(CustomerPictureValue customerPictureValue) { + Optional customerOpt = queryService.callNamedQuerySingleResult(Customer.FIND_BY_NUMBER, new Param(Customer.PARAM_NUMBER, customerPictureValue.customerNumber())); + Customer customer = customerOpt.orElseGet(() -> new Customer.Builder().customerNumber(customerPictureValue.customerNumber()).name(customerPictureValue.pharmacyName()).build()); + + Picture picture = new Picture.Builder().username(customerPictureValue.username()).comment(customerPictureValue.comment()).image(customerPictureValue.base64String()).pictureDate(customerPictureValue.date()).build(); + customer.getPictures().add(picture); + + entityManager.persist(picture); + entityManager.merge(customer); + entityManager.flush(); + return true; + } + +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/CustomerPictureResource.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/CustomerPictureResource.java new file mode 100644 index 0000000..3a01182 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/CustomerPictureResource.java @@ -0,0 +1,49 @@ +package marketing.heyday.hartmann.fotodocumentation.rest; + +import org.jboss.resteasy.annotations.GZIP; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import jakarta.ejb.EJB; +import jakarta.enterprise.context.RequestScoped; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; +import marketing.heyday.hartmann.fotodocumentation.core.service.CustomerPictureService; +import marketing.heyday.hartmann.fotodocumentation.rest.jackson.JsonSchemaValidate; +import marketing.heyday.hartmann.fotodocumentation.rest.vo.CustomerPictureValue; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ +@RequestScoped +@Path("customer-picture") +public class CustomerPictureResource { + + @EJB + private CustomerPictureService customerPictureService; + + @GZIP + @POST + @Path("") + //@Authenticate(shouldBeInAllRoles = RightUtils.ADMIN_RIGHT) + @Consumes(MediaType.APPLICATION_JSON) + @Operation(summary = "Add Customer Image to database") + @ApiResponse(responseCode = "200", description = "Add successfull") + public Response doAddCustomerPicture(@JsonSchemaValidate("schema/customer_picture_add.json") CustomerPictureValue customerPictureValue) { + boolean success = customerPictureService.addCustomerPicture(customerPictureValue); + + return success ? Response.ok().build() : Response.status(Status.BAD_REQUEST).build(); + + } + +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/MonitoringResource.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/MonitoringResource.java new file mode 100644 index 0000000..d94812b --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/MonitoringResource.java @@ -0,0 +1,36 @@ +package marketing.heyday.hartmann.fotodocumentation.rest; + +import jakarta.enterprise.context.RequestScoped; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 14 Nov 2024 + */ +@Path("monitoring") +@RequestScoped +public class MonitoringResource { + + @GET + @Path("check/{text}") + @Produces(MediaType.TEXT_PLAIN) + @Operation(summary = "Monitoring service for testing if the server is up and running.") + @ApiResponse(responseCode = "200", description = "ok with as body the given path param text. ") + public Response check(@PathParam("text") String text) { + return Response.status(Status.OK).entity(text).build(); + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ApplicationConfigApi.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ApplicationConfigApi.java new file mode 100644 index 0000000..0daffd7 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ApplicationConfigApi.java @@ -0,0 +1,51 @@ +package marketing.heyday.hartmann.fotodocumentation.rest.jackson; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import io.swagger.v3.jaxrs2.integration.resources.OpenApiResource; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Contact; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.servers.Server; +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.MediaType; +import marketing.heyday.hartmann.fotodocumentation.rest.CustomerPictureResource; +import marketing.heyday.hartmann.fotodocumentation.rest.MonitoringResource; + +/** + * + * + *

Copyright: Copyright (c) 2017

+ *

Company: heyday marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 18 Oct 2017 + */ +@OpenAPIDefinition(info = @Info(title = "Hartmann Photo upload API", version = "1.0", description = "All available routes for the Hartmann Photo upload API", contact = @Contact(url = "https://localhost", name = "Patrick Verboom", email = "p.verboom@heyday.marketing")), servers = { + @Server(description = "development", url = "http://localhost"), + @Server(description = "integration", url = "http://localhost"), + @Server(description = "production", url = "http://localhost") +}) +@ApplicationPath("/api") +public class ApplicationConfigApi extends Application { + private static final Log LOG = LogFactory.getLog(ApplicationConfigApi.class); + public static final String JSON_OUT = MediaType.APPLICATION_JSON + "; charset=utf-8"; + + @Override + public Set> getClasses() { + Set> retVal = new HashSet<>(); + retVal.add(OpenApiResource.class); + retVal.add(ValidatedMessageBodyReader.class); + //retVal.add(AuthenticateFilter.class); + retVal.add(MonitoringResource.class); + retVal.add(CustomerPictureResource.class); + LOG.info("returning rest api classes " + retVal); + return retVal; + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/JsonSchemaValidate.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/JsonSchemaValidate.java new file mode 100644 index 0000000..d186afc --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/JsonSchemaValidate.java @@ -0,0 +1,21 @@ +package marketing.heyday.hartmann.fotodocumentation.rest.jackson; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * + *

Copyright: Copyright (c) 2017

+ *

Company: heyday marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: Feb 10, 2017 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(value={ElementType.PARAMETER}) +public @interface JsonSchemaValidate { + String value(); +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/SchemaValidated.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/SchemaValidated.java new file mode 100644 index 0000000..4b1d440 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/SchemaValidated.java @@ -0,0 +1,14 @@ +package marketing.heyday.hartmann.fotodocumentation.rest.jackson; + +/** + * + *

Copyright: Copyright (c) 2017

+ *

Company: heyday marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: Feb 10, 2017 + */ +public interface SchemaValidated { + +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ValidatedMessageBodyReader.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ValidatedMessageBodyReader.java new file mode 100644 index 0000000..72e6849 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ValidatedMessageBodyReader.java @@ -0,0 +1,114 @@ +package marketing.heyday.hartmann.fotodocumentation.rest.jackson; + +import java.io.*; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.nio.charset.Charset; +import java.util.Arrays; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.Provider; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.networknt.schema.JsonSchema; +import com.networknt.schema.JsonSchemaFactory; +import com.networknt.schema.ValidationMessage; + +/** + * + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 6 Dec 2024 + */ +@Provider +@Consumes(value = { + MediaType.APPLICATION_JSON, "application/json; charset=utf-8" +}) +public class ValidatedMessageBodyReader implements MessageBodyReader { + private static final Log LOG = LogFactory.getLog(ValidatedMessageBodyReader.class); + + /* (non-Javadoc) + * @see jakarta.ws.rs.ext.MessageBodyReader#isReadable(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType) + */ + @Override + public boolean isReadable(Class classType, Type type, Annotation[] annotations, MediaType mediaType) { + if (mediaType.getType().contains("application/json")) { + return false; + } + return Arrays.stream(annotations).anyMatch(a -> a.annotationType() == JsonSchemaValidate.class); + } + + /* (non-Javadoc) + * @see jakarta.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType, jakarta.ws.rs.core.MultivaluedMap, java.io.InputStream) + */ + @Override + public SchemaValidated readFrom(Class classType, Type type, Annotation[] annotations, MediaType mediaType, + MultivaluedMap httpHeaders, InputStream input) throws IOException { + final String jsonData = read(input); + + Optional annotation = Arrays.stream(annotations).filter(a -> a.annotationType() == JsonSchemaValidate.class).map(a -> (JsonSchemaValidate) a).findAny(); + if (annotation.isPresent()) { + ValidationReply reply = validate(annotation.get(), jsonData); + if (!reply.success) { + throw new WebApplicationException(reply.getErrorResponse()); + } + } + + ObjectMapper objectMapper = new ObjectMapper(); + return objectMapper.readValue(new StringReader(jsonData), classType); + } + + /** + * @param jsonSchema + * @param jsonData + * @return + */ + private ValidationReply validate(JsonSchemaValidate jsonSchema, String jsonData) { + String schemaPath = jsonSchema.value(); + try { + JsonSchema schema = getJsonSchema(schemaPath); + JsonNode node = getJsonNode(jsonData); + Set errors = schema.validate(node); + if (!errors.isEmpty()) { + LOG.error("Failed to validate json to schema " + schemaPath); + errors.stream().forEach(LOG::error); + } + return new ValidationReply.Builder().success(errors.isEmpty()).errors(errors).build(); + } catch (IOException e) { + LOG.error(e.getMessage(), e); + return new ValidationReply.Builder().success(false).build(); + } + } + + protected JsonSchema getJsonSchema(String name) throws IOException { + JsonSchemaFactory factory = new JsonSchemaFactory(); + try (InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(name);) { + return factory.getSchema(input); + } + } + + protected JsonNode getJsonNode(String content) throws IOException { + return new ObjectMapper().readTree(content); + } + + private String read(InputStream input) throws IOException { + try (BufferedReader buffer = new BufferedReader(new InputStreamReader(input, Charset.forName("UTF-8")))) { + return buffer.lines().collect(Collectors.joining("\n")); + } + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ValidationReply.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ValidationReply.java new file mode 100644 index 0000000..0fb23b0 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/jackson/ValidationReply.java @@ -0,0 +1,51 @@ +package marketing.heyday.hartmann.fotodocumentation.rest.jackson; + +import java.util.HashSet; +import java.util.Set; + +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; + +import com.networknt.schema.ValidationMessage; + +/** + * + *

Copyright: Copyright (c) 2017

+ *

Company: heyday marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: Feb 14, 2017 + */ +public final class ValidationReply { + public final boolean success; + public final Set errors = new HashSet<>(); + + private ValidationReply(boolean success, Set errors) { + this.success = success; + this.errors.addAll(errors); + } + + public Response getErrorResponse() { + return Response.status(Status.BAD_REQUEST).entity(errors).build(); + } + + public static final class Builder { + private boolean success; + private Set errors = new HashSet<>(); + + public Builder success(boolean success) { + this.success = success; + return this; + } + + public Builder errors(Set errors) { + this.errors = errors; + return this; + } + + public ValidationReply build() { + return new ValidationReply(success, errors); + } + } +} diff --git a/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/vo/CustomerPictureValue.java b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/vo/CustomerPictureValue.java new file mode 100644 index 0000000..0aa212e --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/java/marketing/heyday/hartmann/fotodocumentation/rest/vo/CustomerPictureValue.java @@ -0,0 +1,17 @@ +package marketing.heyday.hartmann.fotodocumentation.rest.vo; + +import java.util.Date; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 19 Jan 2026 + */ + +public record CustomerPictureValue(String username, String pharmacyName, String customerNumber, Date date, String comment, String base64String) { + +} diff --git a/hartmann-foto-documentation-app/src/main/resources/META-INF/beans.xml b/hartmann-foto-documentation-app/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..be79900 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/resources/META-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/hartmann-foto-documentation-app/src/main/resources/META-INF/persistence.xml b/hartmann-foto-documentation-app/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..06ffc00 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,24 @@ + + + + + java:/jdbc/fotoDocumentationDS + + marketing.heyday.hartmann.fotodocumentation.core.model.Right + marketing.heyday.hartmann.fotodocumentation.core.model.User + marketing.heyday.hartmann.fotodocumentation.core.model.Customer + marketing.heyday.hartmann.fotodocumentation.core.model.Picture + + + + + + + + + + + diff --git a/hartmann-foto-documentation-app/src/main/resources/marketing/heyday/hartmann/fotodocumentation/core/db/migration/V1__init.sql b/hartmann-foto-documentation-app/src/main/resources/marketing/heyday/hartmann/fotodocumentation/core/db/migration/V1__init.sql new file mode 100644 index 0000000..c64fd2c --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/resources/marketing/heyday/hartmann/fotodocumentation/core/db/migration/V1__init.sql @@ -0,0 +1,76 @@ + +-- Right + +create sequence right_seq start 25; + +create table x_right ( + right_id bigint PRIMARY KEY, + code varchar(50) NOT NULL, + name varchar(150) NOT NULL, + jpa_active boolean NOT NULL, + jpa_created timestamp NOT NULL, + jpa_updated timestamp NOT NULL, + jpa_version integer NOT NULL, + CONSTRAINT unq_x_right_code UNIQUE(code) +); + + +-- user + +create sequence user_seq start 25; + +create table x_user ( + user_id bigint PRIMARY KEY, + username varchar(150) NOT NULL, + password varchar(150) NOT NULL, + salt varchar(150) NOT NULL, + title varchar(15) , + firstname varchar(150) NOT NULL, + lastname varchar(150) NOT NULL, + email varchar(150) NOT NULL, + jpa_active boolean NOT NULL, + jpa_created timestamp NOT NULL, + jpa_updated timestamp NOT NULL, + jpa_version integer NOT NULL, + CONSTRAINT unq_x_user_username UNIQUE(username) +); + +create table user_to_right ( + user_id_fk bigint REFERENCES x_user, + right_id_fk bigint REFERENCES x_right, + PRIMARY KEY(user_id_fk, right_id_fk) +); + + +-- customer + +create sequence customer_seq start 25; + +create table customer ( + customer_id bigint PRIMARY KEY, + customer_number varchar(150) NOT NULL, + name varchar(150) NOT NULL, + jpa_active boolean NOT NULL, + jpa_created timestamp NOT NULL, + jpa_updated timestamp NOT NULL, + jpa_version integer NOT NULL, + CONSTRAINT unq_customer_number UNIQUE(customer_number) +); + + +-- picture + +create sequence picture_seq start 25; + +create table picture ( + picture_id bigint PRIMARY KEY, + username varchar(150), + picture_date timestamp NOT NULL, + comment TEXT, + image TEXT, + jpa_active boolean NOT NULL, + jpa_created timestamp NOT NULL, + jpa_updated timestamp NOT NULL, + jpa_version integer NOT NULL, + customer_id_fk bigint REFERENCES customer +); \ No newline at end of file diff --git a/hartmann-foto-documentation-app/src/main/resources/schema/customer_picture_add.json b/hartmann-foto-documentation-app/src/main/resources/schema/customer_picture_add.json new file mode 100644 index 0000000..f75fa66 --- /dev/null +++ b/hartmann-foto-documentation-app/src/main/resources/schema/customer_picture_add.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Add Customer Picture", + "description": "Add a Customer Picture to the system", + "type": "object", + "properties": { + "username": { + "description": "The username from the user who uploads the picture", + "type": "string" + }, + "pharmacyName": { + "description": "The Name from the pharmacy customer ", + "type": "string" + }, + "customerNumber": { + "description": "The unique number from the pharmacy customer ", + "type": "string" + }, + "date": { + "description": "The date when the picture is taken ", + "type": "string" + }, + "comment": { + "description": "A free text comment field ", + "type": "string" + }, + "base64String": { + "description": "The Picture content as base64 ", + "type": "string" + } + }, + "required": [ + "username", + "pharmacyName", + "customerNumber", + "date", + "comment", + "base64String" + ] +} \ No newline at end of file diff --git a/hartmann-foto-documentation-app/src/site/securityDefinitions.json b/hartmann-foto-documentation-app/src/site/securityDefinitions.json new file mode 100644 index 0000000..67858dc --- /dev/null +++ b/hartmann-foto-documentation-app/src/site/securityDefinitions.json @@ -0,0 +1,16 @@ +{ + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "header" + }, + "petstore_auth": { + "type": "oauth2", + "authorizationUrl": "http://swagger.io/api/oauth/dialog", + "flow": "implicit", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } +} \ No newline at end of file diff --git a/hartmann-foto-documentation-app/src/site/templates/markdown.hbs b/hartmann-foto-documentation-app/src/site/templates/markdown.hbs new file mode 100644 index 0000000..8c43e3b --- /dev/null +++ b/hartmann-foto-documentation-app/src/site/templates/markdown.hbs @@ -0,0 +1,107 @@ +#{{#info}}{{title}} + + +## {{join schemes " | "}}://{{host}}{{basePath}} + + +{{description}} + +{{#contact}} +[**Contact the developer**](mailto:{{email}}) +{{/contact}} + +**Version** {{version}} + +[**Terms of Service**]({{termsOfService}}) + +{{#license}}[**{{name}}**]({{url}}){{/license}} + +{{/info}} + +{{#if consumes}}**Consumes:** {{join consumes ", "}}{{/if}} + +{{#if produces}}**Produces:** {{join produces ", "}}{{/if}} + +{{#if securityDefinitions}} +# Security Definitions +{{/if}} +{{> security}} + +# APIs + +{{#each paths}} +## {{@key}} +{{#this}} +{{#get}} +### GET +{{> operation}} +{{/get}} + +{{#put}} +### PUT +{{> operation}} +{{/put}} + +{{#post}} +### POST + +{{> operation}} + +{{/post}} + +{{#delete}} +### DELETE +{{> operation}} +{{/delete}} + +{{#option}} +### OPTION +{{> operation}} +{{/option}} + +{{#patch}} +### PATCH +{{> operation}} +{{/patch}} + +{{#head}} +### HEAD +{{> operation}} +{{/head}} + +{{/this}} +{{/each}} + +# Definitions +{{#each definitions}} +## {{@key}} + + + + + + + + + + {{#each this.properties}} + + + + + + + + {{/each}} +
nametyperequireddescriptionexample
{{@key}} + {{#ifeq type "array"}} + {{#items.$ref}} + {{type}}[{{basename items.$ref}}] + {{/items.$ref}} + {{^items.$ref}}{{type}}[{{items.type}}]{{/items.$ref}} + {{else}} + {{#$ref}}{{basename $ref}}{{/$ref}} + {{^$ref}}{{type}}{{#format}} ({{format}}){{/format}}{{/$ref}} + {{/ifeq}} + {{#required}}required{{/required}}{{^required}}optional{{/required}}{{#description}}{{{description}}}{{/description}}{{^description}}-{{/description}}{{example}}
+{{/each}} diff --git a/hartmann-foto-documentation-app/src/site/templates/operation.hbs b/hartmann-foto-documentation-app/src/site/templates/operation.hbs new file mode 100644 index 0000000..b036fbf --- /dev/null +++ b/hartmann-foto-documentation-app/src/site/templates/operation.hbs @@ -0,0 +1,81 @@ +{{#deprecated}}-deprecated-{{/deprecated}} +{{summary}} + +{{{description}}} + +{{#if externalDocs.url}}{{externalDocs.description}}. [See external documents for more details]({{externalDocs.url}}) +{{/if}} + +{{#if security}} +#### Security +{{/if}} + +{{#security}} +{{#each this}} +* {{@key}} +{{#this}} * {{this}} +{{/this}} +{{/each}} +{{/security}} + +#### Request + +{{#if consumes}} +**Content-Type: ** {{join consumes ", "}}{{/if}} + +##### Parameters +{{#if parameters}} + + + + + + + + + + +{{/if}} + +{{#parameters}} + + + + + + +{{#ifeq in "body"}} + +{{else}} + {{#ifeq type "array"}} + + {{else}} + + {{/ifeq}} +{{/ifeq}} + + + + +{{/parameters}} +{{#if parameters}} +
NameLocated inRequiredDescriptionDefaultSchemaExample
{{name}}{{in}}{{#if required}}yes{{else}}no{{/if}}{{description}}{{#if pattern}} (**Pattern**: `{{pattern}}`){{/if}} - + {{#ifeq schema.type "array"}}Array[{{basename schema.items.$ref}}]{{/ifeq}} + {{#schema.$ref}}{{basename schema.$ref}} {{/schema.$ref}} + Array[{{items.type}}] ({{collectionFormat}}){{type}} {{#format}}({{format}}){{/format}} +{{#each examples}} + {{{this}}} +{{/each}} +
+{{/if}} + + +#### Response + +{{#if produces}}**Content-Type: ** {{join produces ", "}}{{/if}} + + +| Status Code | Reason | Response Model | +|-------------|-------------|----------------| +{{#each responses}}| {{@key}} | {{description}} | {{#schema.$ref}}{{basename schema.$ref}}{{/schema.$ref}}{{^schema.$ref}}{{#ifeq schema.type "array"}}Array[{{basename schema.items.$ref}}]{{else}}{{schema.type}}{{/ifeq}}{{/schema.$ref}}{{^schema}} - {{/schema}}| +{{/each}} \ No newline at end of file diff --git a/hartmann-foto-documentation-app/src/site/templates/security.hbs b/hartmann-foto-documentation-app/src/site/templates/security.hbs new file mode 100644 index 0000000..04f86e8 --- /dev/null +++ b/hartmann-foto-documentation-app/src/site/templates/security.hbs @@ -0,0 +1,88 @@ +{{#each securityDefinitions}} +### {{@key}} +{{#this}} +{{#ifeq type "oauth2"}} + + + + + +{{#if description}} + + + + +{{/if}} +{{#if authorizationUrl}} + + + + +{{/if}} +{{#if flow}} + + + + +{{/if}} +{{#if tokenUrl}} + + + + +{{/if}} +{{#if scopes}} + + +{{#each scopes}} + + + + +{{/each}} + +{{/if}} +
type{{type}}
description{{description}}
authorizationUrl{{authorizationUrl}}
flow{{flow}}
tokenUrl{{tokenUrl}}
scopes{{@key}}{{this}}
+{{/ifeq}} +{{#ifeq type "apiKey"}} + + + + + +{{#if description}} + + + + +{{/if}} +{{#if name}} + + + + +{{/if}} +{{#if in}} + + + + +{{/if}} +
type{{type}}
description{{description}}
name{{name}}
in{{in}}
+{{/ifeq}} +{{#ifeq type "basic"}} + + + + + +{{#if description}} + + + + +{{/if}} +
type{{type}}
description{{description}}
+{{/ifeq}} +{{/this}} +{{/each}} \ No newline at end of file diff --git a/hartmann-foto-documentation-app/src/site/templates/strapdown.html.hbs b/hartmann-foto-documentation-app/src/site/templates/strapdown.html.hbs new file mode 100644 index 0000000..82e6970 --- /dev/null +++ b/hartmann-foto-documentation-app/src/site/templates/strapdown.html.hbs @@ -0,0 +1,16 @@ + + +API Document + + +{{>markdown}} + + + + + + + + + + \ No newline at end of file diff --git a/hartmann-foto-documentation-app/src/test/java/org/mockito/configuration/MockitoConfiguration.java b/hartmann-foto-documentation-app/src/test/java/org/mockito/configuration/MockitoConfiguration.java new file mode 100644 index 0000000..818934c --- /dev/null +++ b/hartmann-foto-documentation-app/src/test/java/org/mockito/configuration/MockitoConfiguration.java @@ -0,0 +1,19 @@ +package org.mockito.configuration; + +/** + * + *

Copyright: Copyright (c) 2016

+ *

Company: heyday marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: Oct 14, 2016 + */ +public class MockitoConfiguration extends DefaultMockitoConfiguration { + + @Override + public boolean enableClassCache() { + return false; + } + +} diff --git a/hartmann-foto-documentation-app/src/test/resources/log4j.xml b/hartmann-foto-documentation-app/src/test/resources/log4j.xml new file mode 100644 index 0000000..95bea55 --- /dev/null +++ b/hartmann-foto-documentation-app/src/test/resources/log4j.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hartmann-foto-documentation-docker/pom.xml b/hartmann-foto-documentation-docker/pom.xml new file mode 100644 index 0000000..42ea3b0 --- /dev/null +++ b/hartmann-foto-documentation-docker/pom.xml @@ -0,0 +1,530 @@ + + + 4.0.0 + + marketing.heyday.hartmann.fotodocumentation + hartmann-foto-documentation + 1.0.0 + ../hartmann-foto-documentation/pom.xml + + hartmann-foto-documentation-docker + 1.0.0-SNAPSHOT + hartmann-foto-documentation docker + + + + org.apache.maven.plugins + maven-site-plugin + + true + true + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M1 + + true + true + + + + + + ${project.build.directory}/lib/*.jar + ${project.build.directory}/lib/*.jar + + + + docker + + + + org.apache.maven.plugins + maven-site-plugin + 3.1 + + true + true + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M1 + + true + true + true + + + + integration-test + + test + + integration-test + + false + false + + once + + + + + + + io.fabric8 + docker-maven-plugin + 0.45.1 + true + + true + false + true + true + + + hartmann_postgres + postgres:11 + + + 5430:5432 + + + hartmann_nw + hartmann_postgres + + + trust + + + + ${basedir}/src/main/docker/sql:/docker-entrypoint-initdb.d + + + + database system is ready to accept connections + + + + + + + + ${project.artifactId} + hartmann + + Dockerfile + + maven + + + latest + + + hub.heyday.marketing + + + /srv/wait-for-it.sh + hartmann_postgres:5432" -- + /srv/wildfly/bin/standalone-jacoco.sh + -b 0.0.0.0 -c test-standalone.xml + + + 8180:8080 + + + hartmann_postgres + + + + hartmann_nw + hartmann + + + + ${basedir}/target:/srv/target + + + + + + http://${docker.host.address}:8180/api/monitoring/check/hello + + + + + + + + + + build + package + + build + + + + + start + pre-integration-test + + start + + + + stop + post-integration-test + + stop + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.2 + + + copy-resources + + validate + + copy-resources + + + ${basedir}/src/main/docker + + + ${basedir}/../hartmann-foto-documentation-web/target/ + + *.war + + + + + + + copy-resources2 + + package + + copy-resources + + + ${project.basedir}/target/classes + + + ${project.basedir}/../hartmann-foto-documentation-app/target/classes + false + + + + + + + copy-jacoco-app + + verify + + copy-resources + + + ${project.basedir}/../hartmann-foto-documentation-app/target + + + ${project.basedir}/target + false + + jacoco-it.exec + + + + + + + + + + + + + + + + org.seleniumhq.selenium + selenium-java + 3.141.59 + test + + + org.seleniumhq.selenium + selenium-edge-driver + + + org.seleniumhq.selenium + selenium-firefox-driver + + + org.seleniumhq.selenium + selenium-ie-driver + + + org.seleniumhq.selenium + selenium-opera-driver + + + org.seleniumhq.selenium + selenium-safari-driver + + + + + + org.seleniumhq.selenium + selenium-api + 3.141.59 + test + + + org.seleniumhq.selenium + selenium-chrome-driver + 3.141.59 + test + + + + org.seleniumhq.selenium + selenium-remote-driver + 3.141.59 + test + + + org.seleniumhq.selenium + selenium-support + 3.141.59 + test + + + + ${project.groupId} + hartmann-foto-documentation-web + ${project.version} + war + + + + ${project.groupId} + hartmann-foto-documentation-app + ${project.version} + + + + + + javax.websocket + javax.websocket-client-api + 1.0 + test + + + + org.glassfish.tyrus + tyrus-client + 1.1 + test + + + org.glassfish.tyrus + tyrus-container-grizzly + 1.1 + test + + + javax.json + javax.json-api + 1.0 + test + + + org.glassfish + javax.json + 1.1 + test + + + + + + org.apache.commons + commons-lang3 + ${version.commons-lang3} + test + + + + org.jacoco + org.jacoco.core + test + + + + org.dbunit + dbunit + 2.7.0 + test + + + junit + junit + + + org.slf4j + slf4j-api + + + + + + org.jboss.resteasy + resteasy-jackson2-provider + ${version.org.jboss.resteasy} + provided + + + + org.codehaus.jackson + jackson-core-asl + 1.9.13 + test + + + + org.codehaus.jackson + jackson-mapper-asl + 1.9.13 + test + + + + org.junit.jupiter + junit-jupiter-api + test + + + + org.junit.platform + junit-platform-suite-engine + test + + + + org.junit.platform + junit-platform-suite-api + test + + + + org.junit.platform + junit-platform-commons + test + + + + org.junit.jupiter + junit-jupiter-engine + test + + + + org.junit.jupiter + junit-jupiter-params + test + + + org.junit.platform + junit-platform-launcher + test + + + + commons-io + commons-io + ${version.commons-io} + test + + + commons-logging + commons-logging + ${version.commons-logging} + test + + + org.apache.httpcomponents + fluent-hc + 4.5.1 + test + + + org.apache.httpcomponents + httpmime + 4.5.1 + test + + + log4j + log4j + 1.2.15 + test + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + + + + org.xmlunit + xmlunit-core + 2.8.2 + test + + + + org.skyscreamer + jsonassert + 1.2.2 + test + + + org.postgresql + postgresql + test + + + org.slf4j + slf4j-simple + 1.7.5 + test + + + diff --git a/hartmann-foto-documentation-docker/src/main/docker/Dockerfile b/hartmann-foto-documentation-docker/src/main/docker/Dockerfile new file mode 100644 index 0000000..cac8acd --- /dev/null +++ b/hartmann-foto-documentation-docker/src/main/docker/Dockerfile @@ -0,0 +1,52 @@ +############################################################ +# Dockerfile to build wildfly Hartmann Foto Documentation docker image +# Based on jboss/wildfly +############################################################ + +# Pull base image. +FROM hub.heyday.marketing/verboomp/wildfly:33.0.2-Final + +# File Author / Maintainer +LABEL org.opencontainers.image.authors="Patrick Verboom " + +USER root + +RUN apt-get update && apt-get install -y unzip + +# install the postgres driver +RUN wget 'https://nexus.heyday.marketing/repository/maven-releases/com/ayeqbenu/wildfly/database/modules/postgres-jdbc/1.1.0/postgres-jdbc-1.1.0.zip' -O /srv/postgres-jdbc.zip \ + && unzip /srv/postgres-jdbc.zip -d ${JBOSS_HOME}/modules \ + && rm -rf /srv/postgres-jdbc.zip + + +# install the startup wait script to make sure postgres is booted before wildfly +COPY wait-for-it.sh /srv/wait-for-it.sh + +RUN chmod 777 /srv/wait-for-it.sh + +# copy the jacoco agent for code coverage +COPY jacoco/jacocoagent.jar /srv/jacocoagent.jar + +run chmod 777 /srv/jacocoagent.jar + +COPY standalone-jacoco.sh ${JBOSS_HOME}/bin/standalone-jacoco.sh + +RUN chmod 777 ${JBOSS_HOME}/bin/standalone-jacoco.sh + + +# install the wildfly config xml file +# COPY test-standalone.xml ${JBOSS_HOME}/standalone/configuration/test-standalone.xml +COPY standalone-fotodocumentation.xml ${JBOSS_HOME}/standalone/configuration/test-standalone.xml + + +# install the web war file +COPY hartmann-foto-documentation-web-*.war ${JBOSS_HOME}/standalone/deployments + +# Expose the ports we're interested in +EXPOSE 8080 + +EXPOSE 9990 + +# Set the default command to run on boot +# This will boot WildFly in the standalone mode and bind to all interface +CMD ["/srv/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-c", "test-standalone.xml"] diff --git a/hartmann-foto-documentation-docker/src/main/docker/docker-compose.yml b/hartmann-foto-documentation-docker/src/main/docker/docker-compose.yml new file mode 100644 index 0000000..afef13c --- /dev/null +++ b/hartmann-foto-documentation-docker/src/main/docker/docker-compose.yml @@ -0,0 +1,40 @@ + +services: + + smtp-server: + image: andreptb/smtp-server-for-it:0.2.0 + ports: + - "8280:8080" + networks: + - hartmann_nw + environment: + - smtp.port=26 + + hartmann_postgres: + image: postgres:11 + volumes: + - ./sql:/docker-entrypoint-initdb.d + ports: + - "5430:5432" + networks: + - hartmann_nw + environment: + - POSTGRES_HOST_AUTH_METHOD=trust + + hartmann: + build: . + ports: + - "8180:8080" + - "9990:9990" + depends_on: + - hartmann_postgres + networks: + - hartmann_nw + command: ["/srv/wait-for-it.sh", "cue_postgres:5432", "--", "/srv/wildfly/bin/standalone-jacoco.sh", "-b", "0.0.0.0", "-c", "test-standalone.xml"] + volumes: + - ./../../../target:/srv/target:z + +networks: + hartmann_nw: +volumes: + jacoco: diff --git a/hartmann-foto-documentation-docker/src/main/docker/hartmann-foto-documentation-web-1.0.0-SNAPSHOT.war b/hartmann-foto-documentation-docker/src/main/docker/hartmann-foto-documentation-web-1.0.0-SNAPSHOT.war new file mode 100644 index 0000000..6b21898 Binary files /dev/null and b/hartmann-foto-documentation-docker/src/main/docker/hartmann-foto-documentation-web-1.0.0-SNAPSHOT.war differ diff --git a/hartmann-foto-documentation-docker/src/main/docker/jacoco/jacocoagent.jar b/hartmann-foto-documentation-docker/src/main/docker/jacoco/jacocoagent.jar new file mode 100644 index 0000000..e3c7d7d Binary files /dev/null and b/hartmann-foto-documentation-docker/src/main/docker/jacoco/jacocoagent.jar differ diff --git a/hartmann-foto-documentation-docker/src/main/docker/sql/init_test.sql b/hartmann-foto-documentation-docker/src/main/docker/sql/init_test.sql new file mode 100644 index 0000000..7554e1b --- /dev/null +++ b/hartmann-foto-documentation-docker/src/main/docker/sql/init_test.sql @@ -0,0 +1,80 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 9.4.5 +-- Dumped by pg_dump version 9.6.5 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SET check_function_bodies = false; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: fotodocumentation; Type: DATABASE; Schema: -; Owner: postgres +-- + +CREATE ROLE fotodocumentation WITH + LOGIN + NOSUPERUSER + NOCREATEDB + NOCREATEROLE + INHERIT + NOREPLICATION + CONNECTION LIMIT -1 + PASSWORD 'fotodocumentation'; + +CREATE DATABASE fotodocumentation WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8'; + + +ALTER DATABASE fotodocumentation OWNER TO postgres; + +\connect fotodocumentation + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SET check_function_bodies = false; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: +-- + +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; + + +-- +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: +-- + +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; + + +SET search_path = public, pg_catalog; + +SET default_tablespace = ''; + +SET default_with_oids = false; + + +-- +-- Name: public; Type: ACL; Schema: -; Owner: postgres +-- + +REVOKE ALL ON SCHEMA public FROM PUBLIC; +REVOKE ALL ON SCHEMA public FROM postgres; +GRANT ALL ON SCHEMA public TO postgres; +GRANT ALL ON SCHEMA public TO PUBLIC; + + +-- +-- PostgreSQL database dump complete +-- diff --git a/hartmann-foto-documentation-docker/src/main/docker/standalone-fotodocumentation.xml b/hartmann-foto-documentation-docker/src/main/docker/standalone-fotodocumentation.xml new file mode 100644 index 0000000..80c65ef --- /dev/null +++ b/hartmann-foto-documentation-docker/src/main/docker/standalone-fotodocumentation.xml @@ -0,0 +1,618 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jdbc:postgresql://hartmann_postgres:5432/fotodocumentation + postgres + TRANSACTION_READ_COMMITTED + + 1 + 10 + + + + + + + + 32 + true + + + + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=${wildfly.h2.compatibility.mode:REGULAR} + h2 + + + + + org.postgresql.xa.PGXADataSource + + + org.h2.jdbcx.JdbcDataSource + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${jboss.bind.address:127.0.0.1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hartmann-foto-documentation-docker/src/main/docker/standalone-jacoco.sh b/hartmann-foto-documentation-docker/src/main/docker/standalone-jacoco.sh new file mode 100644 index 0000000..83b66cb --- /dev/null +++ b/hartmann-foto-documentation-docker/src/main/docker/standalone-jacoco.sh @@ -0,0 +1,3 @@ +#!/bin/bash +export JAVA_OPTS="$JAVA_OPTS -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -javaagent:/srv/jacocoagent.jar=destfile=/srv/target/jacoco-it.exec,includes=marketing/heyday/hartmann/fotodocumentation/*,output=file " +exec `dirname $0`/standalone.sh $@ \ No newline at end of file diff --git a/hartmann-foto-documentation-docker/src/main/docker/wait-for-it.sh b/hartmann-foto-documentation-docker/src/main/docker/wait-for-it.sh new file mode 100644 index 0000000..5b3a6f9 --- /dev/null +++ b/hartmann-foto-documentation-docker/src/main/docker/wait-for-it.sh @@ -0,0 +1,177 @@ +#!/usr/bin/env bash +# Use this script to test if a given TCP host/port are available + +cmdname=$(basename $0) + +echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } + +usage() +{ + cat << USAGE >&2 +Usage: + $cmdname host:port [-s] [-t timeout] [-- command args] + -h HOST | --host=HOST Host or IP under test + -p PORT | --port=PORT TCP port under test + Alternatively, you specify the host and port as host:port + -s | --strict Only execute subcommand if the test succeeds + -q | --quiet Don't output any status messages + -t TIMEOUT | --timeout=TIMEOUT + Timeout in seconds, zero for no timeout + -- COMMAND ARGS Execute command with args after the test finishes +USAGE + exit 1 +} + +wait_for() +{ + if [[ $TIMEOUT -gt 0 ]]; then + echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT" + else + echoerr "$cmdname: waiting for $HOST:$PORT without a timeout" + fi + start_ts=$(date +%s) + while : + do + if [[ $ISBUSY -eq 1 ]]; then + nc -z $HOST $PORT + result=$? + else + (echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1 + result=$? + fi + if [[ $result -eq 0 ]]; then + end_ts=$(date +%s) + echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds" + break + fi + sleep 1 + done + return $result +} + +wait_for_wrapper() +{ + # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 + if [[ $QUIET -eq 1 ]]; then + timeout $BUSYTIMEFLAG $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & + else + timeout $BUSYTIMEFLAG $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & + fi + PID=$! + trap "kill -INT -$PID" INT + wait $PID + RESULT=$? + if [[ $RESULT -ne 0 ]]; then + echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT" + fi + return $RESULT +} + +# process arguments +while [[ $# -gt 0 ]] +do + case "$1" in + *:* ) + hostport=(${1//:/ }) + HOST=${hostport[0]} + PORT=${hostport[1]} + shift 1 + ;; + --child) + CHILD=1 + shift 1 + ;; + -q | --quiet) + QUIET=1 + shift 1 + ;; + -s | --strict) + STRICT=1 + shift 1 + ;; + -h) + HOST="$2" + if [[ $HOST == "" ]]; then break; fi + shift 2 + ;; + --host=*) + HOST="${1#*=}" + shift 1 + ;; + -p) + PORT="$2" + if [[ $PORT == "" ]]; then break; fi + shift 2 + ;; + --port=*) + PORT="${1#*=}" + shift 1 + ;; + -t) + TIMEOUT="$2" + if [[ $TIMEOUT == "" ]]; then break; fi + shift 2 + ;; + --timeout=*) + TIMEOUT="${1#*=}" + shift 1 + ;; + --) + shift + CLI=("$@") + break + ;; + --help) + usage + ;; + *) + echoerr "Unknown argument: $1" + usage + ;; + esac +done + +if [[ "$HOST" == "" || "$PORT" == "" ]]; then + echoerr "Error: you need to provide a host and port to test." + usage +fi + +TIMEOUT=${TIMEOUT:-15} +STRICT=${STRICT:-0} +CHILD=${CHILD:-0} +QUIET=${QUIET:-0} + +# check to see if timeout is from busybox? +# check to see if timeout is from busybox? +TIMEOUT_PATH=$(realpath $(which timeout)) +if [[ $TIMEOUT_PATH =~ "busybox" ]]; then + ISBUSY=1 + BUSYTIMEFLAG="-t" +else + ISBUSY=0 + BUSYTIMEFLAG="" +fi + +if [[ $CHILD -gt 0 ]]; then + wait_for + RESULT=$? + exit $RESULT +else + if [[ $TIMEOUT -gt 0 ]]; then + wait_for_wrapper + RESULT=$? + else + wait_for + RESULT=$? + fi +fi + +if [[ $CLI != "" ]]; then + if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then + echoerr "$cmdname: strict mode, refusing to execute subprocess" + exit $RESULT + fi + exec "${CLI[@]}" +else + exit $RESULT +fi \ No newline at end of file diff --git a/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AAAResourceTestSuite.java b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AAAResourceTestSuite.java new file mode 100644 index 0000000..8802ff4 --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AAAResourceTestSuite.java @@ -0,0 +1,23 @@ +package marketing.heyday.hartmann.fotodocumentation.rest; + +import org.junit.platform.suite.api.SelectPackages; +import org.junit.platform.suite.api.Suite; +import org.junit.platform.suite.api.SuiteDisplayName; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 22 Nov 2024 + */ + + +@Suite +@SuiteDisplayName("Rest Resource Suite") +@SelectPackages("marketing.heyday.hartmann.fotodocumentation.rest") +public class AAAResourceTestSuite { + +} diff --git a/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AbstractRestTest.java b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AbstractRestTest.java new file mode 100644 index 0000000..23f2df4 --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AbstractRestTest.java @@ -0,0 +1,95 @@ +package marketing.heyday.hartmann.fotodocumentation.rest; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.*; +import java.util.Base64; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import javax.json.Json; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.HttpResponse; +import org.apache.http.client.fluent.Executor; +import org.apache.http.client.fluent.Request; +import org.apache.http.impl.client.BasicCookieStore; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 13 Nov 2024 + */ +public abstract class AbstractRestTest extends AbstractTest { + private static final Log LOG = LogFactory.getLog(AbstractRestTest.class); + public static final String TEXT_PLAIN = "text/plain"; + + public HttpResponse executeRequest(Request request) throws IOException { + var executor = Executor.newInstance(); + return executor.use(new BasicCookieStore()).execute(request).returnResponse(); + } + + protected String getAuthorization() { + return getAuthorization(username, password); + } + + protected String getAuthorization(String user, String pass) { + String auth = user + ":" + pass; + String encoded = Base64.getEncoder().encodeToString(auth.getBytes()); + String authorization = "Basic " + encoded; + return authorization; + } + + protected String getBearerToken(String authorization) { + try { + String path = deploymentURL + "api/login"; + Request request = Request.Get(path).addHeader("Accept", "application/json; charset=utf-8") + .addHeader("Authorization", authorization); + + HttpResponse httpResponse = executeRequest(request); + int code = httpResponse.getStatusLine().getStatusCode(); + assertEquals(200, code); + + String bearerStr = getResponseText(httpResponse); + + try (var reader = Json.createReader(new StringReader(bearerStr));) { + return reader.readObject().getString("accessToken"); + } + } catch (IOException e) { + LOG.error("Failed to get bearer token " + e.getMessage(), e); + return ""; + } + } + + protected byte[] getResponse(HttpResponse httpResponse) throws IOException { + try (var output = new ByteArrayOutputStream(); var input = httpResponse.getEntity().getContent()) { + input.transferTo(output); + output.flush(); + return output.toByteArray(); + } + } + + protected String getResponseText(HttpResponse httpResponse) throws IOException { + String text; + try (BufferedReader input = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent()))) { + text = input.lines().collect(Collectors.joining("\n")); + } + return text; + } + + protected String getResponseText(HttpResponse httpResponse, Supplier supplier) throws IOException { + String text = getResponseText(httpResponse); + writeJsonFile(text, supplier.get()); + return text; + } + + protected String getResponseText(HttpResponse httpResponse, String name) throws IOException { + String className = this.getClass().getName(); + return getResponseText(httpResponse, () -> className + "-" + name + ".json"); + } +} diff --git a/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AbstractTest.java b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AbstractTest.java new file mode 100644 index 0000000..4fc7de3 --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/AbstractTest.java @@ -0,0 +1,189 @@ +package marketing.heyday.hartmann.fotodocumentation.rest; + +import java.io.*; +import java.nio.charset.Charset; +import java.sql.*; +import java.util.Date; +import java.util.Properties; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.time.DateUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.codehaus.jackson.map.ObjectMapper; +import org.dbunit.database.DatabaseConfig; +import org.dbunit.database.IDatabaseConnection; +import org.dbunit.dataset.IDataSet; +import org.dbunit.dataset.ReplacementDataSet; +import org.dbunit.dataset.xml.FlatXmlDataSetBuilder; +import org.dbunit.ext.postgresql.PostgresqlDataTypeFactory; +import org.dbunit.operation.DatabaseOperation; +import org.json.JSONException; +import org.skyscreamer.jsonassert.JSONAssert; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 13 Nov 2024 + */ + +public class AbstractTest { + private static final Log LOG = LogFactory.getLog(AbstractTest.class); + + public String deploymentURL = "http://localhost:8180/"; + public String username = "admin"; + public String password = "test"; + + private static Properties props = null; + + public static Connection getConnection() throws SQLException { + if (props == null) { + try (FileReader reader = new FileReader(new File("src/test/resources/junit.properties"))) { + Class.forName("org.postgresql.Driver"); + props = new Properties(); + props.load(reader); + } catch (Exception e) { + throw new SQLException(e.getMessage()); + } + } + return DriverManager.getConnection(props.getProperty("connection"), props.getProperty("username"), props.getProperty("password")); + } + + public static void initDB() { + initDB("dataset.xml"); + } + + public static void initDB(String xmlFile) { + try (Connection jdbcConnection = getConnection();) { + initDb(jdbcConnection, xmlFile); + } catch (SQLException e) { + throw new RuntimeException(e); + } + } + + private static void initDb(Connection jdbcConnection, String xmlFile) { + // using manual DBUnit since the persistence plugin has performance problems. + // https://community.jboss.org/thread/235511 + // https://issues.jboss.org/browse/ARQ-1440 + try { + System.out.println("start dbunit " + new Date(System.currentTimeMillis())); + IDatabaseConnection conn = new org.dbunit.database.DatabaseConnection(jdbcConnection); + DatabaseConfig config = conn.getConfig(); + config.setProperty("http://www.dbunit.org/features/datatypeWarning", Boolean.FALSE); + config.setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, Boolean.TRUE); + config.setProperty(DatabaseConfig.FEATURE_BATCHED_STATEMENTS, Boolean.TRUE); + config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new PostgresqlDataTypeFactory()); + + // initialize your dataset here + IDataSet dataSet = new FlatXmlDataSetBuilder().build(new File("src/test/resources/datasets/" + xmlFile)); + ReplacementDataSet repDataSet = new ReplacementDataSet(dataSet); + repDataSet.addReplacementObject("EXP_DATE", DateUtils.addDays(new Date(), 1)); + repDataSet.addReplacementObject("NULL_DATE", null); + repDataSet.addReplacementObject("NULL_NUMBER", null); + repDataSet.addReplacementObject("NULL_STRING", null); + try { + DatabaseOperation.CLEAN_INSERT.execute(conn, repDataSet); + } finally { + conn.close(); + } + } catch (java.sql.BatchUpdateException e) { + e.printStackTrace(); + e.getNextException().printStackTrace(); + throw new RuntimeException(e.getMessage(), e); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException(e.getMessage(), e); + } + System.out.println("End dbunit " + new Date(System.currentTimeMillis())); + } + + public String fileToString(final String fileName) { + try (FileInputStream input = new FileInputStream("src/test/resources/" + fileName)) { + return IOUtils.toString(input, Charset.forName("utf-8")); + } catch (IOException e) { + return ""; + } + } + + public static void writeJsonFile(final String content, final String fileName) { + if (content.isEmpty()) { + return; + } + File file = new File("target/test/output/"); + file.mkdirs(); + try (FileOutputStream out = new FileOutputStream(new File(file, fileName))) { + ObjectMapper mapper = new ObjectMapper(); + Object json = mapper.readValue(content, Object.class); + String formattedContent = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(json); + System.out.println(formattedContent); + IOUtils.write(formattedContent, out, Charset.forName("utf-8")); + } catch (Exception e) { + LOG.error("Error storing json file", e); + } + } + + public static void writeFile(byte[] content, String fileName) { + File file = new File("target/test/output/"); + file.mkdirs(); + + try (FileOutputStream out = new FileOutputStream(new File(file, fileName))) { + IOUtils.write(content, out); + } catch (Exception e) { + LOG.error("Error storing binary file", e); + } + } + + public static byte[] readFile(String fileName) { + try (FileInputStream in = new FileInputStream("src/test/resources/" + fileName)) { + return IOUtils.toByteArray(in); + } catch (Exception e) { + throw new RuntimeException("Error reading file src/test/resources/" + fileName); + } + } + + public void writeFile(InputStream content, String fileName) { + File file = new File("target/test/output/"); + file.mkdirs(); + + try (FileOutputStream out = new FileOutputStream(new File(file, fileName))) { + IOUtils.copy(content, out); + } catch (Exception e) { + LOG.error("Error storing binary file", e); + } + } + + public static int getCount(String sql) { + try (Connection conn = getConnection(); PreparedStatement statement = conn.prepareStatement(sql); ResultSet resultSet = statement.executeQuery();) { + if (resultSet.next()) { + return resultSet.getInt(1); + } + } catch (SQLException e) { + throw new RuntimeException(e); + } + LOG.error("no result found"); + return 0; + } + + protected void jsonAssert(String expected, String content) { + jsonAssert(expected, content, false); + } + + protected void jsonAssert(String expected, String content, boolean strict) { + try { + JSONAssert.assertEquals(expected, content, strict); + } catch (JSONException e) { + throw new RuntimeException(e); + } + } + + /* + public static void main(String[] args) throws SQLException { + try (var connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/skillmatrix", "skillmatrix", "skillmatrix")) { + initDb(connection, "dataset.xml"); + } + }*/ +} diff --git a/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/CustomerPictureTest.java b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/CustomerPictureTest.java new file mode 100644 index 0000000..f5b1ca2 --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/CustomerPictureTest.java @@ -0,0 +1,53 @@ +package marketing.heyday.hartmann.fotodocumentation.rest; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.HttpResponse; +import org.apache.http.client.fluent.Request; +import org.apache.http.entity.ContentType; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; +import org.junit.jupiter.api.Order; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestMethodOrder; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 14 Nov 2024 + */ +@TestMethodOrder(OrderAnnotation.class) +public class CustomerPictureTest extends AbstractRestTest { + private static final Log LOG = LogFactory.getLog(CustomerPictureTest.class); + private static final String PATH = "api/customer-picture"; + private static final String BASE_UPLOAD = "src/test/resources/upload/"; + + @BeforeAll + public static void init() { + initDB(); + } + + @Test + @Order(1) + public void doAddCustomerPicture() throws IOException { + LOG.info("doAddCustomerPicture"); + + String path = deploymentURL + PATH; + Request request = Request.Post(path).addHeader("Accept", "application/json; charset=utf-8") + .addHeader("Authorization", getAuthorization()) + .bodyFile(new File(BASE_UPLOAD + "add.json"), ContentType.APPLICATION_JSON); + + HttpResponse httpResponse = executeRequest(request); + int code = httpResponse.getStatusLine().getStatusCode(); + assertEquals(200, code); + } +} diff --git a/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/MonitoringResourceTest.java b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/MonitoringResourceTest.java new file mode 100644 index 0000000..8675a6c --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/java/marketing/heyday/hartmann/fotodocumentation/rest/MonitoringResourceTest.java @@ -0,0 +1,34 @@ +package marketing.heyday.hartmann.fotodocumentation.rest; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.apache.http.HttpResponse; +import org.apache.http.client.fluent.Request; +import org.junit.jupiter.api.Test; + +/** + * + *

Copyright: Copyright (c) 2024

+ *

Company: heyday Marketing GmbH

+ * @author Patrick Verboom + * @version 1.0 + * + * created: 13 Nov 2024 + */ + +public class MonitoringResourceTest extends AbstractRestTest { + + @Test + public void check() throws IOException { + String path = deploymentURL + "api/monitoring/check/hello"; + + Request request = Request.Get(path).addHeader("Accept", TEXT_PLAIN); + + HttpResponse httpResponse = executeRequest(request); + int code = httpResponse.getStatusLine().getStatusCode(); + assertEquals(200, code); + } +} + diff --git a/hartmann-foto-documentation-docker/src/test/resources/datasets/dataset.xml b/hartmann-foto-documentation-docker/src/test/resources/datasets/dataset.xml new file mode 100644 index 0000000..2f2aad4 --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/resources/datasets/dataset.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hartmann-foto-documentation-docker/src/test/resources/junit.properties b/hartmann-foto-documentation-docker/src/test/resources/junit.properties new file mode 100644 index 0000000..1bd6fc1 --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/resources/junit.properties @@ -0,0 +1,3 @@ +connection=jdbc:postgresql://localhost:5430/fotodocumentation +username=fotodocumentation +password=fotodocumentation diff --git a/hartmann-foto-documentation-docker/src/test/resources/log4j.xml b/hartmann-foto-documentation-docker/src/test/resources/log4j.xml new file mode 100644 index 0000000..92e24ab --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/resources/log4j.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hartmann-foto-documentation-docker/src/test/resources/upload/add.json b/hartmann-foto-documentation-docker/src/test/resources/upload/add.json new file mode 100644 index 0000000..4b6509d --- /dev/null +++ b/hartmann-foto-documentation-docker/src/test/resources/upload/add.json @@ -0,0 +1,8 @@ +{ + "username": "verboomp", + "pharmacyName": "Müller Apotheke", + "customerNumber": "1234", + "date": "2026-01-20T11:06:00+01:00", + "comment": "Some long text for Müller Pharmacy", + "base64String": "/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMgAA/+4AIUFkb2JlAGTAAAAAAQMAEAMDBgkAAB5dAABcFgAAd9z/2wCEAAgGBgYGBggGBggMCAcIDA4KCAgKDhANDQ4NDRARDA4NDQ4MEQ8SExQTEg8YGBoaGBgjIiIiIycnJycnJycnJycBCQgICQoJCwkJCw4LDQsOEQ4ODg4REw0NDg0NExgRDw8PDxEYFhcUFBQXFhoaGBgaGiEhICEhJycnJycnJycnJ//CABEIAZABRQMBIgACEQEDEQH/xAESAAEAAwEBAQEBAAAAAAAAAAAABQYHBAMCAQgBAQADAQEBAAAAAAAAAAAAAAACBAUDBgEQAAIDAAIBBAICAQIGAgMAAAIDAQQFAAYRECASEzAUQCEVMRZBIjIjMwdQJiQlNREAAgECBAMFBQUCCggEBgMAAQIDEQQAITESQRMFUWFxgSIQkaEyFCAwsUIjwVJA0WJygpIzQyQV8OHxorJTNAbCc5M10mODRCUWs8NUEgABAwEEBwcCBAUEAwAAAAABABECITFBURIQMGFxgZEDIKGxwdEiMkJSQPDhE1DxYnKDgpLC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AHomIigImIYIDIuFJxozKFFBLhogDMQBCZLThxMwzPB2g0xDBIPUTBsVDnAEe5KJ0PBDMRMq8MAdkY3hwj+8JHQtVrAQAh679wqBsogNyDuGFCBSH4HMCSYQYCGtp5oAwGQhgI096iIBZB/AnkjiGuQhR0BMEd04A4GhxMbC56ncAeQecCSICj84EAjhMIYHQ9hRCDOWA+BjLx1gYlwBGdRPkCACqxERDQJDooWDgjSiJF7GrX96QUySEORSIGAhDWEBxDv7pFIFkFIDWFXIgdqBKEzBgnyJixQDMh2oh4iSAM4QeHJkjpCmB8KwQNYCQJB0EfWkCBnonpFZBlIIInj4HlpMQAlBwoiJDaSiX/9k=" +} diff --git a/hartmann-foto-documentation-web/pom.xml b/hartmann-foto-documentation-web/pom.xml new file mode 100644 index 0000000..cf9c87c --- /dev/null +++ b/hartmann-foto-documentation-web/pom.xml @@ -0,0 +1,70 @@ + + 4.0.0 + + marketing.heyday.hartmann.fotodocumentation + hartmann-foto-documentation + 1.0.0 + ../hartmann-foto-documentation/pom.xml + + hartmann-foto-documentation-web + 1.0.0-SNAPSHOT + hartmann-foto-documentation web + war + + + + org.apache.maven.plugins + maven-site-plugin + + true + true + + + + + + + + + ${project.groupId} + hartmann-foto-documentation-app + ${project.version} + + + diff --git a/hartmann-foto-documentation-web/src/main/webapp/.FSync b/hartmann-foto-documentation-web/src/main/webapp/.FSync new file mode 100644 index 0000000..e69de29 diff --git a/hartmann-foto-documentation-web/src/main/webapp/.last_build_id b/hartmann-foto-documentation-web/src/main/webapp/.last_build_id new file mode 100644 index 0000000..7cf2aca --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/.last_build_id @@ -0,0 +1 @@ +20d9c068b272d7a2718d0d8e3e04271e \ No newline at end of file diff --git a/hartmann-foto-documentation-web/src/main/webapp/.sass-cache/eb7439011024ea2090517b484fb24cab7ef65b8d/styles.scssc b/hartmann-foto-documentation-web/src/main/webapp/.sass-cache/eb7439011024ea2090517b484fb24cab7ef65b8d/styles.scssc new file mode 100644 index 0000000..e4a7b6a Binary files /dev/null and b/hartmann-foto-documentation-web/src/main/webapp/.sass-cache/eb7439011024ea2090517b484fb24cab7ef65b8d/styles.scssc differ diff --git a/hartmann-foto-documentation-web/src/main/webapp/META-INF/MANIFEST.MF b/hartmann-foto-documentation-web/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5be8a35 --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Class-Path: commons-logging-1.1.1.jar cue-platform-storage-3.0.1-SN + APSHOT.jar commons-lang3-3.5.jar javaslang-2.0.2.jar javaslang-match-2. + 0.2.jar commons-io-2.4.jar org.eclipse.jgit-4.2.0.201601211800-r.jar js + ch-0.1.53.jar JavaEWAH-0.7.9.jar slf4j-api-1.7.2.jar cue-platform- + app-3.0.1-SNAPSHOT.jar cue-platform-push-3.0.1-SNAPSHOT.jar pushy- + 0.13.5.jar netty-codec-http2-4.1.25.Final.jar netty-codec-http-4.1.25.F + inal.jar netty-codec-4.1.25.Final.jar netty-transport-4.1.25.Final.jar + netty-buffer-4.1.25.Final.jar netty-common-4.1.25.Final.jar netty-resol + ver-4.1.25.Final.jar netty-handler-4.1.25.Final.jar netty-handler-proxy + -4.1.25.Final.jar netty-codec-socks-4.1.25.Final.jar netty-resolver-dns + -4.1.25.Final.jar netty-codec-dns-4.1.25.Final.jar fast-uuid-0.1.jar gs + on-2.2.4.jar primefaces-6.1.jar primefaces-extensions-6.1.1.jar compile + r-0.9.5.jar antlr4-4.5.jar antlr4-runtime-4.5.jar org.abego.treelayout. + core-1.0.1.jar antlr-runtime-3.5.2.jar ST4-4.0.8.jar json-schema-valida + tor-0.1.2.jar slf4j-ext-1.7.21.jar cal10n-api-0.8.1.jar commons-lang-2. + 6.jar omnifaces-2.6.2.jar flyway-core-3.1.jar commons-fileupload-1.3.ja + r poi-4.1.0.jar commons-codec-1.12.jar commons-collections4-4.3.jar com + mons-math3-3.6.1.jar poi-ooxml-4.1.0.jar poi-ooxml-schemas-4.1.0.jar xm + lbeans-3.1.0.jar commons-compress-1.18.jar curvesapi-1.06.jar cue- + platform-module-detailing-3.0.1-SNAPSHOT.jar cue-platform-module-c + ontent-3.0.1-SNAPSHOT.jar cue-platform-module-poll-3.0.1-SNAPSHOT. + jar resources-codemirror-6.1.1.jar + diff --git a/hartmann-foto-documentation-web/src/main/webapp/META-INF/context.xml b/hartmann-foto-documentation-web/src/main/webapp/META-INF/context.xml new file mode 100644 index 0000000..9b7ba60 --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/META-INF/context.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/beans.xml b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..be79900 --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-deployment-structure.xml new file mode 100644 index 0000000..df1c5bb --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-ejb3.xml b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-ejb3.xml new file mode 100644 index 0000000..39de0d9 --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-ejb3.xml @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-web.xml b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-web.xml new file mode 100644 index 0000000..37e8ba3 --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/jboss-web.xml @@ -0,0 +1,5 @@ + + + fotoDocumentationSecurity + / + \ No newline at end of file diff --git a/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/openapi-configuration.yaml b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/openapi-configuration.yaml new file mode 100644 index 0000000..efaa60d --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/openapi-configuration.yaml @@ -0,0 +1,5 @@ +prettyPrint: true +servers: + - url: https://localhost/api + description: Production server + - \ No newline at end of file diff --git a/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/web.xml b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..48df189 --- /dev/null +++ b/hartmann-foto-documentation-web/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + + + Secure + /api/login + + GET + POST + PUT + DELETE + + + ** + + + + + BASIC + fotoDocumentationRealm + + + diff --git a/hartmann-foto-documentation/pom.xml b/hartmann-foto-documentation/pom.xml new file mode 100644 index 0000000..28cddba --- /dev/null +++ b/hartmann-foto-documentation/pom.xml @@ -0,0 +1,506 @@ + + 4.0.0 + + marketing.heyday.maven + parentpom + 16 + + marketing.heyday.hartmann.fotodocumentation + hartmann-foto-documentation + pom + 1.0.0 + hartmann-foto-documentation + + scm:git:git@git.heyday.marketing:heyday-marketing-gmbh/hartmann-foto_documentation.git + https://git.heyday.marketing/?p=heyday-marketing-gmbh/hartmann-foto_documentation.git + HEAD + + + install + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.5.0 + + + enforce-maven + + enforce + + + + + 3.0 + + + + + + + + maven-site-plugin + + true + true + + + + + org.apache.maven.plugins + maven-war-plugin + 3.2.2 + + + + true + + + ${buildNumber} + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 21 + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M1 + + ${surefireArgLine} + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.lang.reflect=ALL-UNNAMED + --add-opens java.base/java.util.concurrent=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED + + true + + + **/test/helper/*.* + **/AllTest.* + + 1 + + **/*Test.java + **/*IT.java + + + + listener + org.sonar.java.jacoco.JUnitListener + + + + + + org.jacoco + jacoco-maven-plugin + + + marketing/heyday/hartmann/fotodocumentation/**/* + + + + + test + initialize + + prepare-agent + + + + + + pre-unit-test + + prepare-agent + + + + surefireArgLine + + + + + post-unit-test + verify + + report + + + + + + pre-integration-test + pre-integration-test + + prepare-agent-integration + + + true + + failsafeArgLine + + + + + post-integration-test + + verify + + report + report-aggregate + + + + XML + CSV + + + **/jacoco.exec + **/jacoco-it.exec + + + ${project.reporting.outputDirectory}/jacoco-aggregate + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${version.jacoco} + + + + org.codehaus.mojo + buildnumber-maven-plugin + 3.0.0 + + + validate + + create + + + + + false + false + 7 + true + + + + + + + + true + + + jacoco + reuseReports + + + ${project.basedir}/target/site/jacoco-aggregate/jacoco.xml + + 0.8.12 + + 0.8.12 + 1.1.11.Final + 2.2.0.Final + 6.2.5.Final + + 1.2 + 2.7 + 2.6 + 3.5 + 1.2 + 1.3 + 2.0.2 + + 4.3 + 13.0.3 + 13.0.3 + + 0.12.5 + + 2.2.19 + + + + + + + org.wildfly.bom + wildfly + 26.1.3.Final + pom + + + + jakarta.platform + jakarta.jakartaee-api + 10.0.0 + provided + + + + org.hibernate.orm + hibernate-core + 6.2.13.Final + provided + + + + + org.eclipse.parsson + parsson + 1.1.5 + provided + + + + jakarta.json + jakarta.json-api + 2.1.2 + provided + + + + + org.apache.poi + poi + 5.1.0 + + + org.apache.poi + poi-ooxml + 5.1.0 + + + dom4j + dom4j + + + stax + stax-api + + + + + + + + + + io.swagger.core.v3 + swagger-jaxrs2-jakarta + compile + ${swagger-version} + + + java.xml.bind + jaxb-api + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + + + + com.fasterxml.jackson.core + jackson-dataformat + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-core + + + + + io.swagger.core.v3 + swagger-jaxrs2-servlet-initializer-jakarta + ${swagger-version} + + + + + + org.apache.logging.log4j + log4j-api + 2.15.0 + + + org.apache.logging.log4j + log4j-core + 2.15.0 + + + + + + org.jboss.resteasy + resteasy-core + ${version.org.jboss.resteasy} + + + + org.jboss.resteasy + resteasy-core-spi + ${version.org.jboss.resteasy} + + + + org.jboss.resteasy + resteasy-multipart-provider + ${version.org.jboss.resteasy} + + + + org.jboss.resteasy + resteasy-jackson2-provider + ${version.org.jboss.resteasy} + provided + + + + + io.jsonwebtoken + jjwt-api + ${version.jsonwebtoken} + + + io.jsonwebtoken + jjwt-impl + ${version.jsonwebtoken} + runtime + + + io.jsonwebtoken + jjwt-jackson + ${version.jsonwebtoken} + runtime + + + + + + org.postgresql + postgresql + 9.4-1201-jdbc41 + test + + + org.slf4j + slf4j-log4j12 + 1.7.5 + test + + + org.mockito + mockito-junit-jupiter + 5.7.0 + test + + + org.mockito + mockito-core + 5.7.0 + test + + + net.bytebuddy + byte-buddy + 1.14.9 + test + + + + + org.junit.jupiter + junit-jupiter-api + 5.6.0 + test + + + org.junit.jupiter + junit-jupiter-params + 5.6.0 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.6.0 + test + + + + org.junit.platform + junit-platform-suite-engine + 1.9.2 + test + + + + org.junit.platform + junit-platform-suite-api + 1.9.2 + test + + + + org.junit.platform + junit-platform-launcher + 1.9.2 + test + + + + org.junit.platform + junit-platform-commons + 1.9.2 + test + + + + org.jacoco + org.jacoco.core + ${version.jacoco} + test + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..6d61c43 --- /dev/null +++ b/pom.xml @@ -0,0 +1,27 @@ + + 4.0.0 + + marketing.heyday.hartmann.fotodocumentation + hartman-foto-documentation + 1.0.0 + hartmann-foto-documentation/pom.xml + + + marketing.heyday.hartmann.fotodocumentation + hartmann-foto-documentation-root + 1.0.0-SNAPSHOT + pom + hartman-foto-documentation-root + + scm:git:git@git.heyday.marketing:heyday-marketing-gmbh/hartmann-foto_documentation.git + https://git.heyday.marketing/?p=heyday-marketing-gmbh/hartmann-foto_documentation.git + HEAD + + + hartmann-foto-documentation-app + hartmann-foto-documentation-web + hartmann-foto-documentation-docker + + + +