throw new ConfigurationException("failed to lookup volumes {id='"+id+"'}",logger);
}
public Volume getLegacyVolume(String uniqueId) throws ConfigurationException {
if (uniqueId==null)
throw new ConfigurationException("uniqueid cannot be null",logger);
Date date = null;
try {
date = DateUtil.convertStringToDate(uniqueId);
} catch (Exception e) {
logger.warn("failed to parse uniqueid {id='"+uniqueId+"'}");
}
for (Volume volume : volumes) {
if (volume.getStatus()==Volume.Status.UNUSED)
throw new ConfigurationException("failed to lookup legacy volumes {uniqueId='"+uniqueId+"'}",logger);
if (volume != null && volume.getModified()!=null && volume.getModified().compareTo(date)>=0) {
boolean isModified = volume.getModified().compareTo(date)>0;
return volume;
}