Class BadOperation
- java.lang.Object
-
- org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
-
- org.linuxforhealth.fhir.operation.test.BadOperation
-
- All Implemented Interfaces:
FHIROperation
public class BadOperation extends AbstractOperation
This class will test what happens if there is a bad OperationDefinition defined for a custom operation.
There is no corresponding testcase as the Java ServiceLoader (SPI) mechanism
will automatically load this service if it is configured as a service provider and available on the classpath.
The expected result is:
1. to see an error/message explaining why this service was not loaded
2. for other operations to continue working
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
definition
-
-
Constructor Summary
Constructors Constructor Description BadOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OperationDefinition
buildOperationDefinition()
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)
This is the method that concrete subclasses must implement to perform the operation logic.-
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:
buildOperationDefinition
in 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:AbstractOperation
This is the method that concrete subclasses must implement to perform the operation logic.- Specified by:
doInvoke
in classAbstractOperation
- Returns:
- the Parameters object to return or null if there is no response Parameters object to return
- Throws:
FHIROperationException
-
-