@Path(value="/demo/v1")
@Consumes(value="application/json")
@Produces(value="application/json")
public interface DemoRestService
servicedocgen-maven-plugin.| Modifier and Type | Method and Description |
|---|---|
void |
deleteString(long id)
Deletes the
DemoTo with the given id. |
DemoTo<String> |
findString(long id)
Finds the
DemoTo with the given id. |
List<DemoTo<Long>> |
saveLongs(List<DemoTo<Long>> objects)
Saves the given
DemoTos. |
DemoTo<String> |
saveString(DemoTo<String> object)
Saves the given
DemoTo. |
void |
testError()
Test operation that always throws an error.
|
@GET
@Path(value="/string/{id}")
DemoTo<String> findString(@PathParam(value="id")
long id)
DemoTo with the given id.id - the primary key of the requested object.@POST @Path(value="/string") DemoTo<String> saveString(DemoTo<String> object)
DemoTo.object - the object to save.@DELETE
@Path(value="/string/{id}")
void deleteString(@PathParam(value="id")
long id)
DemoTo with the given id.id - the primary key of the object to delete.@POST @Path(value="/longs") List<DemoTo<Long>> saveLongs(List<DemoTo<Long>> objects)
DemoTos.objects - the objects to save.@GET
@Path(value="/error")
void testError()
throws IllegalStateException,
UnsupportedOperationException
IllegalStateException - in every case.UnsupportedOperationException - never.Copyright © 2015–2021 MojoHaus. All rights reserved.