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> rulesDefinition; /** * JSON representation of actions to be taken when policy is triggered. */ private Map 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 tags; /** * Stakeholders who should be notified about this policy. */ private List stakeholders; /** * Additional metadata for workflow management. */ private Map 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> getRulesDefinition() { return rulesDefinition; } public void setRulesDefinition(List> rulesDefinition) { this.rulesDefinition = rulesDefinition; } public Map getActions() { return actions; } public void setActions(Map 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 getTags() { return tags; } public void setTags(List tags) { this.tags = tags; } public List getStakeholders() { return stakeholders; } public void setStakeholders(List stakeholders) { this.stakeholders = stakeholders; } public Map getWorkflowMetadata() { return workflowMetadata; } public void setWorkflowMetadata(Map workflowMetadata) { this.workflowMetadata = workflowMetadata; } }