package org.gcube.application.perform.service.rest; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; public class InterfaceCommons { public static final void checkMandatory(Object toCheck, String name) throws WebApplicationException{ if(toCheck==null) throw new WebApplicationException(String.format("Parameter %1$s is mandatory",name),Response.Status.BAD_REQUEST); } }