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/cocktail")
|
|
public interface CocktailInterface {
|
|
|
|
@GET
|
|
@Produces (MediaType.APPLICATION_JSON)
|
|
@Path("/search")
|
|
public Drinks getAllCocktails();
|
|
|
|
@GET
|
|
@Produces (MediaType.APPLICATION_JSON)
|
|
@Path("/search/name/{name}")
|
|
public Drinks getCocktailByName(@PathParam String name);
|
|
|
|
@GET
|
|
@Produces (MediaType.APPLICATION_JSON)
|
|
@Path("/search/ingredient/{ingredient}")
|
|
public Drinks getCocktailByIngredient(@PathParam String ingredient);
|
|
|
|
/*@POST
|
|
@Consumes (MediaType.APPLICATION_JSON)
|
|
@Path("/create")
|
|
public void createCocktail(Mocktail m);
|
|
|
|
@DELETE
|
|
@Path("/delete/{number}")
|
|
public void deleteCocktail(@PathParam long number);
|
|
|
|
@PUT
|
|
@Consumes (MediaType.APPLICATION_JSON)
|
|
@Path("/update/{number}")
|
|
public void updateCocktail(Mocktail m,@PathParam long number);*/
|
|
} |