Spaces:
Build error
Build error
File size: 6,517 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 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
package com.dalab.policyengine.dto;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
/**
* DTO for policy draft workflow actions (submit, approve, reject, etc.).
* Used for all workflow transition operations.
*/
public class PolicyDraftActionDTO {
/**
* The action to perform (SUBMIT, APPROVE, REJECT, REQUEST_CHANGES, ARCHIVE).
*/
@NotBlank(message = "Action type is required")
private String actionType;
/**
* Comment or reason for the action (required for rejection and optional for others).
*/
@Size(max = 2000, message = "Comment must not exceed 2000 characters")
private String comment;
/**
* Priority level if submitting or approving (HIGH, MEDIUM, LOW).
*/
private String priority;
/**
* Target implementation date if approving for publication.
*/
private String targetImplementationDate;
/**
* Additional metadata for the action.
*/
private String metadata;
// Constructors
public PolicyDraftActionDTO() {}
public PolicyDraftActionDTO(String actionType) {
this.actionType = actionType;
}
public PolicyDraftActionDTO(String actionType, String comment) {
this.actionType = actionType;
this.comment = comment;
}
// Getters and Setters
public String getActionType() {
return actionType;
}
public void setActionType(String actionType) {
this.actionType = actionType;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getPriority() {
return priority;
}
public void setPriority(String priority) {
this.priority = priority;
}
public String getTargetImplementationDate() {
return targetImplementationDate;
}
public void setTargetImplementationDate(String targetImplementationDate) {
this.targetImplementationDate = targetImplementationDate;
}
public String getMetadata() {
return metadata;
}
public void setMetadata(String metadata) {
this.metadata = metadata;
}
}
/**
* DTO for bulk operations on multiple policy drafts.
*/
class PolicyDraftBulkActionDTO {
/**
* List of draft IDs to perform action on.
*/
@NotBlank(message = "Draft IDs are required")
private java.util.List<java.util.UUID> draftIds;
/**
* The action to perform on all selected drafts.
*/
@NotBlank(message = "Action type is required")
private String actionType;
/**
* Comment for the bulk action.
*/
@Size(max = 1000, message = "Comment must not exceed 1000 characters")
private String comment;
// Constructors
public PolicyDraftBulkActionDTO() {}
// Getters and Setters
public java.util.List<java.util.UUID> getDraftIds() {
return draftIds;
}
public void setDraftIds(java.util.List<java.util.UUID> draftIds) {
this.draftIds = draftIds;
}
public String getActionType() {
return actionType;
}
public void setActionType(String actionType) {
this.actionType = actionType;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
}
/**
* DTO for policy draft summary information (for list views).
*/
class PolicyDraftSummaryDTO {
private java.util.UUID id;
private String name;
private String status;
private Integer version;
private String priority;
private String category;
private java.time.Instant createdAt;
private java.time.Instant updatedAt;
private java.util.UUID createdByUserId;
private java.time.Instant targetImplementationDate;
private int reviewCommentsCount;
private boolean isOverdue;
// Constructors
public PolicyDraftSummaryDTO() {}
public PolicyDraftSummaryDTO(java.util.UUID id, String name, String status) {
this.id = id;
this.name = name;
this.status = status;
}
// Getters and Setters
public java.util.UUID getId() {
return id;
}
public void setId(java.util.UUID id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
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 java.time.Instant getCreatedAt() {
return createdAt;
}
public void setCreatedAt(java.time.Instant createdAt) {
this.createdAt = createdAt;
}
public java.time.Instant getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(java.time.Instant updatedAt) {
this.updatedAt = updatedAt;
}
public java.util.UUID getCreatedByUserId() {
return createdByUserId;
}
public void setCreatedByUserId(java.util.UUID createdByUserId) {
this.createdByUserId = createdByUserId;
}
public java.time.Instant getTargetImplementationDate() {
return targetImplementationDate;
}
public void setTargetImplementationDate(java.time.Instant targetImplementationDate) {
this.targetImplementationDate = targetImplementationDate;
}
public int getReviewCommentsCount() {
return reviewCommentsCount;
}
public void setReviewCommentsCount(int reviewCommentsCount) {
this.reviewCommentsCount = reviewCommentsCount;
}
public boolean isOverdue() {
return isOverdue;
}
public void setOverdue(boolean overdue) {
isOverdue = overdue;
}
} |