Package de.hybris.platform.b2b.services
Interface B2BCostCenterService<T,U extends UserModel>
- Type Parameters:
T- the b2b cost centerU- the customer
- All Known Implementing Classes:
DefaultB2BCostCenterService
public interface B2BCostCenterService<T,U extends UserModel>
Service around the
B2BCostCenterModel.- Spring Bean ID:
- b2bCostCenterService
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.As of hybris 4.4, replaced bygetAvailableCurrencies(UserModel)findByCode(String code) Deprecated, for removal: This API element is subject to removal in a future version.As of hybris 4.4, replaced bygetCostCenterForCode(String)findCostCenters(B2BUnitModel unit, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.As of hybris 4.4findCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.As of hybris 4.4, replaced bygetCostCentersForUnitBranch(B2BUnitModel, CurrencyModel)findCostCentersForUnitBranch(U customer, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.As of hybris 4.4, replaced bygetCostCentersForUnitBranch(UserModel, CurrencyModel)Returns all B2B Cost Centers to which the caller has visibilityGet available currencies based on a unit and cost centers associated to the unit.Get available currencies based on a usergetB2BBudgetForCode(String code) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.0.Deprecated, for removal: This API element is subject to removal in a future version.Since 6.0.Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.getB2BCostCenters(List<AbstractOrderEntryModel> entries) Collects all the cost centers linked to order entries into a single collection.getCostCenterForCode(String code) Get cost center for a code.getCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency) Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.getCostCentersForUnitBranch(U customer, CurrencyModel currency) Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.getCurrentBudgets(T costCenter) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.getTotalCost(T costCenter, Date startDate, Date endDate) Calculates the total cost for a cost center with a data rangebooleanisCostCenterExisting(String code) Checks whether the cost center exists regardless of visibility constraints
-
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.As of hybris 4.4, replaced bygetCostCentersForUnitBranch(UserModel, CurrencyModel)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 customercurrency- The sessions currency- Returns:
- A collection of cost centers for the users branch.
-
getCostCentersForUnitBranch
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 customercurrency- 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.As of hybris 4.4, replaced bygetCostCentersForUnitBranch(B2BUnitModel, CurrencyModel)Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.- Parameters:
unit- A b2b unitcurrency- The sessions currency- Returns:
- A collection of cost centers for the users branch
-
getCostCentersForUnitBranch
Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.- Parameters:
unit- A b2b unitcurrency- The sessions currency- Returns:
- A collection of cost centers for the users branch.
-
findByCode
Deprecated, for removal: This API element is subject to removal in a future version.As of hybris 4.4, replaced bygetCostCenterForCode(String)Get cost center for a code.- Parameters:
code- the code- Returns:
- the b2b cost center model
-
getCostCenterForCode
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 bygetAvailableCurrencies(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
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 bygetAvailableCurrencies(UserModel)Find available currencies based on a user- Parameters:
user- the session user.- Returns:
- A collection of currencies available to a unit.
-
getAvailableCurrencies
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. UseB2BBudgetService.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
Calculates the total cost for a cost center with a data range- Parameters:
costCenter- the cost centerstartDate- the start dateendDate- 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.4Find cost centers assigned to a given unit and currency.- Parameters:
unit- the unitcurrency- the currency- Returns:
- the list
-
getB2BCostCenterForCode
Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetCostCenterForCode(String)Returns B2BCostCenterMode of specified code. Returns null if none is found.- Parameters:
code-- Returns:
- B2BCostCenterModel
-
getB2BBudgetForCode
Deprecated, for removal: This API element is subject to removal in a future version.Since 6.0. UseB2BBudgetService.getB2BBudgetForCode(String)FindB2BBudgetModelof specified code. Returns null if none found.- Parameters:
code- the code- Returns:
- the B2BBudget model
-
getB2BBudgets
Deprecated, for removal: This API element is subject to removal in a future version.Since 6.0. UseB2BBudgetService.getB2BBudgets()- Returns:
B2BBudgetModelall B2BBudgets to which the caller has visiblity
-
isCostCenterExisting
Checks whether the cost center exists regardless of visibility constraints- Parameters:
code-- Returns:
- true if budget with this code exists
-
getB2BCostCenters
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
-
getAvailableCurrencies(B2BUnitModel)