![JAR search and dependency download from the Maven repository](/logo.png)
com.wadpam.docrest.test.PersonController Maven / Gradle / Ivy
The newest version!
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.wadpam.docrest.test;
import com.wadpam.docrest.domain.RestCode;
import com.wadpam.docrest.domain.RestReturn;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
* This is the PersonController javadoc text, containing a few HTML tags.
* @param stores optional inner object. boolean
* @author os
*/
@RestReturn(value=Venue.class)
@Controller
@RequestMapping(value="person")
public class PersonController extends AbstractController {
/**
* findByName returns all Venues with the specified name
* @param name the specified name
* @return all Venues with the specified name
* @since 1.23
*/
@RestReturn(value=Venue.class,
code={@RestCode(code=200, description="When found"),
@RestCode(code=404, description="When no user exists for specified name", message="NOT FOUND")},
supportsClassParams = true)
@RequestMapping(value="{name}", method= RequestMethod.GET)
public ResponseEntity findByName(@PathVariable String name) {
return new ResponseEntity(HttpStatus.NOT_FOUND);
}
@RequestMapping(value="{id}", method= RequestMethod.DELETE)
public ResponseEntity delete(@PathVariable String id) {
return new ResponseEntity(HttpStatus.OK);
}
/**
* Method comment for update with ModelAttributes
* @param person this is the javadoc comment for person ModelAttribute
* @param location this is the javadoc for location ModelAttribute
* @return
*/
@RestReturn(value=Venue.class,
code={@RestCode(code=200, description="When found"),
@RestCode(code=404, description="When no user exists for specified name", message="NOT FOUND")})
@RequestMapping(value="{name}", method= RequestMethod.POST)
public ResponseEntity update(@ModelAttribute Venue person,
@ModelAttribute Location location) {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy