Class ValidateOperation
- java.lang.Object
-
- org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
-
- org.linuxforhealth.fhir.operation.validate.ValidateOperation
-
- All Implemented Interfaces:
FHIROperation
public class ValidateOperation extends AbstractOperation
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
definition
-
-
Constructor Summary
Constructors Constructor Description ValidateOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FHIROperationExceptionbuildExceptionWithIssue(IssueSeverity severity, IssueType issueType, java.lang.String msg, java.lang.Throwable cause)Method to build the OperationOutcome error responseprotected OperationDefinitionbuildOperationDefinition()protected ParametersdoInvoke(FHIROperationContext operationContext, java.lang.Class<? extends Resource> resourceType, java.lang.String logicalId, java.lang.String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper, SearchHelper searchHelper)This is the method that concrete subclasses must implement to perform the operation logic.java.util.List<OperationOutcome.Issue>validateDeleteResource(java.lang.String type, java.lang.String id, FHIROperationContext operationContext)Validate if the persistence layer implementation supports the "delete" operation.-
Methods inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
buildExceptionWithIssue, buildExceptionWithIssue, countParameters, findOpDefParameter, getDefinition, getName, getParameter, getParameterDefinitions, getParameters, getResourceTypeNames, invoke, isAbstractResourceTypesDisallowed, isAdditionalMethodAllowed, validateInputParameters, validateOperationContext, validateOutputParameters, validateParameters
-
-
-
-
Method Detail
-
buildOperationDefinition
protected OperationDefinition buildOperationDefinition()
- Specified by:
buildOperationDefinitionin classAbstractOperation
-
doInvoke
protected Parameters doInvoke(FHIROperationContext operationContext, java.lang.Class<? extends Resource> resourceType, java.lang.String logicalId, java.lang.String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper, SearchHelper searchHelper) throws FHIROperationException
Description copied from class:AbstractOperationThis is the method that concrete subclasses must implement to perform the operation logic.- Specified by:
doInvokein classAbstractOperation- Returns:
- the Parameters object to return or null if there is no response Parameters object to return
- Throws:
FHIROperationException
-
validateDeleteResource
public java.util.List<OperationOutcome.Issue> validateDeleteResource(java.lang.String type, java.lang.String id, FHIROperationContext operationContext) throws FHIROperationException
Validate if the persistence layer implementation supports the "delete" operation.- Parameters:
type- the resource typeid- the resource logical IDoperationContext- the FHIROperationContext associated with the request- Returns:
- A list of validation errors and warnings
- Throws:
FHIROperationException- the FHIR operation exception
-
buildExceptionWithIssue
protected FHIROperationException buildExceptionWithIssue(IssueSeverity severity, IssueType issueType, java.lang.String msg, java.lang.Throwable cause) throws FHIROperationException
Method to build the OperationOutcome error response- Parameters:
severity- the issue severityissueType- describes the type of issuemsg- describes the error messagecause- the throwable that causes this OperationOutcome/Exception- Returns:
- FHIROperationException with issues
- Throws:
FHIROperationException
-
-