Class DefaultB2BCostCenterService
java.lang.Object
de.hybris.platform.b2b.services.impl.DefaultB2BCostCenterService
- All Implemented Interfaces:
B2BCostCenterService<B2BCostCenterModel,B2BCustomerModel>
public class DefaultB2BCostCenterService
extends Object
implements B2BCostCenterService<B2BCostCenterModel,B2BCustomerModel>
Default implementation of the
B2BCostCenterService- Spring Bean ID:
- b2bCostCenterService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Since 4.4.Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.findByCode(String code) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.findCostCenters(B2BUnitModel unit, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.findCostCentersForUnitBranch(B2BCustomerModel employee, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.findCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.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 userprotected DefaultB2BBookingLineEntryDaoprotected B2BBudgetDaogetB2BBudgetForCode(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.protected B2BCostCenterDaoDeprecated, 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.protected B2BUnitService<B2BUnitModel,B2BCustomerModel> getCostCenterForCode(String code) Get cost center for a code.getCostCentersForUnitBranch(B2BCustomerModel employee, CurrencyModel currency) Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.getCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency) Gets all cost centers for given currency by looking at each unit of the branch and their cost centers.getCurrentBudgets(B2BCostCenterModel costCenter) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.protected SearchRestrictionServiceprotected SessionServicegetTotalCost(B2BCostCenterModel 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 constraintsvoidsetB2bBookingLineEntryDao(DefaultB2BBookingLineEntryDao b2bBookingLineEntryDao) voidsetB2bBudgetDao(B2BBudgetDao b2bBudgetDao) voidsetB2bCostCenterDao(B2BCostCenterDao b2bCostCenterDao) voidsetB2bUnitService(B2BUnitService<B2BUnitModel, B2BCustomerModel> b2bUnitService) voidsetSearchRestrictionService(SearchRestrictionService searchRestrictionService) voidsetSessionService(SessionService sessionService)
-
Constructor Details
-
DefaultB2BCostCenterService
public DefaultB2BCostCenterService()
-
-
Method Details
-
findCostCentersForUnitBranch
@Deprecated(since="4.4", forRemoval=true) public List<B2BCostCenterModel> findCostCentersForUnitBranch(B2BCustomerModel employee, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetCostCentersForUnitBranch(B2BCustomerModel, CurrencyModel)insteadDescription copied from interface:B2BCostCenterServiceGets all cost centers for given currency by looking at each unit of the branch and their cost centers.- Specified by:
findCostCentersForUnitBranchin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
employee- The logged in b2b customercurrency- The sessions currency- Returns:
- A collection of cost centers for the users branch.
-
getCostCentersForUnitBranch
public List<B2BCostCenterModel> getCostCentersForUnitBranch(B2BCustomerModel employee, CurrencyModel currency) Description copied from interface:B2BCostCenterServiceGets all cost centers for given currency by looking at each unit of the branch and their cost centers.- Specified by:
getCostCentersForUnitBranchin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
employee- 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) public List<B2BCostCenterModel> findCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetCostCentersForUnitBranch(B2BUnitModel, CurrencyModel)insteadDescription copied from interface:B2BCostCenterServiceGets all cost centers for given currency by looking at each unit of the branch and their cost centers.- Specified by:
findCostCentersForUnitBranchin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
unit- A b2b unitcurrency- The sessions currency- Returns:
- A collection of cost centers for the users branch
-
getCostCentersForUnitBranch
public List<B2BCostCenterModel> getCostCentersForUnitBranch(B2BUnitModel unit, CurrencyModel currency) Description copied from interface:B2BCostCenterServiceGets all cost centers for given currency by looking at each unit of the branch and their cost centers.- Specified by:
getCostCentersForUnitBranchin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
unit- A b2b unitcurrency- The sessions currency- Returns:
- A collection of cost centers for the users branch.
-
findCostCenters
@Deprecated(since="4.4", forRemoval=true) public List<B2BCostCenterModel> findCostCenters(B2BUnitModel unit, CurrencyModel currency) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.Description copied from interface:B2BCostCenterServiceFind cost centers assigned to a given unit and currency.- Specified by:
findCostCentersin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
unit- the unitcurrency- the currency- Returns:
- the list
-
getCurrentBudgets
@Deprecated(since="4.4", forRemoval=true) public Collection<B2BBudgetModel> getCurrentBudgets(B2BCostCenterModel costCenter) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getCurrentBudgetsin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
costCenter- the cost center- Returns:
- the current budgets
-
findAvailableCurrencies
@Deprecated(since="4.4", forRemoval=true) public Set<CurrencyModel> findAvailableCurrencies(UserModel user) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetAvailableCurrencies(UserModel)insteadDescription copied from interface:B2BCostCenterServiceFind available currencies based on a user- Specified by:
findAvailableCurrenciesin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
user- the session user.- Returns:
- A collection of currencies available to a unit.
-
getAvailableCurrencies
Description copied from interface:B2BCostCenterServiceGet available currencies based on a user- Specified by:
getAvailableCurrenciesin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
user- the session user.- Returns:
- A collection of currencies available to a unit.
-
findAvailableCurrencies
@Deprecated(since="4.4", forRemoval=true) public Set<CurrencyModel> findAvailableCurrencies(B2BUnitModel unit) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetAvailableCurrencies(B2BUnitModel)insteadDescription copied from interface:B2BCostCenterServiceFind available currencies based on a unit and cost centers associated to the unit.- Specified by:
findAvailableCurrenciesin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
unit- the unit- Returns:
- A collection of currencies available to a unit.
-
getAvailableCurrencies
Description copied from interface:B2BCostCenterServiceGet available currencies based on a unit and cost centers associated to the unit.- Specified by:
getAvailableCurrenciesin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
unit- the unit- Returns:
- A collection of currencies available to a unit.
-
isCostCenterExisting
Description copied from interface:B2BCostCenterServiceChecks whether the cost center exists regardless of visibility constraints- Specified by:
isCostCenterExistingin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Returns:
- true if budget with this code exists
-
getB2BCostCenterForCode
@Deprecated(since="4.4", forRemoval=true) public B2BCostCenterModel getB2BCostCenterForCode(String code) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UseB2BCostCenterService.getCostCenterForCode(String)instead- Specified by:
getB2BCostCenterForCodein interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Returns:
- B2BCostCenterModel
- See Also:
-
getTotalCost
Description copied from interface:B2BCostCenterServiceCalculates the total cost for a cost center with a data range- Specified by:
getTotalCostin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
costCenter- the cost centerstartDate- the start dateendDate- the end date- Returns:
- the total cost
-
findByCode
Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetCostCenterForCode(String)insteadDescription copied from interface:B2BCostCenterServiceGet cost center for a code.- Specified by:
findByCodein interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
code- the code- Returns:
- the b2b cost center model
-
getCostCenterForCode
Description copied from interface:B2BCostCenterServiceGet cost center for a code.- Specified by:
getCostCenterForCodein interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
code- the code- Returns:
- the b2b cost center model
-
getAllCostCenters
Description copied from interface:B2BCostCenterServiceReturns all B2B Cost Centers to which the caller has visibility- Specified by:
getAllCostCentersin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Returns:
- true if budget with this code exists
-
getB2BBudgets
Deprecated, for removal: This API element is subject to removal in a future version.Since 6.0. UseB2BBudgetService.getB2BBudgets()- Specified by:
getB2BBudgetsin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Returns:
B2BBudgetModelall B2BBudgets to which the caller has visiblity
-
getB2BBudgetForCode
Deprecated, for removal: This API element is subject to removal in a future version.Since 6.0. UseB2BBudgetService.getB2BBudgetForCode(String)Description copied from interface:B2BCostCenterServiceFindB2BBudgetModelof specified code. Returns null if none found.- Specified by:
getB2BBudgetForCodein interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
code- the code- Returns:
- the B2BBudget model
-
getB2BCostCenters
Description copied from interface:B2BCostCenterServiceCollects all the cost centers linked to order entries into a single collection.- Specified by:
getB2BCostCentersin interfaceB2BCostCenterService<B2BCostCenterModel,B2BCustomerModel> - Parameters:
entries- Entries of an order- Returns:
- A collections of all cost cetners associated to all order entries.
-
setB2bBookingLineEntryDao
-
setB2bUnitService
-
getB2bUnitService
-
getB2bBookingLineEntryDao
-
getSessionService
-
setSessionService
-
getSearchRestrictionService
-
setSearchRestrictionService
-
setB2bCostCenterDao
-
getB2bCostCenterDao
-
setB2bBudgetDao
-
getB2bBudgetDao
-