Interface B2BCostCenterService<T,U extends UserModel>

Type Parameters:
T - the b2b cost center
U - the customer
All Known Implementing Classes:
DefaultB2BCostCenterService

public interface B2BCostCenterService<T,U extends UserModel>
Service around the B2BCostCenterModel.
Spring Bean ID:
b2bCostCenterService
  • Method Details

    • findCostCentersForUnitBranch

      @Deprecated(since="4.4", forRemoval=true) List<T> findCostCentersForUnitBranch(U customer, CurrencyModel currency)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.
      Parameters:
      customer - The logged in b2b customer
      currency - The sessions currency
      Returns:
      A collection of cost centers for the users branch.
    • getCostCentersForUnitBranch

      List<T> getCostCentersForUnitBranch(U customer, CurrencyModel currency)
      Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.
      Parameters:
      customer - The logged in b2b customer
      currency - The sessions currency
      Returns:
      A collection of cost centers for the users branch.
    • findCostCentersForUnitBranch

      @Deprecated(since="4.4", forRemoval=true) List<T> findCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.
      Parameters:
      unit - A b2b unit
      currency - The sessions currency
      Returns:
      A collection of cost centers for the users branch
    • getCostCentersForUnitBranch

      List<T> getCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency)
      Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.
      Parameters:
      unit - A b2b unit
      currency - The sessions currency
      Returns:
      A collection of cost centers for the users branch.
    • findByCode

      @Deprecated(since="4.4", forRemoval=true) T findByCode(String code)
      Deprecated, for removal: This API element is subject to removal in a future version.
      As of hybris 4.4, replaced by getCostCenterForCode(String)
      Get cost center for a code.
      Parameters:
      code - the code
      Returns:
      the b2b cost center model
    • getCostCenterForCode

      T getCostCenterForCode(String code)
      Get cost center for a code.
      Parameters:
      code - the code
      Returns:
      the b2b cost center model
    • findAvailableCurrencies

      @Deprecated(since="4.4", forRemoval=true) Set<CurrencyModel> findAvailableCurrencies(B2BUnitModel unit)
      Deprecated, for removal: This API element is subject to removal in a future version.
      As of hybris 4.4, replaced by getAvailableCurrencies(B2BUnitModel)
      Find available currencies based on a unit and cost centers associated to the unit.
      Parameters:
      unit - the unit
      Returns:
      A collection of currencies available to a unit.
    • getAvailableCurrencies

      Set<CurrencyModel> getAvailableCurrencies(B2BUnitModel unit)
      Get available currencies based on a unit and cost centers associated to the unit.
      Parameters:
      unit - the unit
      Returns:
      A collection of currencies available to a unit.
    • findAvailableCurrencies

      @Deprecated(since="4.4", forRemoval=true) Set<CurrencyModel> findAvailableCurrencies(UserModel user)
      Deprecated, for removal: This API element is subject to removal in a future version.
      As of hybris 4.4, replaced by getAvailableCurrencies(UserModel)
      Find available currencies based on a user
      Parameters:
      user - the session user.
      Returns:
      A collection of currencies available to a unit.
    • getAvailableCurrencies

      Set<CurrencyModel> getAvailableCurrencies(UserModel user)
      Get available currencies based on a user
      Parameters:
      user - the session user.
      Returns:
      A collection of currencies available to a unit.
    • getCurrentBudgets

      @Deprecated(since="4.4", forRemoval=true) Collection<B2BBudgetModel> getCurrentBudgets(T costCenter)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 4.4. Use B2BBudgetService.getCurrentBudgets(de.hybris.platform.b2b.model.B2BCostCenterModel) Gets the current budgets that are active based on a cost center for the session currency
      Parameters:
      costCenter - the cost center
      Returns:
      the current budgets
    • getTotalCost

      Double getTotalCost(T costCenter, Date startDate, Date endDate)
      Calculates the total cost for a cost center with a data range
      Parameters:
      costCenter - the cost center
      startDate - the start date
      endDate - the end date
      Returns:
      the total cost
    • findCostCenters

      @Deprecated(since="4.4", forRemoval=true) List<T> findCostCenters(B2BUnitModel unit, CurrencyModel currency)
      Deprecated, for removal: This API element is subject to removal in a future version.
      As of hybris 4.4
      Find cost centers assigned to a given unit and currency.
      Parameters:
      unit - the unit
      currency - the currency
      Returns:
      the list
    • getB2BCostCenterForCode

      @Deprecated(since="4.4", forRemoval=true) B2BCostCenterModel getB2BCostCenterForCode(String code)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 4.4. Use getCostCenterForCode(String) Returns B2BCostCenterMode of specified code. Returns null if none is found.
      Parameters:
      code -
      Returns:
      B2BCostCenterModel
    • getB2BBudgetForCode

      @Deprecated(since="6.0", forRemoval=true) B2BBudgetModel getB2BBudgetForCode(String code)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Find B2BBudgetModel of specified code. Returns null if none found.
      Parameters:
      code - the code
      Returns:
      the B2BBudget model
    • getB2BBudgets

      @Deprecated(since="6.0", forRemoval=true) Set<B2BBudgetModel> getB2BBudgets()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      B2BBudgetModel all B2BBudgets to which the caller has visiblity
    • isCostCenterExisting

      boolean isCostCenterExisting(String code)
      Checks whether the cost center exists regardless of visibility constraints
      Parameters:
      code -
      Returns:
      true if budget with this code exists
    • getB2BCostCenters

      Set<B2BCostCenterModel> getB2BCostCenters(List<AbstractOrderEntryModel> entries)
      Collects all the cost centers linked to order entries into a single collection.
      Parameters:
      entries - Entries of an order
      Returns:
      A collections of all cost cetners associated to all order entries.
    • getAllCostCenters

      List<B2BCostCenterModel> getAllCostCenters()
      Returns all B2B Cost Centers to which the caller has visibility
      Returns:
      true if budget with this code exists