Class FirmUtils
java.lang.Object
es.kukenan.smartfi.microservice.firm.utils.FirmUtils
class for Signature some util methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CipherComponent used to cypher sensible information stored in unsecured media.private OperationTypeRepositoryRepository for operationType queries. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNewSignature(String contractId, User user, OperationTypeBackoffice otb, Status status, es.kukenan.smartfi.microservice.firm.api.firmcontrol.request.FirmControlRequestDto requestDto) Create a new Siganture.getHeaders(String headersBd) Transform string headers in map.static org.springframework.http.HttpHeadersstringToHttpHeaders(String headersBd) Transform string headers in HttpHeaders.static List<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmControlDto>transformToDto(List<FirmControl> signatures, String currentContract) Transform firmControl to firmControlDto.
-
Field Details
-
operationTypeRepository
Repository for operationType queries. -
cipher
Component used to cypher sensible information stored in unsecured media.
-
-
Constructor Details
-
FirmUtils
public FirmUtils()
-
-
Method Details
-
getHeaders
public static Map<String,String> getHeaders(String headersBd) throws com.fasterxml.jackson.core.JsonProcessingException Transform string headers in map.- Parameters:
headersBd- headers- Returns:
- a headers map.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- error to parse JSON.
-
stringToHttpHeaders
Transform string headers in HttpHeaders.- Parameters:
headersBd- headers- Returns:
- a HttpHeaders.
-
transformToDto
public static List<es.kukenan.smartfi.microservice.firm.api.firmcontrol.response.FirmControlDto> transformToDto(List<FirmControl> signatures, String currentContract) Transform firmControl to firmControlDto.- Parameters:
signatures- signaturescurrentContract- currentContract.- Returns:
- a HttpHeaders.
-
createNewSignature
public FirmControl createNewSignature(String contractId, User user, OperationTypeBackoffice otb, Status status, es.kukenan.smartfi.microservice.firm.api.firmcontrol.request.FirmControlRequestDto requestDto) Create a new Siganture.- Parameters:
contractId- contract id.user- userotb- Operation Type Backoffice.status- StatusrequestDto- Signature Control Request DTO.- Returns:
- an Signature Control
-