@Test public void testCheckExportTypeResourceType() { FHIROperationContext.Type type = Type.RESOURCE_TYPE; Class<? extends Resource> resourceType = Patient.class; BulkDataConstants.ExportType exportType = BulkDataExportUtil.checkExportType(type, resourceType); assertEquals(exportType, ExportType.PATIENT); resourceType = Medication.class; exportType = BulkDataExportUtil.checkExportType(type, resourceType); assertEquals(exportType, ExportType.INVALID); resourceType = Group.class; exportType = BulkDataExportUtil.checkExportType(type, resourceType); assertEquals(exportType, ExportType.INVALID); }
public static BulkDataConstants.ExportType checkExportType(FHIROperationContext.Type type, Class<? extends Resource> resourceType) { ExportType exportType = ExportType.INVALID; if (FHIROperationContext.Type.INSTANCE.equals(type) && "Group".equals(resourceType.getSimpleName())) { exportType = ExportType.GROUP; } else if (FHIROperationContext.Type.RESOURCE_TYPE.equals(type) && "Patient".equals(resourceType.getSimpleName())) { exportType = ExportType.PATIENT; } else if (FHIROperationContext.Type.SYSTEM.equals(type)) { exportType = ExportType.SYSTEM; } return exportType; }
BulkDataExportUtil { public static BulkDataConstants.ExportType checkExportType(FHIROperationContext.Type type, Class<? extends Resource> resourceType) { ExportType exportType = ExportType.INVALID; if (FHIROperationContext.Type.INSTANCE.equals(type) && "Group".equals(resourceType.getSimpleName())) { exportType = ExportType.GROUP; } else if (FHIROperationContext.Type.RESOURCE_TYPE.equals(type) && "Patient".equals(resourceType.getSimpleName())) { exportType = ExportType.PATIENT; } else if (FHIROperationContext.Type.SYSTEM.equals(type)) { exportType = ExportType.SYSTEM; } return exportType; } }
BulkDataExportUtil { public static BulkDataConstants.ExportType checkExportType(FHIROperationContext.Type type, Class<? extends Resource> resourceType) { ExportType exportType = ExportType.INVALID; if (FHIROperationContext.Type.INSTANCE.equals(type) && "Group".equals(resourceType.getSimpleName())) { exportType = ExportType.GROUP; } else if (FHIROperationContext.Type.RESOURCE_TYPE.equals(type) && "Patient".equals(resourceType.getSimpleName())) { exportType = ExportType.PATIENT; } else if (FHIROperationContext.Type.SYSTEM.equals(type)) { exportType = ExportType.SYSTEM; } return exportType; } private  BulkDataExportUtil(); }
BulkDataExportUtil { public static BulkDataConstants.ExportType checkExportType(FHIROperationContext.Type type, Class<? extends Resource> resourceType) { ExportType exportType = ExportType.INVALID; if (FHIROperationContext.Type.INSTANCE.equals(type) && "Group".equals(resourceType.getSimpleName())) { exportType = ExportType.GROUP; } else if (FHIROperationContext.Type.RESOURCE_TYPE.equals(type) && "Patient".equals(resourceType.getSimpleName())) { exportType = ExportType.PATIENT; } else if (FHIROperationContext.Type.SYSTEM.equals(type)) { exportType = ExportType.SYSTEM; } return exportType; } 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 BulkDataConstants.ExportType checkExportType(FHIROperationContext.Type type, Class<? extends Resource> resourceType) { ExportType exportType = ExportType.INVALID; if (FHIROperationContext.Type.INSTANCE.equals(type) && "Group".equals(resourceType.getSimpleName())) { exportType = ExportType.GROUP; } else if (FHIROperationContext.Type.RESOURCE_TYPE.equals(type) && "Patient".equals(resourceType.getSimpleName())) { exportType = ExportType.PATIENT; } else if (FHIROperationContext.Type.SYSTEM.equals(type)) { exportType = ExportType.SYSTEM; } return exportType; } 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);  }