Example usage for org.springframework.http HttpStatus OK

List of usage examples for org.springframework.http HttpStatus OK

Introduction

In this page you can find the example usage for org.springframework.http HttpStatus OK.

Prototype

HttpStatus OK

To view the source code for org.springframework.http HttpStatus OK.

Click Source Link

Document

200 OK .

Usage

From source file:com.salmon.security.xacml.demo.springmvc.rest.controller.MarketPlaceQueryController.java

@RequestMapping(method = RequestMethod.GET, value = "drivers")
@ResponseStatus(HttpStatus.OK)
@ResponseBody//from   w w  w.j  av  a  2 s.  c o m
public DriverList listDrivers() {
    LOG.info("REST Driver LIST");
    return marketPlaceController.listDrivers();
}

From source file:edu.infsci2560.services.BlogsService.java

@RequestMapping(method = RequestMethod.GET, produces = "application/json")
public ResponseEntity<Iterable<Blog>> list() {
    HttpHeaders headers = new HttpHeaders();
    return new ResponseEntity<>(repository.findAll(), headers, HttpStatus.OK);
}

From source file:net.paulgray.lmsrest.people.PeopleController.java

@RequestMapping(method = RequestMethod.GET)
public ResponseEntity getAssignmentsForCourse(@ContextUser User user, @PathVariable Course course) {
    return new ResponseEntity(peopleService.getPeopleForUserAndCourse(user.getId(), course.getId()),
            HttpStatus.OK);
}

From source file:com.tribuo.backend.controllers.UsuariosController.java

/**
 *
 * @param id// www  .ja  v a2s. c o  m
 * @return
 */
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<User> getUsuario(@PathVariable("id") Integer id) {
    User u = se.getUsuariosById(id);
    return new ResponseEntity<>(u, HttpStatus.OK);
}

From source file:edu.infsci2560.services.FriendService.java

@RequestMapping(method = RequestMethod.GET, produces = "application/json")
public ResponseEntity<Iterable<Friend>> list() {
    HttpHeaders headers = new HttpHeaders();
    return new ResponseEntity<>(repository.findAll(), headers, HttpStatus.OK);
}

From source file:org.avidj.zuul.rs.ZuulTest.java

@Test
public void itShallCreateShallowReadLockOnRoot() {
    final Zuul zuul = createZuul();
    given().standaloneSetup(zuul).param("t", "r").param("s", "s").when().put("/s/1/").then()
            .statusCode(HttpStatus.CREATED.value());
    given().standaloneSetup(zuul).when().get("/s/1/").then().statusCode(HttpStatus.OK.value()).and()
            .body("key", hasItem(Collections.emptyList())).and().body("session", hasItem("1")).and()
            .body("type", hasItem("READ")).and().body("scope", hasItem("SHALLOW")).and()
            .body("count", hasItem(1));
}

From source file:springchat.rest.MessagesRest.java

@RequestMapping(value = "/rest/messages", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.OK)
public void postMessage(@RequestParam("message") String message) {
    messages.postMessage(message);/*from   www.ja  va 2  s  . co m*/
}

From source file:com.sms.server.controller.JobController.java

@RequestMapping(value = "/active", method = RequestMethod.GET)
public ResponseEntity<List<Job>> getActiveJobs() {
    List<Job> jobs = jobDao.getActiveJobs();

    if (jobs == null) {
        return new ResponseEntity<>(HttpStatus.NOT_FOUND);
    }//from  w w  w .  j a  va2s  .  c om

    return new ResponseEntity<>(jobs, HttpStatus.OK);
}

From source file:com.tribuo.backend.controllers.EspecificosController.java

/**
 *
 * @param id// w  ww.j ava 2  s .c o  m
 * @return
 */
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<Especificos> getSubcategoria(@PathVariable("id") Integer id) {
    Especificos u = se.getEspecificosById(id);
    return new ResponseEntity<>(u, HttpStatus.OK);
}

From source file:net.eusashead.hateoas.hal.http.converter.module.impl.ManualAdapterController.java

@ResponseBody
@RequestMapping(value = "/responseentity")
public ResponseEntity<Foo> responseEntity() {
    return new ResponseEntity<Foo>(new Foo(), HttpStatus.OK);
}