src/main/java/br/ufpa/labes/spm/web/rest/ReqAgentResource.java
@PutMapping("/req-agents")
  public ResponseEntity<ReqAgent> updateReqAgent(@RequestBody ReqAgent reqAgent)
      throws URISyntaxException {
    log.debug("REST request to update ReqAgent : {}", reqAgent);
    if (reqAgent.getId() == null) {
      throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
    }
    ReqAgent result = reqAgentRepository.save(reqAgent);
    return ResponseEntity.ok()
        .headers(
            HeaderUtil.createEntityUpdateAlert(
                applicationName, true, ENTITY_NAME, reqAgent.getId().toString()))
        .body(result);
  }
/**
   * {@code PUT /req-agents} : Updates an existing reqAgent.
   *
   * @param reqAgent the reqAgent to update.
   * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated
   *     reqAgent, or with status {@code 400 (Bad Request)} if the reqAgent is not valid, or with
   *     status {@code 500 (Internal Server Error)} if the reqAgent couldn't be updated.
   * @throws URISyntaxException if the Location URI syntax is incorrect.
   */
PUT /req-agents : Updates an existing reqAgent.
@param reqAgent the reqAgent to update.
@return the  ResponseEntity with status  200 (OK) and with body the updated
reqAgent, or with status  400 (Bad Request) if the reqAgent is not valid, or with
status  500 (Internal Server Error) if the reqAgent couldn't be updated.
@throws URISyntaxException if the Location URI syntax is incorrect.
PUT / req - agents : Updates an existing reqAgent . @param reqAgent the reqAgent to update . @return the ResponseEntity with status 200 ( OK ) and with body the updated reqAgent or with status 400 ( Bad Request ) if the reqAgent is not valid or with status 500 ( Internal Server Error ) if the reqAgent couldn ' t be updated . @throws URISyntaxException if the Location URI syntax is incorrect .
@PutMapping("/req-agents")
  public ResponseEntity<ReqAgent> updateReqAgent(@RequestBody ReqAgent reqAgent)
      throws URISyntaxException {
    log.debug("REST request to update ReqAgent : {}", reqAgent);
    if (reqAgent.getId() == null) {
      throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
    }
    ReqAgent result = reqAgentRepository.save(reqAgent);
    return ResponseEntity.ok()
        .headers(
            HeaderUtil.createEntityUpdateAlert(
                applicationName, true, ENTITY_NAME, reqAgent.getId().toString()))
        .body(result);
  }
@ PutMapping ( "/req-agents" ) public ResponseEntity < ReqAgent > updateReqAgent ( @ RequestBody ReqAgent reqAgent ) throws URISyntaxException { log . debug ( "REST request to update ReqAgent : {}" , reqAgent ) ; if ( reqAgent . getId ( ) == null ) { throw new BadRequestAlertException ( "Invalid id" , ENTITY_NAME , "idnull" ) ; } ReqAgent result = reqAgentRepository . save ( reqAgent ) ; return ResponseEntity . ok ( ) . headers ( HeaderUtil . createEntityUpdateAlert ( applicationName , true , ENTITY_NAME , reqAgent . getId ( ) . toString ( ) ) ) . body ( result ) ; }
{@code PUT /req-agents} : Updates an existing reqAgent.
{ @code PUT / req - agents } : Updates an existing reqAgent .