Skip to content

Commit

Permalink
functionType to upper case (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciaM1 authored Feb 23, 2024
1 parent 3af058c commit c479394
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class BpmnVersionMapper {
public BpmnVersion toEntityCreation(BpmnCreationDto bpmnCreationDto) throws NoSuchAlgorithmException, IOException {
BpmnVersion bpmnVersion = new BpmnVersion();
bpmnVersion.setDescription(bpmnCreationDto.getDescription());
bpmnVersion.setFunctionType(bpmnCreationDto.getFunctionType());
bpmnVersion.setFunctionType(bpmnCreationDto.getFunctionType().toUpperCase());
bpmnVersion.setStatus(StatusEnum.CREATED);
bpmnVersion.setSha256(FileUtilities.calculateSha256(bpmnCreationDto.getFile()));
bpmnVersion.setDeployedFileName(bpmnCreationDto.getFilename().concat(".").concat(S3ResourceTypeEnum.BPMN.getExtension()));
Expand Down Expand Up @@ -69,7 +69,7 @@ public List<BpmnDTO> toDTOList(List<BpmnVersion> list) {

public BpmnVersion toEntityUpgrade(BpmnUpgradeDto bpmnUpgradeDto, Long version, String definitionKey) throws NoSuchAlgorithmException, IOException {
BpmnVersion bpmnVersion = new BpmnVersion();
bpmnVersion.setFunctionType(bpmnUpgradeDto.getFunctionType());
bpmnVersion.setFunctionType(bpmnUpgradeDto.getFunctionType().toUpperCase());
bpmnVersion.setDescription(bpmnUpgradeDto.getDescription());
bpmnVersion.setStatus(StatusEnum.CREATED);
bpmnVersion.setSha256(FileUtilities.calculateSha256(bpmnUpgradeDto.getFile()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ public Uni<Collection<BpmnBankConfigDTO>> associateBPMN(
@PathParam("functionType") String functionType,
@RequestBody(required = true) @Valid BpmnAssociationDto bpmnAssociationDto) {
List<BpmnBankConfig> configs = getAcquirerConfigs(bpmnAssociationDto, acquirerId,
functionType);
functionType.toUpperCase());
Set<BpmnVersionPK> bpmnIds = BpmnUtils.extractBpmnUUIDFromAssociations(configs);
return bpmnEntityValidator.validateExistenceStatusAndFunctionType(bpmnIds, functionType)
return bpmnEntityValidator.validateExistenceStatusAndFunctionType(bpmnIds, functionType.toUpperCase())
.onItem()
.transformToUni(
x -> this.bpmnVersionService.putAssociations(acquirerId, functionType, configs))
x -> this.bpmnVersionService.putAssociations(acquirerId, functionType.toUpperCase(), configs))
.onItem()
.transformToUni(list -> Uni.createFrom().item(this.bpmnConfigMapper.toDTOList(list)));
}
Expand Down Expand Up @@ -302,6 +302,7 @@ public Uni<BpmnProcessDTO> findBPMNByTriadForProcessService(
@Produces(MediaType.APPLICATION_JSON)
@Path("/upgrade")
public Uni<BpmnDTO> upgradeBPMN(@Valid BpmnUpgradeDto bpmnUpgradeDto) {
bpmnUpgradeDto.setFunctionType(bpmnUpgradeDto.getFunctionType().toUpperCase());
return bpmnVersionService.upgrade(bpmnUpgradeDto);
}

Expand Down

0 comments on commit c479394

Please sign in to comment.