Class ProfileService
java.lang.Object
es.kukenan.smartfi.microservice.contracts.service.ProfileService
Card management service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ProductRepositoryProduct repository.private ProductsServiceproduct service.private ProfileRepositoryProfile repository for database queries. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiones.kukenan.smartfi.microservice.contracts.api.profiles.ProfileDtocreateProfile(es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileRequestDto profileRequestDto, EbContract ebContract) Create a profile.voiddeleteProfile(String profileId, EbContract ebContract) Delete a profile.List<es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileResponseDto>getProfiles(EbContract ebContract, List<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> allProducts) Get all profiles of an ebContract.voidmodifyProfile(String profileId, EbContract contract, Map<String, String> updates) Modify a profile.es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileDtoupdateProfile(String profileId, EbContract contract, es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileRequestDto profileRequestDto) Update a profile.
-
Field Details
-
profileRepository
Profile repository for database queries. -
productRepository
Product repository. -
productsService
product service.
-
-
Constructor Details
-
ProfileService
public ProfileService()
-
-
Method Details
-
createProfile
public es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileDto createProfile(es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileRequestDto profileRequestDto, EbContract ebContract) Create a profile.- Parameters:
profileRequestDto- profile request Dto.ebContract- contract.- Returns:
- the new created profile.
-
getProfiles
public List<es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileResponseDto> getProfiles(EbContract ebContract, List<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> allProducts) Get all profiles of an ebContract.- Parameters:
ebContract- contract.allProducts- list containing all the products of the contract.- Returns:
- List with the profiles.
-
updateProfile
public es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileDto updateProfile(String profileId, EbContract contract, es.kukenan.smartfi.microservice.contracts.api.profiles.ProfileRequestDto profileRequestDto) Update a profile.- Parameters:
profileId- profile identifier.contract- contract.profileRequestDto- new data.- Returns:
- the updated profile.
-
modifyProfile
Modify a profile.- Parameters:
profileId- profile identifier.contract- contract.updates- updates to be made.
-
deleteProfile
Delete a profile.- Parameters:
profileId- profile identifier.ebContract- contract.
-