47 lines
1.2 KiB
Java
47 lines
1.2 KiB
Java
package de.hsos.swa.ma.api.al;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import javax.ws.rs.GET;
|
|
import javax.ws.rs.POST;
|
|
import javax.ws.rs.PUT;
|
|
import javax.ws.rs.DELETE;
|
|
import javax.ws.rs.Path;
|
|
import javax.ws.rs.Produces;
|
|
import javax.ws.rs.Consumes;
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
import org.jboss.resteasy.annotations.jaxrs.PathParam;
|
|
|
|
@Path("/barkeeper/v2/mocktail")
|
|
public interface MocktailInterface {
|
|
|
|
@GET
|
|
@Produces (MediaType.APPLICATION_JSON)
|
|
@Path("/search")
|
|
public ArrayList<Mocktail> getAllMocktails();
|
|
|
|
@GET
|
|
@Produces (MediaType.APPLICATION_JSON)
|
|
@Path("/search/name/{name}")
|
|
public ArrayList<Mocktail> getMocktailByName(@PathParam String name);
|
|
|
|
@GET
|
|
@Produces (MediaType.APPLICATION_JSON)
|
|
@Path("/search/ingredient/{ingredient}")
|
|
public ArrayList<Mocktail> getMocktailByIngredient(@PathParam String ingredient);
|
|
|
|
@POST
|
|
@Consumes (MediaType.APPLICATION_JSON)
|
|
@Path("/create")
|
|
public void createMocktail(Mocktail m);
|
|
|
|
@DELETE
|
|
@Path("/delete/{number}")
|
|
public void deleteMocktail(@PathParam long number);
|
|
|
|
@PUT
|
|
@Consumes (MediaType.APPLICATION_JSON)
|
|
@Path("/update/{number}")
|
|
public void updateMocktail(Mocktail m,@PathParam long number);
|
|
} |