Project

General

Profile

« Previous | Next » 

Revision 52889

SftpIterator can work incrementally with dates and datetimes

View differences:

AbstractSftpCollectorPlugin.java
31 31
		if ((extensions == null) || extensions.isEmpty()) {
32 32
			throw new CollectorServiceException("Param 'extensions' is null or empty");
33 33
		}
34
		if (fromDate != null && !fromDate.matches("\\d{4}-\\d{2}-\\d{2}")) { throw new CollectorServiceException("Invalid date (YYYY-MM-DD): " + fromDate); }
34
		if (fromDate != null && (!fromDate.matches("\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}Z)?+") && !fromDate.matches("\\d{4}-\\d{2}-\\d{2}") )) {
35
			throw new CollectorServiceException("Invalid date (yyyy-MM-dd'T'HH:mm:ss'Z' or yyyy-MM-dd ): " + fromDate);
36
		}
35 37

  
36 38
		Set<String> extensionSet = parseSet(extensions);
37 39

  

Also available in: Unified diff