Skip to content

Commit 33e5994

Browse files
author
Dominick Leppich
committed
Merge pull request 'Release v25.02' (#21) from release_25.02 into master
2 parents 75088e9 + ccc6109 commit 33e5994

26 files changed

+122
-152
lines changed

.github/workflows/develop-build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ jobs:
1414
steps:
1515
- name: Check out source code
1616
uses: actions/checkout@v4
17-
- name: Set up JDK 17
18-
uses: actions/setup-java@v1
17+
- name: Set up JDK 21
18+
uses: actions/setup-java@v4
1919
with:
20-
java-version: 17
20+
distribution: 'temurin'
21+
java-version: 21
2122
- name: Set up Maven cache
22-
uses: actions/cache@v1
23+
uses: actions/cache@v4
2324
with:
2425
path: ~/.m2/repository
2526
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

.github/workflows/release-build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ jobs:
1414
steps:
1515
- name: Check out source code
1616
uses: actions/checkout@v4
17-
- name: Set up JDK 17
18-
uses: actions/setup-java@v1
17+
- name: Set up JDK 21
18+
uses: actions/setup-java@v4
1919
with:
20-
java-version: 17
20+
distribution: 'temurin'
21+
java-version: 21
2122
- name: Set up Maven cache
22-
uses: actions/cache@v1
23+
uses: actions/cache@v4
2324
with:
2425
path: ~/.m2/repository
2526
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

Jenkinsfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ pipeline {
33

44
agent {
55
docker {
6-
/* using a custom build image with a defined home directory for UID 1000 among other things */
7-
image 'nexus.intranda.com:4443/maven:3.9.3-eclipse-temurin-17'
8-
registryUrl 'https://nexus.intranda.com:4443'
9-
registryCredentialsId 'jenkins-docker'
6+
image 'maven:3-eclipse-temurin-21'
107
args '-v $HOME/.m2:/var/maven/.m2:z -v $HOME/.config:/var/maven/.config -v $HOME/.sonar:/var/maven/.sonar -u 1000 -ti -e _JAVA_OPTIONS=-Duser.home=/var/maven -e MAVEN_CONFIG=/var/maven/.m2'
118
}
129
}

module-base/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>io.goobi.workflow.plugin</groupId>
55
<artifactId>plugin-workflow-entity-editor</artifactId>
6-
<version>24.12</version>
6+
<version>25.02</version>
77
</parent>
88
<artifactId>plugin-workflow-entity-editor-base</artifactId>
99
<packaging>jar</packaging>

module-base/src/main/java/de/intranda/goobi/plugins/EntityEditorWorkflowPlugin.java

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import java.util.Set;
1616
import java.util.UUID;
1717

18-
import javax.faces.event.AjaxBehaviorEvent;
19-
2018
import org.apache.commons.configuration.XMLConfiguration;
2119
import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine;
2220
import org.apache.commons.lang.StringUtils;
@@ -57,6 +55,7 @@
5755
import io.goobi.workflow.api.vocabulary.VocabularyAPIManager;
5856
import io.goobi.workflow.api.vocabulary.helper.ExtendedVocabularyRecord;
5957
import io.goobi.workflow.locking.LockingBean;
58+
import jakarta.faces.event.AjaxBehaviorEvent;
6059
import lombok.Getter;
6160
import lombok.Setter;
6261
import lombok.extern.log4j.Log4j2;
@@ -704,11 +703,7 @@ public void changeRelationship(Relationship relationship) {
704703
relationshipSourceType = relationship.getSourceType();
705704
changeRelationshipEntity = new Entity(getConfiguration(), currentProcess);
706705
addRelationship(changeRelationshipEntity.getCurrentType());
707-
if (relationship.isReverse()) {
708-
setRelationship(relationship.getType().getReversedRelationshipNameEn());
709-
} else {
710-
setRelationship(relationship.getType().getRelationshipNameEn());
711-
}
706+
setRelationship(relationship.getType().getRelationshipNameEn());
712707
}
713708

714709
public void changeRelationshipBetweenEntities() {
@@ -730,9 +725,18 @@ public void changeRelationshipBetweenEntities() {
730725
break;
731726
}
732727
}
728+
729+
// find reverse relationship type
730+
Optional<RelationshipType> otherRelationshipType = entityType.getConfiguredRelations().stream()
731+
.filter(r -> !selectedRelationship.getReversedRelationshipNameEn().isBlank() && selectedRelationship.getReversedRelationshipNameEn().equals(r.getRelationshipNameEn()))
732+
.findFirst();
733+
if (otherRelationshipType.isEmpty()) {
734+
otherRelationshipType = Optional.of(selectedRelationship);
735+
}
736+
733737
if (otherRelationship != null) {
734738
// update other type
735-
otherRelationship.setType(selectedRelationship);
739+
otherRelationship.setType(otherRelationshipType.get());
736740
if (selectedRelationship.isDisplayAdditionalData()) {
737741
otherRelationship.setAdditionalData(relationshipData);
738742
otherRelationship.setSourceType(relationshipSourceType);
@@ -795,11 +799,18 @@ public void addRelationshipBetweenEntities() {
795799
return;
796800
}
797801

798-
entity.addRelationship(selectedEntity, relationshipData, relationshipStartDate, relationshipEndDate, selectedRelationship, false,
802+
entity.addRelationship(selectedEntity, relationshipData, relationshipStartDate, relationshipEndDate, selectedRelationship,
799803
relationshipSourceType);
800804

805+
// find reverse relationship type
806+
Optional<RelationshipType> otherRelationshipType = entityType.getConfiguredRelations().stream()
807+
.filter(r -> !selectedRelationship.getReversedRelationshipNameEn().isBlank() && selectedRelationship.getReversedRelationshipNameEn().equals(r.getRelationshipNameEn()))
808+
.findFirst();
809+
if (otherRelationshipType.isEmpty()) {
810+
otherRelationshipType = Optional.of(selectedRelationship);
811+
}
801812
// reverse relationship in other entity
802-
selectedEntity.addRelationship(entity, relationshipData, relationshipStartDate, relationshipEndDate, selectedRelationship, true,
813+
selectedEntity.addRelationship(entity, relationshipData, relationshipStartDate, relationshipEndDate, otherRelationshipType.get(),
803814
relationshipSourceType);
804815

805816
// save both entities

module-gui/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>io.goobi.workflow.plugin</groupId>
55
<artifactId>plugin-workflow-entity-editor</artifactId>
6-
<version>24.12</version>
6+
<version>25.02</version>
77
</parent>
88
<artifactId>plugin-workflow-entity-editor-gui</artifactId>
99
<packaging>jar</packaging>

module-gui/src/main/webapp/resources/uii/includes/edit_relationship_modal.xhtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xmlns:composite="http://xmlns.jcp.org/jsf/composite"
55
xmlns:h="http://xmlns.jcp.org/jsf/html"
66
xmlns:f="http://xmlns.jcp.org/jsf/core"
7-
xmlns:x="http://myfaces.apache.org/tomahawk"
87
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
98
xmlns:jsf="http://xmlns.jcp.org/jsf"
109
xmlns:intranda="http://xmlns.jcp.org/jsf/composite/composites">
@@ -73,7 +72,7 @@
7372
</h3>
7473

7574

76-
<x:dataList
75+
<ui:repeat
7776
value="#{NavigationForm.workflowPlugin.changeRelationshipEntity.metadataFieldList}"
7877
var="configuredField">
7978

@@ -129,7 +128,7 @@
129128
</h:panelGroup>
130129
</h:panelGroup>
131130
</ui:repeat>
132-
</x:dataList>
131+
</ui:repeat>
133132
</div>
134133
</div>
135134

module-gui/src/main/webapp/resources/uii/includes/geonames_search_modal.xhtml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xmlns:composite="http://xmlns.jcp.org/jsf/composite"
55
xmlns:h="http://xmlns.jcp.org/jsf/html"
66
xmlns:f="http://xmlns.jcp.org/jsf/core"
7-
xmlns:x="http://myfaces.apache.org/tomahawk"
87
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
98
xmlns:jsf="http://xmlns.jcp.org/jsf">
109

@@ -61,7 +60,7 @@
6160

6261
<div class="vocab-search-modal__search-bar">
6362

64-
<x:inputText
63+
<h:inputText
6564
id="geonamesSearchInput"
6665
styleClass="form-control"
6766
value="#{NavigationForm.workflowPlugin.geonamesSearchValue}"
@@ -97,7 +96,7 @@
9796
layout="block"
9897
styleClass="modal__gnd-list scrollable vocab-search-modal__search-results"
9998
rendered="#{NavigationForm.workflowPlugin.resultList ne null and NavigationForm.workflowPlugin.resultList.size() != 0}">
100-
<x:dataList
99+
<ui:repeat
101100
value="#{NavigationForm.workflowPlugin.resultList}"
102101
var="geonames">
103102
<div class="row vocab-search-modal__card">
@@ -195,7 +194,7 @@
195194

196195

197196
<hr />
198-
</x:dataList>
197+
</ui:repeat>
199198
</h:panelGroup>
200199

201200

module-gui/src/main/webapp/resources/uii/includes/image_modal.xhtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xmlns:composite="http://xmlns.jcp.org/jsf/composite"
55
xmlns:h="http://xmlns.jcp.org/jsf/html"
66
xmlns:f="http://xmlns.jcp.org/jsf/core"
7-
xmlns:x="http://myfaces.apache.org/tomahawk"
87
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
98
xmlns:jsf="http://xmlns.jcp.org/jsf"
109
xmlns:intranda="http://xmlns.jcp.org/jsf/composite/composites">

module-gui/src/main/webapp/resources/uii/includes/link_entity_modal.xhtml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xmlns:composite="http://xmlns.jcp.org/jsf/composite"
55
xmlns:h="http://xmlns.jcp.org/jsf/html"
66
xmlns:f="http://xmlns.jcp.org/jsf/core"
7-
xmlns:x="http://myfaces.apache.org/tomahawk"
87
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
98
xmlns:jsf="http://xmlns.jcp.org/jsf"
109
xmlns:intranda="http://xmlns.jcp.org/jsf/composite/composites">
@@ -64,7 +63,7 @@
6463
<h:outputLabel
6564
value="#{msgs.plugin_workflow_entity_editor_searchTerm}"
6665
for="linkSearchInput" />
67-
<x:inputText
66+
<h:inputText
6867
id="linkSearchInput"
6968
styleClass="form-control"
7069
value="#{NavigationForm.workflowPlugin.entitySearch}" />
@@ -116,13 +115,13 @@
116115
rendered="#{NavigationForm.workflowPlugin.entities != null and NavigationForm.workflowPlugin.entities.size() != 0}">
117116

118117
<div class="modal__gnd-list link-entity-modal__search-results">
119-
<x:dataList
118+
<ui:repeat
120119
value="#{NavigationForm.workflowPlugin.entities}"
121120
var="record">
122121
<div class="row link-entity-modal__card">
123122
<h3>#{record.entityName}</h3>
124123
<div class="col-sm-11 vocabulary-searchfield">
125-
<x:dataList
124+
<ui:repeat
126125
value="#{record.metadataFieldList}"
127126
var="configuredField">
128127

@@ -178,7 +177,7 @@
178177
</ui:repeat>
179178

180179

181-
</x:dataList>
180+
</ui:repeat>
182181
</div>
183182

184183
<div class="col-sm-1 vocabulary-searchfield">
@@ -197,7 +196,7 @@
197196
</div>
198197
</div>
199198

200-
</x:dataList>
199+
</ui:repeat>
201200

202201
</div>
203202
</ui:fragment>
@@ -222,7 +221,7 @@
222221
</h3>
223222

224223

225-
<x:dataList
224+
<ui:repeat
226225
value="#{NavigationForm.workflowPlugin.selectedEntity.metadataFieldList}"
227226
var="configuredField">
228227

@@ -278,7 +277,7 @@
278277
</h:panelGroup>
279278
</h:panelGroup>
280279
</ui:repeat>
281-
</x:dataList>
280+
</ui:repeat>
282281
</div>
283282
</div>
284283

0 commit comments

Comments
 (0)