Class ConsentOutcome
java.lang.Object
ca.uhn.fhir.rest.server.interceptor.consent.ConsentOutcome
- All Implemented Interfaces:
IConsentVote
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ConsentOutcome
Convenience constant containingnew ConsentOutcome(ConsentOperationStatusEnum.AUTHORIZED)
static final ConsentOutcome
Convenience constant containingnew ConsentOutcome(ConsentOperationStatusEnum.PROCEED)
static final ConsentOutcome
Convenience constant containingnew ConsentOutcome(ConsentOperationStatusEnum.REJECT)
-
Constructor Summary
ConstructorDescriptionConsentOutcome
(ConsentOperationStatusEnum theStatus) ConsentOutcome
(ConsentOperationStatusEnum theStatus, org.hl7.fhir.instance.model.api.IBaseOperationOutcome theOperationOutcome) ConsentOutcome
(ConsentOperationStatusEnum theStatus, org.hl7.fhir.instance.model.api.IBaseResource theResource) -
Method Summary
Modifier and TypeMethodDescriptionorg.hl7.fhir.instance.model.api.IBaseOperationOutcome
org.hl7.fhir.instance.model.api.IBaseResource
Get the votestatic ConsentOutcome
parallelReduce
(Stream<ConsentOutcome> theOutcomes) Evaluate all verdicts together, allowing any to veto (i.e.static ConsentOutcome
serialReduce
(Stream<ConsentOutcome> theStream) Evaluate verdicts in order, taking the first "decision" (i.e.
-
Field Details
-
PROCEED
Convenience constant containingnew ConsentOutcome(ConsentOperationStatusEnum.PROCEED)
-
REJECT
Convenience constant containingnew ConsentOutcome(ConsentOperationStatusEnum.REJECT)
-
AUTHORIZED
Convenience constant containingnew ConsentOutcome(ConsentOperationStatusEnum.AUTHORIZED)
-
-
Constructor Details
-
ConsentOutcome
-
ConsentOutcome
public ConsentOutcome(ConsentOperationStatusEnum theStatus, org.hl7.fhir.instance.model.api.IBaseOperationOutcome theOperationOutcome) -
ConsentOutcome
public ConsentOutcome(ConsentOperationStatusEnum theStatus, org.hl7.fhir.instance.model.api.IBaseResource theResource)
-
-
Method Details
-
parallelReduce
Evaluate all verdicts together, allowing any to veto (i.e. REJECT) the operation.- If any vote is REJECT, then the result is a REJECT vote.
- If no vote is REJECT, and any vote is AUTHORIZED, then the result is one of the AUTHORIZED votes.
- If no vote is REJECT or AUTHORIZED, the result is a PROCEED vote.
- Returns:
- REJECT if any reject, AUTHORIZED if no REJECT and some AUTHORIZED, PROCEED if empty or all PROCEED
-
serialReduce
Evaluate verdicts in order, taking the first "decision" (i.e. first non-PROCEED) verdict.- Returns:
- the first decisive verdict, or theSeed when empty or all PROCEED.
-
getStatus
Description copied from interface:IConsentVote
Get the vote- Specified by:
getStatus
in interfaceIConsentVote
- Returns:
- the vote
-
getOperationOutcome
-
getResource
-