use of com.sequenceiq.cloudbreak.audit.model.AuditEventName in project cloudbreak by hortonworks.
the class RecipesRestResourceAuditEventConverter method auditEventName.
@Override
public AuditEventName auditEventName(StructuredRestCallEvent structuredEvent) {
String method = structuredEvent.getRestCall().getRestRequest().getMethod();
AuditEventName eventName = null;
String resourceEvent = structuredEvent.getOperation().getResourceEvent();
if ("POST".equals(method) && resourceEvent == null) {
eventName = AuditEventName.CREATE_RECIPE;
} else if ("DELETE".equals(method)) {
eventName = AuditEventName.DELETE_RECIPE;
}
return eventName;
}
use of com.sequenceiq.cloudbreak.audit.model.AuditEventName in project cloudbreak by hortonworks.
the class DatahubRestResourceAuditEventConverter method auditEventName.
@Override
public AuditEventName auditEventName(StructuredRestCallEvent structuredEvent) {
String method = structuredEvent.getRestCall().getRestRequest().getMethod();
AuditEventName eventName = null;
String resourceEvent = structuredEvent.getOperation().getResourceEvent();
if ("POST".equals(method) || "PUT".equals(method)) {
if (resourceEvent == null) {
eventName = AuditEventName.CREATE_DATAHUB_CLUSTER;
} else {
eventName = updateRest(resourceEvent);
}
} else if ("DELETE".equals(method)) {
eventName = deletionRest(resourceEvent, structuredEvent.getOperation());
}
return eventName;
}
use of com.sequenceiq.cloudbreak.audit.model.AuditEventName in project cloudbreak by hortonworks.
the class DatalakeRestResourceAuditEventConverter method auditEventName.
@Override
public AuditEventName auditEventName(StructuredRestCallEvent structuredEvent) {
String method = structuredEvent.getRestCall().getRestRequest().getMethod();
AuditEventName eventName = null;
String resourceEvent = structuredEvent.getOperation().getResourceEvent();
if ("POST".equals(method) || "PUT".equals(method)) {
if (resourceEvent == null) {
eventName = AuditEventName.CREATE_DATALAKE_CLUSTER;
} else {
eventName = updateRest(resourceEvent);
}
} else if ("DELETE".equals(method)) {
eventName = deletionRest(resourceEvent);
}
return eventName;
}
use of com.sequenceiq.cloudbreak.audit.model.AuditEventName in project cloudbreak by hortonworks.
the class ClusterTemplatesRestResourceAuditEventConverter method auditEventName.
@Override
public AuditEventName auditEventName(StructuredRestCallEvent structuredEvent) {
String method = structuredEvent.getRestCall().getRestRequest().getMethod();
AuditEventName eventName = null;
String resourceEvent = structuredEvent.getOperation().getResourceEvent();
if ("POST".equals(method) && resourceEvent == null) {
eventName = AuditEventName.CREATE_CLUSTER_TEMPLATE;
} else if ("DELETE".equals(method)) {
eventName = AuditEventName.DELETE_CLUSTER_TEMPLATE;
}
return eventName;
}
use of com.sequenceiq.cloudbreak.audit.model.AuditEventName in project cloudbreak by hortonworks.
the class CredentialRestResourceAuditEventConverter method auditEventName.
@Override
public AuditEventName auditEventName(CDPStructuredRestCallEvent structuredEvent) {
String method = structuredEvent.getRestCall().getRestRequest().getMethod();
AuditEventName eventName = null;
String resourceEvent = structuredEvent.getOperation().getResourceEvent();
if ("POST".equals(method) && resourceEvent == null) {
eventName = AuditEventName.CREATE_CREDENTIAL;
} else if ("PUT".equals(method) && resourceEvent == null) {
eventName = AuditEventName.MODIFY_CREDENTIAL;
} else if ("DELETE".equals(method)) {
eventName = deletionRest(resourceEvent, structuredEvent.getOperation());
}
return eventName;
}
Aggregations