変更なし #29

Merged r-isitani merged 1 commit into nitta-lab-2018:master from nitta-lab-2018:InstancesRest2 on 24 May 2018
Showing 1 changed file
View
12
src/main/java/cactusServer/resources/InstancesRest.java
public InstancesRest() {
 
}
 
/*
@Path("/test")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hoge() {
@GET
@Produces(MediaType.APPLICATION_JSON)
public Instance getInstance(@PathParam("instanceId") String instanceId) {
return Instances.getInstance().getInstance(instanceId);
}
}*/
// @Path("/areas")
// @GET
// @Produces(MediaType.APPLICATION_JSON)
 
 
@POST
@Produces(MediaType.APPLICATION_JSON)
public Map<String, Instance> create(@QueryParam("name") String name, @QueryParam("state") Instance.State state) {
Instance instance = new Instance(name, state);
public Map<String, Instance> create(@FormParam("name") String name) {
Instance instance = new Instance(name);
return Instances.getInstance().createInstance(instance);
}
 
/*
@DELETE
@Path("/destroyInstance")
@Produces(MediaType.APPLICATION_JSON)
public Instance destroy(@QueryParam("instanceId") String instanceId) {
return Instances.getInstance().destroyInstance(instanceId);
}
}*/
 
//
// @Path("/{instanceId}")
// @PUT