bug 10313: on trying to delete a default offering throw error

This commit is contained in:
Abhinandan Prateek 2011-06-19 15:07:45 +05:30
parent db29a56eaf
commit 94a278a638

View File

@ -1727,6 +1727,10 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
} else if (offering.getRemoved() != null) {
throw new InvalidParameterValueException("unable to find service offering " + offeringId);
}
if(offering.getDefaultUse()){
throw new InvalidParameterValueException("Default service offerings cannot be deleted");
}
if (_serviceOfferingDao.remove(offeringId)) {
UserContext.current().setEventDetails("Service offering id=" + offeringId);