Skip to content

Commit

Permalink
Merge pull request 'Release v24.09' (#13) from release_24.09 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Leppich committed Oct 1, 2024
2 parents e808637 + ec8084e commit b1b541e
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 54 deletions.
9 changes: 9 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pipeline {
branch 'master'
branch 'release_*'
branch 'hotfix_release_*'
branch 'sonar_*'
allOf {
branch 'PR-*'
expression { env.CHANGE_BRANCH.startsWith("release_") }
Expand Down Expand Up @@ -55,6 +56,14 @@ pipeline {
sh 'mvn clean verify -U -P release-build'
}
}
stage('build-sonar') {
when {
branch 'sonar_*'
}
steps {
sh 'mvn clean verify -U -P sonar-build'
}
}
stage('sonarcloud') {
when {
allOf {
Expand Down
2 changes: 1 addition & 1 deletion module-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.goobi.workflow.plugin</groupId>
<artifactId>plugin-step-metadata-edition</artifactId>
<version>24.08.1</version>
<version>24.09</version>
</parent>
<artifactId>plugin-step-metadata-edition-base</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
package de.intranda.goobi.plugins;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;

import org.apache.commons.configuration.HierarchicalConfiguration;
import org.apache.commons.configuration.SubnodeConfiguration;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.ResultSetHandler;
import org.apache.commons.lang.StringUtils;
import org.goobi.beans.Process;
import org.goobi.beans.Processproperty;
import org.goobi.beans.Step;
import org.goobi.production.cli.helper.StringPair;
import org.goobi.production.enums.PluginGuiType;
import org.goobi.production.enums.PluginReturnValue;
import org.goobi.production.enums.PluginType;
import org.goobi.production.enums.StepReturnValue;
import org.goobi.production.flow.statistics.hibernate.FilterHelper;
import org.goobi.production.plugin.interfaces.IStepPluginVersion2;
import org.primefaces.event.CloseEvent;

import de.intranda.goobi.plugins.ProcessMetadata.ProcessMetadataField;
import de.sub.goobi.config.ConfigPlugins;
import de.sub.goobi.helper.FacesContextHelper;
Expand All @@ -23,22 +70,6 @@
import lombok.Setter;
import lombok.extern.log4j.Log4j2;
import net.xeoh.plugins.base.annotations.PluginImplementation;
import org.apache.commons.configuration.HierarchicalConfiguration;
import org.apache.commons.configuration.SubnodeConfiguration;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.ResultSetHandler;
import org.apache.commons.lang.StringUtils;
import org.goobi.beans.Process;
import org.goobi.beans.Processproperty;
import org.goobi.beans.Step;
import org.goobi.production.cli.helper.StringPair;
import org.goobi.production.enums.PluginGuiType;
import org.goobi.production.enums.PluginReturnValue;
import org.goobi.production.enums.PluginType;
import org.goobi.production.enums.StepReturnValue;
import org.goobi.production.flow.statistics.hibernate.FilterHelper;
import org.goobi.production.plugin.interfaces.IStepPluginVersion2;
import org.primefaces.event.CloseEvent;
import ugh.dl.DigitalDocument;
import ugh.dl.DocStruct;
import ugh.dl.Fileformat;
Expand All @@ -51,36 +82,6 @@
import ugh.exceptions.ReadException;
import ugh.exceptions.WriteException;

import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

@Log4j2
@PluginImplementation
public class MetadataEditionPlugin implements IStepPluginVersion2 {
Expand Down Expand Up @@ -203,7 +204,6 @@ public class MetadataEditionPlugin implements IStepPluginVersion2 {
@Setter
private boolean displayMetadataAddPopup = false;


private VocabularyAPIManager vocabularyAPI = VocabularyAPIManager.getInstance();

@Override
Expand Down Expand Up @@ -379,7 +379,8 @@ private void initDisplayFields(SubnodeConfiguration config) {
ExtendedVocabulary vocabulary = vocabularyAPI.vocabularies().findByName(vocabularyName);
vocabularyUrl = vocabulary.getURI();
VocabularySchema schema = vocabularyAPI.vocabularySchemas().get(vocabulary.getSchemaId());
Optional<FieldDefinition> searchField = schema.getDefinitions().stream()
Optional<FieldDefinition> searchField = schema.getDefinitions()
.stream()
.filter(d -> d.getName().equals(searchFieldName))
.findFirst();

Expand Down Expand Up @@ -431,7 +432,7 @@ private void initDisplayFields(SubnodeConfiguration config) {
}
if (!found) {
Processproperty property = new Processproperty();
property.setContainer(0);
property.setContainer("0");
property.setCreationDate(new Date());
property.setProcessId(this.process.getId());
property.setProzess(this.process);
Expand Down Expand Up @@ -1000,7 +1001,7 @@ public void addField() {

if ("property".contains(field.getSource())) {
Processproperty property = new Processproperty();
property.setContainer(0);
property.setContainer("0");
property.setCreationDate(new Date());
property.setProcessId(this.process.getId());
property.setProzess(this.process);
Expand Down Expand Up @@ -1068,7 +1069,7 @@ public void addMetadataField() {
switch (this.selectedField.getSource()) {
case "property":
Processproperty property = new Processproperty();
property.setContainer(0);
property.setContainer("0");
property.setCreationDate(new Date());
property.setProcessId(this.process.getId());
property.setProzess(this.process);
Expand Down
2 changes: 1 addition & 1 deletion module-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.goobi.workflow.plugin</groupId>
<artifactId>plugin-step-metadata-edition</artifactId>
<version>24.08.1</version>
<version>24.09</version>
</parent>
<artifactId>plugin-step-metadata-edition-gui</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.goobi.workflow</groupId>
<artifactId>workflow-base</artifactId>
<version>24.08.1</version>
<version>24.09</version>
<relativePath />
</parent>
<groupId>io.goobi.workflow.plugin</groupId>
Expand Down

0 comments on commit b1b541e

Please sign in to comment.