file drop support
- Add a folder where you can drop Zip files which will then be extracted on the fly and ingsted. - CsvReaderSettings now contain TagMatcher that are applied to the first line and can be used to extract additional tags. - Update to jdk 16 so that we can have records.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package org.lucares.pdbui.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class FileDropConfig {
|
||||
private List<FileDropSettings> settings = new ArrayList<>();
|
||||
|
||||
public List<FileDropSettings> getSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
public void setSettings(final List<FileDropSettings> settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
builder.append("FileDropConfig [");
|
||||
if (settings != null) {
|
||||
builder.append("\nsettings=");
|
||||
builder.append(StringUtils.join(settings, "\n"));
|
||||
}
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.lucares.pdbui.domain;
|
||||
|
||||
import org.lucares.pdbui.CsvReaderSettings;
|
||||
|
||||
public record FileDropSettings(String match, CsvReaderSettings csvSettings) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.lucares.pdbui.domain;
|
||||
|
||||
/**
|
||||
* @param regex a regular expression with one catching group, e.g.
|
||||
* "BUILD='([a-zA-Z]+_\\d+\\.\\d_\\d+)"
|
||||
* @param tag the tag, e.g. "build"
|
||||
*/
|
||||
public record TagMatcher(String regex, String tag) {
|
||||
}
|
||||
Reference in New Issue
Block a user