Class ProductServiceImpl
- java.lang.Object
-
- de.hybris.platform.productcockpit.services.product.impl.ProductServiceImpl
-
- All Implemented Interfaces:
ProductService
public class ProductServiceImpl extends java.lang.Object implements ProductService
-
-
Constructor Summary
Constructors Constructor Description ProductServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancreatePdfDatasheetDocument(TypedObject product)Creates new pdf attachment for productvoiddeletePdfDatasheetDocument(TypedObject document)Deletes provided PDF documentjava.util.List<java.lang.String>getAllApprovalStatusCodes()Gets all available approval status codesjava.lang.StringgetApprovalStatusCode(TypedObject item)Gets approval status code for provided itemprotected EnumerationValuegetApprovalStatusFromCode(java.lang.String code)Deprecated.since 6.3java.lang.StringgetApprovalStatusName(java.lang.String code)Gets an enum value name of provided approval status codeprotected HybrisEnumValuegetApprovalStatusValueFromCode(java.lang.String code)protected FormatgetFormat(java.lang.String code, Item item)ModelServicegetModelService()java.util.List<TypedObject>getPdfDatasheetDocuments(TypedObject product)Gets all PDF documents attached to product.TypeServicegetTypeService()java.util.Collection<PropertyDescriptor>getVariantAttributes(java.lang.String typeCode)java.util.List<TypedObject>getVariants(TypedObject base)Gets all variants of provided item that are defined in the systemVariantsServicegetVariantsService()java.lang.StringgetVariantTypecode(TypedObject base)Gets a type code of variants for provided item.booleanhasVariants(TypedObject item)Checks if item is a product that has at least one variant existingbooleanisBaseProduct(TypedObject item)Checks if item is a base productvoidsetApprovalStatus(TypedObject item, java.lang.String code)Sets new approval status code for prodcutvoidsetEnumerationService(EnumerationService enumerationService)voidsetModelService(ModelService modelService)voidsetScriptEvaluationService(ScriptEvaluationService scriptEvaluationService)voidsetTypeService(TypeService typeService)voidsetVariantsService(VariantsService variantsService)
-
-
-
Method Detail
-
getVariantAttributes
public java.util.Collection<PropertyDescriptor> getVariantAttributes(java.lang.String typeCode)
-
hasVariants
public boolean hasVariants(TypedObject item)
Description copied from interface:ProductServiceChecks if item is a product that has at least one variant existing- Specified by:
hasVariantsin interfaceProductService- Parameters:
item- item to be checked- Returns:
trueif there is at least one variant defined for provided item
-
isBaseProduct
public boolean isBaseProduct(TypedObject item)
Description copied from interface:ProductServiceChecks if item is a base product- Specified by:
isBaseProductin interfaceProductService- Parameters:
item- item to be checked- Returns:
trueif item provided is a base product
-
getVariants
public java.util.List<TypedObject> getVariants(TypedObject base)
Description copied from interface:ProductServiceGets all variants of provided item that are defined in the system- Specified by:
getVariantsin interfaceProductService- Parameters:
base- base item- Returns:
- list of variants defined
-
getVariantTypecode
public java.lang.String getVariantTypecode(TypedObject base)
Description copied from interface:ProductServiceGets a type code of variants for provided item.Provided item needs to be a base product.
- Specified by:
getVariantTypecodein interfaceProductService- Parameters:
base- base product- Returns:
- type code for variats of provided product
- See Also:
ProductService.isBaseProduct(TypedObject)
-
getApprovalStatusCode
public java.lang.String getApprovalStatusCode(TypedObject item)
Description copied from interface:ProductServiceGets approval status code for provided item- Specified by:
getApprovalStatusCodein interfaceProductService- Parameters:
item- product to be checked- Returns:
- approval status code or
nullif provided item is not a product - See Also:
ArticleApprovalStatus.getCode()
-
getAllApprovalStatusCodes
public java.util.List<java.lang.String> getAllApprovalStatusCodes()
Description copied from interface:ProductServiceGets all available approval status codes- Specified by:
getAllApprovalStatusCodesin interfaceProductService- Returns:
- list approval status codes
-
getApprovalStatusName
public java.lang.String getApprovalStatusName(java.lang.String code)
Description copied from interface:ProductServiceGets an enum value name of provided approval status code- Specified by:
getApprovalStatusNamein interfaceProductService- Parameters:
code- approval status code- Returns:
- enum value name for approval status
- See Also:
ArticleApprovalStatus
-
getApprovalStatusFromCode
@Deprecated protected EnumerationValue getApprovalStatusFromCode(java.lang.String code)
Deprecated.since 6.3
-
getApprovalStatusValueFromCode
protected HybrisEnumValue getApprovalStatusValueFromCode(java.lang.String code)
-
setApprovalStatus
public void setApprovalStatus(TypedObject item, java.lang.String code)
Description copied from interface:ProductServiceSets new approval status code for prodcut- Specified by:
setApprovalStatusin interfaceProductService- Parameters:
item- product to change an approval statuscode- new approval status code- See Also:
ArticleApprovalStatus.getCode()
-
createPdfDatasheetDocument
public boolean createPdfDatasheetDocument(TypedObject product)
Description copied from interface:ProductServiceCreates new pdf attachment for product- Specified by:
createPdfDatasheetDocumentin interfaceProductService- Parameters:
product- product to which new pdf should be attached- Returns:
trueif attachment has been successfully created
-
getPdfDatasheetDocuments
public java.util.List<TypedObject> getPdfDatasheetDocuments(TypedObject product)
Description copied from interface:ProductServiceGets all PDF documents attached to product.- Specified by:
getPdfDatasheetDocumentsin interfaceProductService- Parameters:
product- product which attachments are required- Returns:
- list of pdfs attached
-
deletePdfDatasheetDocument
public void deletePdfDatasheetDocument(TypedObject document)
Description copied from interface:ProductServiceDeletes provided PDF document- Specified by:
deletePdfDatasheetDocumentin interfaceProductService- Parameters:
document- document to be deleted
-
getTypeService
public TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
getModelService
public ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getVariantsService
public VariantsService getVariantsService()
-
setVariantsService
public void setVariantsService(VariantsService variantsService)
-
setScriptEvaluationService
public void setScriptEvaluationService(ScriptEvaluationService scriptEvaluationService)
-
setEnumerationService
public void setEnumerationService(EnumerationService enumerationService)
-
-