@Path("sender/{name}")
@ApiError(code = 404, reason = "There is no sender with the passed name")
public Response getAlertSenderByName(
@ApiParam("Name of the sender to retrieve") @PathParam("name")String senderName, @Context UriInfo uriInfo) {
AlertSenderInfo info = notificationMgr.getAlertInfoForSender(senderName);
if (info==null) {
throw new StuffNotFoundException("Alert sender with name [" + senderName + "]");
}
AlertSender sender = new AlertSender(senderName);
sender.setDescription(info.getDescription());
ConfigurationDefinition definition = notificationMgr.getConfigurationDefinitionForSender(senderName);
for (PropertyDefinition pd : definition.getPropertyDefinitions().values()) {
if (pd instanceof PropertyDefinitionSimple) {
PropertyDefinitionSimple pds = (PropertyDefinitionSimple) pd;