Class CadfEvent
- java.lang.Object
-
- org.linuxforhealth.fhir.audit.cadf.CadfEvent
-
public class CadfEvent extends java.lang.ObjectThis 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 classCadfEvent.BuilderBuilder of the CadfEvent objectsstatic classCadfEvent.Parserstatic classCadfEvent.WriterGenerates JSON from this object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CadfEvent.Builderbuilder()static java.lang.StringformatDuration(long duration)Format time intervals (durations) according to the XML Schema v2 specifications.ActiongetAction()java.util.ArrayList<CadfAttachment>getAttachments()java.lang.StringgetDuration()java.lang.StringgetEventTime()EventTypegetEventType()java.lang.StringgetId()Return the event IDCadfResourcegetInitiator()java.lang.StringgetInitiatorId()java.util.ArrayList<CadfMeasurement>getMeasurements()java.lang.StringgetName()CadfResourcegetObserver()java.lang.StringgetObserverId()OutcomegetOutcome()CadfReasongetReason()java.util.ArrayList<CadfReporterStep>getReporterchain()java.lang.StringgetSeverity()java.util.ArrayList<java.lang.String>getTags()CadfResourcegetTarget()java.lang.StringgetTargetId()java.lang.StringgetTypeURI()voidsetAction(Action action)voidsetAttachments(java.util.ArrayList<CadfAttachment> attachments)voidsetDuration(java.lang.String duration)voidsetEventTime(java.lang.String eventTime)voidsetEventType(EventType eventType)voidsetId(java.lang.String id)voidsetInitiator(CadfResource initiator)voidsetInitiatorId(java.lang.String initiatorId)voidsetMeasurements(java.util.ArrayList<CadfMeasurement> measurements)voidsetName(java.lang.String name)voidsetObserver(CadfResource observer)voidsetObserverId(java.lang.String observerId)voidsetOutcome(Outcome outcome)voidsetReason(CadfReason reason)voidsetReporterchain(java.util.ArrayList<CadfReporterStep> reporterchain)voidsetSeverity(java.lang.String severity)voidsetTags(java.util.ArrayList<java.lang.String> tags)voidsetTarget(CadfResource target)voidsetTargetId(java.lang.String targetId)voidsetTypeURI(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()
-
-