Applied new patch from Marco Risaliti (OFBIZ-1372), plus additional cleanups I did in the process, to complete the task of pulling out of the product component the code related to the integration with Google Base.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@589499 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -138,7 +138,6 @@ under the License.
|
||||
<GoodIdentificationType description="SKU" goodIdentificationTypeId="SKU" hasTable="N" parentTypeId=""/>
|
||||
<GoodIdentificationType description="UPCA" goodIdentificationTypeId="UPCA" hasTable="N" parentTypeId=""/>
|
||||
<GoodIdentificationType description="UPCE" goodIdentificationTypeId="UPCE" hasTable="N" parentTypeId=""/>
|
||||
<GoodIdentificationType description="Google Id" goodIdentificationTypeId="GOOGLE_ID" hasTable="N" parentTypeId=""/>
|
||||
|
||||
<InventoryItemType description="Serialized" hasTable="N" inventoryItemTypeId="SERIALIZED_INV_ITEM" parentTypeId=""/>
|
||||
<InventoryItemType description="Non-Serialized" hasTable="N" inventoryItemTypeId="NON_SERIAL_INV_ITEM" parentTypeId=""/>
|
||||
|
||||
@@ -455,99 +455,6 @@ public class ProductSearchEvents {
|
||||
return "success";
|
||||
}
|
||||
|
||||
public static String searchExportProductListToGoogle(HttpServletRequest request, HttpServletResponse response) {
|
||||
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
|
||||
Locale locale = UtilHttp.getLocale(request);
|
||||
GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
|
||||
String selectResult = (String) request.getParameter("selectResult");
|
||||
List productExportList = new ArrayList();
|
||||
String errMsg = null;
|
||||
|
||||
try {
|
||||
boolean beganTransaction = TransactionUtil.begin(DEFAULT_TX_TIMEOUT);
|
||||
try {
|
||||
if (UtilValidate.isEmpty(selectResult)) {
|
||||
// If the passed list of product ids is empty, get the list from the search parameters in the request
|
||||
EntityListIterator eli = getProductSearchResults(request);
|
||||
if (eli == null) {
|
||||
errMsg = UtilProperties.getMessage(resource,"productsearchevents.no_results_found_probably_error_constraints", UtilHttp.getLocale(request));
|
||||
Debug.logError(errMsg, module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
return "error";
|
||||
}
|
||||
|
||||
GenericValue searchResultView = null;
|
||||
while ((searchResultView = (GenericValue) eli.next()) != null) {
|
||||
productExportList.add(searchResultView.getString("mainProductId"));
|
||||
}
|
||||
eli.close();
|
||||
} else {
|
||||
if (selectResult.startsWith("[")) {
|
||||
productExportList = StringUtil.toList(selectResult);
|
||||
} else {
|
||||
productExportList.add(selectResult);
|
||||
}
|
||||
}
|
||||
String webSiteUrl = (String) request.getParameter("webSiteUrl");
|
||||
String imageUrl = (String) request.getParameter("imageUrl");
|
||||
String actionType = (String) request.getParameter("actionType");
|
||||
String statusId = (String) request.getParameter("statusId");
|
||||
String testMode = (String) request.getParameter("testMode");
|
||||
String trackingCodeId = (String) request.getParameter("trackingCodeId");
|
||||
|
||||
// Export all or selected products to Google Base
|
||||
try {
|
||||
Map inMap = UtilMisc.toMap("selectResult", productExportList,
|
||||
"webSiteUrl", webSiteUrl,
|
||||
"imageUrl", imageUrl,
|
||||
"actionType", actionType,
|
||||
"statusId", statusId,
|
||||
"testMode", testMode);
|
||||
inMap.put("trackingCodeId", trackingCodeId);
|
||||
inMap.put("userLogin", userLogin);
|
||||
Map exportResult = dispatcher.runSync("exportToGoogle", inMap);
|
||||
if (ServiceUtil.isError(exportResult)) {
|
||||
List errorMessages = (List)exportResult.get(ModelService.ERROR_MESSAGE_LIST);
|
||||
if (UtilValidate.isNotEmpty(errorMessages)) {
|
||||
request.setAttribute("_ERROR_MESSAGE_LIST_", errorMessages);
|
||||
} else {
|
||||
request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(exportResult));
|
||||
}
|
||||
return "error";
|
||||
} else if (ServiceUtil.isFailure(exportResult)) {
|
||||
List eventMessages = (List)exportResult.get(ModelService.ERROR_MESSAGE_LIST);
|
||||
if (UtilValidate.isNotEmpty(eventMessages)) {
|
||||
request.setAttribute("_EVENT_MESSAGE_LIST_", eventMessages);
|
||||
} else {
|
||||
request.setAttribute("_EVENT_MESSAGE_", ServiceUtil.getErrorMessage(exportResult));
|
||||
}
|
||||
} else {
|
||||
request.setAttribute("_EVENT_MESSAGE_", exportResult.get("successMessage"));
|
||||
}
|
||||
} catch (GenericServiceException e) {
|
||||
errMsg = UtilProperties.getMessage(resource, "productsearchevents.exceptionCallingExportToGoogle", locale);
|
||||
Debug.logError(e, errMsg, module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
return "error";
|
||||
}
|
||||
} catch (GenericEntityException e) {
|
||||
errMsg = UtilProperties.getMessage(resource, "productsearchevents.error_getting_search_results", locale);
|
||||
Debug.logError(e, errMsg, module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
return "error";
|
||||
} finally {
|
||||
TransactionUtil.commit(beganTransaction);
|
||||
}
|
||||
} catch (GenericTransactionException e) {
|
||||
errMsg = UtilProperties.getMessage(resource, "productsearchevents.error_getting_search_results", locale);
|
||||
Debug.logError(e, errMsg, module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
return "error";
|
||||
}
|
||||
|
||||
return "success";
|
||||
}
|
||||
|
||||
public static EntityListIterator getProductSearchResults(HttpServletRequest request) {
|
||||
HttpSession session = request.getSession();
|
||||
GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<project name="OFBiz - Google Base Component" default="jar" basedir=".">
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
#####################################################################
|
||||
GoogleBaseApplication=Google Base Integration
|
||||
GoogleBaseCompanyName=Ofbiz
|
||||
GoogleBaseExportToGoogle=Export To Google Base
|
||||
GoogleBaseExportDeactivated=Deactivated
|
||||
GoogleBaseExportPublish=Publish
|
||||
GoogleBaseExportPublishDraft=Publish Draft
|
||||
GoogleBaseExportTestMode=(Yes=Validate the xml document request to Google Base, No=Send the xml document request to Google Base)
|
||||
GoogleBaseExportNoTrackingRequested=Not Requested
|
||||
GoogleBaseViewPermissionError=You do not have permission to view this page. ("GOOGLEBASE_VIEW" needed)
|
||||
|
||||
FormFieldTitle_webSiteUrl=Web Site Url
|
||||
FormFieldTitle_trackingCodeId=Tracking Code Id
|
||||
@@ -41,3 +43,7 @@ productsExportToGoogle.exceptionReadingResponseFromGoogle=Exception reading resp
|
||||
productsExportToGoogle.missingParameterProductCategoryId=Missing parameter productCategoryId
|
||||
productsExportToGoogle.noProductsAvailableInProductCategory=No products available in the selected productCategoryId
|
||||
productsExportToGoogle.productItemsSentCorrecltyToGoogle=Product items sent correclty to Google Base
|
||||
|
||||
googlebasesearchevents.no_results_found_probably_error_constraints=No results found, probably because there was an error or were no constraints.
|
||||
googlebasesearchevents.exceptionCallingExportToGoogle=Exception during exporting product to Google Base.
|
||||
googlebasesearchevents.error_getting_search_results=Error getting search results: ${errSearchResult}.
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
#####################################################################
|
||||
GoogleBaseApplication=Applicazione Per Esportare i Prodotti Su Google Base
|
||||
GoogleBaseCompanyName=Ofbiz
|
||||
GoogleBaseExportToGoogle=Esporta Su Google Base
|
||||
GoogleBaseExportDeactivated=Disattiva
|
||||
GoogleBaseExportPublish=Pubblica
|
||||
GoogleBaseExportPublishDraft=Pubblica come Bozza
|
||||
GoogleBaseExportTestMode=(Si=Valida la richiesta del documento xml su Google Base, No=Invia la richiesta del documento xml a Google Base)
|
||||
GoogleBaseExportNoTrackingRequested=Non Richiesto
|
||||
GoogleBaseViewPermissionError=Tu non sei autorizzato per vedere questa pagina. (necessario permesso "GOOGLEBASE_VIEW")
|
||||
|
||||
FormFieldTitle_webSiteUrl=Url Sito Web
|
||||
FormFieldTitle_trackingCodeId=Codice Tracciatura
|
||||
@@ -40,4 +42,8 @@ productsExportToGoogle.exceptionInExportToGoogle=Eccezione in exportToGoogle
|
||||
productsExportToGoogle.exceptionReadingResponseFromGoogle=Eccezione leggendo la risposta da Google
|
||||
productsExportToGoogle.missingParameterProductCategoryId=Parametro productCategoryId mancante
|
||||
productsExportToGoogle.noProductsAvailableInProductCategory=Nessun prodotto disponibile nella categoria prodotto selezionata
|
||||
productsExportToGoogle.productItemsSentCorrecltyToGoogle=Prodotti inviati correttamente su Google Base
|
||||
productsExportToGoogle.productItemsSentCorrecltyToGoogle=Prodotti inviati correttamente su Google Base
|
||||
|
||||
googlebasesearchevents.no_results_found_probably_error_constraints=No results found, probably because there was an error or were no constraints.
|
||||
googlebasesearchevents.exceptionCallingExportToGoogle=Exception during exporting product to Google Base.
|
||||
googlebasesearchevents.error_getting_search_results=Error getting search results: ${errSearchResult}.
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<entity-engine-xml>
|
||||
<!-- Google Base component security -->
|
||||
<SecurityPermission description="View operations in the Google Base application." permissionId="GOOGLEBASE_VIEW"/>
|
||||
|
||||
<SecurityGroupPermission groupId="FLEXADMIN" permissionId="GOOGLEBASE_VIEW"/>
|
||||
<SecurityGroupPermission groupId="FULLADMIN" permissionId="GOOGLEBASE_VIEW"/>
|
||||
<SecurityGroupPermission groupId="VIEWADMIN" permissionId="GOOGLEBASE_VIEW"/>
|
||||
<SecurityGroupPermission groupId="BIZADMIN" permissionId="GOOGLEBASE_VIEW"/>
|
||||
|
||||
</entity-engine-xml>
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<ofbiz-component name="googlebase"
|
||||
@@ -26,6 +26,7 @@
|
||||
<classpath type="jar" location="build/lib/*"/>
|
||||
|
||||
<entity-resource type="data" reader-name="seed" loader="main" location="data/GoogleBaseTypeData.xml"/>
|
||||
<entity-resource type="data" reader-name="seed" loader="main" location="data/GoogleBaseSecurityData.xml"/>
|
||||
|
||||
<service-resource type="model" loader="main" location="servicedef/services.xml"/>
|
||||
|
||||
@@ -33,7 +34,7 @@
|
||||
title="Google Base"
|
||||
server="default-server"
|
||||
location="webapp/googlebase"
|
||||
base-permission="OFBTOOLS"
|
||||
base-permission="OFBTOOLS,GOOGLEBASE"
|
||||
mount-point="/googlebase"
|
||||
app-bar-display="true"/>
|
||||
</ofbiz-component>
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/*******************************************************************************
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*******************************************************************************/
|
||||
package org.ofbiz.googlebase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.StringUtil;
|
||||
import org.ofbiz.base.util.UtilHttp;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.transaction.GenericTransactionException;
|
||||
import org.ofbiz.entity.transaction.TransactionUtil;
|
||||
import org.ofbiz.entity.util.EntityListIterator;
|
||||
import org.ofbiz.product.product.ProductSearchEvents;
|
||||
import org.ofbiz.service.GenericServiceException;
|
||||
import org.ofbiz.service.LocalDispatcher;
|
||||
import org.ofbiz.service.ModelService;
|
||||
import org.ofbiz.service.ServiceUtil;
|
||||
|
||||
public class GoogleBaseSearchEvents {
|
||||
|
||||
public static final String module = GoogleBaseSearchEvents.class.getName();
|
||||
public static final String resource = "GoogleBaseUiLabels";
|
||||
public static final int DEFAULT_TX_TIMEOUT = 600;
|
||||
|
||||
public static String searchExportProductListToGoogle(HttpServletRequest request, HttpServletResponse response) {
|
||||
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
|
||||
Locale locale = UtilHttp.getLocale(request);
|
||||
GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
|
||||
String selectResult = (String) request.getParameter("selectResult");
|
||||
List productExportList = new ArrayList();
|
||||
String errMsg = null;
|
||||
|
||||
try {
|
||||
boolean beganTransaction = TransactionUtil.begin(DEFAULT_TX_TIMEOUT);
|
||||
try {
|
||||
if (UtilValidate.isEmpty(selectResult)) {
|
||||
// If the passed list of product ids is empty, get the list from the search parameters in the request
|
||||
EntityListIterator eli = ProductSearchEvents.getProductSearchResults(request);
|
||||
if (eli == null) {
|
||||
errMsg = UtilProperties.getMessage(resource,"googlebasesearchevents.no_results_found_probably_error_constraints", UtilHttp.getLocale(request));
|
||||
Debug.logError(errMsg, module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
return "error";
|
||||
}
|
||||
|
||||
GenericValue searchResultView = null;
|
||||
while ((searchResultView = (GenericValue) eli.next()) != null) {
|
||||
productExportList.add(searchResultView.getString("mainProductId"));
|
||||
}
|
||||
eli.close();
|
||||
} else {
|
||||
if (selectResult.startsWith("[")) {
|
||||
productExportList = StringUtil.toList(selectResult);
|
||||
} else {
|
||||
productExportList.add(selectResult);
|
||||
}
|
||||
}
|
||||
String webSiteUrl = (String) request.getParameter("webSiteUrl");
|
||||
String imageUrl = (String) request.getParameter("imageUrl");
|
||||
String actionType = (String) request.getParameter("actionType");
|
||||
String statusId = (String) request.getParameter("statusId");
|
||||
String testMode = (String) request.getParameter("testMode");
|
||||
String trackingCodeId = (String) request.getParameter("trackingCodeId");
|
||||
|
||||
// Export all or selected products to Google Base
|
||||
try {
|
||||
Map inMap = UtilMisc.toMap("selectResult", productExportList,
|
||||
"webSiteUrl", webSiteUrl,
|
||||
"imageUrl", imageUrl,
|
||||
"actionType", actionType,
|
||||
"statusId", statusId,
|
||||
"testMode", testMode);
|
||||
inMap.put("trackingCodeId", trackingCodeId);
|
||||
inMap.put("userLogin", userLogin);
|
||||
Map exportResult = dispatcher.runSync("exportToGoogle", inMap);
|
||||
if (ServiceUtil.isError(exportResult)) {
|
||||
List errorMessages = (List)exportResult.get(ModelService.ERROR_MESSAGE_LIST);
|
||||
if (UtilValidate.isNotEmpty(errorMessages)) {
|
||||
request.setAttribute("_ERROR_MESSAGE_LIST_", errorMessages);
|
||||
} else {
|
||||
request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(exportResult));
|
||||
}
|
||||
return "error";
|
||||
} else if (ServiceUtil.isFailure(exportResult)) {
|
||||
List eventMessages = (List)exportResult.get(ModelService.ERROR_MESSAGE_LIST);
|
||||
if (UtilValidate.isNotEmpty(eventMessages)) {
|
||||
request.setAttribute("_EVENT_MESSAGE_LIST_", eventMessages);
|
||||
} else {
|
||||
request.setAttribute("_EVENT_MESSAGE_", ServiceUtil.getErrorMessage(exportResult));
|
||||
}
|
||||
} else {
|
||||
request.setAttribute("_EVENT_MESSAGE_", exportResult.get("successMessage"));
|
||||
}
|
||||
} catch (GenericServiceException e) {
|
||||
errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.exceptionCallingExportToGoogle", locale);
|
||||
Debug.logError(e, errMsg, module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
return "error";
|
||||
}
|
||||
} catch (GenericEntityException e) {
|
||||
errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.error_getting_search_results", locale);
|
||||
Debug.logError(e, errMsg, module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
return "error";
|
||||
} finally {
|
||||
TransactionUtil.commit(beganTransaction);
|
||||
}
|
||||
} catch (GenericTransactionException e) {
|
||||
errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.error_getting_search_results", locale);
|
||||
Debug.logError(e, errMsg, module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
return "error";
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
<request-map uri="searchExportProductListToGoogle">
|
||||
<security https="true" auth="true"/>
|
||||
<event type="java" path="org.ofbiz.product.product.ProductSearchEvents" invoke="searchExportProductListToGoogle"/>
|
||||
<event type="java" path="org.ofbiz.googlebase.GoogleBaseSearchEvents" invoke="searchExportProductListToGoogle"/>
|
||||
<response name="success" type="view" value="ProductsExportToGoogle"/>
|
||||
<response name="error" type="view" value="ProductsExportToGoogle"/>
|
||||
</request-map>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<web-app>
|
||||
|
||||
@@ -25,5 +25,5 @@ under the License.
|
||||
</script>
|
||||
|
||||
<#if productIds?has_content>
|
||||
<a href="javascript:exportToGoogle();" class="buttontext">${uiLabelMap.ProductExportToGoogle}</a>
|
||||
<a href="javascript:exportToGoogle();" class="buttontext">${uiLabelMap.GoogleBaseExportToGoogle}</a>
|
||||
</#if>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
@@ -53,6 +53,6 @@
|
||||
</entity-options>
|
||||
</drop-down>
|
||||
</field>
|
||||
<field name="submitButton" title="${uiLabelMap.ProductExportToGoogle}"><submit button-type="button"/></field>
|
||||
<field name="submitButton" title="${uiLabelMap.GoogleBaseExportToGoogle}"><submit button-type="button"/></field>
|
||||
</form>
|
||||
</forms>
|
||||
|
||||
@@ -20,7 +20,7 @@ under the License.
|
||||
<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
|
||||
<menu name="GoogleBaseAppBar" default-menu-item-name="main" id="app-navigation" type="simple" title="${uiLabelMap.GoogleBaseApplication}"
|
||||
default-selected-style="selected" selected-menuitem-context-field-name="headerItem">
|
||||
<menu-item name="googlebase" title="${uiLabelMap.ProductExportToGoogle}"><link target="advancedsearch"/></menu-item>
|
||||
<menu-item name="googlebase" title="${uiLabelMap.GoogleBaseExportToGoogle}"><link target="advancedsearch"/></menu-item>
|
||||
|
||||
<menu-item name="Logout" title="Logout" align-style="col-right" selected-style="selected">
|
||||
<condition><not><if-empty field-name="userLogin"/></not></condition>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
@@ -58,15 +58,14 @@
|
||||
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<section>
|
||||
<!-- do check for CATALOG, _VIEW permission -->
|
||||
<condition>
|
||||
<if-has-permission permission="CATALOG" action="_VIEW"/>
|
||||
<if-has-permission permission="GOOGLEBASE" action="_VIEW"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<decorator-section-include name="body"/>
|
||||
</widgets>
|
||||
<fail-widgets>
|
||||
<label style="head3">${uiLabelMap.ProductCatalogViewPermissionError}</label>
|
||||
<label style="head3">${uiLabelMap.GoogleBaseViewPermissionError}</label>
|
||||
</fail-widgets>
|
||||
</section>
|
||||
</decorator-section>
|
||||
|
||||
Reference in New Issue
Block a user