java.lang.Object
es.kukenan.smartfi.microservice.contracts.service.ProfileService

@Service public class ProfileService extends Object
Card management service.
  • Field Details

    • profileRepository

      @Autowired private ProfileRepository profileRepository
      Profile repository for database queries.
    • productRepository

      @Autowired private ProductRepository productRepository
      Product repository.
    • productsService

      @Autowired private ProductsService 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

      public void modifyProfile(String profileId, EbContract contract, Map<String,String> updates)
      Modify a profile.
      Parameters:
      profileId - profile identifier.
      contract - contract.
      updates - updates to be made.
    • deleteProfile

      public void deleteProfile(String profileId, EbContract ebContract)
      Delete a profile.
      Parameters:
      profileId - profile identifier.
      ebContract - contract.