Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbucket-pipelines committed Mar 27, 2024
2 parents 1d08bff + 34567c7 commit 90f99e6
Show file tree
Hide file tree
Showing 53 changed files with 3,453 additions and 24 deletions.
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>magda</artifactId>
<groupId>be.vlaanderen.vip.mock</groupId>
<version>2.13.0</version>
<version>2.14.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion interfaces/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>magda</artifactId>
<groupId>be.vlaanderen.vip.mock</groupId>
<version>2.13.0</version>
<version>2.14.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

/**
* A request that pertains to a company, identified by KBO number.
Expand All @@ -15,6 +16,7 @@
* </ul>
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public abstract class CompanyMagdaRequest extends MagdaRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

Expand All @@ -31,6 +32,7 @@
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public class GeefBetalingenHandicapRequest extends PersonMagdaRequest {

public static class Builder extends PersonMagdaRequest.Builder<Builder> {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
package be.vlaanderen.vip.magda.client.diensten;

import be.vlaanderen.vip.magda.client.MagdaDocument;
import be.vlaanderen.vip.magda.client.MagdaServiceIdentification;
import be.vlaanderen.vip.magda.client.diensten.subject.INSZNumber;
import be.vlaanderen.vip.magda.client.domeinservice.MagdaRegistrationInfo;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.Set;

/**
* A request to a "GeefDossierHandicap" MAGDA service, which provides information regarding disability for an INSZ.
* Adds the following fields to the {@link PersonMagdaRequest}:
* <ul>
* <li>referenceDate: the reference date</li>
* <li>sources: include the sources to consult</li>
* <li>parts: include file parts</li>
* </ul>
*
* @see <a href="file:resources/templates/GeefDossierHandicap/03.00.0000/template.xml">XML template for this request type</a>
* @see <a href="https://vlaamseoverheid.atlassian.net/wiki/spaces/MG/pages/1624016756/SocZek.GeefDossierHandicap-03.00">More information on this request type</a>
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public class GeefDossierHandicapByDateRequest extends PersonMagdaRequest {

public static class Builder extends PersonMagdaRequest.Builder<Builder> {

@Getter(AccessLevel.PROTECTED)
private LocalDate referenceDate;
@Getter(AccessLevel.PROTECTED)
private Set<HandicapAuthenticSourceType> sources;
@Getter(AccessLevel.PROTECTED)
private Set<HandicapFilePartType> parts;


public Builder referenceDate(LocalDate date) {
this.referenceDate = date;
return this;
}

public Builder sources(Set<HandicapAuthenticSourceType> sources) {
this.sources = sources;
return this;
}

public Builder parts(Set<HandicapFilePartType> parts) {
this.parts = parts;
return this;
}

public GeefDossierHandicapByDateRequest build() {
if(getInsz() == null) { throw new IllegalStateException("INSZ number must be given"); }
if(getReferenceDate() == null) { throw new IllegalStateException("Reference date must be given"); }

return new GeefDossierHandicapByDateRequest(
getInsz(),
getRegistration(),
getReferenceDate(),
getSources(),
getParts()
);
}
}

public static Builder builder() {
return new Builder();
}

@NotNull
private final LocalDate referenceDate;
@Nullable
private final Set<HandicapAuthenticSourceType> sources;
@Nullable
private final Set<HandicapFilePartType> parts;

public GeefDossierHandicapByDateRequest(
@NotNull INSZNumber insz,
@NotNull String registration,
@NotNull LocalDate referenceDate,
@Nullable Set<HandicapAuthenticSourceType> sources,
@Nullable Set<HandicapFilePartType> parts) {
super(insz, registration);
this.referenceDate = referenceDate;
this.sources = sources;
this.parts = parts;
}

@Override
public MagdaServiceIdentification magdaServiceIdentification() {
return new MagdaServiceIdentification("GeefDossierHandicap", "03.00.0000");
}

@Override
protected void fillIn(MagdaDocument request, MagdaRegistrationInfo magdaRegistrationInfo) {
fillInCommonFields(request, magdaRegistrationInfo);

var dateFormatter = DateTimeFormatter.ISO_LOCAL_DATE;
request.setValue("//ConsultFilesByDateCriteria/ssin", getInsz().getValue());
request.setValue("//ConsultFilesByDateCriteria/referenceDate", getReferenceDate().format(dateFormatter));
Arrays.stream(HandicapAuthenticSourceType.values()).forEach(x -> {
request.createTextNode("//ConsultFilesByDateCriteria/handicapAuthenticSources", x.getTypeString(), getSources() != null && getSources().contains(x) ? "true" : "false");
});
Arrays.stream(HandicapFilePartType.values()).forEach(x -> {
request.createTextNode("//ConsultFilesByDateCriteria/parts", x.getTypeString(), getParts() != null && getParts().contains(x) ? "true" : "false");
});

request.removeNode("//ConsultFilesByPeriodCriteria");
}

public enum HandicapAuthenticSourceType {
DGPH("DGPH"),
VSB("VSB"),
IRISCARE("IrisCare"),
NICCIN("NicCin"),
AVIQ("AVIQ"),
DSL("DSL");

private final String typeString;

HandicapAuthenticSourceType(String typeString) {
this.typeString = typeString;
}

public String getTypeString() {
return typeString;
}
}

public enum HandicapFilePartType {
EVOLUTION_OF_REQUEST("evolutionOfRequest"),
HANDICAP_RECOGNITIONS("handicapRecognitions"),
RIGHTS("rights"),
SOCIAL_CARDS("socialCards");

private final String typeString;

HandicapFilePartType(String typeString) {
this.typeString = typeString;
}

public String getTypeString() {
return typeString;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

Expand All @@ -28,6 +29,7 @@
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public class GeefFunctiesByPersonRequest extends PersonMagdaRequest{

public static class Builder extends PersonMagdaRequest.Builder<Builder> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

Expand All @@ -27,6 +28,7 @@
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public class GeefHistoriekGezinssamenstellingRequest extends PersonMagdaRequest {

public static class Builder extends PersonMagdaRequest.Builder<Builder> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

Expand All @@ -26,6 +27,7 @@
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public class GeefLeefLoonBedragenRequest extends PersonMagdaRequest {

public static class Builder extends PersonMagdaRequest.Builder<Builder> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import java.time.LocalDate;
Expand All @@ -23,6 +24,7 @@
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public class GeefLoopbaanARZARequest extends PersonMagdaRequest {

public static class Builder extends PersonMagdaRequest.Builder<Builder> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import jakarta.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
Expand All @@ -25,6 +26,7 @@
* @see <a href="https://vlaamseoverheid.atlassian.net/wiki/spaces/MG/pages/1243022119/SocZek.GeefSociaalStatuut-03.00">More information on this request type</a>
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public class GeefSociaalStatuutRequest extends PersonMagdaRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

Expand All @@ -31,6 +32,7 @@
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public class GeefWerkrelatiesRequest extends PersonMagdaRequest{

public static class Builder extends PersonMagdaRequest.Builder<Builder> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

/**
* A request that pertains to a person, identified by INSZ number.
Expand All @@ -15,6 +16,7 @@
* </ul>
*/
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
public abstract class PersonMagdaRequest extends MagdaRequest {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="http://magda.vlaanderen.be/soczek/soap/geefdossierhandicap/v03_00">
<soapenv:Header/>
<soapenv:Body>
<web:GeefBetalingenHandicap>
<Verzoek>
<Context>
<Naam>GeefDossierHandicap</Naam>
<Versie>03.00.0000</Versie>
<Bericht>
<Type>VRAAG</Type>
<Tijdstip>
<Datum>Datum</Datum>
<Tijd>Tijd</Tijd>
</Tijdstip>
<Afzender>
<Identificatie>Identificatie</Identificatie>
<Referte>Referte</Referte>
<Hoedanigheid>Hoedanigheid</Hoedanigheid>
</Afzender>
</Bericht>
</Context>
<Vragen>
<Vraag>
<Referte>Referte</Referte>
<Inhoud>
<Criteria>
<ConsultFilesByDateCriteria>
<ssin>INSZ</ssin>
<handicapAuthenticSources></handicapAuthenticSources>
<referenceDate>ReferenceDate</referenceDate>
<parts></parts>
<decisionStatus>false</decisionStatus>
<enrichedRecognition>false</enrichedRecognition>
</ConsultFilesByDateCriteria>
<ConsultFilesByPeriodCriteria></ConsultFilesByPeriodCriteria>
</Criteria>
</Inhoud>
</Vraag>
</Vragen>
</Verzoek>
</web:GeefBetalingenHandicap>
</soapenv:Body>
</soapenv:Envelope>
Loading

0 comments on commit 90f99e6

Please sign in to comment.