@Override
protected String validateName(String name) throws StorageException {
Matcher matcher = NAME_PATTERN.matcher(name);
if (!matcher.matches()) {
throw new StorageException(name + ": remote filename pattern does not match: " + NAME_PATTERN.pattern() + " expected.");
}
try {
targetRemoteFile = RemoteFile.createRemoteFile(matcher.group(2));
}
catch (Exception e) {
throw new StorageException(name + ": remote filename pattern does not match: " + NAME_PATTERN.pattern() + " expected.");
}
return name;
}