Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public class PolicyViolationNotificationRequest {
private String scanTime;
private String accountId;
private Constants.Actions action;
private String policyId;
private String severity;
private Map<String,Object> additionalInfo=new HashMap<>();

public Map<String, Object> getAdditionalInfo() {
Expand Down Expand Up @@ -104,4 +106,20 @@ public String getAccountId() {
public void setAccountId(String accountId) {
this.accountId = accountId;
}

public void setPolicyId(String policyId) {
this.policyId = policyId;
}

public String getPolicyId() {
return policyId;
}

public void setSeverity(String severity) {
this.severity = severity;
}

public String getSeverity() {
return severity;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ private static NotificationBaseRequest getNotificationBaseRequest(Annotation ann
request.setScanTime(CommonUtils.getCurrentDateStringWithFormat(
PacmanSdkConstants.PAC_TIME_ZONE, PacmanSdkConstants.NOTIFICATION_EMAIL_DATE_FORMAT));
request.setAccountId(annotation.get(ACCOUNT_ID));
request.setPolicyId(annotation.get(POLICY_ID));
request.setSeverity(annotation.get("severity"));

//populate tags information into additionalInfo field.
Map<String,String> tagsKeyAndValueMap = new HashMap<>();
Expand Down