throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
// No null or empty list
List<String> entityKeyList = body.getPublisherId();
if (entityKeyList == null || entityKeyList.size() == 0)
throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
if (!((Publisher)publisher).isAdmin())
throw new UserMismatchException(new ErrorMessage("errors.deletepublisher.AdminReqd"));
HashSet<String> dupCheck = new HashSet<String>();
for (String entityKey : entityKeyList) {
boolean inserted = dupCheck.add(entityKey);
if (!inserted)
throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.DuplicateKey", entityKey));
Object obj = em.find(org.apache.juddi.model.Publisher.class, entityKey);
if (obj == null)
throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.PublisherNotFound", entityKey));
}
}