src/main/java/br/ufpa/labes/spm/web/rest/ProcessModelResource.java
@PostMapping("/process-models")
  public ResponseEntity<ProcessModel> createProcessModel(@RequestBody ProcessModel processModel)
      throws URISyntaxException {
    log.debug("REST request to save ProcessModel : {}", processModel);
    if (processModel.getId() != null) {
      throw new BadRequestAlertException(
          "A new processModel cannot already have an ID", ENTITY_NAME, "idexists");
    }
    ProcessModel result = processModelRepository.save(processModel);
    return ResponseEntity.created(new URI("/api/process-models/" + result.getId()))
        .headers(
            HeaderUtil.createEntityCreationAlert(
                applicationName, true, ENTITY_NAME, result.getId().toString()))
        .body(result);
  }
/**
   * {@code POST /process-models} : Create a new processModel.
   *
   * @param processModel the processModel to create.
   * @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new
   *     processModel, or with status {@code 400 (Bad Request)} if the processModel has already an
   *     ID.
   * @throws URISyntaxException if the Location URI syntax is incorrect.
   */
POST /process-models : Create a new processModel.
@param processModel the processModel to create.
@return the  ResponseEntity with status  201 (Created) and with body the new
processModel, or with status  400 (Bad Request) if the processModel has already an
ID.
@throws URISyntaxException if the Location URI syntax is incorrect.
POST / process - models : Create a new processModel . @param processModel the processModel to create . @return the ResponseEntity with status 201 ( Created ) and with body the new processModel or with status 400 ( Bad Request ) if the processModel has already an ID . @throws URISyntaxException if the Location URI syntax is incorrect .
@PostMapping("/process-models")
  public ResponseEntity<ProcessModel> createProcessModel(@RequestBody ProcessModel processModel)
      throws URISyntaxException {
    log.debug("REST request to save ProcessModel : {}", processModel);
    if (processModel.getId() != null) {
      throw new BadRequestAlertException(
          "A new processModel cannot already have an ID", ENTITY_NAME, "idexists");
    }
    ProcessModel result = processModelRepository.save(processModel);
    return ResponseEntity.created(new URI("/api/process-models/" + result.getId()))
        .headers(
            HeaderUtil.createEntityCreationAlert(
                applicationName, true, ENTITY_NAME, result.getId().toString()))
        .body(result);
  }
@ PostMapping ( "/process-models" ) public ResponseEntity < ProcessModel > createProcessModel ( @ RequestBody ProcessModel processModel ) throws URISyntaxException { log . debug ( "REST request to save ProcessModel : {}" , processModel ) ; if ( processModel . getId ( ) != null ) { throw new BadRequestAlertException ( "A new processModel cannot already have an ID" , ENTITY_NAME , "idexists" ) ; } ProcessModel result = processModelRepository . save ( processModel ) ; return ResponseEntity . created ( new URI ( "/api/process-models/" + result . getId ( ) ) ) . headers ( HeaderUtil . createEntityCreationAlert ( applicationName , true , ENTITY_NAME , result . getId ( ) . toString ( ) ) ) . body ( result ) ; }
{@code POST /process-models} : Create a new processModel.
{ @code POST / process - models } : Create a new processModel .