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

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

Introduction

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

Prototype

RequestMethod PUT

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

Click Source Link

Usage

From source file:com.artivisi.salary.payroll.system.controller.GajiController.java

@RequestMapping(value = "/gaji/{id}", method = RequestMethod.PUT)
public void editGaji(@PathVariable String id, @RequestBody Gaji g) throws Exception {
    Gaji gaji = gajiService.findOne(id);
    if (gaji == null) {
        throw new Exception("User tidak ditemukan");
    }/*from   w w  w  .java  2  s.c om*/

    g.setId(gaji.getId());
    gajiService.save(g);
}

From source file:com.github.lynxdb.server.api.http.handlers.EpAnnotation.java

@RequestMapping(path = "/bulk", method = { RequestMethod.POST, RequestMethod.PUT,
        RequestMethod.DELETE }, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity bulk() {
    return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).build();
}

From source file:org.hsweb.web.controller.datasource.DataSourceController.java

@RequestMapping(value = "/disable/{id}", method = RequestMethod.PUT)
@Authorize(action = "disable")
@AccessLogger("?")
public ResponseMessage disable(@PathVariable("id") String id) {
    dataSourceService.disable(id);/*from  w w w.ja  v  a  2s  .com*/
    return ResponseMessage.ok();
}

From source file:org.bhagya.finance.api.web.HobbyController.java

@RequestMapping(value = "/update", method = RequestMethod.PUT)
public @ResponseBody Hobby updateHobby(@RequestBody Hobby hobby) {
    log.debug("request for update Hobby");
    return serviceManager.update(hobby);
}

From source file:com.vividcode.imap.server.controller.UserController.java

@RequestMapping(method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.OK)/*from   w w  w .ja  v  a 2  s  .com*/
@ResponseBody
public ValidatedResponse update(@RequestBody @Valid UserVO user) {
    userService.updateUser(user);
    return new ValidatedResponse();
}

From source file:cz.fi.muni.pa165.mushroomhunter.rest.HunterRest.java

@RequestMapping(method = RequestMethod.PUT)
public HunterDto updateHunter(@RequestBody @Valid HunterDto hunter) {
    Long currentUserId = securityService.getCurrentlyLoggedUser().getId();
    if (!securityService.hasPermissionToModifyEntity(hunter.getId())) {
        throw new AccessDeniedException(
                "Access denied: User " + currentUserId + " cannot update hunter " + hunter.getId());
    }// ww w .  j ava2  s. co m
    String hashedPassword = HashCode.getHashPassword(hunter.getPassword());
    hunter.setPassword(hashedPassword);
    return hunterService.update(hunter);
}

From source file:org.syncope.core.rest.controller.WorkflowController.java

@PreAuthorize("hasRole('WORKFLOW_DEF_UPDATE')")
@RequestMapping(method = RequestMethod.PUT, value = "/definition")
public void updateDefinition(@RequestBody final WorkflowDefinitionTO definition)
        throws NotFoundException, WorkflowException {

    wfAdapter.updateDefinition(definition);
}

From source file:runtheshow.resource.webservice.SousEventService.java

@RequestMapping(value = "/update", method = RequestMethod.PUT, consumes = "application/json; charset=UTF-8")
public Boolean updateUser(@RequestBody SousEvenement sevent, HttpServletResponse response) {
    return metier.updateSousEvenement(sevent);
}

From source file:com.jci.job.apis.ApiClient.java

/**
 * Gets the po details res.//from   w w w.  j a  va  2  s. c  o m
 *
 * @param poList the po list
 * @param apikey the apikey
 * @param plant the plant
 * @param erp the erp
 * @param region the region
 * @return the po details res
 */
@RequestMapping(value = "/poreadconfirm", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = {
        MediaType.APPLICATION_JSON_VALUE })
public String getPoDetailsRes(@RequestBody SuccessReq poList, @RequestParam("apikey") String apikey,
        @RequestParam("plant") String plant, @RequestParam("erp") String erp,
        @RequestParam("region") String region);

From source file:org.openwms.common.CommonFeignClient.java

@RequestMapping(method = RequestMethod.PUT, value = CommonConstants.API_TRANSPORTUNITS, params = { "bk" })
Response updateTU(@RequestParam("bk") String transportUnitBK, @RequestBody TransportUnitVO tu);