Example usage for org.springframework.web.bind.annotation RequestMethod HEAD

List of usage examples for org.springframework.web.bind.annotation RequestMethod HEAD

Introduction

In this page you can find the example usage for org.springframework.web.bind.annotation RequestMethod HEAD.

Prototype

RequestMethod HEAD

To view the source code for org.springframework.web.bind.annotation RequestMethod HEAD.

Click Source Link

Usage

From source file:com.excelib.controller.GoController.java

@RequestMapping(value = { "/" }, method = { RequestMethod.HEAD })
public String head() {
    return "go.jsp";
}

From source file:com.app.controller.ErrorController.java

@RequestMapping(value = "/error", method = { RequestMethod.GET, RequestMethod.HEAD })
public String getError(Map<String, Object> model) throws DatabaseConnectionException, SQLException {

    Subject currentUser = SecurityUtils.getSubject();

    if (currentUser.isAuthenticated()) {
        User user = UserUtil.getCurrentUser();

        if (user.isActive() || user.isPendingCancellation()) {
            model.put("isActive", true);
        } else {//from w ww . jav a 2s. c om
            model.put("isActive", false);
        }

        model.put("emailAddress", user.getEmailAddress());
    } else {
        model.put("isActive", false);
    }

    return "error";
}

From source file:org.dd4t.test.web.controller.SpringBinaryController.java

@Override
@RequestMapping(method = { RequestMethod.GET, RequestMethod.HEAD })
public void getBinary(final HttpServletRequest request, final HttpServletResponse response)
        throws ItemNotFoundException {
    super.getBinary(request, response);
}

From source file:net.eusashead.hateoas.hal.response.impl.HalResponseBuilderController.java

@RequestMapping(method = { RequestMethod.GET, RequestMethod.HEAD })
public ResponseEntity<Representation> get(@PathVariable Integer id, HalResponseBuilder builder) {
    Order order = orderRepository.getOrder(id);
    return builder.withProperty("id", order.getId()).withProperty("total", order.getTotal())
            .etag(order.getDate()).lastModified(order.getDate()).build();
}

From source file:net.eusashead.hateoas.conditional.interceptor.SyncTestController.java

@RequestMapping(method = RequestMethod.HEAD)
public ResponseEntity<String> head() {
    HttpHeaders headers = new HttpHeaders();
    headers.setETag("\"123456\"");
    return new ResponseEntity<String>(headers, HttpStatus.OK);
}

From source file:net.eusashead.hateoas.response.impl.HalPageResponseBuilderController.java

@RequestMapping(method = { RequestMethod.GET, RequestMethod.HEAD })
public ResponseEntity<Representation> get(Pageable pageable, HalPageResponseBuilder builder) {

    Page<Customer> customers = customerRepository.listCustomers(pageable);

    return builder.page(customers, new CustomerRepresentationWriter()).etag(new Date(123456789l))
            .lastModified(new Date(123456789l)).build();
}

From source file:info.gehrels.voting.web.IndexPageController.java

@RequestMapping(value = "/", method = { RequestMethod.GET, RequestMethod.HEAD })
protected final ModelAndView doGet() {
    return new ModelAndView("indexPage", "numberOfCastBallots",
            new NumberOfCastBallotsBean(castBallotsState.getFirstTryCastBallots().size(),
                    castBallotsState.getSecondTryCastBallots().size()));
}

From source file:org.ow2.proactive.scheduling.api.controllers.ApiController.java

@RequestMapping(value = "/v1/rest", method = { RequestMethod.DELETE, RequestMethod.GET, RequestMethod.HEAD,
        RequestMethod.OPTIONS, RequestMethod.POST, RequestMethod.PUT, RequestMethod.TRACE })
@ResponseBody//  w  w  w .ja  v a  2s  . co m
public String v1() {
    return "TODO: forward to /rest/";
}

From source file:$.BinaryController.java

@Override
    @RequestMapping(method = { RequestMethod.GET, RequestMethod.HEAD })
    public void getBinary(final HttpServletRequest request, final HttpServletResponse response)
            throws ItemNotFoundException {
        super.getBinary(request, response);
    }/*from w w w .  j  a v a 2 s.  c o m*/

From source file:net.eusashead.hateoas.response.argumentresolver.EntityController.java

@RequestMapping(method = { RequestMethod.GET, RequestMethod.HEAD })
public ResponseEntity<Entity> get(EntityResponseBuilder<Entity> builder) {
    return builder.entity(new Entity("foo")).etag().build();
}