org.molgenis.controller
Class PersonController

java.lang.Object
  extended by org.molgenis.controller.PersonController

@Lazy
@Controller
@RequestMapping(value="/api/v1/person")
public class PersonController
extends Object


Constructor Summary
PersonController()
           
 
Method Summary
 org.springframework.http.ResponseEntity<org.molgenis.controller.PersonController.PersonResponse> createPerson(org.molgenis.controller.PersonController.PersonRequest personRequest)
           
 org.springframework.http.ResponseEntity<org.molgenis.controller.PersonController.PersonResponse> createPersonFromForm(org.molgenis.controller.PersonController.PersonRequest personRequest)
           
 void deletePerson(Integer id)
           
 void deletePersonPost(Integer id)
           
 void handleDatabaseAccessException(DatabaseAccessException e)
           
 void handleEntityNotFoundException(EntityNotFoundException e)
           
 org.molgenis.controller.PersonController.PersonResponse retrievePerson(Integer id, String... expandFields)
           
 EntityCollectionResponse<org.molgenis.controller.PersonController.PersonResponse> retrievePersonCollection(EntityCollectionRequest personCollectionRequest, String... expandFields)
           
 EntityCollectionResponse<org.molgenis.controller.PersonController.PersonResponse> retrievePersonCollectionJson(EntityCollectionRequest personCollectionRequest, String... expandFields)
           
 EntityCollectionResponse<org.molgenis.controller.PersonController.PersonResponse> retrievePersonCollectionJsonPost(EntityCollectionRequest personCollectionRequest, String... expandFields)
           
 EntityCollectionResponse<org.molgenis.controller.PersonController.PersonResponse> retrievePersonCollectionPost(EntityCollectionRequest personCollectionRequest, String... expandFields)
           
 org.molgenis.controller.PersonController.PersonResponse retrievePersonJson(Integer id, String... expandFields)
           
 String retrievePersonXrefAffiliation(Integer id, String... expandFields)
           
 String retrievePersonXrefAffiliationJson(Integer id, String... expandFields)
           
 String retrievePersonXrefRoles(Integer id, String... expandFields)
           
 String retrievePersonXrefRolesJson(Integer id, String... expandFields)
           
 void updatePerson(Integer id, org.molgenis.controller.PersonController.PersonRequest personRequest)
           
 org.springframework.http.ResponseEntity<org.molgenis.controller.PersonController.PersonResponse> updatePersonFromForm(Integer id, String _method, org.molgenis.controller.PersonController.PersonRequest personRequest)
           
 void updatePersonFromFormPost(Integer id, org.molgenis.controller.PersonController.PersonRequest personRequest)
           
 void updatePersonPost(Integer id, org.molgenis.controller.PersonController.PersonRequest personRequest)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonController

public PersonController()
Method Detail

createPerson

@RequestMapping(method=POST)
@ResponseBody
public org.springframework.http.ResponseEntity<org.molgenis.controller.PersonController.PersonResponse> createPerson(@RequestBody
                                                                                                                                                 org.molgenis.controller.PersonController.PersonRequest personRequest)
                                                                                                              throws DatabaseException
Throws:
DatabaseException

createPersonFromForm

@RequestMapping(method=POST,
                headers="Content-Type=application/x-www-form-urlencoded")
@ResponseBody
public org.springframework.http.ResponseEntity<org.molgenis.controller.PersonController.PersonResponse> createPersonFromForm(@ModelAttribute
                                                                                                                                                         org.molgenis.controller.PersonController.PersonRequest personRequest)
                                                                                                                      throws DatabaseException
Throws:
DatabaseException

retrievePerson

@RequestMapping(value="/{id}",
                method=GET)
@ResponseBody
public org.molgenis.controller.PersonController.PersonResponse retrievePerson(@PathVariable
                                                                                                          Integer id,
                                                                                                          @RequestParam(value="expand",required=false)
                                                                                                          String... expandFields)
                                                                       throws DatabaseException
Throws:
DatabaseException

retrievePersonJson

@RequestMapping(value="/{id}",
                method=GET,
                params="format=json",
                produces="application/json")
@ResponseBody
public org.molgenis.controller.PersonController.PersonResponse retrievePersonJson(@PathVariable
                                                                                                              Integer id,
                                                                                                              @RequestParam(value="expand",required=false)
                                                                                                              String... expandFields)
                                                                           throws DatabaseException
Throws:
DatabaseException

retrievePersonXrefAffiliation

@RequestMapping(value="/{id}/affiliation",
                method=GET)
public String retrievePersonXrefAffiliation(@PathVariable
                                                           Integer id,
                                                           @RequestParam(value="expand",required=false)
                                                           String... expandFields)
                                     throws DatabaseException
Throws:
DatabaseException

retrievePersonXrefAffiliationJson

@RequestMapping(value="/{id}/affiliation",
                method=GET,
                params="format=json",
                produces="application/json")
public String retrievePersonXrefAffiliationJson(@PathVariable
                                                               Integer id,
                                                               @RequestParam(value="expand",required=false)
                                                               String... expandFields)
                                         throws DatabaseException
Throws:
DatabaseException

retrievePersonXrefRoles

@RequestMapping(value="/{id}/roles",
                method=GET)
public String retrievePersonXrefRoles(@PathVariable
                                                     Integer id,
                                                     @RequestParam(value="expand",required=false)
                                                     String... expandFields)
                               throws DatabaseException
Throws:
DatabaseException

retrievePersonXrefRolesJson

@RequestMapping(value="/{id}/roles",
                method=GET,
                params="format=json",
                produces="application/json")
public String retrievePersonXrefRolesJson(@PathVariable
                                                         Integer id,
                                                         @RequestParam(value="expand",required=false)
                                                         String... expandFields)
                                   throws DatabaseException
Throws:
DatabaseException

updatePerson

@RequestMapping(value="/{id}",
                method=PUT)
@ResponseStatus(value=OK)
public void updatePerson(@PathVariable
                                                       Integer id,
                                                       @RequestBody
                                                       org.molgenis.controller.PersonController.PersonRequest personRequest)
                  throws DatabaseException
Throws:
DatabaseException

updatePersonFromForm

@RequestMapping(value="/{id}",
                method=PUT,
                headers="Content-Type=application/x-www-form-urlencoded")
@ResponseBody
public org.springframework.http.ResponseEntity<org.molgenis.controller.PersonController.PersonResponse> updatePersonFromForm(@PathVariable
                                                                                                                                                         Integer id,
                                                                                                                                                         @PathVariable
                                                                                                                                                         String _method,
                                                                                                                                                         @ModelAttribute
                                                                                                                                                         org.molgenis.controller.PersonController.PersonRequest personRequest)
                                                                                                                      throws DatabaseException
Throws:
DatabaseException

updatePersonPost

@RequestMapping(value="/{id}",
                method=POST,
                params="_method=PUT")
@ResponseStatus(value=NO_CONTENT)
public void updatePersonPost(@PathVariable
                                                           Integer id,
                                                           @RequestBody
                                                           org.molgenis.controller.PersonController.PersonRequest personRequest)
                      throws DatabaseException
Throws:
DatabaseException

updatePersonFromFormPost

@RequestMapping(value="/{id}",
                method=POST,
                params="_method=PUT",
                headers="Content-Type=application/x-www-form-urlencoded")
@ResponseStatus(value=NO_CONTENT)
public void updatePersonFromFormPost(@PathVariable
                                                                   Integer id,
                                                                   @ModelAttribute
                                                                   org.molgenis.controller.PersonController.PersonRequest personRequest)
                              throws DatabaseException
Throws:
DatabaseException

deletePerson

@RequestMapping(value="/{id}",
                method=DELETE)
@ResponseStatus(value=NO_CONTENT)
public void deletePerson(@PathVariable
                                                       Integer id)
                  throws DatabaseException
Throws:
DatabaseException

deletePersonPost

@RequestMapping(value="/{id}",
                method=POST,
                params="_method=DELETE")
@ResponseStatus(value=NO_CONTENT)
public void deletePersonPost(@PathVariable
                                                           Integer id)
                      throws DatabaseException
Throws:
DatabaseException

retrievePersonCollection

@RequestMapping(method=GET)
@ResponseBody
public EntityCollectionResponse<org.molgenis.controller.PersonController.PersonResponse> retrievePersonCollection(EntityCollectionRequest personCollectionRequest,
                                                                                                                                              @RequestParam(value="expand",required=false)
                                                                                                                                              String... expandFields)
                                                                                                           throws DatabaseException
Throws:
DatabaseException

retrievePersonCollectionJson

@RequestMapping(method=GET,
                params="format=json",
                produces="application/json")
@ResponseBody
public EntityCollectionResponse<org.molgenis.controller.PersonController.PersonResponse> retrievePersonCollectionJson(EntityCollectionRequest personCollectionRequest,
                                                                                                                                                  @RequestParam(value="expand",required=false)
                                                                                                                                                  String... expandFields)
                                                                                                               throws DatabaseException
Throws:
DatabaseException

retrievePersonCollectionPost

@RequestMapping(method=POST,
                params="_method=GET")
@ResponseBody
public EntityCollectionResponse<org.molgenis.controller.PersonController.PersonResponse> retrievePersonCollectionPost(@RequestBody
                                                                                                                                                  EntityCollectionRequest personCollectionRequest,
                                                                                                                                                  @RequestParam(value="expand",required=false)
                                                                                                                                                  String... expandFields)
                                                                                                               throws DatabaseException
Throws:
DatabaseException

retrievePersonCollectionJsonPost

@RequestMapping(method=POST,
                params={"_method=GET","format=json"},
                produces="application/json")
@ResponseBody
public EntityCollectionResponse<org.molgenis.controller.PersonController.PersonResponse> retrievePersonCollectionJsonPost(@RequestBody
                                                                                                                                                      EntityCollectionRequest personCollectionRequest,
                                                                                                                                                      @RequestParam(value="expand",required=false)
                                                                                                                                                      String... expandFields)
                                                                                                                   throws DatabaseException
Throws:
DatabaseException

handleEntityNotFoundException

@ExceptionHandler(value=org.molgenis.framework.db.EntityNotFoundException.class)
@ResponseStatus(value=NOT_FOUND)
public void handleEntityNotFoundException(EntityNotFoundException e)

handleDatabaseAccessException

@ExceptionHandler(value=org.molgenis.framework.db.DatabaseAccessException.class)
@ResponseStatus(value=UNAUTHORIZED)
public void handleDatabaseAccessException(DatabaseAccessException e)


Copyright © 2013. All Rights Reserved.