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