@Path(value="contact") @Produces(value="application/json") public class ContactCardResource extends Object
| Constructor and Description |
|---|
ContactCardResource() |
| Modifier and Type | Method and Description |
|---|---|
ContactCard |
addContact(ContactCard contact) |
ContactCard |
deleteContact(Long id) |
List<ContactCard> |
deleteContacts() |
ContactCard |
getContact(Long id) |
List<ContactCard> |
getContacts() |
SearchResource |
search() |
@POST @Consumes(value="application/json") @NotNull(message="{contact.already.exist}") public ContactCard addContact(@NotNull ContactCard contact)
@GET @NotNull public List<ContactCard> getContacts()
@GET @Path(value="{id}") @NotNull(message="{contact.does.not.exist}") public ContactCard getContact(@DecimalMin(value="0",message="{contact.wrong.id}")@PathParam(value="id") Long id)
@DELETE @NotNull public List<ContactCard> deleteContacts()
@DELETE @Path(value="{id}") @NotNull(message="{contact.does.not.exist}") public ContactCard deleteContact(@DecimalMin(value="0",message="{contact.wrong.id}")@PathParam(value="id") Long id)
@Path(value="search/{searchType}") public SearchResource search()
Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.