Package com.ibm.fhir.audit.cadf.model
Class CadfReason
- java.lang.Object
-
- com.ibm.fhir.audit.cadf.model.CadfReason
-
public final class CadfReason extends Object
Outcome reason. Provides additional information to describe the event outcome
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CadfReason.Builder
Builder is a convenience pattern to assemble to Java Objectstatic class
CadfReason.Parser
Parserstatic class
CadfReason.Writer
Generates JSON from this object.
-
Constructor Summary
Constructors Constructor Description CadfReason(String reasonType, String reasonCode, String policyType, String policyId)
Create a CADF Reason object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CadfReason.Builder
builder()
String
getPolicyId()
String
getPolicyType()
String
getReasonCode()
String
getReasonType()
CadfReason
validate()
Validate contents of the Reason type.
-
-
-
Constructor Detail
-
CadfReason
public CadfReason(String reasonType, String reasonCode, String policyType, String policyId)
Create a CADF Reason object- Parameters:
reasonType
- - String. The reason code domain URI. Must be present if reasonCode is present.reasonCode
- - String. Detailed result code as described by the domain identifier (reason type). Must be specified if policyId is not specified.policyType
- - String. The policy domain URI. Must be present if policyId is present.policyId
- - String. An optional identifier that indicates which policy or algorithm was applied in order to achieve the described OUTCOME. Must be specified if reasonCode is not specified.
-
-
Method Detail
-
getReasonType
public String getReasonType()
-
getReasonCode
public String getReasonCode()
-
getPolicyType
public String getPolicyType()
-
getPolicyId
public String getPolicyId()
-
validate
public CadfReason validate() throws IllegalStateException
Validate contents of the Reason type. The logic is determined by the CADF specification.- Returns:
- This object for chaining.
- Throws:
IllegalStateException
- when the properties do not meet the specification.
-
builder
public static CadfReason.Builder builder()
-
-