AccessPoint accessPoint = request.getAccessPoint();
List<String> prefixes = null;
if(request.getAccessPoint() != null) {
prefixes = accessPoint.getFileIncludePrefixes();
if(prefixes != null && prefixes.size() > 0) {
FilePrefixFilter f = new FilePrefixFilter();
f.setPrefixes(prefixes.toArray(sA));
chain.addFilter(f);
}
prefixes = accessPoint.getFileExcludePrefixes();
if(prefixes != null && prefixes.size() > 0) {
FilePrefixFilter f = new FilePrefixFilter();
f.setIncludeMatches(false);
f.setPrefixes(prefixes.toArray(sA));
chain.addFilter(f);
}
List<String> patterns = accessPoint.getFilePatterns();
if(patterns != null && patterns.size() > 0) {
FileRegexFilter f = new FileRegexFilter();
f.setPatterns(patterns);
chain.addFilter(f);
}
long embargoMS = accessPoint.getEmbargoMS();
if(embargoMS > 0) {
chain.addFilter(new DateEmbargoFilter(embargoMS));