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