Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Implement the ITI-48 transaction (Retrieve Value Set, SOAP) #354

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions commons/ihe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<module>xua</module>
<module>hpd</module>
<module>xacml20</module>
<module>svs</module>
</modules>

</project>
188 changes: 188 additions & 0 deletions commons/ihe/svs/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<artifactId>ipf-commons-ihe-svs</artifactId>
<name>ipf-commons-ihe-svs</name>
<description>SVS-specific IHE support</description>

<parent>
<groupId>org.openehealth.ipf.commons</groupId>
<artifactId>ipf-commons-ihe</artifactId>
<version>4.1-SNAPSHOT</version>
</parent>

<dependencies>
<!-- Dependencies for main -->
<dependency>
<groupId>org.openehealth.ipf.commons</groupId>
<artifactId>ipf-commons-ihe-ws</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v25</artifactId>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
</dependency>

<!-- Dependencies for test -->
<dependency>
<groupId>org.openehealth.ipf.commons</groupId>
<artifactId>ipf-commons-ihe-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.openehealth.ipf.commons</groupId>
<artifactId>ipf-commons-ihe-ws</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.openehealth.ipf.commons</groupId>
<artifactId>ipf-commons-xml</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>generate-stubs</id>
<build>
<plugins>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<addOutputDirectory>false</addOutputDirectory>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<outputDirectory>${output-folder}/generated-stubs</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>${jaxb-plugin-version}</version>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-jxc</artifactId>
<version>${jaxb-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb-version}</version>
</dependency>
</dependencies>
<configuration>
<sources>
<source>${project.build.directory}/generated-stubs/org/openehealth/ipf/commons/ihe/svs/core/requests</source>
<source>${project.build.directory}/generated-stubs/org/openehealth/ipf/commons/ihe/svs/core/responses</source>
</sources>
<schemaSourceExcludeFilters>
<filter implementation="org.codehaus.mojo.jaxb2.shared.filters.pattern.PatternFileFilter">
<patterns>
<pattern>builder/*\.java</pattern>
</patterns>
</filter>
</schemaSourceExcludeFilters>
<outputDirectory>${project.build.directory}/jaxb2</outputDirectory>
<createJavaDocAnnotations>false</createJavaDocAnnotations>
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>schemagen</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>none</phase>
</execution>
<execution>
<id>add-test-source</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<addOutputDirectory>false</addOutputDirectory>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-stubs</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright 2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.openehealth.ipf.commons.ihe.svs;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.openehealth.ipf.commons.ihe.core.IntegrationProfile;
import org.openehealth.ipf.commons.ihe.core.InteractionId;
import org.openehealth.ipf.commons.ihe.svs.core.audit.SvsAuditDataset;
import org.openehealth.ipf.commons.ihe.svs.iti48.Iti48AuditStrategy;
import org.openehealth.ipf.commons.ihe.svs.iti48.Iti48PortType;
import org.openehealth.ipf.commons.ihe.ws.WsInteractionId;
import org.openehealth.ipf.commons.ihe.ws.WsTransactionConfiguration;

import javax.xml.namespace.QName;
import java.util.Arrays;
import java.util.List;

/**
* Definitions for the Sharing Value Sets (SVS) integration profile of the IHE TF.
*
* @author Quentin Ligier
*/
public class SVS implements IntegrationProfile {

private static final SVS Instance = new SVS();

@AllArgsConstructor
public enum Interactions implements WsInteractionId<WsTransactionConfiguration<SvsAuditDataset>> {
ITI_48(ITI_48_WS_CONFIG);

@Getter
private final WsTransactionConfiguration<SvsAuditDataset> wsTransactionConfiguration;
}

@Override
public List<InteractionId> getInteractionIds() {
return Arrays.asList(Interactions.values());
}

private static final WsTransactionConfiguration<SvsAuditDataset> ITI_48_WS_CONFIG = new WsTransactionConfiguration<>(
"svs-iti48",
"Retrieve Value Set",
true,
new Iti48AuditStrategy(false),
new Iti48AuditStrategy(true),
new QName("urn:ihe:iti:svs:2008", "ValueSetRepository_Service", "ihe"),
Iti48PortType.class,
new QName("urn:ihe:iti:svs:2008", "ValueSetRepository_Binding_Soap12", "ihe"),
false,
"wsdl/iti48/iti48.wsdl",
true,
false,
false,
false
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright 2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.openehealth.ipf.commons.ihe.svs.core.audit;

import lombok.*;
import org.openehealth.ipf.commons.ihe.ws.cxf.audit.WsAuditDataset;

/**
* The audit dataset for SVS transactions.
*
* @author Quentin Ligier
*/
@Getter
@Setter
@ToString(callSuper = true)
public class SvsAuditDataset extends WsAuditDataset {

private static final long serialVersionUID = -8950614248765744542L;

/**
* The retrieved value set ID (OID).
*/
private String valueSetId;

/**
* The retrieved value set display name, if any.
*/
private String valueSetName;

/**
* The retrieved value set version, if any.
*/
private String valueSetVersion;

public SvsAuditDataset(boolean serverSide) {
super(serverSide);
this.setSourceUserIsRequestor(false);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.openehealth.ipf.commons.ihe.svs.core.audit;

import lombok.Getter;
import org.openehealth.ipf.commons.audit.types.EnumeratedCodedValue;
import org.openehealth.ipf.commons.audit.types.EventType;

/**
* EventTypes for the SVS module
*
* @author Quentin Ligier
*/
public enum SvsEventTypeCode implements EventType, EnumeratedCodedValue<EventType> {

RetrieveValueSet("ITI-48", "Retrieve Value Set");

@Getter
private final EventType value;

SvsEventTypeCode(String code, String displayName) {
this.value = EventType.of(code, "IHE Transactions", displayName);
}
}
Loading