Class CadfEvent
- java.lang.Object
-
- org.linuxforhealth.fhir.audit.cadf.CadfEvent
-
public class CadfEvent extends java.lang.Object
This class represent a CADF audit event as described by the DMTF standard: Cloud Auditing Data Federation (CADF) - Data Format and Interface Definitions Specification. A CADF event generally represents a "subject-verb-object" tuple to indicate what action a particular subject performed over what object. The class is intended to be serialized using JSON Binding (Jsonb). It is implemented using the Builder pattern.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CadfEvent.Builder
Builder of the CadfEvent objectsstatic class
CadfEvent.Parser
static class
CadfEvent.Writer
Generates JSON from this object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CadfEvent.Builder
builder()
static java.lang.String
formatDuration(long duration)
Format time intervals (durations) according to the XML Schema v2 specifications.Action
getAction()
java.util.ArrayList<CadfAttachment>
getAttachments()
java.lang.String
getDuration()
java.lang.String
getEventTime()
EventType
getEventType()
java.lang.String
getId()
Return the event IDCadfResource
getInitiator()
java.lang.String
getInitiatorId()
java.util.ArrayList<CadfMeasurement>
getMeasurements()
java.lang.String
getName()
CadfResource
getObserver()
java.lang.String
getObserverId()
Outcome
getOutcome()
CadfReason
getReason()
java.util.ArrayList<CadfReporterStep>
getReporterchain()
java.lang.String
getSeverity()
java.util.ArrayList<java.lang.String>
getTags()
CadfResource
getTarget()
java.lang.String
getTargetId()
java.lang.String
getTypeURI()
void
setAction(Action action)
void
setAttachments(java.util.ArrayList<CadfAttachment> attachments)
void
setDuration(java.lang.String duration)
void
setEventTime(java.lang.String eventTime)
void
setEventType(EventType eventType)
void
setId(java.lang.String id)
void
setInitiator(CadfResource initiator)
void
setInitiatorId(java.lang.String initiatorId)
void
setMeasurements(java.util.ArrayList<CadfMeasurement> measurements)
void
setName(java.lang.String name)
void
setObserver(CadfResource observer)
void
setObserverId(java.lang.String observerId)
void
setOutcome(Outcome outcome)
void
setReason(CadfReason reason)
void
setReporterchain(java.util.ArrayList<CadfReporterStep> reporterchain)
void
setSeverity(java.lang.String severity)
void
setTags(java.util.ArrayList<java.lang.String> tags)
void
setTarget(CadfResource target)
void
setTargetId(java.lang.String targetId)
void
setTypeURI(java.lang.String typeURI)
-
-
-
Method Detail
-
getId
public java.lang.String getId()
Return the event ID- Returns:
- String value of the event ID
-
formatDuration
public static java.lang.String formatDuration(long duration)
Format time intervals (durations) according to the XML Schema v2 specifications. https://www.w3.org/TR/xmlschema-2/#duration- Parameters:
duration
- in milliseconds- Returns:
- String representation of the duration according to the XML Schema 2 specification.
-
getTypeURI
public java.lang.String getTypeURI()
-
setTypeURI
public void setTypeURI(java.lang.String typeURI)
-
getReason
public CadfReason getReason()
-
setReason
public void setReason(CadfReason reason)
-
getInitiatorId
public java.lang.String getInitiatorId()
-
setInitiatorId
public void setInitiatorId(java.lang.String initiatorId)
-
getTargetId
public java.lang.String getTargetId()
-
setTargetId
public void setTargetId(java.lang.String targetId)
-
getObserverId
public java.lang.String getObserverId()
-
setObserverId
public void setObserverId(java.lang.String observerId)
-
getMeasurements
public java.util.ArrayList<CadfMeasurement> getMeasurements()
-
setMeasurements
public void setMeasurements(java.util.ArrayList<CadfMeasurement> measurements)
-
setId
public void setId(java.lang.String id)
-
getName
public java.lang.String getName()
- Returns:
- the name
-
setName
public void setName(java.lang.String name)
- Parameters:
name
- the name to set
-
getSeverity
public java.lang.String getSeverity()
- Returns:
- the severity
-
setSeverity
public void setSeverity(java.lang.String severity)
- Parameters:
severity
- the severity to set
-
getDuration
public java.lang.String getDuration()
- Returns:
- the duration
-
setDuration
public void setDuration(java.lang.String duration)
- Parameters:
duration
- the duration to set
-
getTags
public java.util.ArrayList<java.lang.String> getTags()
- Returns:
- the tags
-
setTags
public void setTags(java.util.ArrayList<java.lang.String> tags)
- Parameters:
tags
- the tags to set
-
getAttachments
public java.util.ArrayList<CadfAttachment> getAttachments()
- Returns:
- the attachments
-
setAttachments
public void setAttachments(java.util.ArrayList<CadfAttachment> attachments)
- Parameters:
attachments
- the attachments to set
-
getReporterchain
public java.util.ArrayList<CadfReporterStep> getReporterchain()
- Returns:
- the reporterchain
-
setReporterchain
public void setReporterchain(java.util.ArrayList<CadfReporterStep> reporterchain)
- Parameters:
reporterchain
- the reporterchain to set
-
getInitiator
public CadfResource getInitiator()
-
setInitiator
public void setInitiator(CadfResource initiator)
-
getTarget
public CadfResource getTarget()
-
setTarget
public void setTarget(CadfResource target)
-
getObserver
public CadfResource getObserver()
-
setObserver
public void setObserver(CadfResource observer)
-
getEventType
public EventType getEventType()
-
setEventType
public void setEventType(EventType eventType)
-
getEventTime
public java.lang.String getEventTime()
-
setEventTime
public void setEventTime(java.lang.String eventTime)
-
getAction
public Action getAction()
-
setAction
public void setAction(Action action)
-
getOutcome
public Outcome getOutcome()
-
setOutcome
public void setOutcome(Outcome outcome)
-
builder
public static CadfEvent.Builder builder()
-
-