1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sys.service.impl;
17
18 import java.io.File;
19
20 import org.apache.commons.lang.StringUtils;
21 import org.kuali.ole.sys.service.DocumentNumberAwareReportWriterService;
22 import org.kuali.rice.krad.util.KRADConstants;
23
24 public class ScrubberListingReportWriterTextServiceImpl extends ReportWriterTextServiceImpl implements DocumentNumberAwareReportWriterService {
25 private String documentNumber;
26
27
28
29
30 @Override
31 public void destroy() {
32 super.destroy();
33
34 documentNumber = KRADConstants.EMPTY_STRING;
35 }
36
37
38
39
40 @Override
41 public void initialize() {
42 super.initialize();
43 }
44
45
46
47
48 public void setDocumentNumber(String documentNumber) {
49 this.documentNumber = documentNumber;
50 }
51
52 @Override
53 protected String generateFullFilePath() {
54 String fullFilePath = filePath + File.separator;
55 if (StringUtils.isNotBlank(documentNumber) && isAggregationModeOn()) {
56 fullFilePath += documentNumber + "_";
57 }
58 fullFilePath += this.fileNamePrefix;
59 if (StringUtils.isNotBlank(documentNumber) && !isAggregationModeOn()) {
60 fullFilePath += documentNumber + "_";
61 }
62 if (!isAggregationModeOn()) {
63 fullFilePath += dateTimeService.toDateTimeStringForFilename(dateTimeService.getCurrentDate());
64 }
65 fullFilePath += fileNameSuffix;
66
67 return fullFilePath;
68 }
69 }