Spaces:
Build error
Build error
File size: 5,358 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 |
package com.dalab.policyengine.dto;
import java.time.Instant;
import java.util.Map;
import java.util.UUID;
import com.dalab.policyengine.model.EventSeverity;
import com.dalab.policyengine.model.EventType;
/**
* DTO for streaming events in real-time to the Event Center UI.
*/
public class EventStreamDTO {
private UUID eventId;
private EventType eventType;
private EventSeverity severity;
private String sourceService;
private String title;
private String description;
private UUID assetId;
private String assetName;
private UUID policyId;
private String policyName;
private Map<String, Object> eventData;
private Map<String, Object> metadata;
private Instant timestamp;
private UUID userId;
private String userAction;
// Event processing information
private Boolean isProcessed;
private Integer matchingSubscriptionsCount;
private Boolean notificationSent;
private Boolean actionTriggered;
// Constructors
public EventStreamDTO() {}
public EventStreamDTO(UUID eventId, EventType eventType, EventSeverity severity, String sourceService) {
this.eventId = eventId;
this.eventType = eventType;
this.severity = severity;
this.sourceService = sourceService;
this.timestamp = Instant.now();
}
// Getters and Setters
public UUID getEventId() {
return eventId;
}
public void setEventId(UUID eventId) {
this.eventId = eventId;
}
public EventType getEventType() {
return eventType;
}
public void setEventType(EventType eventType) {
this.eventType = eventType;
}
public EventSeverity getSeverity() {
return severity;
}
public void setSeverity(EventSeverity severity) {
this.severity = severity;
}
public String getSourceService() {
return sourceService;
}
public void setSourceService(String sourceService) {
this.sourceService = sourceService;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public UUID getAssetId() {
return assetId;
}
public void setAssetId(UUID assetId) {
this.assetId = assetId;
}
public String getAssetName() {
return assetName;
}
public void setAssetName(String assetName) {
this.assetName = assetName;
}
public UUID getPolicyId() {
return policyId;
}
public void setPolicyId(UUID policyId) {
this.policyId = policyId;
}
public String getPolicyName() {
return policyName;
}
public void setPolicyName(String policyName) {
this.policyName = policyName;
}
public Map<String, Object> getEventData() {
return eventData;
}
public void setEventData(Map<String, Object> eventData) {
this.eventData = eventData;
}
public Map<String, Object> getMetadata() {
return metadata;
}
public void setMetadata(Map<String, Object> metadata) {
this.metadata = metadata;
}
public Instant getTimestamp() {
return timestamp;
}
public void setTimestamp(Instant timestamp) {
this.timestamp = timestamp;
}
public UUID getUserId() {
return userId;
}
public void setUserId(UUID userId) {
this.userId = userId;
}
public String getUserAction() {
return userAction;
}
public void setUserAction(String userAction) {
this.userAction = userAction;
}
public Boolean getIsProcessed() {
return isProcessed;
}
public void setIsProcessed(Boolean isProcessed) {
this.isProcessed = isProcessed;
}
public Integer getMatchingSubscriptionsCount() {
return matchingSubscriptionsCount;
}
public void setMatchingSubscriptionsCount(Integer matchingSubscriptionsCount) {
this.matchingSubscriptionsCount = matchingSubscriptionsCount;
}
public Boolean getNotificationSent() {
return notificationSent;
}
public void setNotificationSent(Boolean notificationSent) {
this.notificationSent = notificationSent;
}
public Boolean getActionTriggered() {
return actionTriggered;
}
public void setActionTriggered(Boolean actionTriggered) {
this.actionTriggered = actionTriggered;
}
@Override
public String toString() {
return "EventStreamDTO{" +
"eventId=" + eventId +
", eventType=" + eventType +
", severity=" + severity +
", sourceService='" + sourceService + '\'' +
", title='" + title + '\'' +
", assetId=" + assetId +
", policyId=" + policyId +
", timestamp=" + timestamp +
", isProcessed=" + isProcessed +
'}';
}
} |