* the directory
* @return the directory service
*/
private DirectoryService findDirectoryService(final Path directory) {
final Iterator<DirectoryService> directoryServicesIterator = this.getDirectoryServices().iterator();
DirectoryService directoryServiceFound = GeneratorUtils.<DirectoryService>generateDefaultUnknownValue();
while ((GeneratorUtils.<DirectoryService>generateDefaultUnknownValue() == directoryServiceFound)
&& directoryServicesIterator.hasNext()) {
final DirectoryService directoryService = directoryServicesIterator.next();
if (directoryService.getDirectoryPath().toAbsolutePath().equals(directory.toAbsolutePath())) {
directoryServiceFound = directoryService;
}
}
return directoryServiceFound;
}