Skip to content

Commit b7b1576

Browse files
committed
update to dsf.dev namespace
1 parent 06e6f01 commit b7b1576

33 files changed

+457
-609
lines changed

.github/workflows/maven-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Set up JDK 11
15+
- name: Set up JDK 17
1616
uses: actions/setup-java@v1
1717
with:
18-
java-version: 11
18+
java-version: 17
1919
- name: Build with Maven
2020
env:
2121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v2
24-
- name: Set up JDK 11
24+
- name: Set up JDK 17
2525
uses: actions/setup-java@v1
2626
with:
27-
java-version: 11
27+
java-version: 17
2828
- name: Publish with Maven
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

eclipse-formatter-config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<profiles version="20">
3-
<profile kind="CodeFormatterProfile" name="highmed_dsf" version="20">
3+
<profile kind="CodeFormatterProfile" name="dsf" version="20">
44
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
55
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
66
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>

pom.xml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<compileSource>17</compileSource>
1515
<compileTarget>17</compileTarget>
1616

17-
<dsf.version>0.9.0</dsf.version>
17+
<dsf.version>1.0.0-SNAPSHOT</dsf.version>
1818
<dsf.location>../dsf</dsf.location>
1919
</properties>
2020

@@ -38,9 +38,10 @@
3838

3939
<dependencies>
4040
<dependency>
41-
<groupId>org.highmed.dsf</groupId>
41+
<groupId>dev.dsf</groupId>
4242
<artifactId>dsf-bpe-process-base</artifactId>
4343
<version>${dsf.version}</version>
44+
<scope>provided</scope>
4445
</dependency>
4546

4647
<dependency>
@@ -52,14 +53,14 @@
5253

5354
<!-- testing -->
5455
<dependency>
55-
<groupId>org.highmed.dsf</groupId>
56+
<groupId>dev.dsf</groupId>
5657
<artifactId>dsf-bpe-process-base</artifactId>
5758
<version>${dsf.version}</version>
5859
<scope>test</scope>
5960
<type>test-jar</type>
6061
</dependency>
6162
<dependency>
62-
<groupId>org.highmed.dsf</groupId>
63+
<groupId>dev.dsf</groupId>
6364
<artifactId>dsf-fhir-validation</artifactId>
6465
<version>${dsf.version}</version>
6566
<scope>test</scope>
@@ -155,25 +156,6 @@
155156
<staticGroups>java,*</staticGroups>
156157
</configuration>
157158
</plugin>
158-
<!--
159-
<plugin>
160-
<groupId>dev.dsf</groupId>
161-
<artifactId>dsf-tools-documentation-generator</artifactId>
162-
<version>${dsf.version}</version>
163-
<executions>
164-
<execution>
165-
<goals>
166-
<goal>generate</goal>
167-
</goals>
168-
</execution>
169-
</executions>
170-
<configuration>
171-
<workingPackages>
172-
<workingPackage>dev.dsf.bpe</workingPackage>
173-
</workingPackages>
174-
</configuration>
175-
</plugin>
176-
-->
177159
</plugins>
178160
</build>
179161

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package dev.dsf.bpe;
2+
3+
public interface ConstantsUpdateAllowList
4+
{
5+
String PROCESS_NAME_DOWNLOAD_ALLOW_LIST = "downloadAllowList";
6+
String PROCESS_NAME_UPDATE_ALLOW_LIST = "updateAllowList";
7+
8+
String PROCESS_NAME_FULL_DOWNLOAD_ALLOW_LIST = "dsfdev_" + PROCESS_NAME_DOWNLOAD_ALLOW_LIST;
9+
String PROCESS_NAME_FULL_UPDATE_ALLOW_LIST = "dsfdev_" + PROCESS_NAME_UPDATE_ALLOW_LIST;
10+
11+
String CODESYSTEM_DSF_UPDATE_ALLOW_LIST = "http://dsf.dev/fhir/CodeSystem/update-allow-list";
12+
String CODESYSTEM_DSF_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST = "allow_list";
13+
14+
String PROFILE_DSF_TASK_DOWNLOAD_ALLOW_LIST = "http://dsf.dev/fhir/StructureDefinition/task-download-allow-list";
15+
String PROFILE_DSF_TASK_DOWNLOAD_ALLOW_LIST_AND_LATEST_VERSION = PROFILE_DSF_TASK_DOWNLOAD_ALLOW_LIST + "|"
16+
+ UpdateAllowListProcessPluginDefinition.VERSION;
17+
String PROFILE_DSF_TASK_DOWNLOAD_ALLOW_LIST_PROCESS_URI = ConstantsBase.PROCESS_DSF_URI_BASE
18+
+ PROCESS_NAME_DOWNLOAD_ALLOW_LIST + "/";
19+
String PROFILE_DSF_TASK_DOWNLOAD_ALLOW_LIST_PROCESS_URI_AND_LATEST_VERSION = PROFILE_DSF_TASK_DOWNLOAD_ALLOW_LIST_PROCESS_URI
20+
+ UpdateAllowListProcessPluginDefinition.VERSION;
21+
String PROFILE_DSF_TASK_DOWNLOAD_ALLOW_LIST_MESSAGE_NAME = "downloadAllowListMessage";
22+
23+
String PROFILE_DSF_TASK_UPDATE_ALLOW_LIST = "http://dsf.dev/fhir/StructureDefinition/task-update-allow-list";
24+
String PROFILE_DSF_TASK_UPDATE_ALLOW_LIST_AND_LATEST_VERSION = PROFILE_DSF_TASK_UPDATE_ALLOW_LIST + "|"
25+
+ UpdateAllowListProcessPluginDefinition.VERSION;
26+
String PROFILE_DSF_TASK_UPDATE_ALLOW_LIST_PROCESS_URI = ConstantsBase.PROCESS_DSF_URI_BASE
27+
+ PROCESS_NAME_UPDATE_ALLOW_LIST + "/";
28+
String PROFILE_DSF_TASK_UPDATE_ALLOW_LIST_PROCESS_URI_AND_LATEST_VERSION = PROFILE_DSF_TASK_UPDATE_ALLOW_LIST_PROCESS_URI
29+
+ UpdateAllowListProcessPluginDefinition.VERSION;
30+
String PROFILE_DSF_TASK_UPDATE_ALLOW_LIST_MESSAGE_NAME = "updateAllowListMessage";
31+
}

src/main/java/org/highmed/dsf/bpe/UpdateAllowListProcessPluginDefinition.java renamed to src/main/java/dev/dsf/bpe/UpdateAllowListProcessPluginDefinition.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
package org.highmed.dsf.bpe;
2-
3-
import static org.highmed.dsf.bpe.ConstantsUpdateAllowList.PROCESS_NAME_FULL_DOWNLOAD_ALLOW_LIST;
4-
import static org.highmed.dsf.bpe.ConstantsUpdateAllowList.PROCESS_NAME_FULL_UPDATE_ALLOW_LIST;
1+
package dev.dsf.bpe;
52

63
import java.time.LocalDate;
74
import java.util.Arrays;
85
import java.util.List;
96
import java.util.Map;
107
import java.util.stream.Stream;
118

12-
import org.highmed.dsf.bpe.spring.config.UpdateAllowListConfig;
13-
import org.highmed.dsf.fhir.resources.AbstractResource;
14-
import org.highmed.dsf.fhir.resources.ActivityDefinitionResource;
15-
import org.highmed.dsf.fhir.resources.CodeSystemResource;
16-
import org.highmed.dsf.fhir.resources.ResourceProvider;
17-
import org.highmed.dsf.fhir.resources.StructureDefinitionResource;
18-
import org.highmed.dsf.fhir.resources.ValueSetResource;
199
import org.springframework.core.env.PropertyResolver;
2010

2111
import ca.uhn.fhir.context.FhirContext;
12+
import dev.dsf.bpe.spring.config.UpdateAllowListConfig;
13+
import dev.dsf.fhir.resources.AbstractResource;
14+
import dev.dsf.fhir.resources.ActivityDefinitionResource;
15+
import dev.dsf.fhir.resources.CodeSystemResource;
16+
import dev.dsf.fhir.resources.ResourceProvider;
17+
import dev.dsf.fhir.resources.StructureDefinitionResource;
18+
import dev.dsf.fhir.resources.ValueSetResource;
2219

2320
public class UpdateAllowListProcessPluginDefinition implements ProcessPluginDefinition
2421
{
@@ -59,19 +56,21 @@ public Stream<Class<?>> getSpringConfigClasses()
5956
public ResourceProvider getResourceProvider(FhirContext fhirContext, ClassLoader classLoader,
6057
PropertyResolver resolver)
6158
{
62-
var c = CodeSystemResource.file("fhir/CodeSystem/highmed-update-allow-list.xml");
59+
var c = CodeSystemResource.file("fhir/CodeSystem/dsf-update-allow-list.xml");
6360

64-
var aDown = ActivityDefinitionResource.file("fhir/ActivityDefinition/highmed-downloadAllowList.xml");
65-
var aUp = ActivityDefinitionResource.file("fhir/ActivityDefinition/highmed-updateAllowList.xml");
61+
var aDown = ActivityDefinitionResource.file("fhir/ActivityDefinition/dsf-downloadAllowList.xml");
62+
var aUp = ActivityDefinitionResource.file("fhir/ActivityDefinition/dsf-updateAllowList.xml");
6663

67-
var sDown = StructureDefinitionResource.file("fhir/StructureDefinition/highmed-task-download-allow-list.xml");
68-
var sUp = StructureDefinitionResource.file("fhir/StructureDefinition/highmed-task-update-allow-list.xml");
64+
var sDown = StructureDefinitionResource.file("fhir/StructureDefinition/dsf-task-download-allow-list.xml");
65+
var sUp = StructureDefinitionResource.file("fhir/StructureDefinition/dsf-task-update-allow-list.xml");
6966

70-
var v = ValueSetResource.file("fhir/ValueSet/highmed-update-allow-list.xml");
67+
var v = ValueSetResource.file("fhir/ValueSet/dsf-update-allow-list.xml");
7168

7269
Map<String, List<AbstractResource>> resourcesByProcessKeyAndVersion = Map.of(
73-
PROCESS_NAME_FULL_DOWNLOAD_ALLOW_LIST + "/" + VERSION, Arrays.asList(c, aDown, sDown, v),
74-
PROCESS_NAME_FULL_UPDATE_ALLOW_LIST + "/" + VERSION, Arrays.asList(c, aUp, sUp, v));
70+
ConstantsUpdateAllowList.PROCESS_NAME_FULL_DOWNLOAD_ALLOW_LIST + "/" + VERSION,
71+
Arrays.asList(c, aDown, sDown, v),
72+
ConstantsUpdateAllowList.PROCESS_NAME_FULL_UPDATE_ALLOW_LIST + "/" + VERSION,
73+
Arrays.asList(c, aUp, sUp, v));
7574

7675
return ResourceProvider.read(VERSION, RELEASE_DATE,
7776
() -> fhirContext.newXmlParser().setStripVersionsFromReferences(false), classLoader, resolver,

src/main/java/org/highmed/dsf/bpe/service/DownloadAllowList.java renamed to src/main/java/dev/dsf/bpe/service/DownloadAllowList.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
package org.highmed.dsf.bpe.service;
2-
3-
import static org.highmed.dsf.bpe.ConstantsUpdateAllowList.CODESYSTEM_HIGHMED_UPDATE_ALLOW_LIST;
4-
import static org.highmed.dsf.bpe.ConstantsUpdateAllowList.CODESYSTEM_HIGHMED_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST;
1+
package dev.dsf.bpe.service;
52

63
import java.util.EnumSet;
74
import java.util.List;
85
import java.util.Objects;
9-
import java.util.stream.Collectors;
10-
11-
import javax.ws.rs.WebApplicationException;
126

137
import org.camunda.bpm.engine.delegate.DelegateExecution;
14-
import org.highmed.dsf.bpe.delegate.AbstractServiceDelegate;
15-
import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper;
16-
import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider;
17-
import org.highmed.dsf.fhir.task.TaskHelper;
18-
import org.highmed.fhir.client.FhirWebserviceClient;
198
import org.hl7.fhir.r4.model.Bundle;
209
import org.hl7.fhir.r4.model.Bundle.BundleType;
2110
import org.hl7.fhir.r4.model.IdType;
@@ -25,6 +14,13 @@
2514
import org.slf4j.LoggerFactory;
2615

2716
import ca.uhn.fhir.context.FhirContext;
17+
import dev.dsf.bpe.ConstantsUpdateAllowList;
18+
import dev.dsf.bpe.delegate.AbstractServiceDelegate;
19+
import dev.dsf.fhir.authorization.read.ReadAccessHelper;
20+
import dev.dsf.fhir.client.FhirWebserviceClient;
21+
import dev.dsf.fhir.client.FhirWebserviceClientProvider;
22+
import dev.dsf.fhir.task.TaskHelper;
23+
import jakarta.ws.rs.WebApplicationException;
2824

2925
public class DownloadAllowList extends AbstractServiceDelegate
3026
{
@@ -93,24 +89,28 @@ protected void doExecute(DelegateExecution execution) throws Exception
9389

9490
private IdType getBundleId(Task task)
9591
{
96-
List<Reference> bundleReferences = getTaskHelper().getInputParameterReferenceValues(task,
97-
CODESYSTEM_HIGHMED_UPDATE_ALLOW_LIST, CODESYSTEM_HIGHMED_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST)
98-
.collect(Collectors.toList());
92+
List<Reference> bundleReferences = getTaskHelper()
93+
.getInputParameterReferenceValues(task, ConstantsUpdateAllowList.CODESYSTEM_DSF_UPDATE_ALLOW_LIST,
94+
ConstantsUpdateAllowList.CODESYSTEM_DSF_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST)
95+
.toList();
9996

10097
if (bundleReferences.size() != 1)
10198
{
10299
logger.error("Task input parameter {} contains unexpected number of Bundle IDs, expected 1, got {}",
103-
CODESYSTEM_HIGHMED_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST, bundleReferences.size());
104-
throw new RuntimeException("Task input parameter " + CODESYSTEM_HIGHMED_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST
105-
+ " contains unexpected number of Bundle IDs, expected 1, got " + bundleReferences.size());
100+
ConstantsUpdateAllowList.CODESYSTEM_DSF_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST,
101+
bundleReferences.size());
102+
throw new RuntimeException(
103+
"Task input parameter " + ConstantsUpdateAllowList.CODESYSTEM_DSF_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST
104+
+ " contains unexpected number of Bundle IDs, expected 1, got " + bundleReferences.size());
106105
}
107106
else if (!bundleReferences.get(0).hasReference()
108107
|| !bundleReferences.get(0).getReference().contains("/Bundle/"))
109108
{
110109
logger.error("Task input parameter {} has no Bundle reference",
111-
CODESYSTEM_HIGHMED_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST);
112-
throw new RuntimeException("Task input parameter " + CODESYSTEM_HIGHMED_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST
113-
+ " has no Bundle reference");
110+
ConstantsUpdateAllowList.CODESYSTEM_DSF_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST);
111+
throw new RuntimeException(
112+
"Task input parameter " + ConstantsUpdateAllowList.CODESYSTEM_DSF_UPDATE_ALLOW_LIST_VALUE_ALLOW_LIST
113+
+ " has no Bundle reference");
114114
}
115115

116116
return new IdType(bundleReferences.get(0).getReference());

0 commit comments

Comments
 (0)