Skip to content

Commit

Permalink
Merge pull request 'Release v24.06' (!335) from release_24.06 into ma…
Browse files Browse the repository at this point in the history
…ster
  • Loading branch information
janvonde committed Jul 10, 2024
2 parents 65384a6 + 47ae627 commit 1dfa1d7
Show file tree
Hide file tree
Showing 86 changed files with 1,678 additions and 410 deletions.
12 changes: 12 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ pipeline {
}
}
}
stage('trigger docker build') {
when {
anyOf {
branch 'master'
branch 'hotfix_release_*'
branch 'develop'
}
}
steps {
build wait: false, job: 'goobi-workflow/goobi-docker/master', parameters: [[$class: 'StringParameterValue', name: 'UPSTREAM_BRANCH', value: String.valueOf(BRANCH_NAME)]]
}
}
}
post {
always {
Expand Down
187 changes: 187 additions & 0 deletions install/config/config_contentServer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8" ?>
<config>

<!--########################################################## *#############################################################
* * general parameters * *#############################################################
*########################################################### -->

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
Path to local config file
/> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<localConfigPath value="/opt/digiverso/goobi/config/config_contentServer.xml" />

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * default
resulution for results of image processing * sample: <defaultResolution value="600"
/> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<defaultResolution value="600" />

<!-- (MB); if 0 then disabled -->
<maxFileLength value="0" />

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
Set quality with which to scale images. Possible settings are SPEED, QUALITY, ULTRAQUALITY
Higher qualities require more processing time
MaxStepSize may range from 0 to 99; higher values increase both image quality and loading times for QUALITY and ULTRAQUALITY.
Recommended values lie between 10 and 50
useScalrForJpeg activates a different scaling method for jpeg-images which generally operates
much slower, so it is recommended to set this option to "false"
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<scaling quality="QUALITY" maxStepSize="25" thumbnailQuality="QUALITY"></scaling>

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
General rendering options.
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<imageTypeSettings>
<type format="png">
<settings forceConvertToRGB="false"/>
</type>
<type format="jp2">
<settings allowSubSampling="true" scaleWithScalr="true"/>
</type>
<type colorType="grayscale">
<settings scaleWithScalr="false"></settings>
</type>
<type colorType="grayscale">
<settings forceConvertToRGB="true"></settings>
</type>
<type format="default" colorType="default" compression="default" embeddedColorProfile="both" minSize="0" maxSize="0">
<settings allowRenderWithJAI="false" allowSubSampling="true" scaleWithScalr="false" mergeWithJAI="false"
forceConvertToBuffered="false" forceConvertToRGB="false" forwardDirectlyIfPossible="true" preferredImageReader="com.twelvemonkeys"></settings>
</type>
</imageTypeSettings>

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * default
file names for pdf or image (file extension will be automatically added);
* define if sending of images or pdf should be with header "attachment" or
not; * currently available variables for file name: * - $datetime current
date and time (pdf and images) * * sample: * <defaultFileNames> * <pdf value="GoobiContentServer_$datetime"
sendAsAttachment="true"/> * </defaultFileNames> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<defaultFileNames>
<pdf value="ContentServer_$datetime" sendAsAttachment="true" />
<image value="image_$datetime" sendAsAttachment="false" />
</defaultFileNames>

<defaultImageConfig defaultFormat="jpeg"></defaultImageConfig>

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * configuration
for the pdf generation, these parameters will change the performance of pdf
generation * - alwaysUseRenderedImage convert all images always to rendered
image before sending it to iText * - alwaysCompressToJPEG compress all images
always to jpeg image before sending it to iText * - metsFileGroup the filegroup
to use for pdf generation * - writeAsPdfA write PDF file as Pdf/A * - pagesize
default page size for pdf generation; possible values are 'A4', 'original'
and 'A4Box' * sample: <defaultPdfConfig alwaysUseRenderedImage="true" alwaysCompressToJPEG="true"
metsFileGroup="DEFAULT" writeAsPdfA="true" pagesize="A4"/> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<!-- old config syntax, replaced by pdfConfig/config[@variant], see below -->
<!--
<defaultPdfConfig metsFileGroup="LOCAL" writeAsPdfA="false" imageScale="0.5" imageCompression="50"
pagesize="original" />
-->


<pdfConfig>
<config variant="pdfa"
metsFileGroup="LOCAL"
writeAsPdfA="true"
pagesize="original"
imageCompression="50"/>

<config variant="default"
metsFileGroup="LOCAL"
writeAsPdfA="false"
imageScale="0.5"
imageCompression="50"
pagesize="original" />
</pdfConfig>


<!--########################################################## *#############################################################
* * ContentServer parameters * *#############################################################
*########################################################### -->

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * default
path to repository for all image processing requests * if repository path
is empty, in the servlet request has to be a complete url * sample: <defaultRepositoryPath
value="file:///home/goobi/imageRepository/" /> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- for digiverso -->
<defaultRepositoryPathImages value="file:///opt/digiverso/goobi/metadata/" />
<!-- for ucc <defaultRepositoryPathImages value="file:///" /> -->

<defaultRepositoryPathPdf value="file:///"
usage="true" />


<defaultRepositoryPathAlto value="file:///"
usage="true" fontFile="NotoSansArabic-Regular.ttf"/>

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * default
color for highlighting inside the image as RGB *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<!-- gelb: 255 255 0 255 rot: 216 7 66 255 gruen: 0 154 107 255 blau: 0
154 255 255 -->

<defaultHighlightColor valueRed="255" valueGreen="255"
valueBlue="0" valueAlpha="255" />

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * configuration
if watermark should be used and url for watermark content configuration file
* sample: <watermark use="true" configFile="file:///home/goobi/config/watermarkconfig.xml"
/> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<watermark use="false" scale="true" convertColorSpace="false" scaleToPercent="6"
configFile="file:///opt/digiverso/goobi/config/config_imageFooter.xml" />

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * configuration
for the error watermark if message should not be shown on jsp echo page *
- title title on top of image * - titleSize fontsize for title * - messageSiz
fontsize for error message * - messageLineLength maximum size of letters
for each line *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<errorWaterMark title="Error" titleFontSize="20"
messageFontSize="14" messageMaxLineLength="60" />

<!--########################################################## *#############################################################
* * GoobiContentServer parameters * *#############################################################
*########################################################### -->

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * default
path to repository for all mets processing requests * if repository path
is empty, in the servlet request has to be a complete url * sample: <defaultRepositoryPath
value="file:///home/goobi/metsRepository/" /> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<defaultRepositoryPathMets value="" />

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * configuration
if titlepage for pdf file should be generated and * which config-file defines
how the title page should look like * * sample: <defaultRepositoryPath value="file:///home/goobi/config/pdftitlepage.xml"
/> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<pdfTitlePage use="false"
configFile="file:///opt/digiverso/goobi/config/config_pdfTitlePage.xml" />

<restapi use="true" useWatermark="false">
<discloseContentLocation>false</discloseContentLocation>
</restapi>


<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * path to
contentCache and maximum size in MB * -path: path in file system * -size:
size in MB * -useCache: central switch, if no cache at all should be used
* -useShortFileNames: define if the cached file name should only consist
of given url-parameter and divid (usShortFileNames=true, not recommended)
* or if it should be full named (useShortFileNames=false, more secure option)
* * sample: <contentCache useCache="false" path="/home/goobi/gcsCache" size="300"/>
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<contentCache useCache="false" useShortFileNames="false"/>

<thumbnailCache useCache="false" useShortFileNames="false"/>

<pdfCache useCache="false" useShortFileNames="false" />

<memoryUsage maximalParallelRequests="0" lowMemoryThreshold="0"></memoryUsage>

<S3>
<useCustom>true</useCustom>
<AccessKeyID>changeme</AccessKeyID>
<SecretAccessKey>changeme</SecretAccessKey>
<Endpoint>https://myendpoint.tld</Endpoint>
</S3>

</config>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.goobi.workflow</groupId>
<artifactId>workflow-base</artifactId>
<version>24.05</version>
<version>24.06</version>
<relativePath/>
</parent>
<artifactId>workflow-core</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/de/sub/goobi/config/ConfigurationHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ public String getProcessImagesFallbackDirectoryName() {
* This method is used to get information about custom processes. The process name is part of the configuration key.
*/
public String getAdditionalProcessFolderName(String foldername) {
return getLocalString("process.folder.images." + foldername, "");
return getAdditionalProcessFolderName("images", foldername);
}

public String getAdditionalProcessFolderName(String folder, String foldername) {
return getLocalString("process.folder." + folder + "." + foldername, "");
}

public String getProcessOcrTxtDirectoryName() {
Expand Down Expand Up @@ -1123,10 +1127,6 @@ public boolean isMetsEditorDisplayFileManipulation() {
return getLocalBoolean("MetsEditorDisplayFileManipulation", false);
}

public boolean isMetsEditorShowArchivedFolder() {
return getLocalBoolean("MetsEditorShowArchivedFolder", false);
}

public boolean isMetsEditorShowMetadataPopup() {
return getLocalBoolean("MetsEditorShowMetadataPopup", true);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/sub/goobi/export/dms/ExportDms.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ public boolean startExport(Process myProzess, String inZielVerzeichnis) throws I
return false;
}
}
newfile.setDigitalDocument(gdzfile.getDigitalDocument());
gdzfile = newfile;
// throw away validation file and re-read the original data
gdzfile = myProzess.readMetadataFile();

} catch (Exception exception) { //NOSONAR InterruptedException must not be re-thrown as it is not running in a separate thread
Helper.setFehlerMeldung(Helper.getTranslation("exportError") + myProzess.getTitel(), exception);
Expand Down
41 changes: 40 additions & 1 deletion src/main/java/de/sub/goobi/forms/AdditionalField.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
*/
package de.sub.goobi.forms;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand All @@ -46,7 +49,7 @@ public class AdditionalField {
@Getter
private boolean required = false;
@Getter
private String from = "prozess";
private String from = "process";
@Getter
@Setter
private List<SelectItem> selectList;
Expand All @@ -72,6 +75,13 @@ public class AdditionalField {
@Setter
private boolean multiselect = false;

@Getter
@Setter
private String fieldType;
@Getter
@Setter
private String pattern;

public void setInitStart(String newValue) {
this.initStart = newValue;
if (this.initStart == null) {
Expand Down Expand Up @@ -169,6 +179,35 @@ public void setValues(List<String> values) {
wert = wert.substring(0, wert.length() - 1);
}
}

public LocalDateTime getValueAsDateTime() {
if (StringUtils.isNotBlank(wert)) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
return LocalDateTime.from(formatter.parse(wert));
} else {
return LocalDateTime.now();
}
}

public void setValueAsDateTime(LocalDateTime date) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
wert = formatter.format(date);
}

public LocalDate getValueAsDate() {
if (StringUtils.isNotBlank(wert)) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
return LocalDate.from(formatter.parse(wert));
} else {
return LocalDate.now();
}
}

public void setValueAsDate(LocalDate date) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
wert = formatter.format(date);
}

}

/* =============================================================== */
2 changes: 1 addition & 1 deletion src/main/java/de/sub/goobi/forms/AdministrationForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class AdministrationForm implements Serializable {
@Setter
private IAdministrationPlugin administrationPlugin;

@Inject
@Inject // NOSONAR needs to be a field injection, as the been constructor does not allow arguments
@Push
PushContext adminPluginPush;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/sub/goobi/forms/MassImportForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class MassImportForm implements Serializable {

private static final String docStructsGetter = "getCurrentDocStructs";

@Inject
@Inject // NOSONAR needs to be a field injection, as the been constructor does not allow arguments
private GoobiScriptManager goobiScriptManager;
private ImportFormat format = null;
private final ImportPluginLoader ipl = new ImportPluginLoader();
Expand Down Expand Up @@ -168,7 +168,7 @@ public class MassImportForm implements Serializable {
@Getter
private Batch batch;

@Inject
@Inject // NOSONAR needs to be a field injection, as the been constructor does not allow arguments
private NavigationForm bean;

@Getter
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/sub/goobi/forms/NavigationForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public class NavigationForm implements Serializable {
private HashMap<String, String> uiStatus = new HashMap<>();
private String currentTheme = "/uii";

@Inject
@Inject // NOSONAR needs to be a field injection, as the been constructor does not allow arguments
@Push
PushContext workflowPluginPush;

Expand Down
Loading

0 comments on commit 1dfa1d7

Please sign in to comment.