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 theB2BCostCenterModel.- Spring Bean ID:
- b2bCostCenterService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.util.Set<CurrencyModel>findAvailableCurrencies(B2BUnitModel unit)Deprecated.As of hybris 4.4, replaced bygetAvailableCurrencies(B2BUnitModel)java.util.Set<CurrencyModel>findAvailableCurrencies(UserModel user)Deprecated.As of hybris 4.4, replaced bygetAvailableCurrencies(UserModel)TfindByCode(java.lang.String code)Deprecated.As of hybris 4.4, replaced bygetCostCenterForCode(String)java.util.List<T>findCostCenters(B2BUnitModel unit, CurrencyModel currency)Deprecated.As of hybris 4.4java.util.List<T>findCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency)Deprecated.As of hybris 4.4, replaced bygetCostCentersForUnitBranch(B2BUnitModel, CurrencyModel)java.util.List<T>findCostCentersForUnitBranch(U customer, CurrencyModel currency)Deprecated.As of hybris 4.4, replaced bygetCostCentersForUnitBranch(UserModel, CurrencyModel)java.util.List<B2BCostCenterModel>getAllCostCenters()Returns all B2B Cost Centers to which the caller has visibilityjava.util.Set<CurrencyModel>getAvailableCurrencies(B2BUnitModel unit)Get available currencies based on a unit and cost centers associated to the unit.java.util.Set<CurrencyModel>getAvailableCurrencies(UserModel user)Get available currencies based on a userB2BBudgetModelgetB2BBudgetForCode(java.lang.String code)Deprecated.Since 6.0.java.util.Set<B2BBudgetModel>getB2BBudgets()Deprecated.Since 6.0.B2BCostCenterModelgetB2BCostCenterForCode(java.lang.String code)Deprecated.Since 4.4.java.util.Set<B2BCostCenterModel>getB2BCostCenters(java.util.List<AbstractOrderEntryModel> entries)Collects all the cost centers linked to order entries into a single collection.TgetCostCenterForCode(java.lang.String code)Get cost center for a code.java.util.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.java.util.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.java.util.Collection<B2BBudgetModel>getCurrentBudgets(T costCenter)Deprecated.Since 4.4.java.lang.DoublegetTotalCost(T costCenter, java.util.Date startDate, java.util.Date endDate)Calculates the total cost for a cost center with a data rangebooleanisCostCenterExisting(java.lang.String code)Checks whether the cost center exists regardless of visibility constraints
-
-
-
Method Detail
-
findCostCentersForUnitBranch
@Deprecated(since="4.4") java.util.List<T> findCostCentersForUnitBranch(U customer, CurrencyModel currency)
Deprecated.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
java.util.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 customercurrency- The sessions currency- Returns:
- A collection of cost centers for the users branch.
-
findCostCentersForUnitBranch
@Deprecated(since="4.4") java.util.List<T> findCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency)
Deprecated.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
java.util.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 unitcurrency- The sessions currency- Returns:
- A collection of cost centers for the users branch.
-
findByCode
@Deprecated(since="4.4") T findByCode(java.lang.String code)
Deprecated.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
T getCostCenterForCode(java.lang.String code)
Get cost center for a code.- Parameters:
code- the code- Returns:
- the b2b cost center model
-
findAvailableCurrencies
@Deprecated(since="4.4") java.util.Set<CurrencyModel> findAvailableCurrencies(B2BUnitModel unit)
Deprecated.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
java.util.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") java.util.Set<CurrencyModel> findAvailableCurrencies(UserModel user)
Deprecated.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
java.util.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") java.util.Collection<B2BBudgetModel> getCurrentBudgets(T costCenter)
Deprecated.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
java.lang.Double getTotalCost(T costCenter, java.util.Date startDate, java.util.Date endDate)
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") java.util.List<T> findCostCenters(B2BUnitModel unit, CurrencyModel currency)
Deprecated.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(since="4.4") B2BCostCenterModel getB2BCostCenterForCode(java.lang.String code)
Deprecated.Since 4.4. UsegetCostCenterForCode(String)Returns B2BCostCenterMode of specified code. Returns null if none is found.- Parameters:
code-- Returns:
- B2BCostCenterModel
-
getB2BBudgetForCode
@Deprecated(since="6.0") B2BBudgetModel getB2BBudgetForCode(java.lang.String code)
Deprecated.Since 6.0. UseB2BBudgetService.getB2BBudgetForCode(String)FindB2BBudgetModelof specified code. Returns null if none found.- Parameters:
code- the code- Returns:
- the B2BBudget model
-
getB2BBudgets
@Deprecated(since="6.0") java.util.Set<B2BBudgetModel> getB2BBudgets()
Deprecated.Since 6.0. UseB2BBudgetService.getB2BBudgets()- Returns:
B2BBudgetModelall B2BBudgets to which the caller has visiblity
-
isCostCenterExisting
boolean isCostCenterExisting(java.lang.String code)
Checks whether the cost center exists regardless of visibility constraints- Parameters:
code-- Returns:
- true if budget with this code exists
-
getB2BCostCenters
java.util.Set<B2BCostCenterModel> getB2BCostCenters(java.util.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
java.util.List<B2BCostCenterModel> getAllCostCenters()
Returns all B2B Cost Centers to which the caller has visibility- Returns:
- true if budget with this code exists
-
-