parent
ba59d1cc80
commit
9d7bb36da8
3 changed files with 13 additions and 2 deletions
|
|
@ -20,8 +20,9 @@ public abstract class AbstractExporterService {
|
|||
}
|
||||
|
||||
public abstract Collection<String> getLimFileRows();
|
||||
public abstract String getTargetFileName();
|
||||
public void process() {
|
||||
String fileName = prepareFileName("security");
|
||||
String fileName = getTargetFileName();
|
||||
File limFile = new File(fileName);
|
||||
|
||||
Path limFilePath = limFile.toPath();
|
||||
|
|
@ -34,7 +35,7 @@ public abstract class AbstractExporterService {
|
|||
}
|
||||
}
|
||||
|
||||
private String prepareFileName(String target) {
|
||||
protected String prepareFileName(String target){
|
||||
StringBuilder result = new StringBuilder();
|
||||
String dt = dtFormatter.format(LocalDateTime.now());
|
||||
|
||||
|
|
|
|||
|
|
@ -19,4 +19,9 @@ public class MoneyExporterService extends AbstractExporterService {
|
|||
List<String> limFileRows = Arrays.asList("a", "b", "c");
|
||||
return limFileRows;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTargetFileName() {
|
||||
return prepareFileName("money");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,4 +18,9 @@ public class SecurityExporterService extends AbstractExporterService {
|
|||
List<String> limFileRows = Arrays.asList("a", "b", "c");
|
||||
return limFileRows;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTargetFileName() {
|
||||
return prepareFileName("security");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue