@Test public void testCheckAndValidateTypeFilters() throws FHIROperationException { List<String> result = BulkDataExportUtil.checkAndValidateTypeFilters(null); assertNotNull(result); assertTrue(result.isEmpty()); }
public static List<String> checkAndValidateTypeFilters(Parameters parameters) throws FHIROperationException { List<String> result = new ArrayList<>(); if (parameters != null) { for (Parameters.Parameter parameter : parameters.getParameter()) { if (BulkDataConstants.PARAM_TYPE_FILTER.equals(parameter.getName().getValue())) { if (parameter.getValue() != null && parameter.getValue().is(com.ibm.fhir.model.type.String.class)) { String typeFilters = parameter.getValue().as(com.ibm.fhir.model.type.String.class).getValue(); for (String typeFilter : typeFilters.split(",")) { if (!typeFilter.isEmpty()) { result.add(typeFilter); } else { throw buildOperationException( "invalid typeFilter sent as a parameter to $export operation", IssueType.INVALID); } } return result; } throw buildOperationException( "invalid typeFilter parameter type sent to $export operation", IssueType.INVALID); } } } return result; }
BulkDataExportUtil { public static List<String> checkAndValidateTypeFilters(Parameters parameters) throws FHIROperationException { List<String> result = new ArrayList<>(); if (parameters != null) { for (Parameters.Parameter parameter : parameters.getParameter()) { if (BulkDataConstants.PARAM_TYPE_FILTER.equals(parameter.getName().getValue())) { if (parameter.getValue() != null && parameter.getValue().is(com.ibm.fhir.model.type.String.class)) { String typeFilters = parameter.getValue().as(com.ibm.fhir.model.type.String.class).getValue(); for (String typeFilter : typeFilters.split(",")) { if (!typeFilter.isEmpty()) { result.add(typeFilter); } else { throw buildOperationException( "invalid typeFilter sent as a parameter to $export operation", IssueType.INVALID); } } return result; } throw buildOperationException( "invalid typeFilter parameter type sent to $export operation", IssueType.INVALID); } } } return result; } }
BulkDataExportUtil { public static List<String> checkAndValidateTypeFilters(Parameters parameters) throws FHIROperationException { List<String> result = new ArrayList<>(); if (parameters != null) { for (Parameters.Parameter parameter : parameters.getParameter()) { if (BulkDataConstants.PARAM_TYPE_FILTER.equals(parameter.getName().getValue())) { if (parameter.getValue() != null && parameter.getValue().is(com.ibm.fhir.model.type.String.class)) { String typeFilters = parameter.getValue().as(com.ibm.fhir.model.type.String.class).getValue(); for (String typeFilter : typeFilters.split(",")) { if (!typeFilter.isEmpty()) { result.add(typeFilter); } else { throw buildOperationException( "invalid typeFilter sent as a parameter to $export operation", IssueType.INVALID); } } return result; } throw buildOperationException( "invalid typeFilter parameter type sent to $export operation", IssueType.INVALID); } } } return result; } private  BulkDataExportUtil(); }
BulkDataExportUtil { public static List<String> checkAndValidateTypeFilters(Parameters parameters) throws FHIROperationException { List<String> result = new ArrayList<>(); if (parameters != null) { for (Parameters.Parameter parameter : parameters.getParameter()) { if (BulkDataConstants.PARAM_TYPE_FILTER.equals(parameter.getName().getValue())) { if (parameter.getValue() != null && parameter.getValue().is(com.ibm.fhir.model.type.String.class)) { String typeFilters = parameter.getValue().as(com.ibm.fhir.model.type.String.class).getValue(); for (String typeFilter : typeFilters.split(",")) { if (!typeFilter.isEmpty()) { result.add(typeFilter); } else { throw buildOperationException( "invalid typeFilter sent as a parameter to $export operation", IssueType.INVALID); } } return result; } throw buildOperationException( "invalid typeFilter parameter type sent to $export operation", IssueType.INVALID); } } } return result; } private  BulkDataExportUtil(); static BulkDataConstants.ExportType checkExportType(FHIROperationContext.Type type,
            Class<? extends Resource> resourceType); static MediaType checkAndConvertToMediaType(Parameters parameters); static FHIROperationException buildOperationException(String errMsg, IssueType issueType); static Instant checkAndExtractSince(Parameters parameters); static List<String> checkAndValidateTypes(Parameters parameters); static List<String> checkAndValidateTypeFilters(Parameters parameters); static Parameters getOutputParametersWithJson(PollingLocationResponse resource); static String checkAndValidateJob(Parameters parameters); static String encryptBatchJobId(String strToEncrypt, SecretKeySpec key); static String decryptBatchJobId(String strToDecrypt, SecretKeySpec key); }
BulkDataExportUtil { public static List<String> checkAndValidateTypeFilters(Parameters parameters) throws FHIROperationException { List<String> result = new ArrayList<>(); if (parameters != null) { for (Parameters.Parameter parameter : parameters.getParameter()) { if (BulkDataConstants.PARAM_TYPE_FILTER.equals(parameter.getName().getValue())) { if (parameter.getValue() != null && parameter.getValue().is(com.ibm.fhir.model.type.String.class)) { String typeFilters = parameter.getValue().as(com.ibm.fhir.model.type.String.class).getValue(); for (String typeFilter : typeFilters.split(",")) { if (!typeFilter.isEmpty()) { result.add(typeFilter); } else { throw buildOperationException( "invalid typeFilter sent as a parameter to $export operation", IssueType.INVALID); } } return result; } throw buildOperationException( "invalid typeFilter parameter type sent to $export operation", IssueType.INVALID); } } } return result; } private  BulkDataExportUtil(); static BulkDataConstants.ExportType checkExportType(FHIROperationContext.Type type,
            Class<? extends Resource> resourceType); static MediaType checkAndConvertToMediaType(Parameters parameters); static FHIROperationException buildOperationException(String errMsg, IssueType issueType); static Instant checkAndExtractSince(Parameters parameters); static List<String> checkAndValidateTypes(Parameters parameters); static List<String> checkAndValidateTypeFilters(Parameters parameters); static Parameters getOutputParametersWithJson(PollingLocationResponse resource); static String checkAndValidateJob(Parameters parameters); static String encryptBatchJobId(String strToEncrypt, SecretKeySpec key); static String decryptBatchJobId(String strToDecrypt, SecretKeySpec key);  }