public interface BundleTemplateService
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsComponenentProductsOfType(BundleTemplateModel bundleTemplate,
java.lang.Class<? extends ProductModel>... clazzes)
Deprecated.
Since 6.0
|
EntryGroup |
createBundleTree(BundleTemplateModel bundleTemplate,
AbstractOrderModel order)
Creates entry group tree reflecting the structure of a bundle template and add the tree to the given order.
|
java.util.List<BundleTemplateModel> |
getAllApprovedRootBundleTemplates(CatalogVersionModel catalogVersion)
This methods returns all approved root bundle templates.
|
java.util.List<BundleTemplateModel> |
getAllComponentsOfType(BundleTemplateModel bundleTemplate,
java.lang.Class<? extends ProductModel>... clazzes)
Deprecated.
Since 6.0
|
java.util.List<BundleTemplateModel> |
getAllRootBundleTemplates(CatalogVersionModel catVer)
This methods returns all root bundle templates.
|
EntryGroup |
getBundleEntryGroup(AbstractOrderEntryModel entry)
Returns
EntryGroup of type GroupType.CONFIGURABLEBUNDLE the given
entry belongs to. |
EntryGroup |
getBundleEntryGroup(AbstractOrderModel order,
java.util.Set<java.lang.Integer> entryGroupNumbers)
For given Set of entry group numbers find the one which id is of type
CONFIGURABLEBUNDLE in given order. |
BundleTemplateModel |
getBundleTemplateForCode(java.lang.String bundleId)
This method returns the bundle template by bundle id
bundleId |
BundleTemplateModel |
getBundleTemplateForCode(java.lang.String bundleId,
java.lang.String version)
This method returns the bundle template by bundle id
bundleId |
java.lang.String |
getBundleTemplateName(BundleTemplateModel bundleTemplate)
Get well-formatted string with the name of the given component.
|
java.util.List<BundleTemplateModel> |
getBundleTemplatesByProduct(ProductModel model)
Get all components (child bundle templates) where the current device is included in the products list
|
java.util.List<BundleTemplateModel> |
getLeafComponents(BundleTemplateModel anyComponent)
Collect all leaf components of bundle.
|
int |
getPositionInParent(BundleTemplateModel bundleTemplate)
Returns the given
bundleTemplate's absolute position in the list of child templates that are assigned
to the parent template |
BundleTemplateModel |
getPreviousBundleTemplate(BundleTemplateModel bundleTemplate)
Returns the previous child bundle template.
|
BundleTemplateModel |
getRelativeBundleTemplate(BundleTemplateModel bundleTemplate,
int relativePosition)
Returns a relative child bundle template.
|
BundleTemplateModel |
getRootBundleTemplate(BundleTemplateModel bundleTemplateModel)
This method returns the root bundleTemplate
BundleTemplateModel of the given
bundleTemplateModel. |
BundleTemplateModel |
getSubsequentBundleTemplate(BundleTemplateModel bundleTemplate)
Returns the next child bundle template.
|
java.util.List<BundleTemplateModel> |
getTemplatesForMasterOrderAndBundleNo(AbstractOrderModel masterAbstractOrder,
int bundleNo)
Deprecated.
since 6.5 - bundleNo parameter is deprecated, should be replaced with entry groups
|
boolean |
isAutoPickComponent(BundleTemplateModel bundleTemplate)
Deprecated.
since 1811 - auto pick component is a part of subscriptionbundles
|
boolean |
isBundleTemplateUsed(BundleTemplateModel bundleTemplate)
Checks if the given
BundleTemplateModel was used in any cart or order entry |
BundleTemplateModel getRootBundleTemplate(BundleTemplateModel bundleTemplateModel)
BundleTemplateModel of the given
bundleTemplateModel. In case the given bundleTemplateModel is the root template the
given bundleTemplateModel is returned as root template.bundleTemplateModel - BundleTemplateModelBundleTemplateModel getBundleTemplateForCode(java.lang.String bundleId)
bundleIdbundleId - Bundle IdBundleTemplateModeljava.util.List<BundleTemplateModel> getBundleTemplatesByProduct(ProductModel model)
model - BundleTemplateModelBundleTemplateModel getSubsequentBundleTemplate(BundleTemplateModel bundleTemplate)
bundleTemplate
and selects the parents next child template, e.g. SMAR_Handset (given bundleTemplate) -> SMAR (parent
template) -> SMAR_Plan (next child template of parent), SMAR_Plan is returned.bundleTemplate - BundleTemplateModelBundleTemplateModel getPreviousBundleTemplate(BundleTemplateModel bundleTemplate)
bundleTemplate and selects the parents next child template, e.g. SMAR_Plan (given
bundleTemplate) -> SMAR (parent template) -> SMAR_Handset (previous child template of parent),
SMAR_Handset is returned.bundleTemplate - BundleTemplateModelBundleTemplateModel getRelativeBundleTemplate(BundleTemplateModel bundleTemplate, int relativePosition)
bundleTemplate
and selects the parents relative child templatebundleTemplate - relativePosition - the relative position of the child template to be returnedBundleTemplateModeljava.util.List<BundleTemplateModel> getLeafComponents(BundleTemplateModel anyComponent)
anyComponent - any component in bundle hierarchy@Deprecated java.util.List<BundleTemplateModel> getTemplatesForMasterOrderAndBundleNo(AbstractOrderModel masterAbstractOrder, int bundleNo)
BundleTemplateModels from the order entries that match the given filter criteriamasterAbstractOrder - the master cart/order the bundle is inbundleNo - the number of the bundle to which the bundle templates belongList of BundleTemplateModels or empty List.BundleTemplateModel getBundleTemplateForCode(java.lang.String bundleId, java.lang.String version)
bundleIdbundleId - Bundle Idversion - BundleTemplateModel@Deprecated boolean isAutoPickComponent(BundleTemplateModel bundleTemplate)
BundleTemplateModel has a selection criteria of auto pick type.bundleTemplate - true if selection criteria has auto pick type, otherwise
false@Deprecated boolean containsComponenentProductsOfType(BundleTemplateModel bundleTemplate, java.lang.Class<? extends ProductModel>... clazzes)
bundleTemplate are of the
the given clazzes.
The method is deprecated and should be replaced with own one on client side.
bundleTemplate - the component to be checked for add-on productsclazzes - class of the products instances that are on the list of assigned products of the given
bundleTemplate (e.g. ServiceAddOnModel.class)true if the given bundleTemplate contains add-on products, otherwise
falsejava.util.List<BundleTemplateModel> getAllRootBundleTemplates(CatalogVersionModel catVer)
catVer - catalog version where bundle templates will be searched inList of BundleTemplateModels@Deprecated java.util.List<BundleTemplateModel> getAllComponentsOfType(BundleTemplateModel bundleTemplate, java.lang.Class<? extends ProductModel>... clazzes)
clazz.
The method is deprecated and should be replaced with own one on client side.
bundleTemplate - the bundleTemplate for which the child components are searchedclazzes - class of the products instances that are on the list of assigned products of the searched
bundleTemplate (e.g. ServicePlanModel.class)int getPositionInParent(BundleTemplateModel bundleTemplate)
bundleTemplate's absolute position in the list of child templates that are assigned
to the parent templatebundleTemplate - the child template whose position shall be returnedjava.util.List<BundleTemplateModel> getAllApprovedRootBundleTemplates(CatalogVersionModel catalogVersion)
catalogVersion - catalog version where bundle templates will be searched inList of BundleTemplateModelsboolean isBundleTemplateUsed(BundleTemplateModel bundleTemplate)
BundleTemplateModel was used in any cart or order entrybundleTemplate - java.lang.String getBundleTemplateName(BundleTemplateModel bundleTemplate)
bundleTemplate - a bundle componentEntryGroup getBundleEntryGroup(AbstractOrderEntryModel entry)
EntryGroup of type GroupType.CONFIGURABLEBUNDLE the given
entry belongs to.entry - entry to get group forEntryGroup getBundleEntryGroup(AbstractOrderModel order, java.util.Set<java.lang.Integer> entryGroupNumbers)
CONFIGURABLEBUNDLE in given order.order - Order to get bundle group forentryGroupNumbers - List of Integers representing numbers of EntryGroupsjava.lang.IllegalArgumentException - when there is more than one group of the given type foundEntryGroup createBundleTree(BundleTemplateModel bundleTemplate, AbstractOrderModel order)
bundleTemplate - any component of a bundle templateorder - order to add the bundle toEntryGroup of the structure createdCopyright © 2018 SAP SE. All Rights Reserved.