Package com.ibm.fhir.server.util
Class FHIROperationUtil
- java.lang.Object
-
- com.ibm.fhir.server.util.FHIROperationUtil
-
public final class FHIROperationUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
ENV_DISABLED_OPERATIONS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkAndVerifyOperationAllowed(String operationName)
check and verify operation allowedstatic FHIROperationException
generateForbiddenOperationException(String operationName)
static Parameters
getInputParameters(OperationDefinition definition, Resource resource)
static Parameters
getInputParameters(OperationDefinition definition, Map<String,List<String>> queryParameters)
static Parameters
getOutputParameters(Resource resource)
static Parameters
getOutputParameters(String name, Resource resource)
static Resource
getSingleResourceOutputParameter(Parameters parameters)
static boolean
hasSingleResourceOutputParameter(Parameters parameters)
static void
init()
Initializes the FHIR Operation Utility so disallowedOperations are loaded one time.
-
-
-
Field Detail
-
ENV_DISABLED_OPERATIONS
public static final String ENV_DISABLED_OPERATIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public static void init()
Initializes the FHIR Operation Utility so disallowedOperations are loaded one time. First, the code checks the environment operations. Second, the code checks the configuration. This is initialized one time for the system.
-
getInputParameters
public static Parameters getInputParameters(OperationDefinition definition, Map<String,List<String>> queryParameters) throws FHIROperationException
- Throws:
FHIROperationException
-
getInputParameters
public static Parameters getInputParameters(OperationDefinition definition, Resource resource) throws Exception
- Throws:
Exception
-
getOutputParameters
public static Parameters getOutputParameters(Resource resource) throws Exception
- Throws:
Exception
-
getOutputParameters
public static Parameters getOutputParameters(String name, Resource resource) throws Exception
- Throws:
Exception
-
hasSingleResourceOutputParameter
public static boolean hasSingleResourceOutputParameter(Parameters parameters)
-
getSingleResourceOutputParameter
public static Resource getSingleResourceOutputParameter(Parameters parameters) throws Exception
- Throws:
Exception
-
checkAndVerifyOperationAllowed
public static void checkAndVerifyOperationAllowed(String operationName) throws FHIROperationException
check and verify operation allowed- Parameters:
operationName
-- Throws:
FHIROperationException
-
generateForbiddenOperationException
public static FHIROperationException generateForbiddenOperationException(String operationName)
-
-