From 5b866751530435ad1ac6d1a7144234ffa108dbce Mon Sep 17 00:00:00 2001 From: adongare Date: Wed, 20 Nov 2024 12:05:25 -0500 Subject: [PATCH 1/2] MAT-7913 update models --- pom.xml | 2 +- .../cms/madie/models/access/AclOperation.java | 24 +++++++++++++++++++ .../madie/models/access/AclSpecification.java | 5 ++-- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 src/main/java/gov/cms/madie/models/access/AclOperation.java diff --git a/pom.xml b/pom.xml index 9772d54..a82e519 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ gov.cms.madie madie-java-models - 0.6.70-SNAPSHOT + 0.6.71-SNAPSHOT madie-java-models Java based models for MADiE microservices diff --git a/src/main/java/gov/cms/madie/models/access/AclOperation.java b/src/main/java/gov/cms/madie/models/access/AclOperation.java new file mode 100644 index 0000000..32c9c77 --- /dev/null +++ b/src/main/java/gov/cms/madie/models/access/AclOperation.java @@ -0,0 +1,24 @@ +package gov.cms.madie.models.access; + +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Data +@Builder(toBuilder = true) +@NoArgsConstructor +@AllArgsConstructor +public class AclOperation { + @NotEmpty private List acls; + @NotNull private AclAction operation; + + public enum AclAction { + GRANT, + REVOKE + } +} diff --git a/src/main/java/gov/cms/madie/models/access/AclSpecification.java b/src/main/java/gov/cms/madie/models/access/AclSpecification.java index bf96f14..da5098e 100644 --- a/src/main/java/gov/cms/madie/models/access/AclSpecification.java +++ b/src/main/java/gov/cms/madie/models/access/AclSpecification.java @@ -1,11 +1,12 @@ package gov.cms.madie.models.access; -import java.util.List; +import java.util.Set; + import lombok.Data; @Data public class AclSpecification { private String userId; - private List roles; + private Set roles; } From ae6a75f6d16fdd36737a138fc8664e4132a4be7a Mon Sep 17 00:00:00 2001 From: adongare Date: Wed, 20 Nov 2024 17:21:23 -0500 Subject: [PATCH 2/2] MAT-7913 rename the property --- src/main/java/gov/cms/madie/models/access/AclOperation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gov/cms/madie/models/access/AclOperation.java b/src/main/java/gov/cms/madie/models/access/AclOperation.java index 32c9c77..419b18f 100644 --- a/src/main/java/gov/cms/madie/models/access/AclOperation.java +++ b/src/main/java/gov/cms/madie/models/access/AclOperation.java @@ -15,7 +15,7 @@ @AllArgsConstructor public class AclOperation { @NotEmpty private List acls; - @NotNull private AclAction operation; + @NotNull private AclAction action; public enum AclAction { GRANT,