@Test public void testGetMetaData() { }
public MetadataResponse getMetaData(MetaDataRequest metaDataRequest, String moduleName) { MetadataResponse metadataResponse = new MetadataResponse(); ReportDefinitions rds = ReportApp.getReportDefs(); ReportDefinition reportDefinition = new ReportDefinition(); reportDefinition = rds.getReportDefinition(moduleName+" "+metaDataRequest.getReportName()); ReportMetadata rmt = new ReportMetadata(); rmt.setReportName(reportDefinition.getReportName()); rmt.setSummary(reportDefinition.getSummary()); rmt.setViewPath(reportDefinition.getViewPath()); rmt.setSearchFilter(reportDefinition.isSearchFilter()); rmt.setSorting(reportDefinition.isSorting()); rmt.setSerialNo(reportDefinition.isSerialNo()); rmt.setSelectiveDownload(reportDefinition.isSelectiveDownload()); List<ColumnDetail> reportHeaders = new ArrayList<>(); List<ColumnDetail> searchParams = new ArrayList<>(); for (SourceColumn cd : reportDefinition.getSourceColumns()) { ColumnDetail reportheader = new ColumnDetail(); reportheader.setLabel(cd.getLabel()); reportheader.setName(cd.getName()); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); reportheader.setType(te); reportheader.setRowTotal(cd.getRowTotal()); reportheader.setColumnTotal(cd.getColumnTotal()); reportHeaders.add(reportheader); } for (SearchColumn cd : reportDefinition.getSearchParams()) { ColumnDetail sc = new ColumnDetail(); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); sc.setType(te); sc.setLabel(cd.getLabel()); sc.setName(cd.getName()); sc.setShowColumn(cd.getShowColumn()); sc.setDefaultValue(cd.getPattern()); sc.setIsMandatory(cd.getIsMandatory()); sc.setColumnTotal(cd.getColumnTotal()); sc.setRowTotal(cd.getRowTotal()); sc.setInitialValue(cd.getInitialValue()); sc.setMinValue(cd.getMinValue()); sc.setMaxValue(cd.getMaxValue()); searchParams.add(sc); } rmt.setReportHeader(reportHeaders); rmt.setSearchParams(searchParams); rmt.setAdditionalConfig(reportDefinition.getAdditionalConfig()); metadataResponse.setReportDetails(rmt); metadataResponse.setTenantId(metaDataRequest.getTenantId()); try { integrationService.getData(reportDefinition, metadataResponse, metaDataRequest.getRequestInfo(),moduleName); } catch (Exception e) { e.printStackTrace(); } return metadataResponse; }
ReportService { public MetadataResponse getMetaData(MetaDataRequest metaDataRequest, String moduleName) { MetadataResponse metadataResponse = new MetadataResponse(); ReportDefinitions rds = ReportApp.getReportDefs(); ReportDefinition reportDefinition = new ReportDefinition(); reportDefinition = rds.getReportDefinition(moduleName+" "+metaDataRequest.getReportName()); ReportMetadata rmt = new ReportMetadata(); rmt.setReportName(reportDefinition.getReportName()); rmt.setSummary(reportDefinition.getSummary()); rmt.setViewPath(reportDefinition.getViewPath()); rmt.setSearchFilter(reportDefinition.isSearchFilter()); rmt.setSorting(reportDefinition.isSorting()); rmt.setSerialNo(reportDefinition.isSerialNo()); rmt.setSelectiveDownload(reportDefinition.isSelectiveDownload()); List<ColumnDetail> reportHeaders = new ArrayList<>(); List<ColumnDetail> searchParams = new ArrayList<>(); for (SourceColumn cd : reportDefinition.getSourceColumns()) { ColumnDetail reportheader = new ColumnDetail(); reportheader.setLabel(cd.getLabel()); reportheader.setName(cd.getName()); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); reportheader.setType(te); reportheader.setRowTotal(cd.getRowTotal()); reportheader.setColumnTotal(cd.getColumnTotal()); reportHeaders.add(reportheader); } for (SearchColumn cd : reportDefinition.getSearchParams()) { ColumnDetail sc = new ColumnDetail(); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); sc.setType(te); sc.setLabel(cd.getLabel()); sc.setName(cd.getName()); sc.setShowColumn(cd.getShowColumn()); sc.setDefaultValue(cd.getPattern()); sc.setIsMandatory(cd.getIsMandatory()); sc.setColumnTotal(cd.getColumnTotal()); sc.setRowTotal(cd.getRowTotal()); sc.setInitialValue(cd.getInitialValue()); sc.setMinValue(cd.getMinValue()); sc.setMaxValue(cd.getMaxValue()); searchParams.add(sc); } rmt.setReportHeader(reportHeaders); rmt.setSearchParams(searchParams); rmt.setAdditionalConfig(reportDefinition.getAdditionalConfig()); metadataResponse.setReportDetails(rmt); metadataResponse.setTenantId(metaDataRequest.getTenantId()); try { integrationService.getData(reportDefinition, metadataResponse, metaDataRequest.getRequestInfo(),moduleName); } catch (Exception e) { e.printStackTrace(); } return metadataResponse; } }
ReportService { public MetadataResponse getMetaData(MetaDataRequest metaDataRequest, String moduleName) { MetadataResponse metadataResponse = new MetadataResponse(); ReportDefinitions rds = ReportApp.getReportDefs(); ReportDefinition reportDefinition = new ReportDefinition(); reportDefinition = rds.getReportDefinition(moduleName+" "+metaDataRequest.getReportName()); ReportMetadata rmt = new ReportMetadata(); rmt.setReportName(reportDefinition.getReportName()); rmt.setSummary(reportDefinition.getSummary()); rmt.setViewPath(reportDefinition.getViewPath()); rmt.setSearchFilter(reportDefinition.isSearchFilter()); rmt.setSorting(reportDefinition.isSorting()); rmt.setSerialNo(reportDefinition.isSerialNo()); rmt.setSelectiveDownload(reportDefinition.isSelectiveDownload()); List<ColumnDetail> reportHeaders = new ArrayList<>(); List<ColumnDetail> searchParams = new ArrayList<>(); for (SourceColumn cd : reportDefinition.getSourceColumns()) { ColumnDetail reportheader = new ColumnDetail(); reportheader.setLabel(cd.getLabel()); reportheader.setName(cd.getName()); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); reportheader.setType(te); reportheader.setRowTotal(cd.getRowTotal()); reportheader.setColumnTotal(cd.getColumnTotal()); reportHeaders.add(reportheader); } for (SearchColumn cd : reportDefinition.getSearchParams()) { ColumnDetail sc = new ColumnDetail(); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); sc.setType(te); sc.setLabel(cd.getLabel()); sc.setName(cd.getName()); sc.setShowColumn(cd.getShowColumn()); sc.setDefaultValue(cd.getPattern()); sc.setIsMandatory(cd.getIsMandatory()); sc.setColumnTotal(cd.getColumnTotal()); sc.setRowTotal(cd.getRowTotal()); sc.setInitialValue(cd.getInitialValue()); sc.setMinValue(cd.getMinValue()); sc.setMaxValue(cd.getMaxValue()); searchParams.add(sc); } rmt.setReportHeader(reportHeaders); rmt.setSearchParams(searchParams); rmt.setAdditionalConfig(reportDefinition.getAdditionalConfig()); metadataResponse.setReportDetails(rmt); metadataResponse.setTenantId(metaDataRequest.getTenantId()); try { integrationService.getData(reportDefinition, metadataResponse, metaDataRequest.getRequestInfo(),moduleName); } catch (Exception e) { e.printStackTrace(); } return metadataResponse; }  }
ReportService { public MetadataResponse getMetaData(MetaDataRequest metaDataRequest, String moduleName) { MetadataResponse metadataResponse = new MetadataResponse(); ReportDefinitions rds = ReportApp.getReportDefs(); ReportDefinition reportDefinition = new ReportDefinition(); reportDefinition = rds.getReportDefinition(moduleName+" "+metaDataRequest.getReportName()); ReportMetadata rmt = new ReportMetadata(); rmt.setReportName(reportDefinition.getReportName()); rmt.setSummary(reportDefinition.getSummary()); rmt.setViewPath(reportDefinition.getViewPath()); rmt.setSearchFilter(reportDefinition.isSearchFilter()); rmt.setSorting(reportDefinition.isSorting()); rmt.setSerialNo(reportDefinition.isSerialNo()); rmt.setSelectiveDownload(reportDefinition.isSelectiveDownload()); List<ColumnDetail> reportHeaders = new ArrayList<>(); List<ColumnDetail> searchParams = new ArrayList<>(); for (SourceColumn cd : reportDefinition.getSourceColumns()) { ColumnDetail reportheader = new ColumnDetail(); reportheader.setLabel(cd.getLabel()); reportheader.setName(cd.getName()); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); reportheader.setType(te); reportheader.setRowTotal(cd.getRowTotal()); reportheader.setColumnTotal(cd.getColumnTotal()); reportHeaders.add(reportheader); } for (SearchColumn cd : reportDefinition.getSearchParams()) { ColumnDetail sc = new ColumnDetail(); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); sc.setType(te); sc.setLabel(cd.getLabel()); sc.setName(cd.getName()); sc.setShowColumn(cd.getShowColumn()); sc.setDefaultValue(cd.getPattern()); sc.setIsMandatory(cd.getIsMandatory()); sc.setColumnTotal(cd.getColumnTotal()); sc.setRowTotal(cd.getRowTotal()); sc.setInitialValue(cd.getInitialValue()); sc.setMinValue(cd.getMinValue()); sc.setMaxValue(cd.getMaxValue()); searchParams.add(sc); } rmt.setReportHeader(reportHeaders); rmt.setSearchParams(searchParams); rmt.setAdditionalConfig(reportDefinition.getAdditionalConfig()); metadataResponse.setReportDetails(rmt); metadataResponse.setTenantId(metaDataRequest.getTenantId()); try { integrationService.getData(reportDefinition, metadataResponse, metaDataRequest.getRequestInfo(),moduleName); } catch (Exception e) { e.printStackTrace(); } return metadataResponse; }  MetadataResponse getMetaData(MetaDataRequest metaDataRequest, String moduleName); ResponseEntity<?> getSuccessResponse(final MetadataResponse metadataResponse, final RequestInfo requestInfo,
			String tenantID); ResponseEntity<?> getReportDataSuccessResponse(final List<ReportResponse> reportResponse, final RequestInfo requestInfo
			,String tenantId); ResponseEntity<?> getFailureResponse( final RequestInfo requestInfo,
			String tenantID); ResponseEntity<?> getFailureResponse( final RequestInfo requestInfo,
			String tenantID, Exception e); ResponseEntity<?> reloadResponse( final RequestInfo requestInfo, Exception e); List<ReportResponse> getAllReportData(ReportRequest reportRequest,String moduleName,String authToken); ReportResponse getReportData(ReportRequest reportRequest,String moduleName,String reportName,String authToken); }
ReportService { public MetadataResponse getMetaData(MetaDataRequest metaDataRequest, String moduleName) { MetadataResponse metadataResponse = new MetadataResponse(); ReportDefinitions rds = ReportApp.getReportDefs(); ReportDefinition reportDefinition = new ReportDefinition(); reportDefinition = rds.getReportDefinition(moduleName+" "+metaDataRequest.getReportName()); ReportMetadata rmt = new ReportMetadata(); rmt.setReportName(reportDefinition.getReportName()); rmt.setSummary(reportDefinition.getSummary()); rmt.setViewPath(reportDefinition.getViewPath()); rmt.setSearchFilter(reportDefinition.isSearchFilter()); rmt.setSorting(reportDefinition.isSorting()); rmt.setSerialNo(reportDefinition.isSerialNo()); rmt.setSelectiveDownload(reportDefinition.isSelectiveDownload()); List<ColumnDetail> reportHeaders = new ArrayList<>(); List<ColumnDetail> searchParams = new ArrayList<>(); for (SourceColumn cd : reportDefinition.getSourceColumns()) { ColumnDetail reportheader = new ColumnDetail(); reportheader.setLabel(cd.getLabel()); reportheader.setName(cd.getName()); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); reportheader.setType(te); reportheader.setRowTotal(cd.getRowTotal()); reportheader.setColumnTotal(cd.getColumnTotal()); reportHeaders.add(reportheader); } for (SearchColumn cd : reportDefinition.getSearchParams()) { ColumnDetail sc = new ColumnDetail(); TypeEnum te = TypeEnum.valueOf(cd.getType().toString().toUpperCase()); sc.setType(te); sc.setLabel(cd.getLabel()); sc.setName(cd.getName()); sc.setShowColumn(cd.getShowColumn()); sc.setDefaultValue(cd.getPattern()); sc.setIsMandatory(cd.getIsMandatory()); sc.setColumnTotal(cd.getColumnTotal()); sc.setRowTotal(cd.getRowTotal()); sc.setInitialValue(cd.getInitialValue()); sc.setMinValue(cd.getMinValue()); sc.setMaxValue(cd.getMaxValue()); searchParams.add(sc); } rmt.setReportHeader(reportHeaders); rmt.setSearchParams(searchParams); rmt.setAdditionalConfig(reportDefinition.getAdditionalConfig()); metadataResponse.setReportDetails(rmt); metadataResponse.setTenantId(metaDataRequest.getTenantId()); try { integrationService.getData(reportDefinition, metadataResponse, metaDataRequest.getRequestInfo(),moduleName); } catch (Exception e) { e.printStackTrace(); } return metadataResponse; }  MetadataResponse getMetaData(MetaDataRequest metaDataRequest, String moduleName); ResponseEntity<?> getSuccessResponse(final MetadataResponse metadataResponse, final RequestInfo requestInfo,
			String tenantID); ResponseEntity<?> getReportDataSuccessResponse(final List<ReportResponse> reportResponse, final RequestInfo requestInfo
			,String tenantId); ResponseEntity<?> getFailureResponse( final RequestInfo requestInfo,
			String tenantID); ResponseEntity<?> getFailureResponse( final RequestInfo requestInfo,
			String tenantID, Exception e); ResponseEntity<?> reloadResponse( final RequestInfo requestInfo, Exception e); List<ReportResponse> getAllReportData(ReportRequest reportRequest,String moduleName,String authToken); ReportResponse getReportData(ReportRequest reportRequest,String moduleName,String reportName,String authToken); static final Logger LOGGER; }