use of com.thinkbiganalytics.metadata.sla.api.DuplicateAgreementNameException in project kylo by Teradata.
the class InMemorySLAProvider method replaceSLA.
private SLAImpl replaceSLA(SLAID id, SLAImpl sla) {
ServiceLevelAgreement oldSla = this.slas.get(id);
ServiceLevelAgreement.ID namedId = this.nameToSlas.get(sla.getName());
// besides the one being replaced.
if (namedId == null || oldSla.getId().equals(namedId)) {
sla.setId(id);
this.slas.put(id, sla);
return sla;
} else {
throw new DuplicateAgreementNameException(sla.getName());
}
}
Aggregations