Pull request #2: Filename is now in redactionLog
Merge in RED/redaction-report-service from filename to master * commit '880968d7023fc31765b478b06444ba0ae06165c9': Filename is now in redactionLog
This commit is contained in:
commit
f141e55a9c
@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>com.iqser.red.service</groupId>
|
||||
<artifactId>redaction-service-api-v1</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<version>1.1.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- This dependency contains annotations that are used in specifying REST endpoints. -->
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
package com.iqser.red.service.redaction.report.v1.api.model;
|
||||
|
||||
import com.iqser.red.service.redaction.v1.model.RedactionLog;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class FileRedactionLog {
|
||||
|
||||
private String filename;
|
||||
private RedactionLog redactionLog;
|
||||
|
||||
}
|
||||
@ -3,6 +3,8 @@ package com.iqser.red.service.redaction.report.v1.api.model;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.iqser.red.service.redaction.v1.model.RedactionLog;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -12,6 +14,6 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public class MultiFileRedactionLog {
|
||||
|
||||
private List<FileRedactionLog> FileRedactionLogs = new ArrayList<>();
|
||||
private List<RedactionLog> redactionLogs = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
||||
@ -46,8 +46,8 @@ public class ReportGenerationService {
|
||||
|
||||
XWPFTable table = doc.getTables().get(1);
|
||||
|
||||
multiFileRedactionLog.getFileRedactionLogs().forEach(fileRedactionLog -> {
|
||||
fileRedactionLog.getRedactionLog().getRedactionLogEntry().forEach(redactionLogEntry -> {
|
||||
multiFileRedactionLog.getRedactionLogs().forEach(fileRedactionLog -> {
|
||||
fileRedactionLog.getRedactionLogEntry().forEach(redactionLogEntry -> {
|
||||
Set<Integer> pages = new HashSet<>();
|
||||
redactionLogEntry.getPositions().forEach(position -> {
|
||||
pages.add(position.getPage());
|
||||
|
||||
@ -15,7 +15,6 @@ import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.iqser.red.service.redaction.report.v1.api.model.FileRedactionLog;
|
||||
import com.iqser.red.service.redaction.report.v1.api.model.MultiFileRedactionLog;
|
||||
import com.iqser.red.service.redaction.report.v1.api.model.ReportResult;
|
||||
import com.iqser.red.service.redaction.report.v1.server.controller.RedactionReportController;
|
||||
@ -39,8 +38,8 @@ public class RedactionReportIntegrationTest {
|
||||
|
||||
RedactionLog redactionLog = objectMapper.readValue(redactionLogResource.getInputStream(), RedactionLog.class);
|
||||
|
||||
FileRedactionLog fileRedactionLog = new FileRedactionLog("Metholachlor 1", redactionLog);
|
||||
MultiFileRedactionLog multiFileRedactionLog = new MultiFileRedactionLog(List.of(fileRedactionLog));
|
||||
redactionLog.setFilename("TestFile");
|
||||
MultiFileRedactionLog multiFileRedactionLog = new MultiFileRedactionLog(List.of(redactionLog));
|
||||
|
||||
ReportResult reportResult = redactionReportController.generateReport(multiFileRedactionLog);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user