hybris

Hybris Enterprise Commerce Platform 服务层的设计与实现

做~自己de王妃 提交于 2019-12-20 04:38:24
Hybris Enterprise Commerce Platform这个系列之前已经由我的同事,SAP成都研究院Hybris开发团队的同事 张健(Zhang Jonathan) 发布过两篇文章了。这里Jerry要特别感谢张健,尽管最近他的第二个孩子诞生了,工作之余的生活变得更加忙碌,然而张健仍然抽出少的可怜的业余时间完成了这个系列的第三篇文章。 前两篇文章分别介绍了SAP Hybris的前端和DTO层: 从产品展示页面谈谈Hybris的特有概念和设计结构 从产品展示页面谈谈Hybris系列之二: DTO, Converter和Populator 本文由张健继续向我们介绍SAP Hybris的持久层即Service层。下面是他的正文。 前两篇文章分别介绍了SAP Hybris的前端和DTO层: 从产品展示页面谈谈Hybris的特有概念和设计结构 从产品展示页面谈谈Hybris系列之二: DTO, Converter和Populator 当我们打开Hybris某个Product的明细页面时,Hybris后台执行了下面三步逻辑: 1. Service层从数据库里把数据取出,以Model(又称为DAO对象)的形式返回给Facade层。 2. Facade层调用Converter, 在Populator的帮助下,基于Model生成了DTO。 3.

XBL Orbeon custom control to show different success message on form save

会有一股神秘感。 提交于 2019-12-18 09:49:47
问题 I am using yForm (Orbeon Form Builder) to generate form run time, where we have a requirement to set different custom success message for each form (eg: "Your contact form save successfully", "Your address form…"). I would like to configure this success message from Form Builder, so that whenever an end user saves that form, it can see the corresponding custom message. 回答1: I'll assume that by "success message", you are referring to the message shown next to the buttons that are at the bottom

使用代码获得Hybris Commerce里显示的产品图片

混江龙づ霸主 提交于 2019-12-17 09:18:24
使用下面这个API去取Hybris Commerce系统里产品主数据的明细信息: https://:9002/rest/v2/electronics/products/300938?fields=FULL 其中图片的url包含在字段images.url里,如下图所示: 加上全域名后,这个url是能够直接在浏览器里访问的:https://:9002/rest/v2/medias/?context=bWFzdGVyfGltYWdlc3wxMzkzNnxpbWFnZS9qcGVnfGltYWdlcy9oMGQvaDVhLzg3OTYyMTQwOTk5OTguanBnfDIwNTM4ZDc0YjQ5YjQzNGE0ZTJlMDZlNmU2NGNmOTI4MzAwOGM1Y2UwNTkyZmJkMzczMTljN2I2N2MzZmY3N2I 只是因为我这台运行Hybris commerce的服务器证书设置有问题,因此微信里访问这个url时,报下面的错误: 该地址为IP地址,请使用域名访问网站: 在手机浏览器里直接输入IP地址是可以访问这张图片的: url里的context的值

使用代码获得Hybris Commerce里显示的产品图片

左心房为你撑大大i 提交于 2019-12-14 09:32:33
使用下面这个API去取Hybris Commerce系统里产品主数据的明细信息: https:// :9002/rest/v2/electronics/products/300938?fields=FULL 其中图片的url包含在字段images.url里,如下图所示: 加上全域名后,这个url是能够直接在浏览器里访问的: https:// :9002/rest/v2/medias/?context=bWFzdGVyfGltYWdlc3wxMzkzNnxpbWFnZS9qcGVnfGltYWdlcy9oMGQvaDVhLzg3OTYyMTQwOTk5OTguanBnfDIwNTM4ZDc0YjQ5YjQzNGE0ZTJlMDZlNmU2NGNmOTI4MzAwOGM1Y2UwNTkyZmJkMzczMTljN2I2N2MzZmY3N2I 只是因为我这台运行Hybris commerce的服务器证书设置有问题,因此微信里访问这个url时,报下面的错误: 该地址为IP地址,请使用域名访问网站: 在手机浏览器里直接输入IP地址是可以访问这张图片的: url里的context的值

What is the origin of a NestedServletException?

情到浓时终转凉″ 提交于 2019-12-14 04:00:28
问题 Lately I've been working with the Hybris platform and I encountered an exception in my Tomcat today. The issue is I can't seem to find any valuable information about what a NestedServletException is or why it's thrown. At the moment my priority is to understand the concept, then after solve it. In case it's usefull, I'll attach the StackTrace: Estado HTTP 500 - Error while processing internal filterchain. Exception occurred at chain position: 5 of 15. Current filter: 'es.logista.storefront

How do I restrict insert in Hybris?

故事扮演 提交于 2019-12-13 09:47:18
问题 Like I know, I can use SearchRestrictions to restrict get operations. But what about insert_update? For instance, I want to remove an opportunity to insert Products with CHECK approvalStatus. 回答1: Search restrictions don't work like that. They restrict queries that are made against the database. How? The condition you add to a search restriction is added to the where clause of the select statement of the query. An INSERT query does not have a where clause. At least not those, that are

search(query) throws NullPointerException

你说的曾经没有我的故事 提交于 2019-12-13 04:01:52
问题 public List<DHProductLookupModel> findProductbyCCsapProductId(final String code) { final String queryString = "SELECT {p:" + DHProductLookupModel.SAPPRODUCTID + "}" + "FROM{" + DHProductLookupModel._TYPECODE + " AS p}" + "WHERE" + "{p:" + DHProductLookupModel.SAPPRODUCTID + "}=?code "; final FlexibleSearchQuery query = new FlexibleSearchQuery(queryString); query.addQueryParameter("code", code); return flexibleSearchService.<DHProductLookupModel> search(query).getResult(); } search(query)

Hybris Task Error: Failed to retrieve lock on task Skipping it

安稳与你 提交于 2019-12-13 03:26:45
问题 I am trying to trigger a Task Runner through Java in Hybris 5.3 This is my Controller where I Trigger the task: final TestDataModel dataModel = *save data in model* dataModel .setRunnerBean("responseTaskRunner"); final TaskConditionModel conditionModel = modelService.create(TaskConditionModel.class); final String uid = "Task" + System.currentTimeMillis(); conditionModel.setUniqueID(uid); dataModel .setConditions(Collections.singleton(conditionModel)); // Start the task in 1 second dataModel

Customizing site url using Hybris

三世轮回 提交于 2019-12-13 02:17:54
问题 I'm using Hybris 5.7 and I would like to customize my websites localhost URL. Current URL is: https://localhost:9001/storefront Desired URL : https://localhost:9001/ Thanks 回答1: First, find webroot in your *storefront extension's local.properties file you will see something like mystorefront.webroot=/mystorefront storefrontContextRoot=/mystorefront Remove /mystorefront , so it will be mystorefront.webroot= storefrontContextRoot= Now, you have to correct website & media URLs similarly by

Finding out the place where an attribute of a model changes in Hybris

╄→尐↘猪︶ㄣ 提交于 2019-12-13 00:19:44
问题 I have a custom attribute called visibility in CategoryModel and it can be changed both from backoffice manually and from a cronjob which checks whether there is at least one product under the category. If it is changed from backoffice, cronjob should not change the visibility even if any product is found under it. When an attribute is changed from backoffice, section called Last Changes in Backoffice registers changes related to attribute but I could not find how or where it is done. How can