Spaces:
Build error
Build error
File size: 5,791 Bytes
9373c61 5cfe5c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
package com.dalab.policyengine.dto;
import java.time.Instant;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
/**
* DTO for creating and updating policy drafts.
* Contains all information needed for draft management and workflow.
*/
public class PolicyDraftInputDTO {
/**
* Name of the policy (must be unique when published).
*/
@NotBlank(message = "Policy name is required")
@Size(max = 255, message = "Policy name must not exceed 255 characters")
private String name;
/**
* Detailed description of the policy's purpose and scope.
*/
@Size(max = 2000, message = "Description must not exceed 2000 characters")
private String description;
/**
* Reference to the published policy if this is an update.
*/
private UUID basePolicyId;
/**
* MVEL condition logic for the policy evaluation.
*/
private String conditionLogic;
/**
* JSON representation of policy rules structure.
*/
private List<Map<String, Object>> rulesDefinition;
/**
* JSON representation of actions to be taken when policy is triggered.
*/
private Map<String, Object> actions;
/**
* Change summary describing what was modified in this version.
*/
@Size(max = 1000, message = "Change summary must not exceed 1000 characters")
private String changeSummary;
/**
* Justification for the policy changes or creation.
*/
@Size(max = 2000, message = "Justification must not exceed 2000 characters")
private String justification;
/**
* Expected impact of implementing this policy.
*/
@Size(max = 1000, message = "Expected impact must not exceed 1000 characters")
private String expectedImpact;
/**
* Target implementation date for the policy.
*/
private Instant targetImplementationDate;
/**
* Priority level for policy implementation.
*/
private String priority = "MEDIUM";
/**
* Business category or domain this policy applies to.
*/
@Size(max = 100, message = "Category must not exceed 100 characters")
private String category;
/**
* Tags for categorization and searchability.
*/
private List<String> tags;
/**
* Stakeholders who should be notified about this policy.
*/
private List<UUID> stakeholders;
/**
* Additional metadata for workflow management.
*/
private Map<String, Object> workflowMetadata;
// Constructors
public PolicyDraftInputDTO() {}
public PolicyDraftInputDTO(String name, String description) {
this.name = name;
this.description = description;
}
// Getters and Setters
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public UUID getBasePolicyId() {
return basePolicyId;
}
public void setBasePolicyId(UUID basePolicyId) {
this.basePolicyId = basePolicyId;
}
public String getConditionLogic() {
return conditionLogic;
}
public void setConditionLogic(String conditionLogic) {
this.conditionLogic = conditionLogic;
}
public List<Map<String, Object>> getRulesDefinition() {
return rulesDefinition;
}
public void setRulesDefinition(List<Map<String, Object>> rulesDefinition) {
this.rulesDefinition = rulesDefinition;
}
public Map<String, Object> getActions() {
return actions;
}
public void setActions(Map<String, Object> actions) {
this.actions = actions;
}
public String getChangeSummary() {
return changeSummary;
}
public void setChangeSummary(String changeSummary) {
this.changeSummary = changeSummary;
}
public String getJustification() {
return justification;
}
public void setJustification(String justification) {
this.justification = justification;
}
public String getExpectedImpact() {
return expectedImpact;
}
public void setExpectedImpact(String expectedImpact) {
this.expectedImpact = expectedImpact;
}
public Instant getTargetImplementationDate() {
return targetImplementationDate;
}
public void setTargetImplementationDate(Instant targetImplementationDate) {
this.targetImplementationDate = targetImplementationDate;
}
public String getPriority() {
return priority;
}
public void setPriority(String priority) {
this.priority = priority;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public List<String> getTags() {
return tags;
}
public void setTags(List<String> tags) {
this.tags = tags;
}
public List<UUID> getStakeholders() {
return stakeholders;
}
public void setStakeholders(List<UUID> stakeholders) {
this.stakeholders = stakeholders;
}
public Map<String, Object> getWorkflowMetadata() {
return workflowMetadata;
}
public void setWorkflowMetadata(Map<String, Object> workflowMetadata) {
this.workflowMetadata = workflowMetadata;
}
} |