All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.anotheria.moskito.webui.threshold.resource.AlertsResource Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
package net.anotheria.moskito.webui.threshold.resource;

import net.anotheria.anoplass.api.APIException;
import net.anotheria.moskito.webui.shared.resource.AbstractResource;
import net.anotheria.moskito.webui.shared.resource.ReplyObject;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

/**
 * TODO comment this class
 *
 * @author lrosenberg
 * @since 14.04.15 16:54
 */
@Path("alerts")
public class AlertsResource extends AbstractResource {
	@GET
	public ReplyObject getAlerts(){
		try{
			return ReplyObject.success("alerts", getThresholdAPI().getAlerts());
		}catch(APIException e){
			return ReplyObject.error(e.getMessage());
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy