-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
538 additions
and
243 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/main/java/it/gov/pagopa/atmlayer/service/model/client/ProcessClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package it.gov.pagopa.atmlayer.service.model.client; | ||
|
||
import io.smallrye.mutiny.Uni; | ||
import it.gov.pagopa.atmlayer.service.model.dto.DeployResponseDto; | ||
import jakarta.ws.rs.Consumes; | ||
import jakarta.ws.rs.FormParam; | ||
import jakarta.ws.rs.POST; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.MediaType; | ||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; | ||
|
||
@RegisterRestClient(configKey = "process-deploy") | ||
public interface ProcessClient { | ||
@POST | ||
@Path("/api/v1/processes/deploy") | ||
@Consumes(MediaType.APPLICATION_FORM_URLENCODED) | ||
@Produces(MediaType.APPLICATION_JSON) | ||
Uni<DeployResponseDto> deploy(@FormParam("url") String url); | ||
} |
62 changes: 31 additions & 31 deletions
62
src/main/java/it/gov/pagopa/atmlayer/service/model/constraint/BankKeyConstraint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
package it.gov.pagopa.atmlayer.service.model.constraint; | ||
|
||
import it.gov.pagopa.atmlayer.service.model.validators.BankKeyValidator; | ||
import jakarta.validation.Constraint; | ||
import jakarta.validation.Payload; | ||
import jakarta.validation.constraintvalidation.SupportedValidationTarget; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import static jakarta.validation.constraintvalidation.ValidationTarget.ANNOTATED_ELEMENT; | ||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE; | ||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
@Retention(RUNTIME) | ||
@Constraint(validatedBy = BankKeyValidator.class) | ||
@Target({ElementType.TYPE_USE, FIELD, METHOD, PARAMETER, ANNOTATION_TYPE}) | ||
@SupportedValidationTarget(ANNOTATED_ELEMENT) | ||
@Documented | ||
public @interface BankKeyConstraint { | ||
String message() default "{the BankKey is invalid}"; | ||
|
||
Class<?>[] groups() default {}; | ||
|
||
Class<? extends Payload>[] payload() default {}; | ||
} | ||
//package it.gov.pagopa.atmlayer.service.model.constraint; | ||
// | ||
//import it.gov.pagopa.atmlayer.service.model.validators.BankKeyValidator; | ||
//import jakarta.validation.Constraint; | ||
//import jakarta.validation.Payload; | ||
//import jakarta.validation.constraintvalidation.SupportedValidationTarget; | ||
// | ||
//import java.lang.annotation.Documented; | ||
//import java.lang.annotation.ElementType; | ||
//import java.lang.annotation.Retention; | ||
//import java.lang.annotation.Target; | ||
// | ||
//import static jakarta.validation.constraintvalidation.ValidationTarget.ANNOTATED_ELEMENT; | ||
//import static java.lang.annotation.ElementType.ANNOTATION_TYPE; | ||
//import static java.lang.annotation.ElementType.FIELD; | ||
//import static java.lang.annotation.ElementType.METHOD; | ||
//import static java.lang.annotation.ElementType.PARAMETER; | ||
//import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
// | ||
//@Retention(RUNTIME) | ||
//@Constraint(validatedBy = BankKeyValidator.class) | ||
//@Target({ElementType.TYPE_USE, FIELD, METHOD, PARAMETER, ANNOTATION_TYPE}) | ||
//@SupportedValidationTarget(ANNOTATED_ELEMENT) | ||
//@Documented | ||
//public @interface BankKeyConstraint { | ||
// String message() default "{the BankKey is invalid}"; | ||
// | ||
// Class<?>[] groups() default {}; | ||
// | ||
// Class<? extends Payload>[] payload() default {}; | ||
//} |
15 changes: 12 additions & 3 deletions
15
src/main/java/it/gov/pagopa/atmlayer/service/model/dto/BpmnAssociationDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
package it.gov.pagopa.atmlayer.service.model.dto; | ||
|
||
import it.gov.pagopa.atmlayer.service.model.constraint.BankKeyConstraint; | ||
import jakarta.validation.Valid; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
@Setter | ||
public class BpmnAssociationDto { | ||
|
||
private List<@BankKeyConstraint @Valid BankKeyDto> bankKeyDtoList; | ||
private UUID defaultTemplateId; | ||
|
||
private Long defaultTemplateVersion; | ||
|
||
private List<BranchConfigs> branchesConfigs; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/it/gov/pagopa/atmlayer/service/model/dto/BranchConfigs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package it.gov.pagopa.atmlayer.service.model.dto; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Data | ||
public class BranchConfigs { | ||
//TODO: Validatore custom | ||
private String branchId; | ||
|
||
private UUID branchDefaultTemplateId; | ||
|
||
private Long branchDefaultTemplateVersion; | ||
|
||
private List<TerminalConfigs> terminals; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/it/gov/pagopa/atmlayer/service/model/dto/DeployResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package it.gov.pagopa.atmlayer.service.model.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.UUID; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class DeployResponseDto { | ||
private List<LinkDto> links; | ||
private UUID id; | ||
private String name; | ||
private String source; | ||
private String deploymentTime; | ||
private String tenantId; | ||
private Map<String, DeployedProcessInfoDto> deployedProcessDefinitions; | ||
private String deployedCaseDefinitions; | ||
private String deployedDecisionDefinitions; | ||
private String deployedDecisionRequirementsDefinitions; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/it/gov/pagopa/atmlayer/service/model/dto/DeployedProcessInfoDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package it.gov.pagopa.atmlayer.service.model.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import java.util.UUID; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class DeployedProcessInfoDto { | ||
private String id; | ||
private String key; | ||
private String category; | ||
private String description; | ||
private String name; | ||
private Integer version; | ||
private String resource; | ||
private UUID deploymentId; | ||
private String diagram; | ||
private Boolean suspended; | ||
private String tenantId; | ||
private String versionTag; | ||
private int historyTimeToLeave; | ||
private Boolean startableInTasklist; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/it/gov/pagopa/atmlayer/service/model/dto/LinkDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package it.gov.pagopa.atmlayer.service.model.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class LinkDto { | ||
private String method; | ||
private String href; | ||
private String rel; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/it/gov/pagopa/atmlayer/service/model/dto/TerminalConfigs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package it.gov.pagopa.atmlayer.service.model.dto; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Data | ||
public class TerminalConfigs { | ||
@NotNull | ||
private UUID templateId; | ||
@NotNull | ||
private Long templateVersion; | ||
|
||
private List<String> terminalIds; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/it/gov/pagopa/atmlayer/service/model/enumeration/BankConfigUtilityValues.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package it.gov.pagopa.atmlayer.service.model.enumeration; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum BankConfigUtilityValues { | ||
NULL_VALUE("NULL"); | ||
|
||
private String value; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/it/gov/pagopa/atmlayer/service/model/enumeration/FunctionTypeEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package it.gov.pagopa.atmlayer.service.model.enumeration; | ||
|
||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum FunctionTypeEnum { | ||
MENU("MENU"), | ||
SPONTANEOUS_PAYMENT("SPONTANEOUS_PAYMENT"); | ||
|
||
@JsonValue | ||
private String value; | ||
} |
Oops, something went wrong.