Class EraseRestImpl
- java.lang.Object
-
- com.ibm.fhir.operation.erase.impl.EraseRestImpl
-
-
Constructor Summary
Constructors Constructor Description EraseRestImpl(java.lang.String method, javax.ws.rs.core.SecurityContext ctx, Parameters parameters, java.lang.Class<? extends Resource> rt, java.lang.String logicalId, CompartmentHelper compartmentHelper)
create the Erase Rest instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
authorize()
verifies the authorization to the operation based on the allowedRoles.void
enabled()
checks if the tenant has enabled the Erase operation.void
logException(java.util.List<OperationOutcome.Issue> issues, java.lang.Exception e)
encapsulating repeated logicvoid
processLogicalId(EraseDTO dto, FHIRPathEvaluator evaluator, FHIRPathEvaluator.EvaluationContext evaluationContext, java.util.List<OperationOutcome.Issue> issues, java.lang.String logicalId)
processes the 'id' from the parameters object in the evaluation context.void
processPatient(EraseDTO dto, FHIRPathEvaluator evaluator, FHIRPathEvaluator.EvaluationContext evaluationContext, java.util.List<OperationOutcome.Issue> issues)
processes the 'patient' from the parameters object in the evaluation context.void
processReason(EraseDTO dto, FHIRPathEvaluator evaluator, FHIRPathEvaluator.EvaluationContext evaluationContext, java.util.List<OperationOutcome.Issue> issues)
processes the 'reason' from the parameters object in the evaluation context.void
processVersion(EraseDTO dto, FHIRPathEvaluator evaluator, FHIRPathEvaluator.EvaluationContext evaluationContext, java.util.List<OperationOutcome.Issue> issues)
processes the 'version' from the parameters object in the evaluation context.EraseDTO
verify()
verifies the HttpMethod and incoming parameters are supported, and creates an intermediate EraseDTO
-
-
-
Constructor Detail
-
EraseRestImpl
public EraseRestImpl(java.lang.String method, javax.ws.rs.core.SecurityContext ctx, Parameters parameters, java.lang.Class<? extends Resource> rt, java.lang.String logicalId, CompartmentHelper compartmentHelper)
create the Erase Rest instance.- Parameters:
method
-ctx
-parameters
-rt
-logicalId
-
-
-
Method Detail
-
authorize
public void authorize() throws FHIROperationException
Description copied from interface:EraseRest
verifies the authorization to the operation based on the allowedRoles. checks if the user calling the erase operation is authorized.- Specified by:
authorize
in interfaceEraseRest
- Throws:
FHIROperationException
-
enabled
public void enabled() throws FHIROperationException
Description copied from interface:EraseRest
checks if the tenant has enabled the Erase operation.- Specified by:
enabled
in interfaceEraseRest
- Throws:
FHIROperationException
- the Erase operation is not enabled
-
verify
public EraseDTO verify() throws FHIROperationException
Description copied from interface:EraseRest
verifies the HttpMethod and incoming parameters are supported, and creates an intermediate EraseDTO- Specified by:
verify
in interfaceEraseRest
- Returns:
- a valid DTO
- Throws:
FHIROperationException
-
processLogicalId
public void processLogicalId(EraseDTO dto, FHIRPathEvaluator evaluator, FHIRPathEvaluator.EvaluationContext evaluationContext, java.util.List<OperationOutcome.Issue> issues, java.lang.String logicalId)
processes the 'id' from the parameters object in the evaluation context.- Parameters:
dto
- the data transfer object that is to be sent to the DAOevaluator
- the FHIRPath Evaluator that is used to evaluate the valueevaluationContext
- the context which includes the input Parameters objectissues
- the aggregate issues list.logicalId
- the id that identifies the current resource.
-
processVersion
public void processVersion(EraseDTO dto, FHIRPathEvaluator evaluator, FHIRPathEvaluator.EvaluationContext evaluationContext, java.util.List<OperationOutcome.Issue> issues)
processes the 'version' from the parameters object in the evaluation context.- Parameters:
dto
- the data transfer object that is to be sent to the DAOevaluator
- the FHIRPath Evaluator that is used to evaluate the valueevaluationContext
- the context which includes the input Parameters objectissues
- the aggregate issues list.
-
processReason
public void processReason(EraseDTO dto, FHIRPathEvaluator evaluator, FHIRPathEvaluator.EvaluationContext evaluationContext, java.util.List<OperationOutcome.Issue> issues)
processes the 'reason' from the parameters object in the evaluation context.- Parameters:
dto
- the data transfer object that is to be sent to the DAOevaluator
- the FHIRPath Evaluator that is used to evaluate the valueevaluationContext
- the context which includes the input Parameters objectissues
- the aggregate issues list.
-
processPatient
public void processPatient(EraseDTO dto, FHIRPathEvaluator evaluator, FHIRPathEvaluator.EvaluationContext evaluationContext, java.util.List<OperationOutcome.Issue> issues)
processes the 'patient' from the parameters object in the evaluation context.- Parameters:
dto
- the data transfer object that is to be sent to the DAOevaluator
- the FHIRPath Evaluator that is used to evaluate the valueevaluationContext
- the context which includes the input Parameters objectissues
- the aggregate issues list.
-
logException
public void logException(java.util.List<OperationOutcome.Issue> issues, java.lang.Exception e)
encapsulating repeated logic- Parameters:
issues
-e
-
-
-