Loading...
Loading...
When users ask about SAP Commerce Cloud (Hybris) best practices, provide actionable guidance, checklists, and examples.
npx skill4agent add sina96/sap-hybris-commerce-best-practices-skill sap-hybris-commerce-best-practices*-items.xmlant clean all// Service (backend logic)
public interface ProductService {
ProductModel findByCode(String code);
}
@Service
public class DefaultProductService implements ProductService {
private final FlexibleSearchService flexibleSearchService;
public DefaultProductService(final FlexibleSearchService flexibleSearchService) {
this.flexibleSearchService = flexibleSearchService;
}
@Override
public ProductModel findByCode(final String code) {
// ...
return null;
}
}
// Facade (frontend API)
public interface ProductFacade {
ProductData getProduct(String code);
}
@Service
public class DefaultProductFacade implements ProductFacade {
private final ProductService productService;
private final Converter<ProductModel, ProductData> converter;
public DefaultProductFacade(final ProductService productService,
final Converter<ProductModel, ProductData> converter) {
this.productService = productService;
this.converter = converter;
}
@Override
public ProductData getProduct(final String code) {
return converter.convert(productService.findByCode(code));
}
}Create -> InitDefaults -> Prepare -> Validate -> Save
Load -> LoadInterceptor
Delete -> RemoveInterceptorcore -> facades -> storefront
-> backoffice
-> occ (REST API)@Autowired# Build and generate models
ant clean all
# Run tests
ant alltests
ant unittests
ant integrationtests
# Solr management
ant startSolrServer
ant stopSolrServer
# Initialize/update system
ant initialize
ant updatesystemhttp://localhost:9001/hac