No functional changes

At http://markmail.org/message/ffmyw773p65fndey I wrote:

I'd like to follow the suggestion I made in the last message of the linked 
thread.
In other words, use
http://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-config
http://blogs.collab.net/subversion/the-road-to-repository-dictated-configuration-day-2-autoprops
Then this problem would be over. No longer need to check from time to time that
concerned files, have svn:eol-style=native property set
This imply that all OFBiz users use svn > 1.7, but we can inform them, et voilĂ 

Then at markmail.org/message/h3q2yvj4db544ro7 I wrote:

Actually, since we get new committers now and then and their are able to create
new files I have a warning every 6 months which says "Check Java 
files, have all svn:eol-style=native" (I totally forgot that because I assume
the machine knows it and warns me ;))
I could extend that to all files (at least the most prominent types), I'll
see...

This does what the last sentence said for Groovy, XML and few new Birt 
Java files.

I'll see if I can implement the svn 1.8 repos-dictated-config ASAP!




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781219 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/applications/humanres/documents/Humanres.xml b/applications/humanres/documents/Humanres.xml
index 5d9cbe3..9864fd8 100644
--- a/applications/humanres/documents/Humanres.xml
+++ b/applications/humanres/documents/Humanres.xml
@@ -1,51 +1,51 @@
-<?xml version="1.0"?>

-<!--

-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.

--->

-<chapter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-    version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" 

-    xmlns:xi="http://www.w3.org/2001/XInclude"

-    xsi:schemaLocation="http://docbook.org/ns/docbook ../../content/dtd/docbook.xsd"

-    xmlns="http://docbook.org/ns/docbook">

-    <title>The Human Resource Application.</title>

-  <para>

-    The human resource application is supporting you to ...WIP, to be completed...

-  </para>

-  

-  <section>

-    <title>Human resource in Apache OFBiz, an overview.</title>

-    <para>

-      WIP, to be completed...

-    </para>

-    

-  </section>

-  

-   <xi:include href="../data/helpdata/HELP_HR.xml" />

-   <xi:include href="../data/helpdata/HELP_HR_main.xml" />

-   <xi:include href="../data/helpdata/HELP_HR_training.xml" />

-     

-    <!-- xi:include href="../data/helpdata/HELP_HUMANRES_employees.xml" />

-    <xi:include href="../data/helpdata/HELP_HUMANRES_employees_positions.xml" />

-    <xi:include href="../data/helpdata/HELP_HUMANRES_performance_review.xml" />

-    <xi:include href="../data/helpdata/HELP_HUMANRES_skills.xml" />

-    <xi:include href="../data/helpdata/HELP_HUMANRES_recruitment.xml" /-->

-    <!--xi:include href="../data/helpdata/HELP_HUMANRES_employment_applications.xml" />

-    <xi:include href="../data/helpdata/HELP_HUMANRES_resumes.xml" />

-    <xi:include href="../data/helpdata/HELP_HUMANRES_leave.xml" />

-    <xi:include href="../data/helpdata/HELP_HUMANRES_global_HR_settings.xml" /-->

-</chapter>

+<?xml version="1.0"?>
+<!--
+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.
+-->
+<chapter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" 
+    xmlns:xi="http://www.w3.org/2001/XInclude"
+    xsi:schemaLocation="http://docbook.org/ns/docbook ../../content/dtd/docbook.xsd"
+    xmlns="http://docbook.org/ns/docbook">
+    <title>The Human Resource Application.</title>
+  <para>
+    The human resource application is supporting you to ...WIP, to be completed...
+  </para>
+  
+  <section>
+    <title>Human resource in Apache OFBiz, an overview.</title>
+    <para>
+      WIP, to be completed...
+    </para>
+    
+  </section>
+  
+   <xi:include href="../data/helpdata/HELP_HR.xml" />
+   <xi:include href="../data/helpdata/HELP_HR_main.xml" />
+   <xi:include href="../data/helpdata/HELP_HR_training.xml" />
+     
+    <!-- xi:include href="../data/helpdata/HELP_HUMANRES_employees.xml" />
+    <xi:include href="../data/helpdata/HELP_HUMANRES_employees_positions.xml" />
+    <xi:include href="../data/helpdata/HELP_HUMANRES_performance_review.xml" />
+    <xi:include href="../data/helpdata/HELP_HUMANRES_skills.xml" />
+    <xi:include href="../data/helpdata/HELP_HUMANRES_recruitment.xml" /-->
+    <!--xi:include href="../data/helpdata/HELP_HUMANRES_employment_applications.xml" />
+    <xi:include href="../data/helpdata/HELP_HUMANRES_resumes.xml" />
+    <xi:include href="../data/helpdata/HELP_HUMANRES_leave.xml" />
+    <xi:include href="../data/helpdata/HELP_HUMANRES_global_HR_settings.xml" /-->
+</chapter>
diff --git a/applications/party/groovyScripts/party/StatusCondition.groovy b/applications/party/groovyScripts/party/StatusCondition.groovy
index b11b265..8e1e82b 100644
--- a/applications/party/groovyScripts/party/StatusCondition.groovy
+++ b/applications/party/groovyScripts/party/StatusCondition.groovy
@@ -1,27 +1,27 @@
-/*

- * 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.

- */

- 

-import org.apache.ofbiz.entity.condition.EntityCondition

-import org.apache.ofbiz.entity.condition.EntityOperator

- 

-exprList = [EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PARTY_DISABLED"), 

-            EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, null)]

-condList = EntityCondition.makeCondition(exprList, EntityOperator.AND)

-context.andCondition = EntityCondition.makeCondition([condList, EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, null)], EntityOperator.OR)

- 

+/*
+ * 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.
+ */
+ 
+import org.apache.ofbiz.entity.condition.EntityCondition
+import org.apache.ofbiz.entity.condition.EntityOperator
+ 
+exprList = [EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PARTY_DISABLED"), 
+            EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, null)]
+condList = EntityCondition.makeCondition(exprList, EntityOperator.AND)
+context.andCondition = EntityCondition.makeCondition([condList, EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, null)], EntityOperator.OR)
+ 
diff --git a/applications/product/groovyScripts/facility/facility/FacilityLocationGeoLocation.groovy b/applications/product/groovyScripts/facility/facility/FacilityLocationGeoLocation.groovy
index f73f65e..5b3c5f3 100644
--- a/applications/product/groovyScripts/facility/facility/FacilityLocationGeoLocation.groovy
+++ b/applications/product/groovyScripts/facility/facility/FacilityLocationGeoLocation.groovy
@@ -1,48 +1,48 @@
-/*

- * 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.

- */

-

- import org.apache.ofbiz.base.util.*

- import org.apache.ofbiz.common.geo.*

- import org.apache.ofbiz.entity.*

-

-facilityId = parameters.facilityId

-locationSeqId = parameters.locationSeqId

-

-uiLabelMap = UtilProperties.getResourceBundleMap("ProductUiLabels", locale)

-uiLabelMap.addBottomResourceBundle("CommonUiLabels")

-

-if (facilityId && locationSeqId) {

-    latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "FacilityLocationAndGeoPoint", "facilityId", facilityId, "locationSeqId", locationSeqId)

-    context.latestGeoPoint = latestGeoPoint

-

-    List geoCenter = UtilMisc.toList(UtilMisc.toMap("lat", latestGeoPoint.latitude, "lon", latestGeoPoint.longitude, "zoom", "13"))

-

-    if (UtilValidate.isNotEmpty(latestGeoPoint) && latestGeoPoint.containsKey("latitude") && latestGeoPoint.containsKey("longitude")) {

-        List geoPoints = UtilMisc.toList(UtilMisc.toMap("lat", latestGeoPoint.latitude, "lon", latestGeoPoint.longitude, "facilityId", facilityId,

-                "link", UtilMisc.toMap("url", "EditFacilityLocation?facilityId="+ facilityId + "&locationSeqId=" + locationSeqId,

-                "label", uiLabelMap.ProductFacilityLocation  + " " + uiLabelMap.CommonOf + " " + facilityId + "/" + locationSeqId)))

-

-        Map geoChart = UtilMisc.toMap("width", "500px", "height", "450px", "controlUI" , "small", "dataSourceId", latestGeoPoint.dataSourceId, "points", geoPoints)

-        context.geoChart = geoChart

-    }

-    if (latestGeoPoint && latestGeoPoint.elevationUomId) {

-        elevationUom = from("Uom").where("uomId", latestGeoPoint.elevationUomId).queryOne()

-        context.elevationUomAbbr = elevationUom.abbreviation

-    }

+/*
+ * 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.
+ */
+
+ import org.apache.ofbiz.base.util.*
+ import org.apache.ofbiz.common.geo.*
+ import org.apache.ofbiz.entity.*
+
+facilityId = parameters.facilityId
+locationSeqId = parameters.locationSeqId
+
+uiLabelMap = UtilProperties.getResourceBundleMap("ProductUiLabels", locale)
+uiLabelMap.addBottomResourceBundle("CommonUiLabels")
+
+if (facilityId && locationSeqId) {
+    latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "FacilityLocationAndGeoPoint", "facilityId", facilityId, "locationSeqId", locationSeqId)
+    context.latestGeoPoint = latestGeoPoint
+
+    List geoCenter = UtilMisc.toList(UtilMisc.toMap("lat", latestGeoPoint.latitude, "lon", latestGeoPoint.longitude, "zoom", "13"))
+
+    if (UtilValidate.isNotEmpty(latestGeoPoint) && latestGeoPoint.containsKey("latitude") && latestGeoPoint.containsKey("longitude")) {
+        List geoPoints = UtilMisc.toList(UtilMisc.toMap("lat", latestGeoPoint.latitude, "lon", latestGeoPoint.longitude, "facilityId", facilityId,
+                "link", UtilMisc.toMap("url", "EditFacilityLocation?facilityId="+ facilityId + "&locationSeqId=" + locationSeqId,
+                "label", uiLabelMap.ProductFacilityLocation  + " " + uiLabelMap.CommonOf + " " + facilityId + "/" + locationSeqId)))
+
+        Map geoChart = UtilMisc.toMap("width", "500px", "height", "450px", "controlUI" , "small", "dataSourceId", latestGeoPoint.dataSourceId, "points", geoPoints)
+        context.geoChart = geoChart
+    }
+    if (latestGeoPoint && latestGeoPoint.elevationUomId) {
+        elevationUom = from("Uom").where("uomId", latestGeoPoint.elevationUomId).queryOne()
+        context.elevationUomAbbr = elevationUom.abbreviation
+    }
 }
diff --git a/applications/product/widget/catalog/ImageManagementScreens.xml b/applications/product/widget/catalog/ImageManagementScreens.xml
index 18df252..4498847 100644
--- a/applications/product/widget/catalog/ImageManagementScreens.xml
+++ b/applications/product/widget/catalog/ImageManagementScreens.xml
@@ -1,864 +1,864 @@
-<?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.

--->

-<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">

-

-    <screen name="Imagemanagement">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="main"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.ImageManagementApplication}">

-                                    <include-form name="ImageGallery" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <screenlet title="${uiLabelMap.ImageManagementApplication}">

-                                    <container><label style="label" text="${uiLabelMap.ImageManagementWelcomeMessage}"/></container>

-                                </screenlet>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageGallery">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageGallery"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="${uiLabelMap.ImageManagementGallery}">

-                               <include-form name="ImageGallery" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-     <screen name="ListImageGallery">

-        <section>

-            <condition>

-                <not><if-empty field="parameters.productId"/></not>

-            </condition>

-            <actions>

-                <set field="productId" from-field="parameters.productId"/>

-                <entity-one entity-name="Product" value-field="product"/>

-            </actions>

-            <widgets>

-                <section>

-                    <condition>

-                        <not><if-empty field="product"/></not>

-                    </condition>

-                    <widgets>

-                        <section>

-                            <actions>

-                                <set field="userTabButtonImage" value="ImageGallery"/>

-                                <!--<entity-and  list="productContents" entity-name="ProductContent">

-                                   <field-map field-name="productId" from-field="parameters.productId" />

-                                   <field-map field-name="productContentTypeId" value="PRODUCT_NAME" />

-                                </entity-and>

-                                

-                                <entity-and  list="contentAssocs" entity-name="ContentAssoc">

-                                   <field-map field-name="contentId" from-field="productContents[0].contentId" />

-                                   <field-map field-name="contentAssocTypeId" value="ALTERNATE_LOCALE" />

-                                </entity-and>-->

-                                

-                                <!--<entity-one entity-name="Product" value-field="product"/>-->

-                                <!--<script location="component://product/groovyScripts/catalog/imagemanagement/SeoLocales.groovy"/>-->

-                                <script location="component://product/groovyScripts/catalog/imagemanagement/ImageGallery.groovy"/>

-                            </actions>

-                            <widgets>

-                                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                                    <decorator-section name="body">

-                                        <label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>

-                                        <screenlet title="${uiLabelMap.ImageManagementGallery}">

-                                            <platform-specific>

-                                                <html><html-template location="component://product/template/imagemanagement/ImageGallery.ftl"/></html>

-                                            </platform-specific>

-                                        </screenlet>

-                                    </decorator-section>

-                                </decorator-screen>

-                            </widgets>

-                        </section>

-                    </widgets>

-                    <fail-widgets>

-                        <section>

-                            <actions>

-                                <set field="userTabButtonImage" value="ImageGallery"/>

-                            </actions>

-                            <widgets>

-                                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                                    <decorator-section name="body">

-                                        <label text="${uiLabelMap.ProductNoExistingProductsFound}"/>

-                                    </decorator-section>

-                                </decorator-screen>

-                            </widgets>

-                        </section>

-                    </fail-widgets>

-                </section>

-            </widgets>

-            <fail-widgets>

-                <section>

-                    <actions>

-                        <set field="userTabButtonImage" value="ImageGallery"/>

-                        <!--<set field="errorMessage" value="There is no a selected product, please insert or select the product to view image(s)."/>-->

-                    </actions>

-                    <widgets>

-                        <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                            <decorator-section name="body">

-                                <screenlet title="${uiLabelMap.ImageManagementGallery}">

-                                    <include-form name="ImageGallery" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </decorator-section>

-                        </decorator-screen>

-                    </widgets>

-                </section>

-            </fail-widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageUpload">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageUpload"/>

-                <set field="productId" from-field="parameters.productId"/>

-                <entity-one entity-name="Product" value-field="product"/>

-                <script location="component://product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_UPLOAD"/>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.CommonUpload}">

-                                    <platform-specific>

-                                        <html><html-template location="component://product/template/imagemanagement/AddMultipleImages.ftl"/></html>

-                                    </platform-specific>

-                                </screenlet>

-                                <screenlet title="${uiLabelMap.ImageManagementImageUploadList}">

-                                    <include-grid name="ListImageUpload" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_UPLOAD&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageApprove">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageApprove"/>

-                <entity-condition entity-name="PartyRole" list="partyRoles">

-                    <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>

-                </entity-condition>

-                <entity-condition entity-name="ContentApprovalProductContentAndInfo" list="contentApprovalProductContentAndInfos">

-                    <condition-list combine="and">

-                        <condition-expr field-name="partyId" from-field="userLogin.partyId"/>

-                        <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>

-                        <condition-expr field-name="approvalStatusId" value="IM_PENDING"/>

-                    </condition-list>

-                    <order-by field-name="productId"/>

-                </entity-condition>

-                <entity-condition entity-name="Product" list="products">

-                    <order-by field-name="productId"/>

-                </entity-condition>

-                <set field="userMap.checkUser" from-field="userLogin.userLoginId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <platform-specific>

-                                    <html><html-template location="component://product/template/imagemanagement/ShowPeopleApprove.ftl"/></html>

-                                </platform-specific>

-                                <screenlet title="${uiLabelMap.ImageManagementApprove}">

-                                    <include-form name="ImageApprove" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ListPeopleApproved">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageApprove"/>

-                <entity-condition entity-name="PartyRole" list="partyRoles">

-                    <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>

-                </entity-condition>

-                <entity-one entity-name="UserLogin" value-field="userLoginInfo">

-                    <field-map field-name="userLoginId" from-field="parameters.createdByUserLogin"/>

-                </entity-one>

-                <entity-condition entity-name="ContentApprovalProductContentAndInfo" list="contentApprovalProductContentAndInfos">

-                    <condition-list combine="and">

-                        <condition-expr field-name="partyId" from-field="userLoginInfo.partyId"/>

-                        <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>

-                        <condition-expr field-name="approvalStatusId" value="IM_PENDING"/>

-                    </condition-list>

-                    <order-by field-name="productId"/>

-                </entity-condition>

-                <entity-condition entity-name="Product" list="products">

-                    <order-by field-name="productId"/>

-                </entity-condition>

-                <set field="userMap.checkUser" from-field="parameters.createdByUserLogin"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <platform-specific>

-                                    <html><html-template location="component://product/template/imagemanagement/ShowPeopleApprove.ftl"/></html>

-                                </platform-specific>

-                                <screenlet title="${uiLabelMap.CommonApproved}">

-                                    <include-grid name="ListPeopleApproved" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageRejected">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageRejected"/>

-                <entity-condition entity-name="PartyRole" list="partyRoles">

-                    <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>

-                </entity-condition>

-                <entity-condition entity-name="ProductContentAndInfo" list="productContentAndInfos">

-                    <condition-list combine="and">

-                        <condition-expr field-name="statusId" value="IM_REJECTED"/>

-                        <condition-expr field-name="productContentTypeId" value="IMAGE"/>

-                        <condition-expr field-name="thruDate" operator="not-equals" from-field="nullField"/>

-                    </condition-list>

-                    <order-by field-name="productId"/>

-                </entity-condition>

-                <entity-condition entity-name="Product" list="products">

-                    <order-by field-name="productId"/>

-                </entity-condition>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.CommonRejected}">

-                                    <include-form name="ImageRejected" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ListPeopleRejected">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageApprove"/>

-                <entity-condition entity-name="PartyRole" list="partyRoles">

-                    <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>

-                </entity-condition>

-                <entity-condition entity-name="ProductContentAndInfo" list="productContentAndInfos">

-                    <condition-list combine="and">

-                        <condition-expr field-name="statusId" value="IM_REJECTED"/>

-                        <condition-expr field-name="productContentTypeId" value="IMAGE"/>

-                        <condition-expr field-name="createdByUserLogin" from-field="userLogin.userLoginId"/>

-                        <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>

-                    </condition-list>

-                    <order-by field-name="productId"/>

-                </entity-condition>

-                <entity-condition entity-name="Product" list="products">

-                    <order-by field-name="productId"/>

-                </entity-condition>

-                <set field="userMap.checkUser" value="REJECTED"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <platform-specific>

-                                    <html><html-template location="component://product/template/imagemanagement/ShowPeopleApprove.ftl"/></html>

-                                </platform-specific>

-                                <screenlet title="${uiLabelMap.CommonRejected}">

-                                    <include-form name="ListPeopleRejected" location="component://product/widget/catalog/ImageManagementForms.xml"/>    

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageManage">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageManage"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.CommonManage}">

-                                    <include-form name="ImageManage" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ListImageManage">

-        <section>

-            <condition>

-                <not><if-empty field="parameters.productId"/></not>

-            </condition>

-            <actions>

-                <set field="userTabButtonImage" value="ImageManage"/>

-                <set field="productId" from-field="parameters.productId"/>

-                <entity-one entity-name="Product" value-field="product"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <section>

-                                    <condition>

-                                        <not><if-empty field="product"/></not>

-                                    </condition>

-                                    <widgets>

-                                        <label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>

-                                        <screenlet title="${uiLabelMap.CommonManage}">

-                                            <include-form name="ListImageManage" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                        </screenlet>

-                                        <screenlet title="${uiLabelMap.ImageManagementDefaultImage}">

-                                            <include-form name="ShowDefaultImage" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                        </screenlet>

-                                    </widgets>

-                                    <fail-widgets>

-                                        <label text="${uiLabelMap.ProductNoExistingProductsFound}"/>

-                                    </fail-widgets>

-                                </section>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-            <fail-widgets>

-                <section>

-                    <actions>

-                        <set field="userTabButtonImage" value="ImageManage"/>

-                        <!--<set field="errorMessage" value="There is no a selected product, please insert or select the product to view image(s)."/>-->

-                    </actions>

-                    <widgets>

-                        <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                            <decorator-section name="body">

-                                <section>

-                                    <condition>

-                                        <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                    </condition>

-                                    <widgets>

-                                        <screenlet title="${uiLabelMap.CommonManage}">

-                                            <include-form name="ImageManage" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                        </screenlet>

-                                    </widgets>

-                                    <fail-widgets>

-                                        <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                                    </fail-widgets>

-                                </section>

-                            </decorator-section>

-                        </decorator-screen>

-                    </widgets>

-                </section>

-            </fail-widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageFrames">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageManage"/>

-                <set field="currentFormName" value="ImageFrames"/>

-                <set field="statusForm" value="IM_PENDING"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.ImageManagementImageFrames}">

-                                    <include-form name="ImageFrames" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                    <platform-specific>

-                                        <html><html-template location="component://product/template/imagemanagement/ImageFrame.ftl"/></html>

-                                    </platform-specific>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="ImageCropping">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageManage"/>

-                <set field="currentFormName" value="ImageCropping"/>

-                <set field="statusForm" value="IM_PENDING"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.ImageManagementImageCropping}">

-                                    <include-form name="ImageCropping" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                    <platform-specific>

-                                        <html><html-template location="component://product/template/imagemanagement/ImageCrop.ftl"/></html>

-                                    </platform-specific>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-     <screen name="ImageRotating">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageManage"/>

-                <set field="currentFormName" value="ImageRotating"/>

-                <set field="statusForm" value="IM_PENDING"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.ImageManagementImageRotating}">

-                                    <platform-specific>

-                                        <html><html-template location="component://product/template/imagemanagement/ImageRotateButton.ftl"/></html>

-                                    </platform-specific>

-                                    <include-form name="ImageRotating" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                    <platform-specific>

-                                        <html><html-template location="component://product/template/imagemanagement/ImageRotating.ftl"/></html>

-                                    </platform-specific>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageShare">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageGallery"/>

-                <set field="currentFormName" value="ImageShare"/>

-                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">

-                    <decorator-section name="body">

-                        <section>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.ImageManagementShareImage}">

-                                    <include-form name="ImageShare" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                    <platform-specific>

-                                        <html><html-template location="component://product/template/imagemanagement/ImageShare.ftl"/></html>

-                                    </platform-specific>

-                                </screenlet>

-                            </widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageReplace">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageReplace"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.ImageManagementReplace}">

-                                    <include-form name="ProductImageReplace" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ListImageReplace">

-        <section>

-            <condition>

-                <not><if-empty field="parameters.productId"/></not>

-            </condition>

-            <actions>

-                <set field="userTabButtonImage" value="ImageReplace"/>

-                <set field="currentFormName" value="ListImageReplace"/>

-                <set field="statusForm" value="IM_APPROVED"/>

-                <set field="productId" from-field="parameters.productId"/>

-                <entity-one entity-name="Product" value-field="product"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <section>

-                                    <condition>

-                                        <not><if-empty field="product"/></not>

-                                    </condition>

-                                    <widgets>

-                                        <label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>

-                                        <container style="lefthalf">

-                                            <screenlet title="${uiLabelMap.ImageManagementChooseReplacementImage}">

-                                                <include-grid name="ListImageExist" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                            </screenlet>

-                                        </container>

-                                        <container style="righthalf">

-                                            <screenlet title="${uiLabelMap.ImageManagementChooseImageToReplace}">

-                                                <include-grid name="ListImageReplace" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                            </screenlet>

-                                        </container>

-                                        <container style="clear"/>

-                                        <screenlet title="${uiLabelMap.ImageManagementReplace}">

-                                            <include-form name="ImageReplace" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                        </screenlet>

-                                    </widgets>

-                                    <fail-widgets>

-                                        <label text="${uiLabelMap.ProductNoExistingProductsFound}"/>

-                                    </fail-widgets>

-                                </section>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                   </decorator-section>

-                </decorator-screen>

-            </widgets>

-            <fail-widgets>

-                <section>

-                    <actions>

-                        <set field="userTabButtonImage" value="ImageReplace"/>

-                        <!--<set field="errorMessage" value="There is no a selected product, please insert or select the product to view image(s)."/>-->

-                    </actions>

-                    <widgets>

-                        <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                            <decorator-section name="body">

-                                <section>

-                                    <condition>

-                                        <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                    </condition>

-                                    <widgets>

-                                        <screenlet title="${uiLabelMap.ImageManagementReplace}">

-                                            <include-form name="ProductImageReplace" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                        </screenlet>

-                                    </widgets>

-                                    <fail-widgets>

-                                        <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                                    </fail-widgets>

-                                </section>

-                            </decorator-section>

-                        </decorator-screen>

-                    </widgets>

-                </section>

-            </fail-widgets>

-        </section>

-    </screen>

-    

-    <screen name="ViewImage">

-        <section>

-            <widgets>

-                <image src="${parameters.drObjectInfo}"/>

-                <platform-specific>

-                    <html><html-template location="component://product/template/imagemanagement/ResizeImage.ftl"/></html>

-                </platform-specific>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ViewPreviewImage">

-        <section>

-            <actions>

-                <property-to-field resource="catalog" property="image.management.url" field="imageServerUrl"/>

-            </actions>

-            <widgets>

-                <image src="${imageServerUrl}/preview/previewImage.jpg"/>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="LookupImage">

-        <section>

-            <widgets>

-                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">

-                    <decorator-section name="body">

-                        <include-grid name="ListLookupImage" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageRecentlyApproved">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageRecentlyApproved"/>

-                <script location="component://product/groovyScripts/catalog/imagemanagement/ImageRecentlyApproved.groovy"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>

-                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.ImageManagementRecentlyApproved}">

-                                    <platform-specific>

-                                        <html><html-template location="component://product/template/imagemanagement/ImageRecentlyApproved.ftl"/></html>

-                                    </platform-specific>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ListImageRecentlyApproved">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageRecentlyApproved"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${parameters.productId} : ${parameters.showDate}">

-                                    <include-grid name="ListImageRecentlyApproved" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="LookupImageFrame">

-        <section>

-            <widgets>

-                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">

-                    <decorator-section name="body">

-                        <include-grid name="ListLookupImageFrame" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    

-    <screen name="ImageResize">

-        <section>

-            <actions>

-                <set field="userTabButtonImage" value="ImageResize"/>

-                <set field="productId" from-field="parameters.productId"/>

-                <entity-one entity-name="Product" value-field="product"/>

-                <entity-condition entity-name="ProductContentAndInfo" list="productContentAndInfos">

-                    <condition-list combine="and">

-                        <condition-expr field-name="productId" from-field="parameters.productId"/>

-                        <condition-expr field-name="productContentTypeId" value="IMAGE"/>

-                        <!--<condition-expr field-name="statusId" value="IM_APPROVED"/>-->

-                    </condition-list>

-                </entity-condition>

-                <set field="parameters.contentIdAccos" from-field="productContentAndInfos[0].contentId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>

-                            </condition>

-                            <widgets>

-                                <!--<label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>-->

-                                <screenlet title="${uiLabelMap.ImageManagementThumbnailSizeExistingInProduct} : ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]">

-                                    <include-grid name="SizeListOfProduct" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                                <screenlet title="${uiLabelMap.ImageManagementResize}">

-                                    <include-form name="ImageResize" location="component://product/widget/catalog/ImageManagementForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-</screens>

+<?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.
+-->
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
+    <screen name="Imagemanagement">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="main"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.ImageManagementApplication}">
+                                    <include-form name="ImageGallery" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <screenlet title="${uiLabelMap.ImageManagementApplication}">
+                                    <container><label style="label" text="${uiLabelMap.ImageManagementWelcomeMessage}"/></container>
+                                </screenlet>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageGallery">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageGallery"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.ImageManagementGallery}">
+                               <include-form name="ImageGallery" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+     <screen name="ListImageGallery">
+        <section>
+            <condition>
+                <not><if-empty field="parameters.productId"/></not>
+            </condition>
+            <actions>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-one entity-name="Product" value-field="product"/>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <not><if-empty field="product"/></not>
+                    </condition>
+                    <widgets>
+                        <section>
+                            <actions>
+                                <set field="userTabButtonImage" value="ImageGallery"/>
+                                <!--<entity-and  list="productContents" entity-name="ProductContent">
+                                   <field-map field-name="productId" from-field="parameters.productId" />
+                                   <field-map field-name="productContentTypeId" value="PRODUCT_NAME" />
+                                </entity-and>
+                                
+                                <entity-and  list="contentAssocs" entity-name="ContentAssoc">
+                                   <field-map field-name="contentId" from-field="productContents[0].contentId" />
+                                   <field-map field-name="contentAssocTypeId" value="ALTERNATE_LOCALE" />
+                                </entity-and>-->
+                                
+                                <!--<entity-one entity-name="Product" value-field="product"/>-->
+                                <!--<script location="component://product/groovyScripts/catalog/imagemanagement/SeoLocales.groovy"/>-->
+                                <script location="component://product/groovyScripts/catalog/imagemanagement/ImageGallery.groovy"/>
+                            </actions>
+                            <widgets>
+                                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                                    <decorator-section name="body">
+                                        <label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>
+                                        <screenlet title="${uiLabelMap.ImageManagementGallery}">
+                                            <platform-specific>
+                                                <html><html-template location="component://product/template/imagemanagement/ImageGallery.ftl"/></html>
+                                            </platform-specific>
+                                        </screenlet>
+                                    </decorator-section>
+                                </decorator-screen>
+                            </widgets>
+                        </section>
+                    </widgets>
+                    <fail-widgets>
+                        <section>
+                            <actions>
+                                <set field="userTabButtonImage" value="ImageGallery"/>
+                            </actions>
+                            <widgets>
+                                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                                    <decorator-section name="body">
+                                        <label text="${uiLabelMap.ProductNoExistingProductsFound}"/>
+                                    </decorator-section>
+                                </decorator-screen>
+                            </widgets>
+                        </section>
+                    </fail-widgets>
+                </section>
+            </widgets>
+            <fail-widgets>
+                <section>
+                    <actions>
+                        <set field="userTabButtonImage" value="ImageGallery"/>
+                        <!--<set field="errorMessage" value="There is no a selected product, please insert or select the product to view image(s)."/>-->
+                    </actions>
+                    <widgets>
+                        <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                            <decorator-section name="body">
+                                <screenlet title="${uiLabelMap.ImageManagementGallery}">
+                                    <include-form name="ImageGallery" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </decorator-section>
+                        </decorator-screen>
+                    </widgets>
+                </section>
+            </fail-widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageUpload">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageUpload"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-one entity-name="Product" value-field="product"/>
+                <script location="component://product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_UPLOAD"/>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.CommonUpload}">
+                                    <platform-specific>
+                                        <html><html-template location="component://product/template/imagemanagement/AddMultipleImages.ftl"/></html>
+                                    </platform-specific>
+                                </screenlet>
+                                <screenlet title="${uiLabelMap.ImageManagementImageUploadList}">
+                                    <include-grid name="ListImageUpload" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_UPLOAD&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageApprove">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageApprove"/>
+                <entity-condition entity-name="PartyRole" list="partyRoles">
+                    <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>
+                </entity-condition>
+                <entity-condition entity-name="ContentApprovalProductContentAndInfo" list="contentApprovalProductContentAndInfos">
+                    <condition-list combine="and">
+                        <condition-expr field-name="partyId" from-field="userLogin.partyId"/>
+                        <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>
+                        <condition-expr field-name="approvalStatusId" value="IM_PENDING"/>
+                    </condition-list>
+                    <order-by field-name="productId"/>
+                </entity-condition>
+                <entity-condition entity-name="Product" list="products">
+                    <order-by field-name="productId"/>
+                </entity-condition>
+                <set field="userMap.checkUser" from-field="userLogin.userLoginId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <platform-specific>
+                                    <html><html-template location="component://product/template/imagemanagement/ShowPeopleApprove.ftl"/></html>
+                                </platform-specific>
+                                <screenlet title="${uiLabelMap.ImageManagementApprove}">
+                                    <include-form name="ImageApprove" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ListPeopleApproved">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageApprove"/>
+                <entity-condition entity-name="PartyRole" list="partyRoles">
+                    <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>
+                </entity-condition>
+                <entity-one entity-name="UserLogin" value-field="userLoginInfo">
+                    <field-map field-name="userLoginId" from-field="parameters.createdByUserLogin"/>
+                </entity-one>
+                <entity-condition entity-name="ContentApprovalProductContentAndInfo" list="contentApprovalProductContentAndInfos">
+                    <condition-list combine="and">
+                        <condition-expr field-name="partyId" from-field="userLoginInfo.partyId"/>
+                        <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>
+                        <condition-expr field-name="approvalStatusId" value="IM_PENDING"/>
+                    </condition-list>
+                    <order-by field-name="productId"/>
+                </entity-condition>
+                <entity-condition entity-name="Product" list="products">
+                    <order-by field-name="productId"/>
+                </entity-condition>
+                <set field="userMap.checkUser" from-field="parameters.createdByUserLogin"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <platform-specific>
+                                    <html><html-template location="component://product/template/imagemanagement/ShowPeopleApprove.ftl"/></html>
+                                </platform-specific>
+                                <screenlet title="${uiLabelMap.CommonApproved}">
+                                    <include-grid name="ListPeopleApproved" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageRejected">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageRejected"/>
+                <entity-condition entity-name="PartyRole" list="partyRoles">
+                    <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>
+                </entity-condition>
+                <entity-condition entity-name="ProductContentAndInfo" list="productContentAndInfos">
+                    <condition-list combine="and">
+                        <condition-expr field-name="statusId" value="IM_REJECTED"/>
+                        <condition-expr field-name="productContentTypeId" value="IMAGE"/>
+                        <condition-expr field-name="thruDate" operator="not-equals" from-field="nullField"/>
+                    </condition-list>
+                    <order-by field-name="productId"/>
+                </entity-condition>
+                <entity-condition entity-name="Product" list="products">
+                    <order-by field-name="productId"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.CommonRejected}">
+                                    <include-form name="ImageRejected" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ListPeopleRejected">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageApprove"/>
+                <entity-condition entity-name="PartyRole" list="partyRoles">
+                    <condition-expr field-name="roleTypeId" value="IMAGEAPPROVER"/>
+                </entity-condition>
+                <entity-condition entity-name="ProductContentAndInfo" list="productContentAndInfos">
+                    <condition-list combine="and">
+                        <condition-expr field-name="statusId" value="IM_REJECTED"/>
+                        <condition-expr field-name="productContentTypeId" value="IMAGE"/>
+                        <condition-expr field-name="createdByUserLogin" from-field="userLogin.userLoginId"/>
+                        <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
+                    </condition-list>
+                    <order-by field-name="productId"/>
+                </entity-condition>
+                <entity-condition entity-name="Product" list="products">
+                    <order-by field-name="productId"/>
+                </entity-condition>
+                <set field="userMap.checkUser" value="REJECTED"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <platform-specific>
+                                    <html><html-template location="component://product/template/imagemanagement/ShowPeopleApprove.ftl"/></html>
+                                </platform-specific>
+                                <screenlet title="${uiLabelMap.CommonRejected}">
+                                    <include-form name="ListPeopleRejected" location="component://product/widget/catalog/ImageManagementForms.xml"/>    
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageManage">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageManage"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.CommonManage}">
+                                    <include-form name="ImageManage" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ListImageManage">
+        <section>
+            <condition>
+                <not><if-empty field="parameters.productId"/></not>
+            </condition>
+            <actions>
+                <set field="userTabButtonImage" value="ImageManage"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-one entity-name="Product" value-field="product"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field="product"/></not>
+                                    </condition>
+                                    <widgets>
+                                        <label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>
+                                        <screenlet title="${uiLabelMap.CommonManage}">
+                                            <include-form name="ListImageManage" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                        </screenlet>
+                                        <screenlet title="${uiLabelMap.ImageManagementDefaultImage}">
+                                            <include-form name="ShowDefaultImage" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                        </screenlet>
+                                    </widgets>
+                                    <fail-widgets>
+                                        <label text="${uiLabelMap.ProductNoExistingProductsFound}"/>
+                                    </fail-widgets>
+                                </section>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+            <fail-widgets>
+                <section>
+                    <actions>
+                        <set field="userTabButtonImage" value="ImageManage"/>
+                        <!--<set field="errorMessage" value="There is no a selected product, please insert or select the product to view image(s)."/>-->
+                    </actions>
+                    <widgets>
+                        <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                            <decorator-section name="body">
+                                <section>
+                                    <condition>
+                                        <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                    </condition>
+                                    <widgets>
+                                        <screenlet title="${uiLabelMap.CommonManage}">
+                                            <include-form name="ImageManage" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                        </screenlet>
+                                    </widgets>
+                                    <fail-widgets>
+                                        <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                                    </fail-widgets>
+                                </section>
+                            </decorator-section>
+                        </decorator-screen>
+                    </widgets>
+                </section>
+            </fail-widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageFrames">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageManage"/>
+                <set field="currentFormName" value="ImageFrames"/>
+                <set field="statusForm" value="IM_PENDING"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.ImageManagementImageFrames}">
+                                    <include-form name="ImageFrames" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                    <platform-specific>
+                                        <html><html-template location="component://product/template/imagemanagement/ImageFrame.ftl"/></html>
+                                    </platform-specific>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="ImageCropping">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageManage"/>
+                <set field="currentFormName" value="ImageCropping"/>
+                <set field="statusForm" value="IM_PENDING"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.ImageManagementImageCropping}">
+                                    <include-form name="ImageCropping" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                    <platform-specific>
+                                        <html><html-template location="component://product/template/imagemanagement/ImageCrop.ftl"/></html>
+                                    </platform-specific>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+     <screen name="ImageRotating">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageManage"/>
+                <set field="currentFormName" value="ImageRotating"/>
+                <set field="statusForm" value="IM_PENDING"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.ImageManagementImageRotating}">
+                                    <platform-specific>
+                                        <html><html-template location="component://product/template/imagemanagement/ImageRotateButton.ftl"/></html>
+                                    </platform-specific>
+                                    <include-form name="ImageRotating" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                    <platform-specific>
+                                        <html><html-template location="component://product/template/imagemanagement/ImageRotating.ftl"/></html>
+                                    </platform-specific>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageShare">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageGallery"/>
+                <set field="currentFormName" value="ImageShare"/>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.ImageManagementShareImage}">
+                                    <include-form name="ImageShare" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                    <platform-specific>
+                                        <html><html-template location="component://product/template/imagemanagement/ImageShare.ftl"/></html>
+                                    </platform-specific>
+                                </screenlet>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageReplace">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageReplace"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.ImageManagementReplace}">
+                                    <include-form name="ProductImageReplace" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ListImageReplace">
+        <section>
+            <condition>
+                <not><if-empty field="parameters.productId"/></not>
+            </condition>
+            <actions>
+                <set field="userTabButtonImage" value="ImageReplace"/>
+                <set field="currentFormName" value="ListImageReplace"/>
+                <set field="statusForm" value="IM_APPROVED"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-one entity-name="Product" value-field="product"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field="product"/></not>
+                                    </condition>
+                                    <widgets>
+                                        <label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>
+                                        <container style="lefthalf">
+                                            <screenlet title="${uiLabelMap.ImageManagementChooseReplacementImage}">
+                                                <include-grid name="ListImageExist" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                            </screenlet>
+                                        </container>
+                                        <container style="righthalf">
+                                            <screenlet title="${uiLabelMap.ImageManagementChooseImageToReplace}">
+                                                <include-grid name="ListImageReplace" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                            </screenlet>
+                                        </container>
+                                        <container style="clear"/>
+                                        <screenlet title="${uiLabelMap.ImageManagementReplace}">
+                                            <include-form name="ImageReplace" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                        </screenlet>
+                                    </widgets>
+                                    <fail-widgets>
+                                        <label text="${uiLabelMap.ProductNoExistingProductsFound}"/>
+                                    </fail-widgets>
+                                </section>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                   </decorator-section>
+                </decorator-screen>
+            </widgets>
+            <fail-widgets>
+                <section>
+                    <actions>
+                        <set field="userTabButtonImage" value="ImageReplace"/>
+                        <!--<set field="errorMessage" value="There is no a selected product, please insert or select the product to view image(s)."/>-->
+                    </actions>
+                    <widgets>
+                        <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                            <decorator-section name="body">
+                                <section>
+                                    <condition>
+                                        <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                    </condition>
+                                    <widgets>
+                                        <screenlet title="${uiLabelMap.ImageManagementReplace}">
+                                            <include-form name="ProductImageReplace" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                        </screenlet>
+                                    </widgets>
+                                    <fail-widgets>
+                                        <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                                    </fail-widgets>
+                                </section>
+                            </decorator-section>
+                        </decorator-screen>
+                    </widgets>
+                </section>
+            </fail-widgets>
+        </section>
+    </screen>
+    
+    <screen name="ViewImage">
+        <section>
+            <widgets>
+                <image src="${parameters.drObjectInfo}"/>
+                <platform-specific>
+                    <html><html-template location="component://product/template/imagemanagement/ResizeImage.ftl"/></html>
+                </platform-specific>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ViewPreviewImage">
+        <section>
+            <actions>
+                <property-to-field resource="catalog" property="image.management.url" field="imageServerUrl"/>
+            </actions>
+            <widgets>
+                <image src="${imageServerUrl}/preview/previewImage.jpg"/>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="LookupImage">
+        <section>
+            <widgets>
+                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
+                    <decorator-section name="body">
+                        <include-grid name="ListLookupImage" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageRecentlyApproved">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageRecentlyApproved"/>
+                <script location="component://product/groovyScripts/catalog/imagemanagement/ImageRecentlyApproved.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/>
+                                    <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.ImageManagementRecentlyApproved}">
+                                    <platform-specific>
+                                        <html><html-template location="component://product/template/imagemanagement/ImageRecentlyApproved.ftl"/></html>
+                                    </platform-specific>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ListImageRecentlyApproved">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageRecentlyApproved"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${parameters.productId} : ${parameters.showDate}">
+                                    <include-grid name="ListImageRecentlyApproved" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="LookupImageFrame">
+        <section>
+            <widgets>
+                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
+                    <decorator-section name="body">
+                        <include-grid name="ListLookupImageFrame" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ImageResize">
+        <section>
+            <actions>
+                <set field="userTabButtonImage" value="ImageResize"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-one entity-name="Product" value-field="product"/>
+                <entity-condition entity-name="ProductContentAndInfo" list="productContentAndInfos">
+                    <condition-list combine="and">
+                        <condition-expr field-name="productId" from-field="parameters.productId"/>
+                        <condition-expr field-name="productContentTypeId" value="IMAGE"/>
+                        <!--<condition-expr field-name="statusId" value="IM_APPROVED"/>-->
+                    </condition-list>
+                </entity-condition>
+                <set field="parameters.contentIdAccos" from-field="productContentAndInfos[0].contentId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+                            </condition>
+                            <widgets>
+                                <!--<label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>-->
+                                <screenlet title="${uiLabelMap.ImageManagementThumbnailSizeExistingInProduct} : ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]">
+                                    <include-grid name="SizeListOfProduct" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                                <screenlet title="${uiLabelMap.ImageManagementResize}">
+                                    <include-form name="ImageResize" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label text="You do not have permission to access this page. (&quot;IMAGE_MANAGEMENT_ADMIN&quot; needed)"/>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>
diff --git a/framework/common/groovyScripts/GeoLocation.groovy b/framework/common/groovyScripts/GeoLocation.groovy
index 1c60e93..fb9fa27 100644
--- a/framework/common/groovyScripts/GeoLocation.groovy
+++ b/framework/common/groovyScripts/GeoLocation.groovy
@@ -1,23 +1,23 @@
-/*

- * 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.

- */

-

-if (geoPoint && geoPoint.elevationUomId) {

-    elevationUom = delegator.findOne("Uom", [uomId : geoPoint.elevationUomId], false)

-    context.elevationUomAbbr = elevationUom.abbreviation

-}

+/*
+ * 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.
+ */
+
+if (geoPoint && geoPoint.elevationUomId) {
+    elevationUom = delegator.findOne("Uom", [uomId : geoPoint.elevationUomId], false)
+    context.elevationUomAbbr = elevationUom.abbreviation
+}
diff --git a/framework/minilang/testdef/MinilangTests.xml b/framework/minilang/testdef/MinilangTests.xml
index 8cd5d88..bbada19 100644
--- a/framework/minilang/testdef/MinilangTests.xml
+++ b/framework/minilang/testdef/MinilangTests.xml
@@ -1,29 +1,29 @@
-<?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.

-  -->

-

-<test-suite suite-name="MinilangTests"

-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">

-

-    <test-case case-name="MiniLangUnitTests">

-        <junit-test-suite class-name="org.apache.ofbiz.minilang.test.MiniLangTests"/>

-    </test-case>

-

-</test-suite>

+<?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.
+  -->
+
+<test-suite suite-name="MinilangTests"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
+
+    <test-case case-name="MiniLangUnitTests">
+        <junit-test-suite class-name="org.apache.ofbiz.minilang.test.MiniLangTests"/>
+    </test-case>
+
+</test-suite>
diff --git a/framework/webtools/widget/StatsForms.xml b/framework/webtools/widget/StatsForms.xml
index ba1f392..efed4ca 100644
--- a/framework/webtools/widget/StatsForms.xml
+++ b/framework/webtools/widget/StatsForms.xml
@@ -1,64 +1,64 @@
-<?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.

--->

-

-<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

-        xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">

-

-    <grid name="ListStats" paginate-target="StatsSinceStart" separate-columns="true" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">

-        <field name="requestId" title="${uiLabelMap.WebtoolsStatsRequestId}"><display/></field>

-        <field name="startTime" title="${uiLabelMap.WebtoolsStatsStart}"><display/></field>

-        <field name="endTime" title="${uiLabelMap.WebtoolsStatsStop}"><display/></field>

-        <field name="lengthMins" title="${uiLabelMap.WebtoolsStatsMinutes}"><display/></field>

-        <field name="numberHits" title="${uiLabelMap.WebtoolsStatsHits}"><display/></field>

-        <field name="minTime" title="${uiLabelMap.WebtoolsStatsMin}"><display/></field>

-        <field name="avgTime" title="${uiLabelMap.WebtoolsStatsAvg}"><display/></field>

-        <field name="maxTime" title="${uiLabelMap.WebtoolsStatsMax}"><display/></field>

-        <field name="hitsPerMin" title="${uiLabelMap.WebtoolsStatsHitsPerMin}"><display/></field>

-        <field name="viewBins" title=" " widget-area-style="button-col">

-            <hyperlink description="${uiLabelMap.WebtoolsStatsViewBins}" target="StatBinsHistory">

-                <parameter param-name="statsId" from-field="requestId"/>

-                <parameter param-name="type" from-field="requestType"/>

-            </hyperlink>

-        </field>

-    </grid>

-

-    <grid name="ListRequestStats" extends="ListStats" list-name="requestList"/>

-    <grid name="ListEventStats" extends="ListStats" list-name="eventList"/>

-    <grid name="ListViewStats" extends="ListStats" list-name="viewList"/>

-    <grid name="ListRequestBins" extends="ListStats" list-name="requestList">

-        <field name="viewBins"><hidden/></field>

-    </grid>

-

-    <grid name="ListMetrics" list-name="metricsList" paginate-target="ViewMetrics"

-            header-row-style="header-row-2" default-table-style="basic-table light-grid">

-        <actions>

-            <service service-name="getAllMetrics" />

-        </actions>

-        <field name="name" title="${uiLabelMap.CommonName}"><display/></field>

-        <field name="serviceRate" title="${uiLabelMap.WebtoolsMetricsRate}"><display/></field>

-        <field name="threshold" title="${uiLabelMap.WebtoolsMetricsThreshold}"><display/></field>

-        <field name="totalEvents" title="${uiLabelMap.WebtoolsMetricsTotalEvents}"><display/></field>

-        <field name="resetMetric" title=" " widget-area-style="button-col">

-            <hyperlink description="${uiLabelMap.CommonReset}" target="ResetMetric">

-                <parameter param-name="name"/>

-            </hyperlink>

-        </field>

-    </grid>

-</forms>

+<?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.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
+
+    <grid name="ListStats" paginate-target="StatsSinceStart" separate-columns="true" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <field name="requestId" title="${uiLabelMap.WebtoolsStatsRequestId}"><display/></field>
+        <field name="startTime" title="${uiLabelMap.WebtoolsStatsStart}"><display/></field>
+        <field name="endTime" title="${uiLabelMap.WebtoolsStatsStop}"><display/></field>
+        <field name="lengthMins" title="${uiLabelMap.WebtoolsStatsMinutes}"><display/></field>
+        <field name="numberHits" title="${uiLabelMap.WebtoolsStatsHits}"><display/></field>
+        <field name="minTime" title="${uiLabelMap.WebtoolsStatsMin}"><display/></field>
+        <field name="avgTime" title="${uiLabelMap.WebtoolsStatsAvg}"><display/></field>
+        <field name="maxTime" title="${uiLabelMap.WebtoolsStatsMax}"><display/></field>
+        <field name="hitsPerMin" title="${uiLabelMap.WebtoolsStatsHitsPerMin}"><display/></field>
+        <field name="viewBins" title=" " widget-area-style="button-col">
+            <hyperlink description="${uiLabelMap.WebtoolsStatsViewBins}" target="StatBinsHistory">
+                <parameter param-name="statsId" from-field="requestId"/>
+                <parameter param-name="type" from-field="requestType"/>
+            </hyperlink>
+        </field>
+    </grid>
+
+    <grid name="ListRequestStats" extends="ListStats" list-name="requestList"/>
+    <grid name="ListEventStats" extends="ListStats" list-name="eventList"/>
+    <grid name="ListViewStats" extends="ListStats" list-name="viewList"/>
+    <grid name="ListRequestBins" extends="ListStats" list-name="requestList">
+        <field name="viewBins"><hidden/></field>
+    </grid>
+
+    <grid name="ListMetrics" list-name="metricsList" paginate-target="ViewMetrics"
+            header-row-style="header-row-2" default-table-style="basic-table light-grid">
+        <actions>
+            <service service-name="getAllMetrics" />
+        </actions>
+        <field name="name" title="${uiLabelMap.CommonName}"><display/></field>
+        <field name="serviceRate" title="${uiLabelMap.WebtoolsMetricsRate}"><display/></field>
+        <field name="threshold" title="${uiLabelMap.WebtoolsMetricsThreshold}"><display/></field>
+        <field name="totalEvents" title="${uiLabelMap.WebtoolsMetricsTotalEvents}"><display/></field>
+        <field name="resetMetric" title=" " widget-area-style="button-col">
+            <hyperlink description="${uiLabelMap.CommonReset}" target="ResetMetric">
+                <parameter param-name="name"/>
+            </hyperlink>
+        </field>
+    </grid>
+</forms>
diff --git a/plugins/birt/data/BirtMasterData.xml b/plugins/birt/data/BirtMasterData.xml
index 11a5e93..c3187da 100644
--- a/plugins/birt/data/BirtMasterData.xml
+++ b/plugins/birt/data/BirtMasterData.xml
@@ -1,47 +1,47 @@
-<?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>

-    <DataResource dataResourceId="DR_MASTER_EXAMPLE" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FORM_COMBINED" />

-    <ElectronicText dataResourceId="DR_MASTER_EXAMPLE">

-        <textData><![CDATA[<!--default domain form-->

-<form name="${masterContentId}_${contentId}" type="single" extends="${masterContentId}" extends-resource="component://birt/widget/birt/BirtMasterForms.xml">

-</form>]]>

-        </textData>

-    </ElectronicText>

-    <Content contentId="CTNT_MASTER_EXAMPLE" contentTypeId="REPORT_MASTER"  dataResourceId="DR_MASTER_EXAMPLE" statusId="CTNT_PUBLISHED" contentName="Example" description="Master Content for Example" />

-    <!-- Data retrieval will be done using perform find on entity Example-->

-    <ContentAttribute contentId="CTNT_MASTER_EXAMPLE" attrName="Entity" attrValue="Example"/>

-

-    <CustomMethod customMethodId="CM_FB_TURNOVER" customMethodTypeId="FLEXIBLE_BIRT" customMethodName="flexibleReportTurnOver" description="service to resolve invoice for turnover report domain"/>

-    <DataResource dataResourceId="DR_MASTER_TURNOVER" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FORM_COMBINED" />

-    <ElectronicText dataResourceId="DR_MASTER_TURNOVER">

-        <textData><![CDATA[<!--default domain form-->

-<form name="${masterContentId}_${contentId}" type="single" extends="${masterContentId}" extends-resource="component://birt/widget/birt/BirtMasterForms.xml">

-</form>]]>

-        </textData>

-    </ElectronicText>

-    <Content contentId="CTNT_MASTER_TURNOVER" customMethodId="CM_FB_TURNOVER" contentTypeId="REPORT_MASTER" dataResourceId="DR_MASTER_TURNOVER" statusId="CTNT_PUBLISHED" contentName="Turnover" description="Master Content for TURNOVER domain" />

-    <!-- Data retrieval will be done using two service calls. First the contentAttribute Service gives the service that will define which data and label will be retrieved,

-    and which filter and label are supported by the report design (default value will call the second service with "prepareField" suffix).

-    Second, the custom method gives the service to retrieve all data in the report design.

-    Here : flexibleReportTurnOverPrepareFields (customMethodName + "prepareFields") then flexibleReportTurnOver-->

-    <ContentAttribute contentId="CTNT_MASTER_TURNOVER" attrName="Service" attrValue="default"/>

-

+<?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>
+    <DataResource dataResourceId="DR_MASTER_EXAMPLE" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FORM_COMBINED" />
+    <ElectronicText dataResourceId="DR_MASTER_EXAMPLE">
+        <textData><![CDATA[<!--default domain form-->
+<form name="${masterContentId}_${contentId}" type="single" extends="${masterContentId}" extends-resource="component://birt/widget/birt/BirtMasterForms.xml">
+</form>]]>
+        </textData>
+    </ElectronicText>
+    <Content contentId="CTNT_MASTER_EXAMPLE" contentTypeId="REPORT_MASTER"  dataResourceId="DR_MASTER_EXAMPLE" statusId="CTNT_PUBLISHED" contentName="Example" description="Master Content for Example" />
+    <!-- Data retrieval will be done using perform find on entity Example-->
+    <ContentAttribute contentId="CTNT_MASTER_EXAMPLE" attrName="Entity" attrValue="Example"/>
+
+    <CustomMethod customMethodId="CM_FB_TURNOVER" customMethodTypeId="FLEXIBLE_BIRT" customMethodName="flexibleReportTurnOver" description="service to resolve invoice for turnover report domain"/>
+    <DataResource dataResourceId="DR_MASTER_TURNOVER" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FORM_COMBINED" />
+    <ElectronicText dataResourceId="DR_MASTER_TURNOVER">
+        <textData><![CDATA[<!--default domain form-->
+<form name="${masterContentId}_${contentId}" type="single" extends="${masterContentId}" extends-resource="component://birt/widget/birt/BirtMasterForms.xml">
+</form>]]>
+        </textData>
+    </ElectronicText>
+    <Content contentId="CTNT_MASTER_TURNOVER" customMethodId="CM_FB_TURNOVER" contentTypeId="REPORT_MASTER" dataResourceId="DR_MASTER_TURNOVER" statusId="CTNT_PUBLISHED" contentName="Turnover" description="Master Content for TURNOVER domain" />
+    <!-- Data retrieval will be done using two service calls. First the contentAttribute Service gives the service that will define which data and label will be retrieved,
+    and which filter and label are supported by the report design (default value will call the second service with "prepareField" suffix).
+    Second, the custom method gives the service to retrieve all data in the report design.
+    Here : flexibleReportTurnOverPrepareFields (customMethodName + "prepareFields") then flexibleReportTurnOver-->
+    <ContentAttribute contentId="CTNT_MASTER_TURNOVER" attrName="Service" attrValue="default"/>
+
 </entity-engine-xml>
\ No newline at end of file
diff --git a/plugins/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java b/plugins/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java
index 94456f9..078ea12 100644
--- a/plugins/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java
+++ b/plugins/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java
@@ -1,825 +1,825 @@
-/*******************************************************************************

- * 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

- * <p>

- * http://www.apache.org/licenses/LICENSE-2.0

- * <p>

- * 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.apache.ofbiz.birt.flexible;

-

-import java.io.File;

-import java.io.IOException;

-import java.io.RandomAccessFile;

-import java.nio.ByteBuffer;

-import java.nio.file.Files;

-import java.nio.file.Path;

-import java.nio.file.Paths;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.LinkedHashMap;

-import java.util.List;

-import java.util.Locale;

-import java.util.Map;

-

-import javax.xml.parsers.ParserConfigurationException;

-

-import org.apache.ofbiz.base.util.Debug;

-import org.apache.ofbiz.base.util.GeneralException;

-import org.apache.ofbiz.base.util.StringUtil;

-import org.apache.ofbiz.base.util.UtilMisc;

-import org.apache.ofbiz.base.util.UtilProperties;

-import org.apache.ofbiz.base.util.UtilValidate;

-import org.apache.ofbiz.base.util.UtilXml;

-import org.apache.ofbiz.base.util.string.FlexibleStringExpander;

-import org.apache.ofbiz.birt.BirtWorker;

-import org.apache.ofbiz.entity.Delegator;

-import org.apache.ofbiz.entity.GenericEntityException;

-import org.apache.ofbiz.entity.GenericValue;

-import org.apache.ofbiz.entity.condition.EntityCondition;

-import org.apache.ofbiz.entity.condition.EntityConditionList;

-import org.apache.ofbiz.entity.condition.EntityExpr;

-import org.apache.ofbiz.entity.condition.EntityOperator;

-import org.apache.ofbiz.entity.model.ModelEntity;

-import org.apache.ofbiz.entity.model.ModelField;

-import org.apache.ofbiz.entity.util.EntityListIterator;

-import org.apache.ofbiz.entity.util.EntityQuery;

-import org.apache.ofbiz.entity.util.EntityUtil;

-import org.apache.ofbiz.service.DispatchContext;

-import org.apache.ofbiz.service.GenericServiceException;

-import org.apache.ofbiz.service.LocalDispatcher;

-import org.apache.ofbiz.service.ModelService;

-import org.apache.ofbiz.service.ServiceUtil;

-import org.eclipse.birt.core.exception.BirtException;

-import org.eclipse.birt.core.framework.Platform;

-import org.eclipse.birt.report.engine.api.script.IReportContext;

-import org.eclipse.birt.report.model.api.DesignConfig;

-import org.eclipse.birt.report.model.api.DesignElementHandle;

-import org.eclipse.birt.report.model.api.DesignFileException;

-import org.eclipse.birt.report.model.api.IDesignEngine;

-import org.eclipse.birt.report.model.api.IDesignEngineFactory;

-import org.eclipse.birt.report.model.api.ReportDesignHandle;

-import org.eclipse.birt.report.model.api.SessionHandle;

-import org.eclipse.birt.report.model.api.SimpleMasterPageHandle;

-import org.eclipse.birt.report.model.api.SlotHandle;

-import org.eclipse.birt.report.model.api.VariableElementHandle;

-import org.eclipse.birt.report.model.api.activity.SemanticException;

-import org.eclipse.birt.report.model.elements.SimpleMasterPage;

-import org.w3c.dom.Document;

-import org.xml.sax.SAXException;

-

-import com.ibm.icu.util.ULocale;

-

-

-/**

- * Birt Services

- */

-

-public class BirtServices {

-

-    public static final String module = BirtServices.class.getName();

-    public static final String resource = "BirtUiLabels";

-    public static final String resource_error = "BirtErrorUiLabels";

-    public static final String resourceProduct = "BirtUiLabels";

-

-    /**

-     * Instantiate a new Flexible report, using the data given in parameters and <code>ReportDesignGenerator</code> class.

-     */

-    public static Map<String, Object> createFlexibleReport(DispatchContext dctx, Map<String, Object> context) {

-        ReportDesignGenerator rptGenerator;

-        try {

-            rptGenerator = new ReportDesignGenerator(context, dctx);

-        } catch (Exception e1) {

-            e1.printStackTrace();

-            return ServiceUtil.returnError(e1.getMessage());

-        }

-        try {

-            rptGenerator.buildReport();

-        } catch (Exception e) {

-            Debug.logError(e, module);

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        return ServiceUtil.returnSuccess();

-    }

-

-    @Deprecated

-    public static Map<String, Object> prepareFlexibleReportOptionFieldsFromEntity(DispatchContext dctx, Map<String, Object> context) {

-        String entityViewName = (String) context.get("entityViewName");

-        GenericValue userLogin = (GenericValue) context.get("userLogin");

-        List<String> listMultiFields = new ArrayList<String>();

-        Delegator delegator = dctx.getDelegator();

-        LocalDispatcher dispatcher = dctx.getDispatcher();

-        Map<String, Object> result = new HashMap<String, Object>();

-        Locale locale = (Locale) context.get("locale");

-

-        ModelEntity modelEntity = delegator.getModelEntity(entityViewName);

-        List<String> listFieldsEntity = modelEntity.getAllFieldNames();

-

-        for (String field : listFieldsEntity) {

-            listMultiFields.add(field);

-            ModelField mField = modelEntity.getField(field);

-            String fieldType = mField.getType();

-            String birtType = null;

-            try {

-                Map<String, Object> convertRes = dispatcher.runSync("convertFieldTypeToBirtType", UtilMisc.toMap("fieldType", fieldType, "userLogin", userLogin));

-                birtType = (String) convertRes.get("birtType");

-                if (UtilValidate.isEmpty(birtType)) {

-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorConversionFieldToBirtFailed", locale));

-                }

-            } catch (GenericServiceException e) {

-                e.printStackTrace();

-            }

-            // make more general when report forms have been made so too.

-            if (birtType.equalsIgnoreCase("date-time") || birtType.equalsIgnoreCase("date") || birtType.equalsIgnoreCase("time")) {

-                listMultiFields.add(field + "_fld0_op");

-                listMultiFields.add(field + "_fld0_value");

-                listMultiFields.add(field + "_fld1_op");

-                listMultiFields.add(field + "_fld1_value");

-            }

-        }

-        result.put("listMultiFields", listMultiFields);

-        return result;

-    }

-

-    /**

-     * Perform find data on given view/entity and return these into birt compatible format.

-     * This service is meant to be used as default for View/entity report design

-     *

-     */

-    public static Map<String, Object> callPerformFindFromBirt(DispatchContext dctx, Map<String, Object> context) {

-        LocalDispatcher dispatcher = dctx.getDispatcher();

-        IReportContext reportContext = (IReportContext) context.get("reportContext");

-        Locale locale = (Locale) context.get("locale");

-        GenericValue userLogin = (GenericValue) context.get("userLogin");

-        String entityViewName = (String) reportContext.getParameterValue("modelElementName");

-        Map<String, Object> inputFields = (Map<String, Object>) reportContext.getParameterValue("parameters");

-        Map<String, Object> resultPerformFind = new HashMap<String, Object>();

-        Map<String, Object> resultToBirt = null;

-        List<GenericValue> list = null;

-

-        if (UtilValidate.isEmpty(entityViewName)) {

-            entityViewName = (String) inputFields.get("modelElementName");

-            if (UtilValidate.isEmpty(entityViewName)) {

-                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorEntityViewNotFound", locale));

-            }

-        }

-

-        try {

-            resultPerformFind = dispatcher.runSync("performFind", UtilMisc.<String, Object>toMap("entityName", entityViewName, "inputFields", inputFields, "userLogin", userLogin, "noConditionFind", "Y", "locale", locale));

-            if (ServiceUtil.isError(resultPerformFind)) {

-                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorRunningPerformFind", locale));

-            }

-        } catch (GenericServiceException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-

-        EntityListIterator listIt = (EntityListIterator) resultPerformFind.get("listIt");

-        try {

-            if (UtilValidate.isNotEmpty(listIt)) {

-                list = listIt.getCompleteList();

-                listIt.close();

-            } else {

-                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorRunningPerformFind", locale));

-            }

-        } catch (GenericEntityException e) {

-            e.printStackTrace();

-        }

-        resultToBirt = ServiceUtil.returnSuccess();

-        resultToBirt.put("records", list);

-        return resultToBirt;

-    }

-

-    /**

-     * Analyse given master and create report design from its data

-     * Two cases are implemented :

-     * <ul>

-     *     <li>Entity : data retieval is based on a simple view/entity</li>

-     *     <li>Service : data retrieval is based on service</li>

-     * </ul>

-     */

-    public static Map<String, Object> createFlexibleReportFromMaster(DispatchContext dctx, Map<String, Object> context) {

-        Delegator delegator = dctx.getDelegator();

-        LocalDispatcher dispatcher = dctx.getDispatcher();

-        Locale locale = (Locale) context.get("locale");

-

-        String reportName = (String) context.get("reportName");

-        String masterContentId = (String) context.get("contentId");

-        String description = (String) context.get("description");

-        String writeFilters = (String) context.get("writeFilters");

-        GenericValue userLogin = (GenericValue) context.get("userLogin");

-

-        GenericValue masterContentAttribute = null;

-        try {

-            EntityCondition entityCondition = EntityCondition.makeCondition("contentId", masterContentId);

-            masterContentAttribute = EntityQuery.use(delegator).from("ContentAttribute").where(entityCondition).queryFirst();

-        } catch (GenericEntityException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-

-        if (masterContentAttribute == null) {

-            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorNoAttributeFound", locale));

-        }

-        String attrName = masterContentAttribute.getString("attrName");

-        String reportContentId;

-        if (attrName.equalsIgnoreCase("Entity")) {

-            String entityViewName = masterContentAttribute.getString("attrValue");

-                ModelEntity modelEntity = delegator.getModelEntity(entityViewName);

-                if (modelEntity == null) {

-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorEntityViewNotExist", locale) + " " + entityViewName);

-                }

-            try {

-                Map<String, Object> resultContent = dispatcher.runSync("createFlexibleReportFromMasterEntityWorkflow", UtilMisc.toMap("entityViewName", entityViewName, "reportName", reportName, "description", description, "writeFilters", writeFilters, "masterContentId", masterContentId, "userLogin", userLogin, "locale", locale));

-                if(ServiceUtil.isError(resultContent)) {

-                    return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultContent));

-                }

-                reportContentId = (String) resultContent.get("contentId");

-            } catch (GenericServiceException e) {

-                e.printStackTrace();

-                return ServiceUtil.returnError(e.getMessage());

-            }

-        } else if (attrName.equalsIgnoreCase("Service")) {

-            String serviceName = masterContentAttribute.getString("attrValue");

-            try {

-                Map<String, Object> resultContent = dispatcher.runSync("createFlexibleReportFromMasterServiceWorkflow", UtilMisc.toMap("serviceName", serviceName, "reportName", reportName, "description", description, "writeFilters", writeFilters, "masterContentId", masterContentId, "userLogin", userLogin, "locale", locale));

-                if (ServiceUtil.isError(resultContent)) {

-                    return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultContent));

-                }

-                reportContentId = (String) resultContent.get("contentId");

-            } catch (GenericServiceException e) {

-                e.printStackTrace();

-                return ServiceUtil.returnError(e.getMessage());

-            }

-        } else {

-            // could create other workflows. WebService? Does it need to be independent from Service workflow?

-            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCannotDetermineDataSource", locale));

-        }

-

-        // prepare report form to display to allow override

-        String textForm;

-        Map<String, Object> resultFormDisplay;

-        try {

-            resultFormDisplay = dispatcher.runSync("prepareFlexibleReportSearchFormToEdit", UtilMisc.toMap("reportContentId", reportContentId, "userLogin", userLogin, "locale", locale));

-            textForm = (String) resultFormDisplay.get("textForm");

-        } catch (GenericServiceException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCreatingDefaultSearchForm", locale).concat(": ").concat(e.getMessage()));

-        }

-

-        Map<String, Object> result = ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "BirtFlexibleReportSuccessfullyGenerated", locale).concat(" ").concat(reportName));

-        result.put("textForm", textForm);

-        result.put("reportContentId", reportContentId);

-        return result;

-    }

-

-    // I'm not a big fan of how I did the createFormForDisplay / overrideReportForm. Could probably be improved using a proper formForReport object or something similar.

-

-    /**

-     * Update search form of a report design

-     */

-    public static Map<String, Object> overrideReportForm(DispatchContext dctx, Map<String, Object> context) {

-        LocalDispatcher dispatcher = dctx.getDispatcher();

-        Delegator delegator = dctx.getDelegator();

-        Locale locale = (Locale) context.get("locale");

-        String reportContentId = (String) context.get("reportContentId");

-        String overrideFilters = (String) context.get("overrideFilters");

-        GenericValue userLogin = (GenericValue) context.get("userLogin");

-

-        // safety check : do not accept "${groovy", "${bsh" and "javascript"

-        String overideFiltersNoWhiteSpace = overrideFilters.replaceAll("\\s", "");

-        if (overideFiltersNoWhiteSpace.contains("${groovy:") || overideFiltersNoWhiteSpace.contains("${bsh:") || overideFiltersNoWhiteSpace.contains("javascript:")) {

-            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorUnauthorisedCharacter", locale));

-        }

-

-        try {

-            GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", reportContentId).queryOne();

-            String dataResourceId = content.getString("dataResourceId");

-            StringBuffer newForm = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <forms xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://ofbiz.apache.org/dtds/widget-form.xsd\">");

-            newForm.append(overrideFilters);

-            newForm.append("</forms>");

-            Document xmlForm = UtilXml.readXmlDocument(newForm.toString());

-            dispatcher.runSync("updateElectronicTextForm", UtilMisc.toMap("dataResourceId", dataResourceId, "textData", UtilXml.writeXmlDocument(xmlForm), "userLogin", userLogin, "locale", locale));

-        } catch (GeneralException | SAXException | ParserConfigurationException | IOException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "BirtSearchFormSuccessfullyOverridde", locale));

-    }

-

-    /**

-     * Create report design from View/Entity master report

-     */

-    public static Map<String, Object> createFlexibleReportFromMasterEntityWorkflow(DispatchContext dctx, Map<String, Object> context) {

-        LocalDispatcher dispatcher = dctx.getDispatcher();

-        Delegator delegator = dctx.getDelegator();

-        Locale locale = (Locale) context.get("locale");

-        String writeFilters = (String) context.get("writeFilters");

-        GenericValue userLogin = (GenericValue) context.get("userLogin");

-        String entityViewName = (String) context.get("entityViewName");

-

-        ModelEntity modelEntity = delegator.getModelEntity(entityViewName);

-        String contentId = null;

-        Map<String, Object> result = ServiceUtil.returnSuccess();

-        try {

-            Map<String, Object> resultMapsForGeneration = dispatcher.runSync("prepareFlexibleReportFieldsFromEntity", UtilMisc.toMap("modelEntity", modelEntity, "userLogin", userLogin, "locale", locale));

-            if (ServiceUtil.isError(resultMapsForGeneration)) {

-                return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultMapsForGeneration));

-            }

-            Map<String, String> dataMap = (Map<String, String>) resultMapsForGeneration.get("dataMap");

-            Map<String, String> fieldDisplayLabels = null;

-            if (UtilValidate.isNotEmpty(resultMapsForGeneration.get("fieldDisplayLabels"))) {

-                fieldDisplayLabels = (Map<String, String>) resultMapsForGeneration.get("fieldDisplayLabels");

-            }

-            Map<String, String> filterMap = null;

-            if (UtilValidate.isNotEmpty(resultMapsForGeneration.get("filterMap"))) {

-                filterMap = (Map<String, String>) resultMapsForGeneration.get("filterMap");

-            }

-            Map<String, String> filterDisplayLabels = null;

-            if (UtilValidate.isNotEmpty(resultMapsForGeneration.get("filterDisplayLabels"))) {

-                filterDisplayLabels = (Map<String, String>) resultMapsForGeneration.get("filterDisplayLabels");

-            }

-            contentId = BirtWorker.recordReportContent(delegator, dispatcher, context);

-            // callPerformFindFromBirt is the customMethod for Entity workflow

-            String rptDesignFileName = BirtUtil.resolveRptDesignFilePathFromContent(delegator, contentId);

-            GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne();

-            String customMethodId = content.getString("customMethodId");

-            if (UtilValidate.isEmpty(customMethodId)) customMethodId = "CM_FB_PERFORM_FIND";

-            GenericValue customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", customMethodId).cache().queryOne();

-            if (customMethod == null) {

-                return ServiceUtil.returnError("CustomMethod not exist : " + customMethodId); //todo labelise

-            }

-            result = dispatcher.runSync("createFlexibleReport", UtilMisc.toMap(

-                    "locale", locale,

-                    "dataMap", dataMap,

-                    "userLogin", userLogin,

-                    "filterMap", filterMap,

-                    "serviceName", customMethod.get("customMethodName"),

-                    "writeFilters", writeFilters,

-                    "rptDesignName", rptDesignFileName,

-                    "fieldDisplayLabels", fieldDisplayLabels,

-                    "filterDisplayLabels", filterDisplayLabels));

-            if (ServiceUtil.isError(result)) {

-                return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));

-            }

-        } catch (GeneralException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        result.put("contentId", contentId);

-        return result;

-    }

-

-    /**

-     * Create report design from service master report

-     */

-    public static Map<String, Object> createFlexibleReportFromMasterServiceWorkflow(DispatchContext dctx, Map<String, Object> context) {

-        LocalDispatcher dispatcher = dctx.getDispatcher();

-        Delegator delegator = dctx.getDelegator();

-        Locale locale = (Locale) context.get("locale");

-        String writeFilters = (String) context.get("writeFilters");

-        String serviceName = (String) context.get("serviceName");

-        GenericValue userLogin = (GenericValue) context.get("userLogin");

-        String masterContentId = (String) context.get("masterContentId");

-        String contentId = null;

-        Map<String, Object> result = ServiceUtil.returnSuccess();

-

-        try {

-            GenericValue masterContent = EntityQuery.use(delegator).from("Content").where("contentId", masterContentId).cache().queryOne();

-            String customMethodId = masterContent.getString("customMethodId");

-            if (UtilValidate.isEmpty(customMethodId)) {

-                throw new GeneralException("The master content " + masterContentId + " haven't a customMethod");

-            }

-            GenericValue customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", customMethodId).cache().queryOne();

-            if (customMethod == null) {

-                return ServiceUtil.returnError("CustomMethod not exist : " + customMethodId); //todo labelise

-            }

-            String customMethodName = (String) customMethod.getString("customMethodName");

-            if ("default".equalsIgnoreCase(serviceName)) {

-                serviceName = customMethodName + "PrepareFields";

-            }

-            try {

-                ModelService modelService = dctx.getModelService(serviceName);

-            } catch (GenericServiceException e) {

-                return ServiceUtil.returnError("No service define with name " + serviceName); //TODO labelise

-            }

-            contentId = BirtWorker.recordReportContent(delegator, dispatcher, context);

-            String rptDesignFileName = BirtUtil.resolveRptDesignFilePathFromContent(delegator, contentId);

-            Map<String, Object> resultService = dispatcher.runSync(serviceName, UtilMisc.toMap("locale", locale, "userLogin", userLogin));

-            Map<String, String> dataMap = (Map<String, String>) resultService.get("dataMap");

-            Map<String, String> filterMap = (Map<String, String>) resultService.get("filterMap");

-            Map<String, String> fieldDisplayLabels = (Map<String, String>) resultService.get("fieldDisplayLabels");

-            Map<String, String> filterDisplayLabels = (Map<String, String>) resultService.get("filterDisplayLabels");

-            Map<String, Object> resultGeneration = dispatcher.runSync("createFlexibleReport", UtilMisc.toMap(

-                    "locale", locale,

-                    "dataMap", dataMap,

-                    "userLogin", userLogin,

-                    "filterMap", filterMap,

-                    "serviceName", customMethodName,

-                    "writeFilters", writeFilters,

-                    "rptDesignName", rptDesignFileName,

-                    "fieldDisplayLabels", fieldDisplayLabels,

-                    "filterDisplayLabels", filterDisplayLabels));

-            if (ServiceUtil.isError(resultGeneration)) {

-                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCreatingFlexibleReport", locale));

-            }

-        } catch (GeneralException e) {

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        result.put("contentId", contentId);

-        return result;

-    }

-

-    /**

-     * Define which data fields and its label, filter fields and label that will be supported by the View/Entity report design

-     */

-    public static Map<String, Object> prepareFlexibleReportFieldsFromEntity(DispatchContext dctx, Map<String, Object> context) {

-        Locale locale = (Locale) context.get("locale");

-        ModelEntity modelEntity = (ModelEntity) context.get("modelEntity");

-

-        Map<String, String> dataMap = new HashMap<String, String>();

-        Map<String, String> fieldDisplayLabels = new HashMap<String, String>();

-        LinkedHashMap<String, String> filterMap = new LinkedHashMap<String, String>();

-        LinkedHashMap<String, String> filterDisplayLabels = new LinkedHashMap<String, String>();

-

-        List<String> listEntityFields = modelEntity.getAllFieldNames();

-        Map<Object, Object> uiLabelMap = new HashMap<Object, Object>();

-        final String[] resourceGlob = {"OrderUiLabels", "ProductUiLabels", "PartyUiLabels", "ContentUiLabels", "AccountingUiLabels", "CommonUiLabels", "BirtUiLabels"};

-        for (String res : resourceGlob) {

-            uiLabelMap.putAll(UtilProperties.getProperties(res, locale));

-        }

-

-        List<String> excludeFields = modelEntity.getAutomaticFieldNames();

-        for (String field : listEntityFields) {

-            ModelField mField = modelEntity.getField(field);

-            //ignore stamps fields

-            if (excludeFields.contains(mField.getName())) continue;

-            dataMap.put(field, mField.getType());

-

-            String localizedName = null;

-            String interpretedFieldName = null;

-            FlexibleStringExpander.getInstance(mField.getDescription()).expandString(context);

-            String titleFieldName = "FormFieldTitle_".concat(field);

-            localizedName = (String) uiLabelMap.get(titleFieldName);

-            if (UtilValidate.isEmpty(localizedName) || localizedName.equals(titleFieldName)) {

-                interpretedFieldName = FlexibleStringExpander.getInstance(field).expandString(context);

-                fieldDisplayLabels.put(field, interpretedFieldName);

-            } else {

-                fieldDisplayLabels.put(field, localizedName);

-            }

-

-            List<String> fieldTypeWithRangeList = UtilMisc.toList("date", "date-time", "time", "floating-point", "currency-amount", "numeric");

-            if (fieldTypeWithRangeList.contains(mField.getType())) {

-                filterMap.put(field.concat("_fld0_value"), mField.getType());

-                filterMap.put(field.concat("_fld0_op"), "short-varchar");

-                filterMap.put(field.concat("_fld1_value"), mField.getType());

-                filterMap.put(field.concat("_fld1_op"), "short-varchar");

-                filterDisplayLabels.put(field.concat("_fld0_value"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindFieldOptionValue0", locale)));

-                filterDisplayLabels.put(field.concat("_fld0_op"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindFieldOptionValue0", locale).concat(UtilProperties.getMessage(resource, "BirtFindCompareOperator", locale))));

-                filterDisplayLabels.put(field.concat("_fld1_value"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindFieldOptionValue1", locale)));

-                filterDisplayLabels.put(field.concat("_fld1_op"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindFieldOptionValue1", locale).concat(UtilProperties.getMessage(resource, "BirtFindCompareOperator", locale))));

-            } else { // remaining types need 4 fields (fld0-1_op-value)

-                filterMap.put(field, mField.getType());

-                filterMap.put(field.concat("_op"), "short-varchar");

-                filterDisplayLabels.put(field, fieldDisplayLabels.get(field));

-                filterDisplayLabels.put(field.concat("_op"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindCompareOperator", locale)));

-            }

-        }

-        Map<String, Object> result = ServiceUtil.returnSuccess();

-        result.put("dataMap", dataMap);

-        if (UtilValidate.isNotEmpty(fieldDisplayLabels)) {

-            result.put("fieldDisplayLabels", fieldDisplayLabels);

-        }

-        if (UtilValidate.isNotEmpty(filterMap)) {

-            result.put("filterMap", filterMap);

-        }

-        if (UtilValidate.isNotEmpty(filterDisplayLabels)) {

-            result.put("filterDisplayLabels", filterDisplayLabels);

-        }

-        return result;

-    }

-

-    /**

-     * Prepare and return search form of a report design

-     */

-    public static Map<String, Object> createFormForDisplay(DispatchContext dctx, Map<String, Object> context) {

-        String reportContentId = (String) context.get("reportContentId");

-        Delegator delegator = dctx.getDelegator();

-        Map<String, Object> result = ServiceUtil.returnSuccess();

-

-        String textData = null;

-        try {

-            GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", reportContentId).cache().queryOne();

-            String dataResourceId = content.getString("dataResourceId");

-            GenericValue electronicText = EntityQuery.use(delegator).from("ElectronicText").where("dataResourceId", dataResourceId).cache().queryOne();

-            textData = electronicText.getString("textData");

-        } catch (GenericEntityException e) {

-            return ServiceUtil.returnError(e.getMessage());

-        }

-

-        if (Debug.infoOn()) Debug.logInfo(textData, module);

-        textData = textData.substring(textData.indexOf("<form "), textData.length());

-        if (textData.contains("</form>")) {

-            textData = textData.substring(0, textData.indexOf("</form>") + 7);

-        } else {

-            textData = textData.substring(0, textData.indexOf("/>") + 2);

-        }

-        textData = StringUtil.replaceString(textData, "$", "&#36;");

-        result.put("textForm", textData);

-        return result;

-    }

-

-    /**

-     * delete all non-master report design

-     */

-    public static Map<String, Object> deleteAllReports(DispatchContext dctx, Map<String, Object> context) {

-        Delegator delegator = dctx.getDelegator();

-        LocalDispatcher dispatcher = dctx.getDispatcher();

-        Locale locale = (Locale) context.get("locale");

-        GenericValue userLogin = (GenericValue) context.get("userLogin");

-

-        List<String> listContentId = null;

-        List<GenericValue> listContent = null;

-        EntityCondition entityConditionContent = EntityCondition.makeCondition("contentTypeId", "FLEXIBLE_REPORT");

-        try {

-            listContent = EntityQuery.use(delegator).from("Content").where(entityConditionContent).select("contentId").queryList();

-        } catch (GenericEntityException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        if (UtilValidate.isEmpty(listContent)) {

-            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorNoFlexibleReportToDelete", locale));

-        }

-        listContentId = EntityUtil.getFieldListFromEntityList(listContent, "contentId", true);

-

-        try {

-            for (String contentId : listContentId) {

-                Map<String, Object> returnMap = dispatcher.runSync("deleteFlexibleReport", UtilMisc.toMap("contentId", contentId, "userLogin", userLogin, "locale", locale));

-                ServiceUtil.isError(returnMap);

-            }

-        } catch (GenericServiceException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "BirtFlexibleReportsSuccessfullyDeleted", locale));

-    }

-

-    /**

-     * Delete a flexible report design

-     */

-    public static Map<String, Object> deleteFlexibleReport(DispatchContext dctx, Map<String, Object> context) {

-        Delegator delegator = dctx.getDelegator();

-        LocalDispatcher dispatcher = dctx.getDispatcher();

-        Locale locale = (Locale) context.get("locale");

-        GenericValue userLogin = (GenericValue) context.get("userLogin");

-        String contentId = (String) context.get("contentId");

-

-        List<GenericValue> listContentRpt = null;

-        List<GenericValue> listRptDesignFileGV = null;

-        String contentIdRpt;

-        try {

-            listContentRpt = EntityQuery.use(delegator).from("ContentAssoc").where("contentId", contentId).select("contentIdTo").queryList();

-            contentIdRpt = listContentRpt.get(0).getString("contentIdTo");

-            List<EntityExpr> listConditions = UtilMisc.toList(EntityCondition.makeCondition("contentTypeId", EntityOperator.EQUALS, "RPTDESIGN"), EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentIdRpt));

-            EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(listConditions, EntityOperator.AND);

-            listRptDesignFileGV = EntityQuery.use(delegator).from("ContentDataResourceView").where(ecl).select("drObjectInfo").queryList();

-        } catch (GenericEntityException e1) {

-            e1.printStackTrace();

-            return ServiceUtil.returnError(e1.getMessage());

-        }

-        if (listRptDesignFileGV.size() > 1) {

-            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorUnexpectedNumberReportToDelete", locale));

-        }

-        List<String> listRptDesignFile = EntityUtil.getFieldListFromEntityList(listRptDesignFileGV, "drObjectInfo", false);

-        String rptfileName = listRptDesignFile.get(0);

-        Path path = Paths.get(rptfileName);

-        try {

-            if (! Files.deleteIfExists(path)) {

-                ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCannotLocateReportFile", locale));

-            }

-        } catch (IOException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        try {

-            delegator.removeByAnd("ContentAttribute", UtilMisc.toMap("contentId", contentId));

-            dispatcher.runSync("removeContentAndRelated", UtilMisc.toMap("contentId", contentId, "userLogin", userLogin, "locale", locale));

-            dispatcher.runSync("removeContentAndRelated", UtilMisc.toMap("contentId", contentIdRpt, "userLogin", userLogin, "locale", locale));

-        } catch (GenericServiceException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        } catch (GenericEntityException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "BirtFlexibleReportSuccessfullyDeleted", locale));

-    }

-

-    /**

-     * Update birt rptdesign file from uploaded one.

-     * <p>This will update only STYLES, BODY, MASTERPAGE AND CUBES from existing rptdesign with uploaded ones.</p>

-     *

-     */

-    public static Map<String, Object> uploadRptDesign(DispatchContext dctx, Map<String, Object> context) {

-        String dataResourceId = (String) context.get("dataResourceIdRpt");

-        Locale locale = (Locale) context.get("locale");

-        Delegator delegator = dctx.getDelegator();

-        Map<String, Object> result = null;

-        List<String> listSuccessMessage = new ArrayList<String>();

-

-        // the idea is to allow only design to be uploaded. We use the stored file and add the new design from the uploaded file within.

-        DesignConfig config = new DesignConfig();

-        IDesignEngine engine = null;

-        try {

-            Platform.startup();

-            IDesignEngineFactory factory = (IDesignEngineFactory) Platform.createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY);

-            engine = factory.createDesignEngine(config);

-        } catch (Exception e) {

-            e.printStackTrace();

-        }

-        SessionHandle session = engine.newSessionHandle(ULocale.forLocale(locale));

-

-        // get old file to restore dataset and datasource

-        ByteBuffer newRptDesignBytes = (ByteBuffer) context.get("uploadRptDesign");

-        if (newRptDesignBytes == null) {

-            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCannotFindUploadedFile", locale));

-        }

-

-        GenericValue dataResource = null;

-        try {

-            dataResource = EntityQuery.use(delegator).from("DataResource").where("dataResourceId", dataResourceId).queryOne();

-        } catch (GenericEntityException e1) {

-            e1.printStackTrace();

-            return ServiceUtil.returnError(e1.getMessage());

-        }

-        String rptDesignName = dataResource.getString("objectInfo");

-        // start Birt API platfrom

-        try {

-            Platform.startup();

-        } catch (BirtException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError("Cannot start Birt platform");

-        }

-

-        // get database design

-        ReportDesignHandle designStored;

-        try {

-            designStored = session.openDesign(rptDesignName);

-        } catch (DesignFileException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-

-        // check if design stored already has a body and delete it to avoid conflicts (taking into account only newly designed body)

-        if (UtilValidate.isNotEmpty(designStored.getBody())) {

-            SlotHandle bodyStored = designStored.getBody();

-

-            Iterator<DesignElementHandle> iter = bodyStored.iterator();

-            while (iter.hasNext()) {

-                try {

-                    iter.remove();

-                } catch (Exception e) {

-                    e.printStackTrace();

-                    return ServiceUtil.returnError(e.getMessage());

-                }

-            }

-        }

-

-        // NEED TO COPY STYLES, BODY, MASTERPAGE AND CUBES; existing elements (in case I missed one):

-        //[styles, parameters, dataSources, dataSets, pageSetup, components, body, scratchPad, templateParameterDefinitions, cubes, themes]

-        // get user design

-        String nameTempRpt = rptDesignName.substring(0, rptDesignName.lastIndexOf('.')).concat("_TEMP_.rptdesign");

-        File file = new File(nameTempRpt);

-        RandomAccessFile out;

-        ReportDesignHandle designFromUser;

-        try {

-            out = new RandomAccessFile(file, "rw");

-            out.write(newRptDesignBytes.array());

-            out.close();

-            designFromUser = session.openDesign(nameTempRpt);

-            // user file is deleted straight away to prevent the use of the report as script entry (security)

-            Path path = Paths.get(nameTempRpt);

-            Files.deleteIfExists(path);

-        } catch (Exception e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-

-        //copy cube

-        SlotHandle cubesFromUser = designFromUser.getCubes();

-        Iterator<DesignElementHandle> iterCube = cubesFromUser.iterator();

-

-        while (iterCube.hasNext()) {

-            DesignElementHandle item = (DesignElementHandle) iterCube.next();

-            DesignElementHandle copy = item.copy().getHandle(item.getModule());

-            try {

-                designStored.getCubes().add(copy);

-            } catch (Exception e) {

-                e.printStackTrace();

-                return ServiceUtil.returnError(e.getMessage());

-            }

-        }

-

-        // copy body

-        SlotHandle bodyFromUser = designFromUser.getBody();

-        Iterator<DesignElementHandle> iter = bodyFromUser.iterator();

-

-        while (iter.hasNext()) {

-            DesignElementHandle item = (DesignElementHandle) iter.next();

-            DesignElementHandle copy = item.copy().getHandle(item.getModule());

-            try {

-                designStored.getBody().add(copy);

-            } catch (Exception e) {

-                e.printStackTrace();

-                return ServiceUtil.returnError(e.getMessage());

-            }

-        }

-

-        // deleting simple master page from design stored

-        try {

-            List<DesignElementHandle> listMasterPagesStored = designStored.getMasterPages().getContents();

-            for (Object masterPage : listMasterPagesStored) {

-                if (masterPage instanceof SimpleMasterPageHandle) {

-                    designStored.getMasterPages().drop((DesignElementHandle) masterPage);

-                }

-            }

-

-            // adding simple master page => tous ces casts et autres instanceof... c'est laid, mais c'est tellement galère que quand je trouve une solution qui marche... :s

-            List<DesignElementHandle> listMasterPages = designFromUser.getMasterPages().getContents();

-            for (DesignElementHandle masterPage : listMasterPages) {

-                if (masterPage instanceof SimpleMasterPageHandle) {

-                    designStored.getMasterPages().add((SimpleMasterPage) ((SimpleMasterPageHandle) masterPage).copy());

-                }

-            }

-        } catch (Exception e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-

-        // page variables

-        List<VariableElementHandle> pageVariablesUser = designFromUser.getPageVariables();

-        for (VariableElementHandle pageVariable : pageVariablesUser) {

-            try {

-                designStored.setPageVariable(pageVariable.getName(), pageVariable.getPropertyBindingExpression(pageVariable.getName()));

-            } catch (SemanticException e) {

-                e.printStackTrace();

-                return ServiceUtil.returnError(e.getMessage());

-            }

-        }

-

-        // copy styles

-        SlotHandle stylesFromUser = designFromUser.getStyles();

-        SlotHandle stylesStored = designStored.getStyles();

-

-        // getting style names from stored report

-        List<String> listStyleNames = new ArrayList<String>();

-        Iterator<DesignElementHandle> iterStored = stylesStored.iterator();

-        while (iterStored.hasNext()) {

-            DesignElementHandle item = (DesignElementHandle) iterStored.next();

-            listStyleNames.add(item.getName());

-        }

-

-        Iterator<DesignElementHandle> iterUser = stylesFromUser.iterator();

-

-        // adding to styles those which are not already present

-        while (iterUser.hasNext()) {

-            DesignElementHandle item = (DesignElementHandle) iterUser.next();

-            if (! listStyleNames.contains(item.getName())) {

-                DesignElementHandle copy = item.copy().getHandle(item.getModule());

-                try {

-                    designStored.getStyles().add(copy);

-                } catch (Exception e) {

-                    e.printStackTrace();

-                    return ServiceUtil.returnError(e.getMessage());

-                }

-            }

-        }

-

-        try {

-            designStored.saveAs(rptDesignName);

-        } catch (IOException e) {

-            e.printStackTrace();

-            return ServiceUtil.returnError(e.getMessage());

-        }

-        designFromUser.close();

-        designStored.close();

-        if (Debug.infoOn()) Debug.logInfo("####### Design uploaded: ".concat(rptDesignName), module);

-

-        // should we as a secondary safety precaution delete any file finishing with _TEMP_.rptdesign?

-        listSuccessMessage.add(UtilProperties.getMessage(resource, "BirtFlexibleRptDesignSuccessfullyUploaded", locale));

-        result = ServiceUtil.returnSuccess(listSuccessMessage);

-        return result;

-    }

-

+/*******************************************************************************
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.apache.ofbiz.birt.flexible;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.ofbiz.base.util.Debug;
+import org.apache.ofbiz.base.util.GeneralException;
+import org.apache.ofbiz.base.util.StringUtil;
+import org.apache.ofbiz.base.util.UtilMisc;
+import org.apache.ofbiz.base.util.UtilProperties;
+import org.apache.ofbiz.base.util.UtilValidate;
+import org.apache.ofbiz.base.util.UtilXml;
+import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
+import org.apache.ofbiz.birt.BirtWorker;
+import org.apache.ofbiz.entity.Delegator;
+import org.apache.ofbiz.entity.GenericEntityException;
+import org.apache.ofbiz.entity.GenericValue;
+import org.apache.ofbiz.entity.condition.EntityCondition;
+import org.apache.ofbiz.entity.condition.EntityConditionList;
+import org.apache.ofbiz.entity.condition.EntityExpr;
+import org.apache.ofbiz.entity.condition.EntityOperator;
+import org.apache.ofbiz.entity.model.ModelEntity;
+import org.apache.ofbiz.entity.model.ModelField;
+import org.apache.ofbiz.entity.util.EntityListIterator;
+import org.apache.ofbiz.entity.util.EntityQuery;
+import org.apache.ofbiz.entity.util.EntityUtil;
+import org.apache.ofbiz.service.DispatchContext;
+import org.apache.ofbiz.service.GenericServiceException;
+import org.apache.ofbiz.service.LocalDispatcher;
+import org.apache.ofbiz.service.ModelService;
+import org.apache.ofbiz.service.ServiceUtil;
+import org.eclipse.birt.core.exception.BirtException;
+import org.eclipse.birt.core.framework.Platform;
+import org.eclipse.birt.report.engine.api.script.IReportContext;
+import org.eclipse.birt.report.model.api.DesignConfig;
+import org.eclipse.birt.report.model.api.DesignElementHandle;
+import org.eclipse.birt.report.model.api.DesignFileException;
+import org.eclipse.birt.report.model.api.IDesignEngine;
+import org.eclipse.birt.report.model.api.IDesignEngineFactory;
+import org.eclipse.birt.report.model.api.ReportDesignHandle;
+import org.eclipse.birt.report.model.api.SessionHandle;
+import org.eclipse.birt.report.model.api.SimpleMasterPageHandle;
+import org.eclipse.birt.report.model.api.SlotHandle;
+import org.eclipse.birt.report.model.api.VariableElementHandle;
+import org.eclipse.birt.report.model.api.activity.SemanticException;
+import org.eclipse.birt.report.model.elements.SimpleMasterPage;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import com.ibm.icu.util.ULocale;
+
+
+/**
+ * Birt Services
+ */
+
+public class BirtServices {
+
+    public static final String module = BirtServices.class.getName();
+    public static final String resource = "BirtUiLabels";
+    public static final String resource_error = "BirtErrorUiLabels";
+    public static final String resourceProduct = "BirtUiLabels";
+
+    /**
+     * Instantiate a new Flexible report, using the data given in parameters and <code>ReportDesignGenerator</code> class.
+     */
+    public static Map<String, Object> createFlexibleReport(DispatchContext dctx, Map<String, Object> context) {
+        ReportDesignGenerator rptGenerator;
+        try {
+            rptGenerator = new ReportDesignGenerator(context, dctx);
+        } catch (Exception e1) {
+            e1.printStackTrace();
+            return ServiceUtil.returnError(e1.getMessage());
+        }
+        try {
+            rptGenerator.buildReport();
+        } catch (Exception e) {
+            Debug.logError(e, module);
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        return ServiceUtil.returnSuccess();
+    }
+
+    @Deprecated
+    public static Map<String, Object> prepareFlexibleReportOptionFieldsFromEntity(DispatchContext dctx, Map<String, Object> context) {
+        String entityViewName = (String) context.get("entityViewName");
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        List<String> listMultiFields = new ArrayList<String>();
+        Delegator delegator = dctx.getDelegator();
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        Map<String, Object> result = new HashMap<String, Object>();
+        Locale locale = (Locale) context.get("locale");
+
+        ModelEntity modelEntity = delegator.getModelEntity(entityViewName);
+        List<String> listFieldsEntity = modelEntity.getAllFieldNames();
+
+        for (String field : listFieldsEntity) {
+            listMultiFields.add(field);
+            ModelField mField = modelEntity.getField(field);
+            String fieldType = mField.getType();
+            String birtType = null;
+            try {
+                Map<String, Object> convertRes = dispatcher.runSync("convertFieldTypeToBirtType", UtilMisc.toMap("fieldType", fieldType, "userLogin", userLogin));
+                birtType = (String) convertRes.get("birtType");
+                if (UtilValidate.isEmpty(birtType)) {
+                    return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorConversionFieldToBirtFailed", locale));
+                }
+            } catch (GenericServiceException e) {
+                e.printStackTrace();
+            }
+            // make more general when report forms have been made so too.
+            if (birtType.equalsIgnoreCase("date-time") || birtType.equalsIgnoreCase("date") || birtType.equalsIgnoreCase("time")) {
+                listMultiFields.add(field + "_fld0_op");
+                listMultiFields.add(field + "_fld0_value");
+                listMultiFields.add(field + "_fld1_op");
+                listMultiFields.add(field + "_fld1_value");
+            }
+        }
+        result.put("listMultiFields", listMultiFields);
+        return result;
+    }
+
+    /**
+     * Perform find data on given view/entity and return these into birt compatible format.
+     * This service is meant to be used as default for View/entity report design
+     *
+     */
+    public static Map<String, Object> callPerformFindFromBirt(DispatchContext dctx, Map<String, Object> context) {
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        IReportContext reportContext = (IReportContext) context.get("reportContext");
+        Locale locale = (Locale) context.get("locale");
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        String entityViewName = (String) reportContext.getParameterValue("modelElementName");
+        Map<String, Object> inputFields = (Map<String, Object>) reportContext.getParameterValue("parameters");
+        Map<String, Object> resultPerformFind = new HashMap<String, Object>();
+        Map<String, Object> resultToBirt = null;
+        List<GenericValue> list = null;
+
+        if (UtilValidate.isEmpty(entityViewName)) {
+            entityViewName = (String) inputFields.get("modelElementName");
+            if (UtilValidate.isEmpty(entityViewName)) {
+                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorEntityViewNotFound", locale));
+            }
+        }
+
+        try {
+            resultPerformFind = dispatcher.runSync("performFind", UtilMisc.<String, Object>toMap("entityName", entityViewName, "inputFields", inputFields, "userLogin", userLogin, "noConditionFind", "Y", "locale", locale));
+            if (ServiceUtil.isError(resultPerformFind)) {
+                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorRunningPerformFind", locale));
+            }
+        } catch (GenericServiceException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+
+        EntityListIterator listIt = (EntityListIterator) resultPerformFind.get("listIt");
+        try {
+            if (UtilValidate.isNotEmpty(listIt)) {
+                list = listIt.getCompleteList();
+                listIt.close();
+            } else {
+                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorRunningPerformFind", locale));
+            }
+        } catch (GenericEntityException e) {
+            e.printStackTrace();
+        }
+        resultToBirt = ServiceUtil.returnSuccess();
+        resultToBirt.put("records", list);
+        return resultToBirt;
+    }
+
+    /**
+     * Analyse given master and create report design from its data
+     * Two cases are implemented :
+     * <ul>
+     *     <li>Entity : data retieval is based on a simple view/entity</li>
+     *     <li>Service : data retrieval is based on service</li>
+     * </ul>
+     */
+    public static Map<String, Object> createFlexibleReportFromMaster(DispatchContext dctx, Map<String, Object> context) {
+        Delegator delegator = dctx.getDelegator();
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        Locale locale = (Locale) context.get("locale");
+
+        String reportName = (String) context.get("reportName");
+        String masterContentId = (String) context.get("contentId");
+        String description = (String) context.get("description");
+        String writeFilters = (String) context.get("writeFilters");
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+
+        GenericValue masterContentAttribute = null;
+        try {
+            EntityCondition entityCondition = EntityCondition.makeCondition("contentId", masterContentId);
+            masterContentAttribute = EntityQuery.use(delegator).from("ContentAttribute").where(entityCondition).queryFirst();
+        } catch (GenericEntityException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+
+        if (masterContentAttribute == null) {
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorNoAttributeFound", locale));
+        }
+        String attrName = masterContentAttribute.getString("attrName");
+        String reportContentId;
+        if (attrName.equalsIgnoreCase("Entity")) {
+            String entityViewName = masterContentAttribute.getString("attrValue");
+                ModelEntity modelEntity = delegator.getModelEntity(entityViewName);
+                if (modelEntity == null) {
+                    return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorEntityViewNotExist", locale) + " " + entityViewName);
+                }
+            try {
+                Map<String, Object> resultContent = dispatcher.runSync("createFlexibleReportFromMasterEntityWorkflow", UtilMisc.toMap("entityViewName", entityViewName, "reportName", reportName, "description", description, "writeFilters", writeFilters, "masterContentId", masterContentId, "userLogin", userLogin, "locale", locale));
+                if(ServiceUtil.isError(resultContent)) {
+                    return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultContent));
+                }
+                reportContentId = (String) resultContent.get("contentId");
+            } catch (GenericServiceException e) {
+                e.printStackTrace();
+                return ServiceUtil.returnError(e.getMessage());
+            }
+        } else if (attrName.equalsIgnoreCase("Service")) {
+            String serviceName = masterContentAttribute.getString("attrValue");
+            try {
+                Map<String, Object> resultContent = dispatcher.runSync("createFlexibleReportFromMasterServiceWorkflow", UtilMisc.toMap("serviceName", serviceName, "reportName", reportName, "description", description, "writeFilters", writeFilters, "masterContentId", masterContentId, "userLogin", userLogin, "locale", locale));
+                if (ServiceUtil.isError(resultContent)) {
+                    return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultContent));
+                }
+                reportContentId = (String) resultContent.get("contentId");
+            } catch (GenericServiceException e) {
+                e.printStackTrace();
+                return ServiceUtil.returnError(e.getMessage());
+            }
+        } else {
+            // could create other workflows. WebService? Does it need to be independent from Service workflow?
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCannotDetermineDataSource", locale));
+        }
+
+        // prepare report form to display to allow override
+        String textForm;
+        Map<String, Object> resultFormDisplay;
+        try {
+            resultFormDisplay = dispatcher.runSync("prepareFlexibleReportSearchFormToEdit", UtilMisc.toMap("reportContentId", reportContentId, "userLogin", userLogin, "locale", locale));
+            textForm = (String) resultFormDisplay.get("textForm");
+        } catch (GenericServiceException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCreatingDefaultSearchForm", locale).concat(": ").concat(e.getMessage()));
+        }
+
+        Map<String, Object> result = ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "BirtFlexibleReportSuccessfullyGenerated", locale).concat(" ").concat(reportName));
+        result.put("textForm", textForm);
+        result.put("reportContentId", reportContentId);
+        return result;
+    }
+
+    // I'm not a big fan of how I did the createFormForDisplay / overrideReportForm. Could probably be improved using a proper formForReport object or something similar.
+
+    /**
+     * Update search form of a report design
+     */
+    public static Map<String, Object> overrideReportForm(DispatchContext dctx, Map<String, Object> context) {
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        Delegator delegator = dctx.getDelegator();
+        Locale locale = (Locale) context.get("locale");
+        String reportContentId = (String) context.get("reportContentId");
+        String overrideFilters = (String) context.get("overrideFilters");
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+
+        // safety check : do not accept "${groovy", "${bsh" and "javascript"
+        String overideFiltersNoWhiteSpace = overrideFilters.replaceAll("\\s", "");
+        if (overideFiltersNoWhiteSpace.contains("${groovy:") || overideFiltersNoWhiteSpace.contains("${bsh:") || overideFiltersNoWhiteSpace.contains("javascript:")) {
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorUnauthorisedCharacter", locale));
+        }
+
+        try {
+            GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", reportContentId).queryOne();
+            String dataResourceId = content.getString("dataResourceId");
+            StringBuffer newForm = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <forms xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://ofbiz.apache.org/dtds/widget-form.xsd\">");
+            newForm.append(overrideFilters);
+            newForm.append("</forms>");
+            Document xmlForm = UtilXml.readXmlDocument(newForm.toString());
+            dispatcher.runSync("updateElectronicTextForm", UtilMisc.toMap("dataResourceId", dataResourceId, "textData", UtilXml.writeXmlDocument(xmlForm), "userLogin", userLogin, "locale", locale));
+        } catch (GeneralException | SAXException | ParserConfigurationException | IOException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "BirtSearchFormSuccessfullyOverridde", locale));
+    }
+
+    /**
+     * Create report design from View/Entity master report
+     */
+    public static Map<String, Object> createFlexibleReportFromMasterEntityWorkflow(DispatchContext dctx, Map<String, Object> context) {
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        Delegator delegator = dctx.getDelegator();
+        Locale locale = (Locale) context.get("locale");
+        String writeFilters = (String) context.get("writeFilters");
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        String entityViewName = (String) context.get("entityViewName");
+
+        ModelEntity modelEntity = delegator.getModelEntity(entityViewName);
+        String contentId = null;
+        Map<String, Object> result = ServiceUtil.returnSuccess();
+        try {
+            Map<String, Object> resultMapsForGeneration = dispatcher.runSync("prepareFlexibleReportFieldsFromEntity", UtilMisc.toMap("modelEntity", modelEntity, "userLogin", userLogin, "locale", locale));
+            if (ServiceUtil.isError(resultMapsForGeneration)) {
+                return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultMapsForGeneration));
+            }
+            Map<String, String> dataMap = (Map<String, String>) resultMapsForGeneration.get("dataMap");
+            Map<String, String> fieldDisplayLabels = null;
+            if (UtilValidate.isNotEmpty(resultMapsForGeneration.get("fieldDisplayLabels"))) {
+                fieldDisplayLabels = (Map<String, String>) resultMapsForGeneration.get("fieldDisplayLabels");
+            }
+            Map<String, String> filterMap = null;
+            if (UtilValidate.isNotEmpty(resultMapsForGeneration.get("filterMap"))) {
+                filterMap = (Map<String, String>) resultMapsForGeneration.get("filterMap");
+            }
+            Map<String, String> filterDisplayLabels = null;
+            if (UtilValidate.isNotEmpty(resultMapsForGeneration.get("filterDisplayLabels"))) {
+                filterDisplayLabels = (Map<String, String>) resultMapsForGeneration.get("filterDisplayLabels");
+            }
+            contentId = BirtWorker.recordReportContent(delegator, dispatcher, context);
+            // callPerformFindFromBirt is the customMethod for Entity workflow
+            String rptDesignFileName = BirtUtil.resolveRptDesignFilePathFromContent(delegator, contentId);
+            GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne();
+            String customMethodId = content.getString("customMethodId");
+            if (UtilValidate.isEmpty(customMethodId)) customMethodId = "CM_FB_PERFORM_FIND";
+            GenericValue customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", customMethodId).cache().queryOne();
+            if (customMethod == null) {
+                return ServiceUtil.returnError("CustomMethod not exist : " + customMethodId); //todo labelise
+            }
+            result = dispatcher.runSync("createFlexibleReport", UtilMisc.toMap(
+                    "locale", locale,
+                    "dataMap", dataMap,
+                    "userLogin", userLogin,
+                    "filterMap", filterMap,
+                    "serviceName", customMethod.get("customMethodName"),
+                    "writeFilters", writeFilters,
+                    "rptDesignName", rptDesignFileName,
+                    "fieldDisplayLabels", fieldDisplayLabels,
+                    "filterDisplayLabels", filterDisplayLabels));
+            if (ServiceUtil.isError(result)) {
+                return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
+            }
+        } catch (GeneralException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        result.put("contentId", contentId);
+        return result;
+    }
+
+    /**
+     * Create report design from service master report
+     */
+    public static Map<String, Object> createFlexibleReportFromMasterServiceWorkflow(DispatchContext dctx, Map<String, Object> context) {
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        Delegator delegator = dctx.getDelegator();
+        Locale locale = (Locale) context.get("locale");
+        String writeFilters = (String) context.get("writeFilters");
+        String serviceName = (String) context.get("serviceName");
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        String masterContentId = (String) context.get("masterContentId");
+        String contentId = null;
+        Map<String, Object> result = ServiceUtil.returnSuccess();
+
+        try {
+            GenericValue masterContent = EntityQuery.use(delegator).from("Content").where("contentId", masterContentId).cache().queryOne();
+            String customMethodId = masterContent.getString("customMethodId");
+            if (UtilValidate.isEmpty(customMethodId)) {
+                throw new GeneralException("The master content " + masterContentId + " haven't a customMethod");
+            }
+            GenericValue customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", customMethodId).cache().queryOne();
+            if (customMethod == null) {
+                return ServiceUtil.returnError("CustomMethod not exist : " + customMethodId); //todo labelise
+            }
+            String customMethodName = (String) customMethod.getString("customMethodName");
+            if ("default".equalsIgnoreCase(serviceName)) {
+                serviceName = customMethodName + "PrepareFields";
+            }
+            try {
+                ModelService modelService = dctx.getModelService(serviceName);
+            } catch (GenericServiceException e) {
+                return ServiceUtil.returnError("No service define with name " + serviceName); //TODO labelise
+            }
+            contentId = BirtWorker.recordReportContent(delegator, dispatcher, context);
+            String rptDesignFileName = BirtUtil.resolveRptDesignFilePathFromContent(delegator, contentId);
+            Map<String, Object> resultService = dispatcher.runSync(serviceName, UtilMisc.toMap("locale", locale, "userLogin", userLogin));
+            Map<String, String> dataMap = (Map<String, String>) resultService.get("dataMap");
+            Map<String, String> filterMap = (Map<String, String>) resultService.get("filterMap");
+            Map<String, String> fieldDisplayLabels = (Map<String, String>) resultService.get("fieldDisplayLabels");
+            Map<String, String> filterDisplayLabels = (Map<String, String>) resultService.get("filterDisplayLabels");
+            Map<String, Object> resultGeneration = dispatcher.runSync("createFlexibleReport", UtilMisc.toMap(
+                    "locale", locale,
+                    "dataMap", dataMap,
+                    "userLogin", userLogin,
+                    "filterMap", filterMap,
+                    "serviceName", customMethodName,
+                    "writeFilters", writeFilters,
+                    "rptDesignName", rptDesignFileName,
+                    "fieldDisplayLabels", fieldDisplayLabels,
+                    "filterDisplayLabels", filterDisplayLabels));
+            if (ServiceUtil.isError(resultGeneration)) {
+                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCreatingFlexibleReport", locale));
+            }
+        } catch (GeneralException e) {
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        result.put("contentId", contentId);
+        return result;
+    }
+
+    /**
+     * Define which data fields and its label, filter fields and label that will be supported by the View/Entity report design
+     */
+    public static Map<String, Object> prepareFlexibleReportFieldsFromEntity(DispatchContext dctx, Map<String, Object> context) {
+        Locale locale = (Locale) context.get("locale");
+        ModelEntity modelEntity = (ModelEntity) context.get("modelEntity");
+
+        Map<String, String> dataMap = new HashMap<String, String>();
+        Map<String, String> fieldDisplayLabels = new HashMap<String, String>();
+        LinkedHashMap<String, String> filterMap = new LinkedHashMap<String, String>();
+        LinkedHashMap<String, String> filterDisplayLabels = new LinkedHashMap<String, String>();
+
+        List<String> listEntityFields = modelEntity.getAllFieldNames();
+        Map<Object, Object> uiLabelMap = new HashMap<Object, Object>();
+        final String[] resourceGlob = {"OrderUiLabels", "ProductUiLabels", "PartyUiLabels", "ContentUiLabels", "AccountingUiLabels", "CommonUiLabels", "BirtUiLabels"};
+        for (String res : resourceGlob) {
+            uiLabelMap.putAll(UtilProperties.getProperties(res, locale));
+        }
+
+        List<String> excludeFields = modelEntity.getAutomaticFieldNames();
+        for (String field : listEntityFields) {
+            ModelField mField = modelEntity.getField(field);
+            //ignore stamps fields
+            if (excludeFields.contains(mField.getName())) continue;
+            dataMap.put(field, mField.getType());
+
+            String localizedName = null;
+            String interpretedFieldName = null;
+            FlexibleStringExpander.getInstance(mField.getDescription()).expandString(context);
+            String titleFieldName = "FormFieldTitle_".concat(field);
+            localizedName = (String) uiLabelMap.get(titleFieldName);
+            if (UtilValidate.isEmpty(localizedName) || localizedName.equals(titleFieldName)) {
+                interpretedFieldName = FlexibleStringExpander.getInstance(field).expandString(context);
+                fieldDisplayLabels.put(field, interpretedFieldName);
+            } else {
+                fieldDisplayLabels.put(field, localizedName);
+            }
+
+            List<String> fieldTypeWithRangeList = UtilMisc.toList("date", "date-time", "time", "floating-point", "currency-amount", "numeric");
+            if (fieldTypeWithRangeList.contains(mField.getType())) {
+                filterMap.put(field.concat("_fld0_value"), mField.getType());
+                filterMap.put(field.concat("_fld0_op"), "short-varchar");
+                filterMap.put(field.concat("_fld1_value"), mField.getType());
+                filterMap.put(field.concat("_fld1_op"), "short-varchar");
+                filterDisplayLabels.put(field.concat("_fld0_value"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindFieldOptionValue0", locale)));
+                filterDisplayLabels.put(field.concat("_fld0_op"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindFieldOptionValue0", locale).concat(UtilProperties.getMessage(resource, "BirtFindCompareOperator", locale))));
+                filterDisplayLabels.put(field.concat("_fld1_value"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindFieldOptionValue1", locale)));
+                filterDisplayLabels.put(field.concat("_fld1_op"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindFieldOptionValue1", locale).concat(UtilProperties.getMessage(resource, "BirtFindCompareOperator", locale))));
+            } else { // remaining types need 4 fields (fld0-1_op-value)
+                filterMap.put(field, mField.getType());
+                filterMap.put(field.concat("_op"), "short-varchar");
+                filterDisplayLabels.put(field, fieldDisplayLabels.get(field));
+                filterDisplayLabels.put(field.concat("_op"), fieldDisplayLabels.get(field).concat(UtilProperties.getMessage(resource, "BirtFindCompareOperator", locale)));
+            }
+        }
+        Map<String, Object> result = ServiceUtil.returnSuccess();
+        result.put("dataMap", dataMap);
+        if (UtilValidate.isNotEmpty(fieldDisplayLabels)) {
+            result.put("fieldDisplayLabels", fieldDisplayLabels);
+        }
+        if (UtilValidate.isNotEmpty(filterMap)) {
+            result.put("filterMap", filterMap);
+        }
+        if (UtilValidate.isNotEmpty(filterDisplayLabels)) {
+            result.put("filterDisplayLabels", filterDisplayLabels);
+        }
+        return result;
+    }
+
+    /**
+     * Prepare and return search form of a report design
+     */
+    public static Map<String, Object> createFormForDisplay(DispatchContext dctx, Map<String, Object> context) {
+        String reportContentId = (String) context.get("reportContentId");
+        Delegator delegator = dctx.getDelegator();
+        Map<String, Object> result = ServiceUtil.returnSuccess();
+
+        String textData = null;
+        try {
+            GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", reportContentId).cache().queryOne();
+            String dataResourceId = content.getString("dataResourceId");
+            GenericValue electronicText = EntityQuery.use(delegator).from("ElectronicText").where("dataResourceId", dataResourceId).cache().queryOne();
+            textData = electronicText.getString("textData");
+        } catch (GenericEntityException e) {
+            return ServiceUtil.returnError(e.getMessage());
+        }
+
+        if (Debug.infoOn()) Debug.logInfo(textData, module);
+        textData = textData.substring(textData.indexOf("<form "), textData.length());
+        if (textData.contains("</form>")) {
+            textData = textData.substring(0, textData.indexOf("</form>") + 7);
+        } else {
+            textData = textData.substring(0, textData.indexOf("/>") + 2);
+        }
+        textData = StringUtil.replaceString(textData, "$", "&#36;");
+        result.put("textForm", textData);
+        return result;
+    }
+
+    /**
+     * delete all non-master report design
+     */
+    public static Map<String, Object> deleteAllReports(DispatchContext dctx, Map<String, Object> context) {
+        Delegator delegator = dctx.getDelegator();
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        Locale locale = (Locale) context.get("locale");
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+
+        List<String> listContentId = null;
+        List<GenericValue> listContent = null;
+        EntityCondition entityConditionContent = EntityCondition.makeCondition("contentTypeId", "FLEXIBLE_REPORT");
+        try {
+            listContent = EntityQuery.use(delegator).from("Content").where(entityConditionContent).select("contentId").queryList();
+        } catch (GenericEntityException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        if (UtilValidate.isEmpty(listContent)) {
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorNoFlexibleReportToDelete", locale));
+        }
+        listContentId = EntityUtil.getFieldListFromEntityList(listContent, "contentId", true);
+
+        try {
+            for (String contentId : listContentId) {
+                Map<String, Object> returnMap = dispatcher.runSync("deleteFlexibleReport", UtilMisc.toMap("contentId", contentId, "userLogin", userLogin, "locale", locale));
+                ServiceUtil.isError(returnMap);
+            }
+        } catch (GenericServiceException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "BirtFlexibleReportsSuccessfullyDeleted", locale));
+    }
+
+    /**
+     * Delete a flexible report design
+     */
+    public static Map<String, Object> deleteFlexibleReport(DispatchContext dctx, Map<String, Object> context) {
+        Delegator delegator = dctx.getDelegator();
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        Locale locale = (Locale) context.get("locale");
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        String contentId = (String) context.get("contentId");
+
+        List<GenericValue> listContentRpt = null;
+        List<GenericValue> listRptDesignFileGV = null;
+        String contentIdRpt;
+        try {
+            listContentRpt = EntityQuery.use(delegator).from("ContentAssoc").where("contentId", contentId).select("contentIdTo").queryList();
+            contentIdRpt = listContentRpt.get(0).getString("contentIdTo");
+            List<EntityExpr> listConditions = UtilMisc.toList(EntityCondition.makeCondition("contentTypeId", EntityOperator.EQUALS, "RPTDESIGN"), EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentIdRpt));
+            EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(listConditions, EntityOperator.AND);
+            listRptDesignFileGV = EntityQuery.use(delegator).from("ContentDataResourceView").where(ecl).select("drObjectInfo").queryList();
+        } catch (GenericEntityException e1) {
+            e1.printStackTrace();
+            return ServiceUtil.returnError(e1.getMessage());
+        }
+        if (listRptDesignFileGV.size() > 1) {
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorUnexpectedNumberReportToDelete", locale));
+        }
+        List<String> listRptDesignFile = EntityUtil.getFieldListFromEntityList(listRptDesignFileGV, "drObjectInfo", false);
+        String rptfileName = listRptDesignFile.get(0);
+        Path path = Paths.get(rptfileName);
+        try {
+            if (! Files.deleteIfExists(path)) {
+                ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCannotLocateReportFile", locale));
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        try {
+            delegator.removeByAnd("ContentAttribute", UtilMisc.toMap("contentId", contentId));
+            dispatcher.runSync("removeContentAndRelated", UtilMisc.toMap("contentId", contentId, "userLogin", userLogin, "locale", locale));
+            dispatcher.runSync("removeContentAndRelated", UtilMisc.toMap("contentId", contentIdRpt, "userLogin", userLogin, "locale", locale));
+        } catch (GenericServiceException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        } catch (GenericEntityException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "BirtFlexibleReportSuccessfullyDeleted", locale));
+    }
+
+    /**
+     * Update birt rptdesign file from uploaded one.
+     * <p>This will update only STYLES, BODY, MASTERPAGE AND CUBES from existing rptdesign with uploaded ones.</p>
+     *
+     */
+    public static Map<String, Object> uploadRptDesign(DispatchContext dctx, Map<String, Object> context) {
+        String dataResourceId = (String) context.get("dataResourceIdRpt");
+        Locale locale = (Locale) context.get("locale");
+        Delegator delegator = dctx.getDelegator();
+        Map<String, Object> result = null;
+        List<String> listSuccessMessage = new ArrayList<String>();
+
+        // the idea is to allow only design to be uploaded. We use the stored file and add the new design from the uploaded file within.
+        DesignConfig config = new DesignConfig();
+        IDesignEngine engine = null;
+        try {
+            Platform.startup();
+            IDesignEngineFactory factory = (IDesignEngineFactory) Platform.createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY);
+            engine = factory.createDesignEngine(config);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        SessionHandle session = engine.newSessionHandle(ULocale.forLocale(locale));
+
+        // get old file to restore dataset and datasource
+        ByteBuffer newRptDesignBytes = (ByteBuffer) context.get("uploadRptDesign");
+        if (newRptDesignBytes == null) {
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCannotFindUploadedFile", locale));
+        }
+
+        GenericValue dataResource = null;
+        try {
+            dataResource = EntityQuery.use(delegator).from("DataResource").where("dataResourceId", dataResourceId).queryOne();
+        } catch (GenericEntityException e1) {
+            e1.printStackTrace();
+            return ServiceUtil.returnError(e1.getMessage());
+        }
+        String rptDesignName = dataResource.getString("objectInfo");
+        // start Birt API platfrom
+        try {
+            Platform.startup();
+        } catch (BirtException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError("Cannot start Birt platform");
+        }
+
+        // get database design
+        ReportDesignHandle designStored;
+        try {
+            designStored = session.openDesign(rptDesignName);
+        } catch (DesignFileException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+
+        // check if design stored already has a body and delete it to avoid conflicts (taking into account only newly designed body)
+        if (UtilValidate.isNotEmpty(designStored.getBody())) {
+            SlotHandle bodyStored = designStored.getBody();
+
+            Iterator<DesignElementHandle> iter = bodyStored.iterator();
+            while (iter.hasNext()) {
+                try {
+                    iter.remove();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    return ServiceUtil.returnError(e.getMessage());
+                }
+            }
+        }
+
+        // NEED TO COPY STYLES, BODY, MASTERPAGE AND CUBES; existing elements (in case I missed one):
+        //[styles, parameters, dataSources, dataSets, pageSetup, components, body, scratchPad, templateParameterDefinitions, cubes, themes]
+        // get user design
+        String nameTempRpt = rptDesignName.substring(0, rptDesignName.lastIndexOf('.')).concat("_TEMP_.rptdesign");
+        File file = new File(nameTempRpt);
+        RandomAccessFile out;
+        ReportDesignHandle designFromUser;
+        try {
+            out = new RandomAccessFile(file, "rw");
+            out.write(newRptDesignBytes.array());
+            out.close();
+            designFromUser = session.openDesign(nameTempRpt);
+            // user file is deleted straight away to prevent the use of the report as script entry (security)
+            Path path = Paths.get(nameTempRpt);
+            Files.deleteIfExists(path);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+
+        //copy cube
+        SlotHandle cubesFromUser = designFromUser.getCubes();
+        Iterator<DesignElementHandle> iterCube = cubesFromUser.iterator();
+
+        while (iterCube.hasNext()) {
+            DesignElementHandle item = (DesignElementHandle) iterCube.next();
+            DesignElementHandle copy = item.copy().getHandle(item.getModule());
+            try {
+                designStored.getCubes().add(copy);
+            } catch (Exception e) {
+                e.printStackTrace();
+                return ServiceUtil.returnError(e.getMessage());
+            }
+        }
+
+        // copy body
+        SlotHandle bodyFromUser = designFromUser.getBody();
+        Iterator<DesignElementHandle> iter = bodyFromUser.iterator();
+
+        while (iter.hasNext()) {
+            DesignElementHandle item = (DesignElementHandle) iter.next();
+            DesignElementHandle copy = item.copy().getHandle(item.getModule());
+            try {
+                designStored.getBody().add(copy);
+            } catch (Exception e) {
+                e.printStackTrace();
+                return ServiceUtil.returnError(e.getMessage());
+            }
+        }
+
+        // deleting simple master page from design stored
+        try {
+            List<DesignElementHandle> listMasterPagesStored = designStored.getMasterPages().getContents();
+            for (Object masterPage : listMasterPagesStored) {
+                if (masterPage instanceof SimpleMasterPageHandle) {
+                    designStored.getMasterPages().drop((DesignElementHandle) masterPage);
+                }
+            }
+
+            // adding simple master page => tous ces casts et autres instanceof... c'est laid, mais c'est tellement galère que quand je trouve une solution qui marche... :s
+            List<DesignElementHandle> listMasterPages = designFromUser.getMasterPages().getContents();
+            for (DesignElementHandle masterPage : listMasterPages) {
+                if (masterPage instanceof SimpleMasterPageHandle) {
+                    designStored.getMasterPages().add((SimpleMasterPage) ((SimpleMasterPageHandle) masterPage).copy());
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+
+        // page variables
+        List<VariableElementHandle> pageVariablesUser = designFromUser.getPageVariables();
+        for (VariableElementHandle pageVariable : pageVariablesUser) {
+            try {
+                designStored.setPageVariable(pageVariable.getName(), pageVariable.getPropertyBindingExpression(pageVariable.getName()));
+            } catch (SemanticException e) {
+                e.printStackTrace();
+                return ServiceUtil.returnError(e.getMessage());
+            }
+        }
+
+        // copy styles
+        SlotHandle stylesFromUser = designFromUser.getStyles();
+        SlotHandle stylesStored = designStored.getStyles();
+
+        // getting style names from stored report
+        List<String> listStyleNames = new ArrayList<String>();
+        Iterator<DesignElementHandle> iterStored = stylesStored.iterator();
+        while (iterStored.hasNext()) {
+            DesignElementHandle item = (DesignElementHandle) iterStored.next();
+            listStyleNames.add(item.getName());
+        }
+
+        Iterator<DesignElementHandle> iterUser = stylesFromUser.iterator();
+
+        // adding to styles those which are not already present
+        while (iterUser.hasNext()) {
+            DesignElementHandle item = (DesignElementHandle) iterUser.next();
+            if (! listStyleNames.contains(item.getName())) {
+                DesignElementHandle copy = item.copy().getHandle(item.getModule());
+                try {
+                    designStored.getStyles().add(copy);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    return ServiceUtil.returnError(e.getMessage());
+                }
+            }
+        }
+
+        try {
+            designStored.saveAs(rptDesignName);
+        } catch (IOException e) {
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        designFromUser.close();
+        designStored.close();
+        if (Debug.infoOn()) Debug.logInfo("####### Design uploaded: ".concat(rptDesignName), module);
+
+        // should we as a secondary safety precaution delete any file finishing with _TEMP_.rptdesign?
+        listSuccessMessage.add(UtilProperties.getMessage(resource, "BirtFlexibleRptDesignSuccessfullyUploaded", locale));
+        result = ServiceUtil.returnSuccess(listSuccessMessage);
+        return result;
+    }
+
 }
\ No newline at end of file
diff --git a/plugins/birt/webapp/birt/WEB-INF/web.xml b/plugins/birt/webapp/birt/WEB-INF/web.xml
index 012b423..a0362d6 100644
--- a/plugins/birt/webapp/birt/WEB-INF/web.xml
+++ b/plugins/birt/webapp/birt/WEB-INF/web.xml
@@ -1,291 +1,291 @@
-<?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.

--->

-

-<web-app version="3.0">

-    <display-name>Apache OFBiz - BIRT Component</display-name>

-    <description>BIRT Component of the Apache OFBiz Project</description>

-    

-    <context-param>

-        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>

-        <param-name>localDispatcherName</param-name><param-value>birt</param-value>

-    </context-param>    

-    <context-param>

-        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>

-        <param-name>entityDelegatorName</param-name><param-value>default</param-value>

-    </context-param>

-    <context-param>

-        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>

-        <param-name>mainDecoratorLocation</param-name>

-        <param-value>component://birt/widget/birt/BirtScreens.xml</param-value>

-    </context-param>

-    <context-param>

-        <description>Enable widget boundary comments. See org.apache.ofbiz.widget.model.ModelWidget.widgetBoundaryCommentsEnabled().</description>

-        <param-name>widgetVerbose</param-name>

-        <param-value>false</param-value>

-    </context-param>

-    <context-param>

-        <description>Remove unnecessary whitespace from HTML output.</description>

-        <param-name>compressHTML</param-name>

-        <param-value>false</param-value>

-    </context-param>

-    

-    <!-- Default locale setting.-->

-    <context-param>

-        <param-name>BIRT_VIEWER_LOCALE</param-name>

-        <param-value>en-US</param-value>

-    </context-param>

-    

-    <!-- 

-        Default timezone setting.

-        Examples: "Europe/Paris", "GMT+1".

-        Defaults to the container's timezone.       

-     -->

-    <context-param>

-        <param-name>BIRT_VIEWER_TIMEZONE</param-name>

-        <param-value></param-value>

-    </context-param>

-    

-    <!--

-        Report resources directory for preview. Defaults to ${birt home}

-    -->

-    <context-param>

-        <param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>

-        <param-value>${ofbiz.home}/runtime/tempfiles</param-value>

-    </context-param>

-    

-    <!--

-        Temporary document files directory. Defaults to ${birt home}/documents

-    -->

-    <context-param>

-        <param-name>BIRT_VIEWER_DOCUMENT_FOLDER</param-name>

-        <param-value>${ofbiz.home}/runtime/tempfiles/documents</param-value>

-    </context-param>

-    

-    <!--

-        Flag whether the report resources can only be accessed under the

-        working folder. Defaults to true

-    -->

-    <context-param>

-        <param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>

-        <param-value>false</param-value>

-    </context-param>

-    

-    <!--

-        Temporary image/chart directory. Defaults to ${birt home}/report/images

-    -->

-    <context-param>

-        <param-name>BIRT_VIEWER_IMAGE_DIR</param-name>

-        <param-value>${ofbiz.home}/runtime/tempfiles/images</param-value>

-    </context-param>

-    

-    <!-- Engine log directory. Defaults to ${birt home}/logs -->

-    <context-param>

-        <param-name>BIRT_VIEWER_LOG_DIR</param-name>

-        <param-value>${ofbiz.home}/runtime/logs</param-value>

-    </context-param>

-    

-    <!-- Report engine log level -->

-    <context-param>

-        <param-name>BIRT_VIEWER_LOG_LEVEL</param-name>

-        <param-value>WARNING</param-value>

-    </context-param>

-    

-    <!--

-        Directory where to store all the birt report script libraries (JARs).

-        Defaults to ${birt home}/scriptlib

-    -->

-    <context-param>

-        <param-name>BIRT_VIEWER_SCRIPTLIB_DIR</param-name>

-        <param-value>${ofbiz.home}/plugins/birt/lib/scriptlib</param-value>

-    </context-param>

-    

-    <!-- Resource location directory. Defaults to ${birt home} -->

-    <context-param>

-        <param-name>BIRT_RESOURCE_PATH</param-name>

-        <param-value>${ofbiz.home}/runtime/tempfiles</param-value>

-    </context-param>

-    

-    <!-- Preview report rows limit. An empty value means no limit. -->

-    <context-param>

-        <param-name>BIRT_VIEWER_MAX_ROWS</param-name>

-        <param-value></param-value>

-    </context-param>

-    

-    <!--

-        Max cube fetch levels limit for report preview (Only used when

-        previewing a report design file using the preview pattern)

-    -->

-    <context-param>

-        <param-name>BIRT_VIEWER_MAX_CUBE_ROWLEVELS</param-name>

-        <param-value></param-value>

-    </context-param>

-    <context-param>

-        <param-name>BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS</param-name>

-        <param-value></param-value>

-    </context-param>

-

-    <!-- Memory size in MB for creating a cube. -->

-    <context-param>

-        <param-name>BIRT_VIEWER_CUBE_MEMORY_SIZE</param-name>

-        <param-value></param-value>

-    </context-param>

-

-    <!-- Defines the BIRT viewer configuration file -->

-    <context-param>

-        <param-name>BIRT_VIEWER_CONFIG_FILE</param-name>

-        <param-value>WEB-INF/viewer.properties</param-value>

-    </context-param>

-

-    <!--

-        Flag whether to allow server-side printing. Possible values are "ON"

-        and "OFF". Defaults to "ON".

-    -->

-    <context-param>

-        <param-name>BIRT_VIEWER_PRINT_SERVERSIDE</param-name>

-        <param-value>ON</param-value>

-    </context-param>

-

-    <!--

-        Flag whether to force browser-optimized HTML output. Defaults to true

-    -->

-    <context-param>

-        <param-name>HTML_ENABLE_AGENTSTYLE_ENGINE</param-name>

-        <param-value>true</param-value>

-    </context-param>

-

-    <!--

-        Filename generator class/factory to use for the exported reports.

-    -->

-    <context-param>

-        <param-name>BIRT_FILENAME_GENERATOR_CLASS</param-name>

-        <param-value>org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator</param-value>

-    </context-param>

-    

-    <filter>

-        <display-name>ControlFilter</display-name>

-        <filter-name>ControlFilter</filter-name>

-        <filter-class>org.apache.ofbiz.webapp.control.ControlFilter</filter-class>

-        <init-param>

-            <param-name>allowedPaths</param-name>

-            <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/frameset:/run:/preview:/download:/parameter:/document:/output:/extract:/webcontent:/CancelTask.jsp</param-value>

-        </init-param>

-        <init-param>

-            <param-name>redirectPath</param-name>

-            <param-value>/control/main</param-value>

-        </init-param>

-    </filter>

-    <filter>

-        <display-name>ContextFilter</display-name>

-        <filter-name>ContextFilter</filter-name>

-        <filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>

-    </filter>

-    <filter-mapping>

-        <filter-name>ControlFilter</filter-name>

-        <url-pattern>/*</url-pattern>

-    </filter-mapping>

-    <filter-mapping>

-        <filter-name>ContextFilter</filter-name>

-        <url-pattern>/*</url-pattern>

-    </filter-mapping>

-

-    <listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>

-    <listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>

-    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->

-    <!-- <listener><listener-class>org.apache.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->

-

-    <!-- Viewer HttpSession Listener -->

-    <listener>

-        <listener-class>org.eclipse.birt.report.listener.ViewerHttpSessionListener</listener-class>

-    </listener>

-  

-    <servlet>

-        <description>Main Control Servlet</description>

-        <display-name>ControlServlet</display-name>

-        <servlet-name>ControlServlet</servlet-name>

-        <servlet-class>org.apache.ofbiz.webapp.control.ControlServlet</servlet-class>

-        <load-on-startup>1</load-on-startup>

-    </servlet>

-    <!-- Viewer Servlet, Supports SOAP -->

-    <servlet>

-        <servlet-name>ViewerServlet</servlet-name>

-        <servlet-class>org.apache.ofbiz.birt.report.servlet.BirtViewerServlet</servlet-class>

-    </servlet>

-    <!-- Engine Servlet -->

-    <servlet>

-        <servlet-name>EngineServlet</servlet-name>

-        <servlet-class>org.apache.ofbiz.birt.report.servlet.BirtEngineServlet</servlet-class>

-    </servlet>

-    <servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>

-    

-    <servlet-mapping>

-        <servlet-name>ViewerServlet</servlet-name>

-        <url-pattern>/frameset</url-pattern>

-    </servlet-mapping>

-    

-    <servlet-mapping>

-        <servlet-name>ViewerServlet</servlet-name>

-        <url-pattern>/run</url-pattern>

-    </servlet-mapping>

-    

-    <servlet-mapping>

-        <servlet-name>EngineServlet</servlet-name>

-        <url-pattern>/preview</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>EngineServlet</servlet-name>

-        <url-pattern>/download</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>EngineServlet</servlet-name>

-        <url-pattern>/parameter</url-pattern>

-    </servlet-mapping>  

-

-    <servlet-mapping>

-        <servlet-name>EngineServlet</servlet-name>

-        <url-pattern>/document</url-pattern>

-    </servlet-mapping>  

-

-    <servlet-mapping>

-        <servlet-name>EngineServlet</servlet-name>

-        <url-pattern>/output</url-pattern>

-    </servlet-mapping>  

-    

-    <servlet-mapping>

-        <servlet-name>EngineServlet</servlet-name>

-        <url-pattern>/extract</url-pattern>

-    </servlet-mapping>

-

-    <session-config>

-        <session-timeout>60</session-timeout><!-- in minutes -->

-        <cookie-config>

-          <http-only>true</http-only>

-          <secure>true</secure>

-        </cookie-config>

-        <tracking-mode>COOKIE</tracking-mode>

-    </session-config>

-

-    <welcome-file-list>

-        <welcome-file>index.jsp</welcome-file>

-        <welcome-file>index.html</welcome-file>

-        <welcome-file>index.htm</welcome-file>

-    </welcome-file-list>

-</web-app>

+<?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.
+-->
+
+<web-app version="3.0">
+    <display-name>Apache OFBiz - BIRT Component</display-name>
+    <description>BIRT Component of the Apache OFBiz Project</description>
+    
+    <context-param>
+        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
+        <param-name>localDispatcherName</param-name><param-value>birt</param-value>
+    </context-param>    
+    <context-param>
+        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
+        <param-name>entityDelegatorName</param-name><param-value>default</param-value>
+    </context-param>
+    <context-param>
+        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
+        <param-name>mainDecoratorLocation</param-name>
+        <param-value>component://birt/widget/birt/BirtScreens.xml</param-value>
+    </context-param>
+    <context-param>
+        <description>Enable widget boundary comments. See org.apache.ofbiz.widget.model.ModelWidget.widgetBoundaryCommentsEnabled().</description>
+        <param-name>widgetVerbose</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Remove unnecessary whitespace from HTML output.</description>
+        <param-name>compressHTML</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    
+    <!-- Default locale setting.-->
+    <context-param>
+        <param-name>BIRT_VIEWER_LOCALE</param-name>
+        <param-value>en-US</param-value>
+    </context-param>
+    
+    <!-- 
+        Default timezone setting.
+        Examples: "Europe/Paris", "GMT+1".
+        Defaults to the container's timezone.       
+     -->
+    <context-param>
+        <param-name>BIRT_VIEWER_TIMEZONE</param-name>
+        <param-value></param-value>
+    </context-param>
+    
+    <!--
+        Report resources directory for preview. Defaults to ${birt home}
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>
+        <param-value>${ofbiz.home}/runtime/tempfiles</param-value>
+    </context-param>
+    
+    <!--
+        Temporary document files directory. Defaults to ${birt home}/documents
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_DOCUMENT_FOLDER</param-name>
+        <param-value>${ofbiz.home}/runtime/tempfiles/documents</param-value>
+    </context-param>
+    
+    <!--
+        Flag whether the report resources can only be accessed under the
+        working folder. Defaults to true
+    -->
+    <context-param>
+        <param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    
+    <!--
+        Temporary image/chart directory. Defaults to ${birt home}/report/images
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_IMAGE_DIR</param-name>
+        <param-value>${ofbiz.home}/runtime/tempfiles/images</param-value>
+    </context-param>
+    
+    <!-- Engine log directory. Defaults to ${birt home}/logs -->
+    <context-param>
+        <param-name>BIRT_VIEWER_LOG_DIR</param-name>
+        <param-value>${ofbiz.home}/runtime/logs</param-value>
+    </context-param>
+    
+    <!-- Report engine log level -->
+    <context-param>
+        <param-name>BIRT_VIEWER_LOG_LEVEL</param-name>
+        <param-value>WARNING</param-value>
+    </context-param>
+    
+    <!--
+        Directory where to store all the birt report script libraries (JARs).
+        Defaults to ${birt home}/scriptlib
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_SCRIPTLIB_DIR</param-name>
+        <param-value>${ofbiz.home}/plugins/birt/lib/scriptlib</param-value>
+    </context-param>
+    
+    <!-- Resource location directory. Defaults to ${birt home} -->
+    <context-param>
+        <param-name>BIRT_RESOURCE_PATH</param-name>
+        <param-value>${ofbiz.home}/runtime/tempfiles</param-value>
+    </context-param>
+    
+    <!-- Preview report rows limit. An empty value means no limit. -->
+    <context-param>
+        <param-name>BIRT_VIEWER_MAX_ROWS</param-name>
+        <param-value></param-value>
+    </context-param>
+    
+    <!--
+        Max cube fetch levels limit for report preview (Only used when
+        previewing a report design file using the preview pattern)
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_MAX_CUBE_ROWLEVELS</param-name>
+        <param-value></param-value>
+    </context-param>
+    <context-param>
+        <param-name>BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS</param-name>
+        <param-value></param-value>
+    </context-param>
+
+    <!-- Memory size in MB for creating a cube. -->
+    <context-param>
+        <param-name>BIRT_VIEWER_CUBE_MEMORY_SIZE</param-name>
+        <param-value></param-value>
+    </context-param>
+
+    <!-- Defines the BIRT viewer configuration file -->
+    <context-param>
+        <param-name>BIRT_VIEWER_CONFIG_FILE</param-name>
+        <param-value>WEB-INF/viewer.properties</param-value>
+    </context-param>
+
+    <!--
+        Flag whether to allow server-side printing. Possible values are "ON"
+        and "OFF". Defaults to "ON".
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_PRINT_SERVERSIDE</param-name>
+        <param-value>ON</param-value>
+    </context-param>
+
+    <!--
+        Flag whether to force browser-optimized HTML output. Defaults to true
+    -->
+    <context-param>
+        <param-name>HTML_ENABLE_AGENTSTYLE_ENGINE</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <!--
+        Filename generator class/factory to use for the exported reports.
+    -->
+    <context-param>
+        <param-name>BIRT_FILENAME_GENERATOR_CLASS</param-name>
+        <param-value>org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator</param-value>
+    </context-param>
+    
+    <filter>
+        <display-name>ControlFilter</display-name>
+        <filter-name>ControlFilter</filter-name>
+        <filter-class>org.apache.ofbiz.webapp.control.ControlFilter</filter-class>
+        <init-param>
+            <param-name>allowedPaths</param-name>
+            <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/frameset:/run:/preview:/download:/parameter:/document:/output:/extract:/webcontent:/CancelTask.jsp</param-value>
+        </init-param>
+        <init-param>
+            <param-name>redirectPath</param-name>
+            <param-value>/control/main</param-value>
+        </init-param>
+    </filter>
+    <filter>
+        <display-name>ContextFilter</display-name>
+        <filter-name>ContextFilter</filter-name>
+        <filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>ControlFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>ContextFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
+    <listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
+    <!-- <listener><listener-class>org.apache.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
+
+    <!-- Viewer HttpSession Listener -->
+    <listener>
+        <listener-class>org.eclipse.birt.report.listener.ViewerHttpSessionListener</listener-class>
+    </listener>
+  
+    <servlet>
+        <description>Main Control Servlet</description>
+        <display-name>ControlServlet</display-name>
+        <servlet-name>ControlServlet</servlet-name>
+        <servlet-class>org.apache.ofbiz.webapp.control.ControlServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <!-- Viewer Servlet, Supports SOAP -->
+    <servlet>
+        <servlet-name>ViewerServlet</servlet-name>
+        <servlet-class>org.apache.ofbiz.birt.report.servlet.BirtViewerServlet</servlet-class>
+    </servlet>
+    <!-- Engine Servlet -->
+    <servlet>
+        <servlet-name>EngineServlet</servlet-name>
+        <servlet-class>org.apache.ofbiz.birt.report.servlet.BirtEngineServlet</servlet-class>
+    </servlet>
+    <servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>
+    
+    <servlet-mapping>
+        <servlet-name>ViewerServlet</servlet-name>
+        <url-pattern>/frameset</url-pattern>
+    </servlet-mapping>
+    
+    <servlet-mapping>
+        <servlet-name>ViewerServlet</servlet-name>
+        <url-pattern>/run</url-pattern>
+    </servlet-mapping>
+    
+    <servlet-mapping>
+        <servlet-name>EngineServlet</servlet-name>
+        <url-pattern>/preview</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>EngineServlet</servlet-name>
+        <url-pattern>/download</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>EngineServlet</servlet-name>
+        <url-pattern>/parameter</url-pattern>
+    </servlet-mapping>  
+
+    <servlet-mapping>
+        <servlet-name>EngineServlet</servlet-name>
+        <url-pattern>/document</url-pattern>
+    </servlet-mapping>  
+
+    <servlet-mapping>
+        <servlet-name>EngineServlet</servlet-name>
+        <url-pattern>/output</url-pattern>
+    </servlet-mapping>  
+    
+    <servlet-mapping>
+        <servlet-name>EngineServlet</servlet-name>
+        <url-pattern>/extract</url-pattern>
+    </servlet-mapping>
+
+    <session-config>
+        <session-timeout>60</session-timeout><!-- in minutes -->
+        <cookie-config>
+          <http-only>true</http-only>
+          <secure>true</secure>
+        </cookie-config>
+        <tracking-mode>COOKIE</tracking-mode>
+    </session-config>
+
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+    </welcome-file-list>
+</web-app>
diff --git a/plugins/birt/widget/birt/BirtForms.xml b/plugins/birt/widget/birt/BirtForms.xml
index e991e86..4874b00 100644
--- a/plugins/birt/widget/birt/BirtForms.xml
+++ b/plugins/birt/widget/birt/BirtForms.xml
@@ -1,145 +1,145 @@
-<?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.

--->

-

-<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

-        xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">

-

-    <form name="EditMail" type="single" target="sendBirtMail">

-        <field name="sendFrom"><text/></field>

-        <field name="sendTo"><text/></field>

-        <field name="subject"><text/></field>

-        <field name="birtContentType">

-            <drop-down>

-                <entity-options entity-name="Enumeration" description="${enumCode}" key-field-name="description">

-                    <entity-constraint name="enumTypeId" value="FLEXIBLE_BIRT"/>

-                    <entity-order-by field-name="sequenceId"/>

-                </entity-options>

-            </drop-down>

-        </field>

-        <field name="attachmentName" required-field="true"><text/></field>

-        <field name="birtReportLocation" tooltip="Example is component://birt/webapp/birt/report/example.rptdesign" required-field="true"><text/></field>

-        <field name="sendButton"><submit/></field>

-    </form>

-

-    <!-- Flexible Report Form -->

-    <form name="CreateFlexibleReport" type="single" target="CreateFlexibleReport">

-        <field name="contentId" title="${uiLabelMap.BirtSelectMasterFlexibleReport}" >

-            <drop-down>

-                <entity-options description="${description}" entity-name="Content" key-field-name="contentId">

-                    <entity-constraint name="contentTypeId" value="REPORT_MASTER" />

-                </entity-options>

-            </drop-down>

-        </field>

-        <field name="reportName" required-field="true"><text/></field>

-        <field name="description" required-field="true"><text /></field>

-        <field name="writeFilters"><check/></field>

-        <field name="sendButton"><submit/></field>

-    </form>

-    <form name="ListPublishFlexibleReport" type="single" target="DisplayFlexibleReportSearchForm">

-        <field name="contentId" title="${uiLabelMap.BirtSelectFlexibleReport}" >

-            <drop-down>

-                <entity-options description="[${contentName}] ${description}" entity-name="ContentAssocViewTo" key-field-name="contentId">

-                    <entity-constraint name="contentTypeId" value="FLEXIBLE_REPORT" />

-                    <entity-constraint name="statusId" value="CTNT_PUBLISHED"/>

-                </entity-options>

-            </drop-down>

-        </field>

-        <field name="sendButton"><submit /></field>

-    </form>

-

-    <form name="EditFlexibleReport" type="single" target="UpdateFlexibleReport" default-map-name="content">

-        <field name="contentId"><hidden/></field>

-        <field name="contentName" title="${uiLabelMap.FormFieldTitle_reportName}"><display/></field>

-        <field name="description"><text/></field>

-        <field name="statusId">

-            <drop-down>

-                <entity-options description="${description}" entity-name="StatusItem">

-                    <entity-constraint name="statusId" operator="in" value="CTNT_PUBLISHED,CTNT_IN_PROGRESS"/>

-                </entity-options>

-            </drop-down>

-        </field>

-        <field name="submit" title="${uiLabelMap.CommonSubmit}"><submit/></field>

-    </form>

-    <form name="UploadRptDesign" type="upload" target="UploadRptDesign">

-        <actions>

-            <entity-and entity-name="ContentAssoc" use-cache="true" list="contentAssocs">

-                <field-map field-name="contentId" from-field="content.contentId"/>

-            </entity-and>

-            <set field="contentAssoc" from-field="contentAssocs[0]" type="Object"/>

-            <entity-one entity-name="Content" value-field="contentRpt">

-                <field-map from-field="contentAssoc.contentIdTo" field-name="contentId"/>

-            </entity-one>

-        </actions>

-        <field name="contentId"><hidden value="${content.contentId}"/></field>

-        <field name="dataResourceIdRpt"><hidden value="${contentRpt.dataResourceId}"/></field>

-        <field name="downloadRptDesignLink" title=" " widget-style="buttontext">

-            <hyperlink also-hidden="false" description="${uiLabelMap.BirtDownloadRptDesign}" target="ViewBinaryDataResource" target-window="_blank">

-                <parameter param-name="dataResourceId" from-field="contentRpt.dataResourceId"/>

-            </hyperlink>

-        </field>

-        <field name="uploadRptDesign" title=" "><file/></field>

-        <field name="upload" title="${uiLabelMap.CommonUpload}" position="2"><submit/></field>

-    </form>

-

-    <form name="EditFlexibleReportSearchForm" type="single" target="EditFlexibleReportSearchForm">

-        <actions>

-            <set field="statusId" from-field="content.statusId"/>

-            <set field="reportContentId" from-field="content.contentId"/>

-            <entity-and entity-name="ContentAssoc" list="masterContent">

-                <field-map field-name="contentIdTo" from-field="contentId"/>

-                <field-map field-name="contentAssocTypeId" value="SUB_CONTENT"/>

-            </entity-and>

-            <service service-name="prepareFlexibleReportSearchFormToEdit" auto-field-map="true" result-map="displayFormMap"/>

-        </actions>

-        <field name="overrideFilters" title=" "><textarea cols="90" rows="20" default-value="${displayFormMap.textForm}"/></field>

-        <field name="reportContentId"><hidden/></field>

-        <field name="saveButton" title="${uiLabelMap.CommonSave}"><submit/></field>

-        <on-event-update-area event-type="submit" area-id="preview-column" area-target="PreviewReportSearchForm">

-            <parameter param-name="contentId" value="${contentId}"/>

-        </on-event-update-area>

-    </form>

-

-    <form name="ListFlexibleReport" type="list" target="" odd-row-style="alternate-row" list-name="contentTypeReport" header-row-style="header-row-2" default-table-style="basic-table hover-bar">

-        <row-actions>

-            <entity-one entity-name="Content" value-field="content" />

-            <set field="contentId" from-field="content.contentId"/>

-            <entity-and entity-name="ContentAssoc" use-cache="true" list="contentAssocs">

-                <field-map field-name="contentId"/>

-            </entity-and>

-            <set field="contentAssoc" from-field="contentAssocs[0]" type="Object"/>

-            <entity-one entity-name="Content" value-field="contentRpt">

-                <field-map from-field="contentAssoc.contentIdTo" field-name="contentId"/>

-            </entity-one>

-            <entity-and entity-name="ContentAssoc" use-cache="true" list="masterContentAssocs">

-                <field-map field-name="contentIdTo" from-field="contentId"/>

-            </entity-and>

-            <set field="masterContentAssoc" from-field="masterContentAssocs[0]" type="Object"/>

-            <entity-one entity-name="Content" value-field="masterContent">

-                <field-map from-field="masterContentAssoc.contentId" field-name="contentId"/>

-            </entity-one>

-        </row-actions>

-        <field name="contentName" sort-field="true"><display/></field>

-        <field name="masterContentName" sort-field="true" map-name="masterContent" entry-name="contentName"><display /></field>

-        <field name="statusId" sort-field="true"><display-entity entity-name="StatusItem" /></field>

-        <field name="description" sort-field="true"><display/></field>

-        <field name="manageLink"><include-menu name="ListFlexibleBirtAction" location="component://birt/widget/birt/BirtMenus.xml"/></field>

-  </form>

-

-</forms>

+<?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.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
+
+    <form name="EditMail" type="single" target="sendBirtMail">
+        <field name="sendFrom"><text/></field>
+        <field name="sendTo"><text/></field>
+        <field name="subject"><text/></field>
+        <field name="birtContentType">
+            <drop-down>
+                <entity-options entity-name="Enumeration" description="${enumCode}" key-field-name="description">
+                    <entity-constraint name="enumTypeId" value="FLEXIBLE_BIRT"/>
+                    <entity-order-by field-name="sequenceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="attachmentName" required-field="true"><text/></field>
+        <field name="birtReportLocation" tooltip="Example is component://birt/webapp/birt/report/example.rptdesign" required-field="true"><text/></field>
+        <field name="sendButton"><submit/></field>
+    </form>
+
+    <!-- Flexible Report Form -->
+    <form name="CreateFlexibleReport" type="single" target="CreateFlexibleReport">
+        <field name="contentId" title="${uiLabelMap.BirtSelectMasterFlexibleReport}" >
+            <drop-down>
+                <entity-options description="${description}" entity-name="Content" key-field-name="contentId">
+                    <entity-constraint name="contentTypeId" value="REPORT_MASTER" />
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="reportName" required-field="true"><text/></field>
+        <field name="description" required-field="true"><text /></field>
+        <field name="writeFilters"><check/></field>
+        <field name="sendButton"><submit/></field>
+    </form>
+    <form name="ListPublishFlexibleReport" type="single" target="DisplayFlexibleReportSearchForm">
+        <field name="contentId" title="${uiLabelMap.BirtSelectFlexibleReport}" >
+            <drop-down>
+                <entity-options description="[${contentName}] ${description}" entity-name="ContentAssocViewTo" key-field-name="contentId">
+                    <entity-constraint name="contentTypeId" value="FLEXIBLE_REPORT" />
+                    <entity-constraint name="statusId" value="CTNT_PUBLISHED"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="sendButton"><submit /></field>
+    </form>
+
+    <form name="EditFlexibleReport" type="single" target="UpdateFlexibleReport" default-map-name="content">
+        <field name="contentId"><hidden/></field>
+        <field name="contentName" title="${uiLabelMap.FormFieldTitle_reportName}"><display/></field>
+        <field name="description"><text/></field>
+        <field name="statusId">
+            <drop-down>
+                <entity-options description="${description}" entity-name="StatusItem">
+                    <entity-constraint name="statusId" operator="in" value="CTNT_PUBLISHED,CTNT_IN_PROGRESS"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submit" title="${uiLabelMap.CommonSubmit}"><submit/></field>
+    </form>
+    <form name="UploadRptDesign" type="upload" target="UploadRptDesign">
+        <actions>
+            <entity-and entity-name="ContentAssoc" use-cache="true" list="contentAssocs">
+                <field-map field-name="contentId" from-field="content.contentId"/>
+            </entity-and>
+            <set field="contentAssoc" from-field="contentAssocs[0]" type="Object"/>
+            <entity-one entity-name="Content" value-field="contentRpt">
+                <field-map from-field="contentAssoc.contentIdTo" field-name="contentId"/>
+            </entity-one>
+        </actions>
+        <field name="contentId"><hidden value="${content.contentId}"/></field>
+        <field name="dataResourceIdRpt"><hidden value="${contentRpt.dataResourceId}"/></field>
+        <field name="downloadRptDesignLink" title=" " widget-style="buttontext">
+            <hyperlink also-hidden="false" description="${uiLabelMap.BirtDownloadRptDesign}" target="ViewBinaryDataResource" target-window="_blank">
+                <parameter param-name="dataResourceId" from-field="contentRpt.dataResourceId"/>
+            </hyperlink>
+        </field>
+        <field name="uploadRptDesign" title=" "><file/></field>
+        <field name="upload" title="${uiLabelMap.CommonUpload}" position="2"><submit/></field>
+    </form>
+
+    <form name="EditFlexibleReportSearchForm" type="single" target="EditFlexibleReportSearchForm">
+        <actions>
+            <set field="statusId" from-field="content.statusId"/>
+            <set field="reportContentId" from-field="content.contentId"/>
+            <entity-and entity-name="ContentAssoc" list="masterContent">
+                <field-map field-name="contentIdTo" from-field="contentId"/>
+                <field-map field-name="contentAssocTypeId" value="SUB_CONTENT"/>
+            </entity-and>
+            <service service-name="prepareFlexibleReportSearchFormToEdit" auto-field-map="true" result-map="displayFormMap"/>
+        </actions>
+        <field name="overrideFilters" title=" "><textarea cols="90" rows="20" default-value="${displayFormMap.textForm}"/></field>
+        <field name="reportContentId"><hidden/></field>
+        <field name="saveButton" title="${uiLabelMap.CommonSave}"><submit/></field>
+        <on-event-update-area event-type="submit" area-id="preview-column" area-target="PreviewReportSearchForm">
+            <parameter param-name="contentId" value="${contentId}"/>
+        </on-event-update-area>
+    </form>
+
+    <form name="ListFlexibleReport" type="list" target="" odd-row-style="alternate-row" list-name="contentTypeReport" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <row-actions>
+            <entity-one entity-name="Content" value-field="content" />
+            <set field="contentId" from-field="content.contentId"/>
+            <entity-and entity-name="ContentAssoc" use-cache="true" list="contentAssocs">
+                <field-map field-name="contentId"/>
+            </entity-and>
+            <set field="contentAssoc" from-field="contentAssocs[0]" type="Object"/>
+            <entity-one entity-name="Content" value-field="contentRpt">
+                <field-map from-field="contentAssoc.contentIdTo" field-name="contentId"/>
+            </entity-one>
+            <entity-and entity-name="ContentAssoc" use-cache="true" list="masterContentAssocs">
+                <field-map field-name="contentIdTo" from-field="contentId"/>
+            </entity-and>
+            <set field="masterContentAssoc" from-field="masterContentAssocs[0]" type="Object"/>
+            <entity-one entity-name="Content" value-field="masterContent">
+                <field-map from-field="masterContentAssoc.contentId" field-name="contentId"/>
+            </entity-one>
+        </row-actions>
+        <field name="contentName" sort-field="true"><display/></field>
+        <field name="masterContentName" sort-field="true" map-name="masterContent" entry-name="contentName"><display /></field>
+        <field name="statusId" sort-field="true"><display-entity entity-name="StatusItem" /></field>
+        <field name="description" sort-field="true"><display/></field>
+        <field name="manageLink"><include-menu name="ListFlexibleBirtAction" location="component://birt/widget/birt/BirtMenus.xml"/></field>
+  </form>
+
+</forms>
diff --git a/plugins/birt/widget/birt/BirtScreens.xml b/plugins/birt/widget/birt/BirtScreens.xml
index 2dbd9b8..754122f 100644
--- a/plugins/birt/widget/birt/BirtScreens.xml
+++ b/plugins/birt/widget/birt/BirtScreens.xml
@@ -1,417 +1,417 @@
-<?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.

--->

-

-<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">

-

-    <screen name="main-decorator">

-        <section>

-            <actions>

-                <!-- base/top/specific map first, then more common map added for shared labels -->

-                <property-map resource="BirtUiLabels" map-name="uiLabelMap" global="true"/>

-                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>

-

-                <set field="layoutSettings.companyName" from-field="uiLabelMap.BirtCompanyName" global="true"/>

-                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.BirtCompanySubtitle" global="true"/>

-                <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,

-                    then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->

-                <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.gif" global="true"/>-->

-

-                <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->

-                <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->

-                <!-- TODO: Use transform to specify component URI -->

-                <set field="layoutSettings.companyName" from-field="uiLabelMap.BirtCompanyName" global="true"/>

-                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.BirtCompanySubtitle" global="true"/>

-                <set field="activeApp" value="birt" global="true"/>

-                <set field="applicationMenuName" value="BirtAppBar" global="true"/>

-                <set field="applicationMenuLocation" value="component://birt/widget/birt/BirtMenus.xml" global="true"/>

-                <set field="applicationTitle" value="${uiLabelMap.BirtExampleApplication}" global="true"/>

-            </actions>

-            <widgets>

-                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="CommonBirtDecorator">

-        <section>

-            <actions>

-                <set field="headerItem" value="Birt"/>

-                <set field="subcomponentMenuName" from-field="subcomponentMenuName" default-value="BirtTabBar" />

-                <set field="subcomponentMenuLocation" from-field="subcomponentMenuLocation" default-value="component://birt/widget/birt/BirtMenus.xml" />

-            </actions>

-            <widgets>

-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="pre-body">

-                        <section>

-                            <!-- do check for WEBTOOLS, _VIEW permission -->

-                            <condition>

-                                <if-has-permission permission="ENTITY_MAINT"/>

-                            </condition>

-                            <widgets>

-                                <include-menu name="${subcomponentMenuName}" location="${subcomponentMenuLocation}"/>

-                            </widgets>

-                        </section>

-                    </decorator-section>

-                    <decorator-section name="body">

-                        <container style="clear" />

-                        <section>

-                            <!-- do check for WEBTOOLS, _VIEW permission -->

-                            <condition>

-                                <if-has-permission permission="ENTITY_MAINT"/>

-                            </condition>

-                            <widgets>

-                                <decorator-section-include name="body"/>

-                            </widgets>

-                            <fail-widgets>

-                                <label style="h3">${uiLabelMap.WebtoolsPermissionError}</label>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="CommonBirtMinimalDecorator">

-        <section>

-            <actions>

-                <property-map resource="BirtUiLabels" map-name="uiLabelMap" global="true"/>

-                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>

-            </actions>

-            <widgets>

-                <decorator-section-include name="body"/>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="main">

-        <section>

-            <actions>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <widgets>

-                                  <label style="h3" text="BIRT is an open source Eclipse-based reporting system that integrates with any OFBiz application to produce compelling reports including graphical presentations like pie and bar charts."/>

-                                  <label style="h3" text="This application provides you with a sample example report."/>

-                                  <label style="h3" text="See the help option how to create your own OFBiz intergrated reports."/>

-                                  <link style="h3" text="or see the Birt home for more information" target="http://eclipse.org/birt/phoenix/intro/" url-mode="plain" target-window="_blank_"/>

-                            </widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="Report">

-        <section>

-            <actions>

-                <set field="tabButtonItem" value="Report"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <widgets>

-                                <screenlet title="Using report tag">

-                                    <platform-specific>

-                                        <html>

-                                            <html-template location="component://birt/template/Report.ftl"/>

-                                        </html>

-                                    </platform-specific>

-                                </screenlet>

-                            </widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="EditMail">

-        <section>

-            <actions>

-                <set field="tabButtonItem" value="Mail"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <widgets>

-                                <screenlet title="Send BIRT report by mail">

-                                    <include-form name="EditMail" location="component://birt/widget/birt/BirtForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="chartReport">

-        <section>

-            <actions>

-                <set field="tabButtonItem" value="chartReport"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <widgets>

-                                <screenlet title="Using report tag">

-                                    <platform-specific>

-                                        <html><html-template location="component://birt/template/ChartReport.ftl"/></html>

-                                    </platform-specific>

-                                </screenlet>

-                            </widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <!--=========================-->

-    <!--  Flexible Birt Screen   -->

-    <!--=========================-->

-    <screen name="CommonFlexibleBirtDecorator">

-        <section>

-            <actions>

-                <set field="subcomponentMenuLocation" value="component://birt/widget/birt/BirtMenus.xml"/>

-                <set field="subcomponentMenuName" value="FlexibleBirtTabBar"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <decorator-section-include name="body"/>

-                    </decorator-section>

-                </decorator-screen>

-

-            </widgets>

-        </section>

-    </screen>

-    <screen name="UseFlexibleReport">

-        <section>

-            <actions>

-               <set field="tabButtonItem" value="UseFlexibleReport" />

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonFlexibleBirtDecorator">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="BIRT" action="_VIEW"/>

-                            </condition>

-                            <widgets>

-                                <include-screen name="SelectFlexibleReport"/>

-                            </widgets>

-                            <fail-widgets>

-                                <label style="h3">${uiLabelMap.BirtPermissionError}</label>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="SelectFlexibleReport">

-        <section>

-            <condition>

-                <if-has-permission permission="BIRT" action="_VIEW"/>

-<!--                 <if-service-permission service-name="genericBirtPermission" main-action="VIEW"/> -->

-            </condition>

-            <actions>

-                <property-map resource="BirtUiLabels" map-name="uiLabelMap" global="true" />

-                <set field="contentEntityNameView" from-field="contentEntityNameView" default-value=""/>

-            </actions>

-            <widgets>

-                <screenlet title="${uiLabelMap.BirtSelectFlexibleReport}">

-                    <include-form location="component://birt/widget/birt/BirtForms.xml" name="ListPublishFlexibleReport" />

-                </screenlet>

-            </widgets>

-            <fail-widgets>

-                <label style="h3">${uiLabelMap.BirtPermissionError}</label>

-            </fail-widgets>

-        </section>

-    </screen>

-

-    <screen name="ListFlexibleReport">

-        <section>

-            <actions>

-                <set field="tabButtonItem" value="ListFlexibleReport" />

-                <set field="sortField" from-field="parameters.sortField" default-value="contentName"/>

-                <entity-and entity-name="Content" use-cache="true" list="contentTypeReport">

-                    <field-map field-name="contentTypeId" value="FLEXIBLE_REPORT"/>

-                    <order-by field-name="${sortField}"/>

-                </entity-and>

-                <service service-name="genericBirtPermission" result-map="permCreateResult">

-                    <field-map field-name="mainAction" value="CREATE"/>

-                </service>

-                <set field="hasCreatePermission" from-field="permCreateResult.hasPermission"/>

-    

-                <service service-name="genericBirtPermission" result-map="permDeleteResult">

-                    <field-map field-name="mainAction" value="DELETE"/>

-                </service>

-                <set field="hasDeletePermission" from-field="permDeleteResult.hasPermission"/>

-    

-                <service service-name="genericBirtPermission" result-map="permUpdateResult">

-                    <field-map field-name="mainAction" value="UPDATE"/>

-                </service>

-                <set field="hasUpdatePermission" from-field="permUpdateResult.hasPermission"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonFlexibleBirtDecorator">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="BIRT" action="_DELETE"/>

-                                    <if-has-permission permission="BIRT" action="_CREATE"/>

-                                    <if-has-permission permission="BIRT" action="_UPDATE"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <container style="button-bar">

-                                    <link target="SelectMasterFlexibleReport" text="${uiLabelMap.BirtFlexibleReportGeneration}" style="buttontext create"/>

-                                </container>

-                                <screenlet title="${uiLabelMap.BirtFlexibleReportManagement}">

-                                    <section>

-                                        <condition>

-                                            <not><if-empty field="contentTypeReport"/></not>

-                                        </condition>

-                                        <widgets>

-                                            <include-form location="component://birt/widget/birt/BirtForms.xml" name="ListFlexibleReport" />

-                                        </widgets>

-                                        <fail-widgets>

-                                            <label text="${uiLabelMap.BirtNoKnownFlexibleReport}"/>

-                                        </fail-widgets>

-                                    </section>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label style="h3">${uiLabelMap.BirtPermissionError}</label>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="CreateFlexibleReport">

-        <section>

-            <actions>

-                <set field="tabButtonItem" value="SelectMasterFlexibleReport" />

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonFlexibleBirtDecorator">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="BIRT" action="_CREATE"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.BirtSelectMasterFlexibleReport}">

-                                    <include-form location="component://birt/widget/birt/BirtForms.xml" name="CreateFlexibleReport" />

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label style="h3">${uiLabelMap.BirtPermissionError}</label>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="EditFlexibleReport">

-        <section>

-            <actions>

-                <set field="tabButtonItem" value="manageReport" />

-                <set field="contentId" from-field="parameters.reportContentId" default-value="${parameters.contentId}"/>

-                <entity-one entity-name="Content" value-field="content"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonFlexibleBirtDecorator">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-has-permission permission="BIRT" action="_CREATE"/>

-                                    <if-has-permission permission="BIRT" action="_UPDATE"/>

-                                </or>

-                            </condition>

-                            <widgets>

-                                <container id="edit-column" style="lefthalf">

-                                    <screenlet title="${uiLabelMap.BirtEditFlexibleReport}">

-                                        <label style="h2">${uiLabelMap.BirtFlexibleReportInformation}</label>

-                                        <include-form name="EditFlexibleReport" location="component://birt/widget/birt/BirtForms.xml"/>

-                                        <label style="h2">${uiLabelMap.BirtUploadRptDesign}</label>

-                                        <include-form name="UploadRptDesign" location="component://birt/widget/birt/BirtForms.xml" />

-                                        <label style="h2">${uiLabelMap.BirtOverrideFilters}</label>

-                                        <include-form name="EditFlexibleReportSearchForm" location="component://birt/widget/birt/BirtForms.xml"/>

-                                    </screenlet>

-                                </container>

-                                <container id="preview-column" style="righthalf">

-                                    <include-screen name="PreviewReportSearchForm"/>

-                                </container>

-                            </widgets>

-                            <fail-widgets>

-                                <label style="h3">${uiLabelMap.BirtPermissionError}</label>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="DisplayFlexibleReportSearchForm">

-        <section>

-            <widgets>

-                <decorator-screen name="CommonFlexibleBirtDecorator">

-                    <decorator-section name="body">

-                        <include-screen name="PreviewReportSearchForm"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="PreviewReportSearchForm">

-        <section>

-            <actions>

-                <entity-one entity-name="Content" value-field="content" use-cache="true"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBirtMinimalDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="${uiLabelMap.CommonPreview}" id="content-form-preview">

-                            <content content-id="${content.contentId}"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-</screens>

+<?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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
+    <screen name="main-decorator">
+        <section>
+            <actions>
+                <!-- base/top/specific map first, then more common map added for shared labels -->
+                <property-map resource="BirtUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+                <set field="layoutSettings.companyName" from-field="uiLabelMap.BirtCompanyName" global="true"/>
+                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.BirtCompanySubtitle" global="true"/>
+                <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,
+                    then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->
+                <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.gif" global="true"/>-->
+
+                <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
+                <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
+                <!-- TODO: Use transform to specify component URI -->
+                <set field="layoutSettings.companyName" from-field="uiLabelMap.BirtCompanyName" global="true"/>
+                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.BirtCompanySubtitle" global="true"/>
+                <set field="activeApp" value="birt" global="true"/>
+                <set field="applicationMenuName" value="BirtAppBar" global="true"/>
+                <set field="applicationMenuLocation" value="component://birt/widget/birt/BirtMenus.xml" global="true"/>
+                <set field="applicationTitle" value="${uiLabelMap.BirtExampleApplication}" global="true"/>
+            </actions>
+            <widgets>
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="CommonBirtDecorator">
+        <section>
+            <actions>
+                <set field="headerItem" value="Birt"/>
+                <set field="subcomponentMenuName" from-field="subcomponentMenuName" default-value="BirtTabBar" />
+                <set field="subcomponentMenuLocation" from-field="subcomponentMenuLocation" default-value="component://birt/widget/birt/BirtMenus.xml" />
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="pre-body">
+                        <section>
+                            <!-- do check for WEBTOOLS, _VIEW permission -->
+                            <condition>
+                                <if-has-permission permission="ENTITY_MAINT"/>
+                            </condition>
+                            <widgets>
+                                <include-menu name="${subcomponentMenuName}" location="${subcomponentMenuLocation}"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                    <decorator-section name="body">
+                        <container style="clear" />
+                        <section>
+                            <!-- do check for WEBTOOLS, _VIEW permission -->
+                            <condition>
+                                <if-has-permission permission="ENTITY_MAINT"/>
+                            </condition>
+                            <widgets>
+                                <decorator-section-include name="body"/>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.WebtoolsPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="CommonBirtMinimalDecorator">
+        <section>
+            <actions>
+                <property-map resource="BirtUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+            </actions>
+            <widgets>
+                <decorator-section-include name="body"/>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="main">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                  <label style="h3" text="BIRT is an open source Eclipse-based reporting system that integrates with any OFBiz application to produce compelling reports including graphical presentations like pie and bar charts."/>
+                                  <label style="h3" text="This application provides you with a sample example report."/>
+                                  <label style="h3" text="See the help option how to create your own OFBiz intergrated reports."/>
+                                  <link style="h3" text="or see the Birt home for more information" target="http://eclipse.org/birt/phoenix/intro/" url-mode="plain" target-window="_blank_"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="Report">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="Report"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <screenlet title="Using report tag">
+                                    <platform-specific>
+                                        <html>
+                                            <html-template location="component://birt/template/Report.ftl"/>
+                                        </html>
+                                    </platform-specific>
+                                </screenlet>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="EditMail">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="Mail"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <screenlet title="Send BIRT report by mail">
+                                    <include-form name="EditMail" location="component://birt/widget/birt/BirtForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="chartReport">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="chartReport"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <screenlet title="Using report tag">
+                                    <platform-specific>
+                                        <html><html-template location="component://birt/template/ChartReport.ftl"/></html>
+                                    </platform-specific>
+                                </screenlet>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <!--=========================-->
+    <!--  Flexible Birt Screen   -->
+    <!--=========================-->
+    <screen name="CommonFlexibleBirtDecorator">
+        <section>
+            <actions>
+                <set field="subcomponentMenuLocation" value="component://birt/widget/birt/BirtMenus.xml"/>
+                <set field="subcomponentMenuName" value="FlexibleBirtTabBar"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBirtDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+
+            </widgets>
+        </section>
+    </screen>
+    <screen name="UseFlexibleReport">
+        <section>
+            <actions>
+               <set field="tabButtonItem" value="UseFlexibleReport" />
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFlexibleBirtDecorator">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="BIRT" action="_VIEW"/>
+                            </condition>
+                            <widgets>
+                                <include-screen name="SelectFlexibleReport"/>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.BirtPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="SelectFlexibleReport">
+        <section>
+            <condition>
+                <if-has-permission permission="BIRT" action="_VIEW"/>
+<!--                 <if-service-permission service-name="genericBirtPermission" main-action="VIEW"/> -->
+            </condition>
+            <actions>
+                <property-map resource="BirtUiLabels" map-name="uiLabelMap" global="true" />
+                <set field="contentEntityNameView" from-field="contentEntityNameView" default-value=""/>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.BirtSelectFlexibleReport}">
+                    <include-form location="component://birt/widget/birt/BirtForms.xml" name="ListPublishFlexibleReport" />
+                </screenlet>
+            </widgets>
+            <fail-widgets>
+                <label style="h3">${uiLabelMap.BirtPermissionError}</label>
+            </fail-widgets>
+        </section>
+    </screen>
+
+    <screen name="ListFlexibleReport">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="ListFlexibleReport" />
+                <set field="sortField" from-field="parameters.sortField" default-value="contentName"/>
+                <entity-and entity-name="Content" use-cache="true" list="contentTypeReport">
+                    <field-map field-name="contentTypeId" value="FLEXIBLE_REPORT"/>
+                    <order-by field-name="${sortField}"/>
+                </entity-and>
+                <service service-name="genericBirtPermission" result-map="permCreateResult">
+                    <field-map field-name="mainAction" value="CREATE"/>
+                </service>
+                <set field="hasCreatePermission" from-field="permCreateResult.hasPermission"/>
+    
+                <service service-name="genericBirtPermission" result-map="permDeleteResult">
+                    <field-map field-name="mainAction" value="DELETE"/>
+                </service>
+                <set field="hasDeletePermission" from-field="permDeleteResult.hasPermission"/>
+    
+                <service service-name="genericBirtPermission" result-map="permUpdateResult">
+                    <field-map field-name="mainAction" value="UPDATE"/>
+                </service>
+                <set field="hasUpdatePermission" from-field="permUpdateResult.hasPermission"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFlexibleBirtDecorator">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="BIRT" action="_DELETE"/>
+                                    <if-has-permission permission="BIRT" action="_CREATE"/>
+                                    <if-has-permission permission="BIRT" action="_UPDATE"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <container style="button-bar">
+                                    <link target="SelectMasterFlexibleReport" text="${uiLabelMap.BirtFlexibleReportGeneration}" style="buttontext create"/>
+                                </container>
+                                <screenlet title="${uiLabelMap.BirtFlexibleReportManagement}">
+                                    <section>
+                                        <condition>
+                                            <not><if-empty field="contentTypeReport"/></not>
+                                        </condition>
+                                        <widgets>
+                                            <include-form location="component://birt/widget/birt/BirtForms.xml" name="ListFlexibleReport" />
+                                        </widgets>
+                                        <fail-widgets>
+                                            <label text="${uiLabelMap.BirtNoKnownFlexibleReport}"/>
+                                        </fail-widgets>
+                                    </section>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.BirtPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="CreateFlexibleReport">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="SelectMasterFlexibleReport" />
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFlexibleBirtDecorator">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="BIRT" action="_CREATE"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.BirtSelectMasterFlexibleReport}">
+                                    <include-form location="component://birt/widget/birt/BirtForms.xml" name="CreateFlexibleReport" />
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.BirtPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EditFlexibleReport">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="manageReport" />
+                <set field="contentId" from-field="parameters.reportContentId" default-value="${parameters.contentId}"/>
+                <entity-one entity-name="Content" value-field="content"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFlexibleBirtDecorator">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-has-permission permission="BIRT" action="_CREATE"/>
+                                    <if-has-permission permission="BIRT" action="_UPDATE"/>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <container id="edit-column" style="lefthalf">
+                                    <screenlet title="${uiLabelMap.BirtEditFlexibleReport}">
+                                        <label style="h2">${uiLabelMap.BirtFlexibleReportInformation}</label>
+                                        <include-form name="EditFlexibleReport" location="component://birt/widget/birt/BirtForms.xml"/>
+                                        <label style="h2">${uiLabelMap.BirtUploadRptDesign}</label>
+                                        <include-form name="UploadRptDesign" location="component://birt/widget/birt/BirtForms.xml" />
+                                        <label style="h2">${uiLabelMap.BirtOverrideFilters}</label>
+                                        <include-form name="EditFlexibleReportSearchForm" location="component://birt/widget/birt/BirtForms.xml"/>
+                                    </screenlet>
+                                </container>
+                                <container id="preview-column" style="righthalf">
+                                    <include-screen name="PreviewReportSearchForm"/>
+                                </container>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.BirtPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="DisplayFlexibleReportSearchForm">
+        <section>
+            <widgets>
+                <decorator-screen name="CommonFlexibleBirtDecorator">
+                    <decorator-section name="body">
+                        <include-screen name="PreviewReportSearchForm"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="PreviewReportSearchForm">
+        <section>
+            <actions>
+                <entity-one entity-name="Content" value-field="content" use-cache="true"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBirtMinimalDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.CommonPreview}" id="content-form-preview">
+                            <content content-id="${content.contentId}"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>
diff --git a/plugins/ebaystore/widget/EbayAccountScreens.xml b/plugins/ebaystore/widget/EbayAccountScreens.xml
index b7a4b35..2edb17f 100644
--- a/plugins/ebaystore/widget/EbayAccountScreens.xml
+++ b/plugins/ebaystore/widget/EbayAccountScreens.xml
@@ -1,218 +1,218 @@
-<!--

-  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"

-        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">

-    <!-- Personal Information -->

-    <screen name="EbayPersonalInformation">

-        <section>

-            <actions>

-                <set field="accountItem" value="personalInformation"/>

-                <service service-name="getEbayUser" result-map="results">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-            </actions>

-            <widgets>

-                <decorator-screen name="AccountDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet name="" title="${uiLabelMap.EbayPersonalInformation}">

-                            <include-form name="EbayPersonalInformationForm" location="component://ebaystore/widget/EbayAccountForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <!-- feedback -->

-    <screen name="EbayFeedback">

-        <section>

-            <actions>

-                <set field="titleProperty" value="eBay Feedback"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="accountItem" value="feedback"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="AccountDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="EBAY" action="_VIEW"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.EbayFeedback}">

-                                    <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayFeedbackTabBar"/>

-                                    <decorator-section-include name="body"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label style="h3">${uiLabelMap.EbayViewPermissionError}</label>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="Feedback">

-        <section>

-            <actions>

-                <set field="titleProperty" value="eBay Feedback"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="feedbackItem" value="Feedback"/>

-                <service service-name="loadFeedback"> 

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <service service-name="getItemsAwaitingFeedback" result-map="results"> 

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <set field="itemsAwaitingFeedbackList" from-field="results.itemsAwaitingFeedback"/>

-                <script location="component://ebaystore/groovyScripts/feedback/FeedbackList.groovy"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbayFeedback" >

-                    <decorator-section name="body">

-                        <screenlet>

-                            <screenlet navigation-form-name="ItemsAwaitingFeedback" title="Items Awaiting Feedback">

-                                <include-form name="ItemsAwaitingFeedback" location="component://ebaystore/widget/EbayAccountForms.xml"/>

-                            </screenlet>

-                        </screenlet>

-                        <screenlet>

-                            <screenlet navigation-form-name="RecentFeedback" title="Recent Feedback">

-                                <include-form name="RecentFeedback" location="component://ebaystore/widget/EbayAccountForms.xml"/>

-                            </screenlet>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="LeaveFeedback">

-        <section>

-            <actions>

-                <set field="titleProperty" value="eBay Feedback"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="feedbackItem" value="LeaveFeedback"/>

-                <set field="role" from-field="parameters.role" default-value="all"/>

-                <service service-name="getItemsAwaitingFeedback" result-map="results"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbayFeedback" >

-                    <decorator-section name="body">

-                        <screenlet>

-                            <screenlet title="${uiLabelMap.EbayLeaveFeedback}">

-                                <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayFeedbackSubTabBar"/>

-                                <platform-specific>

-                                    <html><html-template location="component://ebaystore/template/feedback/LeaveFeedback.ftl"/></html>

-                                </platform-specific>

-                            </screenlet>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen> 

-    <!-- ebay feedback -->

-    <screen name="EbayFeedback">

-        <section>

-            <actions>

-                <set field="titleProperty" value="eBay Feedback"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="accountItem" value="feedback"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="AccountDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <if-has-permission permission="EBAY" action="_VIEW"/>

-                            </condition>

-                            <widgets>

-                                <screenlet title="${uiLabelMap.EbayFeedback}">

-                                    <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayFeedbackTabBar"/>

-                                    <decorator-section-include name="body"/>

-                                </screenlet>

-                            </widgets>

-                            <fail-widgets>

-                                <label style="h3">${uiLabelMap.EbayViewPermissionError}</label>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="Feedback">

-        <section>

-            <actions>

-                <set field="titleProperty" value="eBay Feedback"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="feedbackItem" value="Feedback"/>

-                <service service-name="loadFeedback"> 

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <service service-name="getItemsAwaitingFeedback" result-map="results"> 

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <set field="itemsAwaitingFeedbackList" from-field="results.itemsAwaitingFeedback"/>

-                <script location="component://ebaystore/groovyScripts/feedback/FeedbackList.groovy"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbayFeedback" >

-                    <decorator-section name="body">

-                        <screenlet>

-                            <screenlet navigation-form-name="ItemsAwaitingFeedback" title="Items Awaiting Feedback">

-                                <include-grid name="ItemsAwaitingFeedback" location="component://ebaystore/widget/EbayAccountForms.xml"/>

-                            </screenlet>

-                        </screenlet>

-                        <screenlet>

-                            <screenlet navigation-form-name="RecentFeedback" title="Recent Feedback">

-                                <include-grid name="RecentFeedback" location="component://ebaystore/widget/EbayAccountForms.xml"/>

-                            </screenlet>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="LeaveFeedback">

-        <section>

-            <actions>

-                <set field="titleProperty" value="eBay Feedback"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="feedbackItem" value="LeaveFeedback"/>

-                <set field="role" from-field="parameters.role" default-value="all"/>

-                <service service-name="getItemsAwaitingFeedback" result-map="results"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbayFeedback" >

-                    <decorator-section name="body">

-                        <screenlet>

-                            <screenlet title="${uiLabelMap.EbayLeaveFeedback}">

-                                <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayFeedbackSubTabBar"/>

-                                <platform-specific>

-                                    <html><html-template location="component://ebaystore/template/feedback/LeaveFeedback.ftl"/></html>

-                                </platform-specific>

-                            </screenlet>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-</screens>

+<!--
+  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"
+        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
+    <!-- Personal Information -->
+    <screen name="EbayPersonalInformation">
+        <section>
+            <actions>
+                <set field="accountItem" value="personalInformation"/>
+                <service service-name="getEbayUser" result-map="results">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+            </actions>
+            <widgets>
+                <decorator-screen name="AccountDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet name="" title="${uiLabelMap.EbayPersonalInformation}">
+                            <include-form name="EbayPersonalInformationForm" location="component://ebaystore/widget/EbayAccountForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <!-- feedback -->
+    <screen name="EbayFeedback">
+        <section>
+            <actions>
+                <set field="titleProperty" value="eBay Feedback"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="accountItem" value="feedback"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="AccountDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="EBAY" action="_VIEW"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.EbayFeedback}">
+                                    <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayFeedbackTabBar"/>
+                                    <decorator-section-include name="body"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.EbayViewPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="Feedback">
+        <section>
+            <actions>
+                <set field="titleProperty" value="eBay Feedback"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="feedbackItem" value="Feedback"/>
+                <service service-name="loadFeedback"> 
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <service service-name="getItemsAwaitingFeedback" result-map="results"> 
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <set field="itemsAwaitingFeedbackList" from-field="results.itemsAwaitingFeedback"/>
+                <script location="component://ebaystore/groovyScripts/feedback/FeedbackList.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayFeedback" >
+                    <decorator-section name="body">
+                        <screenlet>
+                            <screenlet navigation-form-name="ItemsAwaitingFeedback" title="Items Awaiting Feedback">
+                                <include-form name="ItemsAwaitingFeedback" location="component://ebaystore/widget/EbayAccountForms.xml"/>
+                            </screenlet>
+                        </screenlet>
+                        <screenlet>
+                            <screenlet navigation-form-name="RecentFeedback" title="Recent Feedback">
+                                <include-form name="RecentFeedback" location="component://ebaystore/widget/EbayAccountForms.xml"/>
+                            </screenlet>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="LeaveFeedback">
+        <section>
+            <actions>
+                <set field="titleProperty" value="eBay Feedback"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="feedbackItem" value="LeaveFeedback"/>
+                <set field="role" from-field="parameters.role" default-value="all"/>
+                <service service-name="getItemsAwaitingFeedback" result-map="results"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayFeedback" >
+                    <decorator-section name="body">
+                        <screenlet>
+                            <screenlet title="${uiLabelMap.EbayLeaveFeedback}">
+                                <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayFeedbackSubTabBar"/>
+                                <platform-specific>
+                                    <html><html-template location="component://ebaystore/template/feedback/LeaveFeedback.ftl"/></html>
+                                </platform-specific>
+                            </screenlet>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen> 
+    <!-- ebay feedback -->
+    <screen name="EbayFeedback">
+        <section>
+            <actions>
+                <set field="titleProperty" value="eBay Feedback"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="accountItem" value="feedback"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="AccountDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="EBAY" action="_VIEW"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.EbayFeedback}">
+                                    <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayFeedbackTabBar"/>
+                                    <decorator-section-include name="body"/>
+                                </screenlet>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.EbayViewPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="Feedback">
+        <section>
+            <actions>
+                <set field="titleProperty" value="eBay Feedback"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="feedbackItem" value="Feedback"/>
+                <service service-name="loadFeedback"> 
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <service service-name="getItemsAwaitingFeedback" result-map="results"> 
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <set field="itemsAwaitingFeedbackList" from-field="results.itemsAwaitingFeedback"/>
+                <script location="component://ebaystore/groovyScripts/feedback/FeedbackList.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayFeedback" >
+                    <decorator-section name="body">
+                        <screenlet>
+                            <screenlet navigation-form-name="ItemsAwaitingFeedback" title="Items Awaiting Feedback">
+                                <include-grid name="ItemsAwaitingFeedback" location="component://ebaystore/widget/EbayAccountForms.xml"/>
+                            </screenlet>
+                        </screenlet>
+                        <screenlet>
+                            <screenlet navigation-form-name="RecentFeedback" title="Recent Feedback">
+                                <include-grid name="RecentFeedback" location="component://ebaystore/widget/EbayAccountForms.xml"/>
+                            </screenlet>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="LeaveFeedback">
+        <section>
+            <actions>
+                <set field="titleProperty" value="eBay Feedback"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="feedbackItem" value="LeaveFeedback"/>
+                <set field="role" from-field="parameters.role" default-value="all"/>
+                <service service-name="getItemsAwaitingFeedback" result-map="results"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayFeedback" >
+                    <decorator-section name="body">
+                        <screenlet>
+                            <screenlet title="${uiLabelMap.EbayLeaveFeedback}">
+                                <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayFeedbackSubTabBar"/>
+                                <platform-specific>
+                                    <html><html-template location="component://ebaystore/template/feedback/LeaveFeedback.ftl"/></html>
+                                </platform-specific>
+                            </screenlet>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>
diff --git a/plugins/ebaystore/widget/EbaySellingManagerScreens.xml b/plugins/ebaystore/widget/EbaySellingManagerScreens.xml
index 790d205..f5d3d90 100644
--- a/plugins/ebaystore/widget/EbaySellingManagerScreens.xml
+++ b/plugins/ebaystore/widget/EbaySellingManagerScreens.xml
@@ -1,761 +1,761 @@
-<!--

-  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"

-        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">

-    <!-- Store reserve inventory -->

-    <screen name="ebayStoreInventory">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="inventory"/>

-                <entity-and entity-name="ProductStoreFacility" list="productStoreFacilityList">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </entity-and>

-                <set  field="check"  value="${groovy: 

-                    check= &quot;false&quot;;

-                    if(productStoreFacilityList!=null &amp;&amp; productStoreFacilityList.size()== 1)  check = &quot;true&quot;;

-                    return check;

-                    }" type="String"/>

-                <set field="facilityId"  value="${groovy:

-                    if(check.equals(&quot;true&quot;)) facility = productStoreFacilityList.get(0);

-                    if(facility!=null) facilityId = facility.facilityId;

-                    return facilityId;}" type="String"/>

-            </actions>

-            <widgets>

-                <section>

-                    <condition>

-                        <if-compare field="check" operator="equals" value="true"/>

-                    </condition>

-                    <widgets>

-                        <section>

-                            <actions>

-                                <set field="parameters.facilityId" value="${facilityId}"/>

-                                <set field="parameters.productStoreId" from-field="parameters.productStoreId"/>

-                                <service service-name="getFolderInEbayStoreInventory" result-map="result">

-                                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                                </service>

-                                <set field="ebayfolderId" value="${result.folderId}"/>

-                            </actions>

-                            <widgets>

-                                <section>

-                                    <condition>

-                                        <not><if-empty field="ebayfolderId"/></not>

-                                    </condition>

-                                    <widgets><include-screen name="ViewInventoryItemDetail"/></widgets>

-                                    <fail-widgets><include-screen name="ebayStoreInventoryFail"/></fail-widgets>

-                                </section>

-                            </widgets>

-                        </section>

-                    </widgets>

-                    <fail-widgets>

-                        <section>

-                            <actions>

-                                <set field="parameters.facilityId" value="${facilityId}"/>

-                                <set field="parameters.productStoreId" from-field="parameters.productStoreId"/>

-                            </actions>

-                            <widgets>

-                                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                                    <decorator-section name="body">

-                                        <screenlet>

-                                            <include-form name="EbayStoreFacilityList" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                                        </screenlet>

-                                    </decorator-section>

-                                </decorator-screen>

-                            </widgets>

-                        </section>

-                    </fail-widgets>

-                </section>

-            </widgets>

-        </section>

-    </screen> 

-    <screen name="ebayLoadStoreInventory">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="inventory"/>

-                <entity-and entity-name="ProductStoreFacility" list="productStoreFacilityList">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </entity-and>

-            </actions>

-            <widgets>

-                <section>

-                    <widgets>

-                        <section>

-                            <actions>

-                                <set field="facilityId" from-field="parameters.facilityId"/>

-                                <set field="productStoreId" from-field="parameters.productStoreId"/>

-                                <set field="ebayfolderId" from-field="parameters.folderId"/>

-                            </actions>

-                            <widgets><include-screen name="ViewInventoryItemDetail"/></widgets>

-                        </section>

-                    </widgets>

-                </section>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="ViewInventoryItemDetail">

-        <section>

-            <actions>

-                <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>

-                <set field="titleProperty" value="PageTitleEditInventoryItem"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="inventory"/>

-                <set field="facilityId" from-field="parameters.facilityId"/>

-                <set field="productStoreId" from-field="parameters.productStoreId"/>

-                <entity-one entity-name="ProductStore" value-field="productStore">

-                    <field-map field-name="productStoreId" from-field="productStoreId"/>

-                    <select-field field-name="storeName"/>

-                </entity-one>

-                <entity-one entity-name="Facility" value-field="facility">

-                    <field-map field-name="facilityId" from-field="facilityId"/>

-                    <select-field field-name="facilityName"/>

-                </entity-one>

-                <entity-and entity-name="EbayProductStoreInventory" list="ebayProductStoreInventoryList">

-                    <field-map field-name="productStoreId"  from-field="productStoreId"/>

-                    <field-map field-name="facilityId"  from-field="facilityId"/>

-                </entity-and>

-                <property-map resource="ProductUiLabels" map-name="uiLabelMap"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="${uiLabelMap.ProductInventoryDetails} ${uiLabelMap.ProductStoreNameId} : ${productStore.storeName}[${productStore.productStoreId}] ${uiLabelMap.FacilityFacility} : ${facility.facilityName}">

-                            <section>

-                                <widgets>

-                                    <link name="updateEbayInventoryStatus" secure="true" target="updateEbayInventoryStatus"  style="buttontext" text="${uiLabelMap.EbayUpdateInventoryStatus}">

-                                        <parameter param-name="productStoreId" from-field="productStoreId"/>

-                                        <parameter param-name="facilityId" from-field="facilityId"/>

-                                    </link>

-                                    <link name="reserveEbayProductInventory" target="reserveEbayProductInventory"  style="buttontext" text="${uiLabelMap.EbayReserveProductInventory}">

-                                        <parameter param-name="productStoreId" from-field="productStoreId"/>

-                                        <parameter param-name="facilityId" from-field="facilityId"/>

-                                    </link>

-                                </widgets>

-                            </section>

-                            <include-form name="ListEbayProductInventoryDetail" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="reserveEbayProductInventory">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="inventory"/>

-                <set field="productStoreId" from-field="parameters.productStoreId"/>

-                <entity-one entity-name="Facility" value-field="facility">

-                    <field-map field-name="facilityId"  value="${parameters.facilityId}"/>

-                    <select-field field-name="facilityName"/>

-                </entity-one>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="${uiLabelMap.EbayReserveProductFrom} : ${facility.facilityName}">

-                            <include-form name="ReserveEbayProductInventory" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="ebayStoreInventoryFail">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="inventory"/>

-                <set field="productStoreId" from-field="parameters.productStoreId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="notes">

-                            <label style="label" text="Please subscribed to Selling Manager Pro before you use this function because ebay product inventory will open when you start selling manager pro on ebay site."></label>

-                            <label style="label" text="if you subscribed already then still can not use, please check you internet connection."></label>

-                            <label text="- To subscribe for production site"></label>

-                            <link target="http://pages.ebay.com/selling_manager_pro" text="http://pages.ebay.com/selling_manager_pro"  target-window="_BLANK" url-mode="plain"></link>

-                            <label text="- To upgrade store level sandbox site"></label>

-                            <link target="http://k2b-bulk.sandbox.ebay.com/ws/eBayISAPI.dll?MyeBaySellingPendingListings" target-window="_BLANK" url-mode="plain" text="http://k2b-bulk.sandbox.ebay.com/ws/eBayISAPI.dll?MyeBaySellingPendingListings"></link>

-                        </screenlet>

-                        <screenlet title="How to upgrade sandbox store level?">

-                            <label text="- Click on the link &quot;To upgrade store level for sandbox site&quot;"></label>

-                            <label text="- Go to &quot;Selling Related links&quot; section"></label>

-                            <label text="- Click on &quot;Edit my eBay store&quot;"></label>

-                            <label text="- Page Manage my eBay store will show up"></label>

-                            <label text="- Go to &quot;Store Usage Information&quot; section"></label>

-                            <label text="- Click upgrade at &quot;Subscription level&quot; then select &quot;Premium Store&quot; and &quot;Selling Manager Pro&quot; then submit."></label>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="updateQuantityReserved">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="inventory"/>

-                <entity-one entity-name="EbayProductStoreInventory" value-field="ebayProductStoreInventory">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="facilityId" from-field="parameters.facilityId"/>

-                    <field-map field-name="productId" from-field="parameters.productId"/>

-                </entity-one>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="Inventory Quantities">

-                            <include-form name="UpdateQuantityReserved" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <!-- Automation Preferences -->

-    <screen name="EbayAutomationPreferences">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="automationPreferences"/>

-                <service service-name="getEbayStoreUser" result-map="result">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <set field="userLoginId" from-field="result.userLoginId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <decorator-section-include name="body"/>

-                        <include-screen name="AutomationRelistSoldItems"/>

-                        <include-screen name="AutomationDispute"/>

-                        <screenlet title="${uiLabelMap.EbayTxtAutoPositiveFeedbackBuyer}" id="autoPositiveFeedback" collapsible="true" initially-collapsed="true">

-                            <include-form name="AutoPositiveFeedbackForBuyers" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                        <screenlet title="${uiLabelMap.EbayIsAutoFeedbackReminder}" id="autoSendFeedbackReminder" collapsible="true" initially-collapsed="true">

-                            <include-form name="AutoSendFeedbackReminder" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                        <screenlet title="${uiLabelMap.EbayAutoPaymentReceviedEmail}" id="autoSendPaymentReceivedEmail" collapsible="true" initially-collapsed="true">

-                            <include-form name="AutoSendPaymentReceivedEmail" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                        <screenlet title="${uiLabelMap.EbayCombineOrderSetting}" id="combineOrdersSetting" collapsible="true" initially-collapsed="true">

-                            <include-form name="CombineOrdersSetting" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                        <screenlet title="${uiLabelMap.EbayAutoSendWinBuyerEmail}" id="winningBuyerNotification" collapsible="true" initially-collapsed="true">

-                            <include-form name="WinningBuyerNotification" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                        <screenlet title="${uiLabelMap.EbayAutoSendItemDispatchEmail}" id="itemDispatchedNotification" collapsible="true" initially-collapsed="true">

-                            <include-form name="ItemDispatchedNotification" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                        <screenlet title="${uiLabelMap.EbayBlockItemOutOfStock}" id="blockItemsOutOfStock" collapsible="true" initially-collapsed="true">

-                            <include-form name="BlockItemsOutOfStock" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                        <screenlet title="${uiLabelMap.AutoBestOfferSetting}" id="bestOfferSetting" collapsible="true" initially-collapsed="true">

-                            <include-form name="BestOffer" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="AutomationRelistSoldItems">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="autoPrefEnumId" value="EBAY_AUTO_RELISTING"/>

-                <set field="serviceName" value="autoRelistingItems"/>

-                <entity-one entity-name="EbayProductStorePref" value-field="ebayPrefRelisting">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="autoPrefEnumId" from-field="autoPrefEnumId"/>

-                </entity-one>

-                 <service service-name="getEbayStoreUser" result-map="result">

-                     <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <set field="userLoginId" from-field="result.userLoginId"/>

-            </actions>

-            <widgets>

-                <screenlet title="${uiLabelMap.EbayAutomationRelistItems}" collapsible="true" name="EbayAutomationRelistItems">

-                    <include-form name="EditAutomationRelistSoldItems"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                </screenlet>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="AutomationDispute">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="automaticEbayDisputeItems"/>

-                <set field="autoPrefEnumId1" value="EBAY_AUTO_DISPUTE1"/>

-                <set field="autoPrefEnumId2" value="EBAY_AUTO_DISPUTE2"/>

-                <set field="serviceName1" value="automaticEbayDisputeNotComplete"/>

-                <set field="serviceName2" value="automaticEbayDisputeNotPay"/>

-                <entity-one entity-name="EbayProductStorePref" value-field="ebayPrefDispute1">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="autoPrefEnumId" from-field="autoPrefEnumId1"/>

-                </entity-one>

-                <entity-one entity-name="EbayProductStorePref" value-field="ebayPrefDispute2">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="autoPrefEnumId" from-field="autoPrefEnumId2"/>

-                </entity-one>

-                <script location="component://ebaystore/groovyScripts/automationPreferences/GetDisputeInfo.groovy"/>

-            </actions>

-            <widgets>

-                <screenlet title="${uiLabelMap.EbayAutomatiionDisputeItems}" collapsible="true" name="AutomationDispute">

-                    <include-form name="AutomationDisputeNotComplete"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                    <include-form name="AutomationDisputeNotPay"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                </screenlet>

-            </widgets>

-        </section>

-    </screen>

-    <!-- Sold -->

-    <screen name="EbaySoldListing">

-        <section>

-            <actions>

-                <set field="sellingManagerItem" value="soldListing"/>

-            </actions>

-            <widgets>

-               <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <decorator-section-include name="body"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="SoldListing">

-        <section>

-            <actions>

-                <service service-name="getEbaySoldItems" result-map="result">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <set field="soldItemList" from-field="result.soldItems"/>

-                <set field="target" value="soldListing"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbaySoldListing">

-                    <decorator-section name="body">

-                        <screenlet title="Sold Listing">

-                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="SoldItemList"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="OpenUnpaid">

-        <section>

-            <widgets>

-                <decorator-screen name="EbaySoldListing">

-                    <decorator-section name="body">

-                        <screenlet title="Open Unpaid">

-                               <include-form name="OpenUnpaid" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                           </screenlet>

-                       </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="MakeSecondChanceOffer">

-        <section>

-            <actions>

-                <service service-name="getEbayAllBidders" result-map="results">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="itemId" from-field="parameters.itemId"/>

-                </service>

-                <set field="allBidders" from-field="results.allBidders"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbaySoldListing">

-                    <decorator-section name="body">

-                        <screenlet title="${uiLabelMap.EbayAddSecondChanceOffer}">

-                            <include-form name="MakeSecondChanceOffer" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="EditEmailTemplate">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="automationPreferences"/>

-                <service service-name="getEbayStoreUser" result-map="result">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <service service-name="getEbayUser" result-map="ebayUser">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <set field="userLoginId" from-field="result.userLoginId"/>

-                <set field="emailType" from-field="parameters.emailType"/>

-                <entity-one entity-name="ProductStoreEmailSetting" value-field="emailSetting">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="emailType" from-field="emailType"/>

-                </entity-one>

-                <set field="subject" from-field="emailSetting.subject"/>

-                <set field="bodyScreenLocation" value="component://ebaystore/widget/EbayEmailScreens.xml#EbayEmailTemplate"/>

-                   <set field="fromAddress" from-field="ebayUser.email"/>

-                   <entity-one entity-name="UserLogin" value-field="userLoginCheck">

-                       <field-map field-name="userLoginId" from-field="userLoginId"/>

-                   </entity-one>

-                   <set field="partyId" from-field="userLoginCheck.partyId"/>

-                   <script location="component://ebaystore/groovyScripts/email/GetProductStoreEmailTemplate.groovy"/>

-                   <entity-one entity-name="Content" value-field="templateContent"/>

-                   <get-related-one value-field="templateContent" relation-name="DataResource" to-value-field="templateDataResource"/>

-                   <get-related-one value-field="templateDataResource" relation-name="ElectronicText" to-value-field="templateData"/>

-                   <set field="textData" from-field="templateData.textData"/>

-                   <set field="dataResourceId" from-field="templateData.dataResourceId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="${uiLabelMap.EbayEditEmailTemplate}">

-                            <include-form name="EditEmailTemplate"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="EbayActiveListing">

-        <section>

-            <actions>

-                <set field="sellingManagerItem" value="activeListing"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <decorator-section-include name="body"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="ActiveListing">

-        <section>

-            <actions>

-                <service service-name="getMyeBaySelling" result-map="result">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="listingType" from-field="requestParameters.listingType"/>

-                </service>

-                <set field="activeItemList" from-field="result.activeItems"/>

-                <set field="target" value="activeListing"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbayActiveListing">

-                    <decorator-section name="body">

-                        <screenlet title="Active to Open Listings">

-                            <include-form name="ItemOption" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="ActiveItemList"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="EbayUnsoldListing">

-        <section>

-            <actions>

-                <set field="sellingManagerItem" value="unsoldListing"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <decorator-section-include name="body"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="UnsoldListing">

-        <section>

-            <actions>

-                <service service-name="getMyeBaySelling" result-map="result">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="listingType" from-field="parameters.listingType"/>

-                </service>

-                <set field="unsoldItemList" from-field="result.unsoldItems"/>

-                <set field="target" value="unsoldListing"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbayUnsoldListing">

-                    <decorator-section name="body">

-                        <screenlet title="Unsold Listing">

-                            <include-form name="ItemOption" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="UnsoldItemList"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="WaitingToShipping">

-        <section>

-            <actions>

-                <set field="sellingManagerItem" value="waitingToShipping"/>

-                <service service-name="getEbaySoldItems" result-map="result">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="filter" value="PAID_NOT_SHIPPED"/>

-                    <field-map field-name="itemId" from-field="parameters.itemId"/>

-                    <field-map field-name="buyerId" from-field="parameters.buyerId"/>

-                </service>

-                <set field="soldItemList" from-field="result.soldItems"/>

-                <set field="target" value="waitingToShipping"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="uiLabelMap.EbayWaitingToShipping">

-                            <include-form name="WaitingToShippingOption" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="SoldItemList"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="ordersImported">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="sellingManagerItem" value="ordersImported"/>

-                <script location="component://order/groovyScripts/order/FindOrders.groovy"/>

-                <set field="orderList" value="${orderList}" type="List"/>

-                <set field="productStoreId" from-field="parameters.productStoreId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="Find Orders Imported">

-                            <include-form name="FindOrdersImported" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                        </screenlet>

-                        <platform-specific>

-                            <html>

-                                <html-template location="component://ebaystore/template/store/OrderImported.ftl"/>

-                            </html>

-                        </platform-specific>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="GetItemProduct">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <service service-name="getEbayStoreProductItem" result-map="result">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <field-map field-name="itemId" from-field="parameters.itemId"/>

-                </service>

-                <set field="title" from-field="result.title"/>

-                <set field="description" from-field="result.description"/>

-                <set field="price" from-field="result.price"/>

-                <set field="pictureURL" from-field="result.pictureURL"/>

-                <set field="listingType" from-field="result.listingType"/>

-                <set field="currencyId" from-field="result.currencyId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <decorator-section-include name="body"/>

-                            <screenlet title="Edit Product Item" collapsible="true" name="GetItemProduct">

-                                <include-form name="EditItemProduct"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                            </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="customerService">

-        <section>

-            <actions>

-                    <set field="headerItem" value="ebayStore"/>

-                    <service service-name="getEbayStoreUser" result-map="result">

-                        <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    </service>

-                    <set field="productStoreId" from-field="parameters.productStoreId"/>

-                    <set field="userLoginId" from-field="result.userLoginId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet name="ebayCustomerService" title="Customer Offer Included Message" collapsible="true">

-                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="bestOfferIncludeMessage"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="customerOfferData">

-        <section>

-           <actions>

-               <set field="productStoreId" value="${parameters.productStoreId}"/>

-               <set field="itemId" value="${parameters.itemId}"/>

-               <set field="userId" value="${parameters.userId}"/>

-               <set field="itemName" value="${parameters.itemName}"/>

-               <set field="email" value="${parameters.email}"/>

-               <set field="quantity" value="${parameters.quantity}"/>

-               <set field="price" value="${parameters.price}"/>

-               <set field="message" value="${parameters.message}"/>

-               <set field="offerId" value="${parameters.offerId}"/>

-               <set field="contactStatus" value="${parameters.contactStatus}"/>

-           </actions>

-           <widgets>

-               <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                   <decorator-section name="body">

-                       <screenlet name="customerData"  title="Customer Offer Data">

-                           <include-form name="ViewCustomerOfferData" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                       </screenlet>

-                   </decorator-section>

-               </decorator-screen>

-           </widgets>

-        </section>

-    </screen>

-    <screen name="EbayclosedListing">

-        <section>

-            <actions>

-                <set field="sellingManagerItem" value="closedListing"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <decorator-section-include name="body"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="ClosedListing">

-        <section>

-            <actions>

-                <service service-name="geteBayClosedItem" result-map="closedItemMap">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </service>

-                <set field="closedList" from-field="closedItemMap.closedItemList"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbayclosedListing">

-                    <decorator-section name="body">

-                        <screenlet title="Closed Item Listings">

-                            <include-form name="ItemOption" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="ClosedItemList"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="EbayOrderListing">

-        <section>

-            <actions>

-                <set field="sellingManagerItem" value="orderListing"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <decorator-section-include name="body"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="OrderListing">

-        <section>

-            <actions>

-                <set field="productStoreId" from-field="parameters.productStoreId"/>

-                <set field="check" from-field="parameters.formSelect" default-value="transaction"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="EbayOrderListing">

-                    <decorator-section name="body">

-                    <section>

-                        <condition>

-                            <if-compare operator="equals" value="transaction" field="check"/>

-                        </condition>

-                        <widgets>

-                            <section>

-                                <actions>

-                                    <set field="selectedDate" from-field="parameters.selectedDate" default-value="false"/>

-                                </actions>

-                                <widgets>

-                                <section>

-                                    <condition>

-                                        <if-compare operator="equals" value="true" field="selectedDate"/>

-                                    </condition>

-                                    <actions>

-                                        <service service-name="getEbayStoreTransaction" result-map="transactionResult">

-                                            <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                                            <field-map field-name="fromDate" from-field="parameters.fromDate"/>

-                                            <field-map field-name="thruDate" from-field="parameters.thruDate"/>

-                                        </service>

-                                        <set field="transactionsList" from-field="transactionResult.transactionsList"/>

-                                        <set field="selectedDate" value="false"/>

-                                    </actions>

-                                    <widgets/>

-                                </section>

-                                    <screenlet title="Order Listings (Import single Transactions)">

-                                        <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayOrderSubBar"/>

-                                        <include-form name="FindEbayStoreOrders" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                                        <include-form name="TransactionList" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                                    </screenlet>

-                                </widgets>

-                            </section>

-                        </widgets>

-                        <fail-widgets>

-                            <section>

-                                <actions>

-                                    <set field="formSelect" from-field="parameters.formSelect"/>

-                                    <set field="selectedDate" from-field="parameters.selectedDate" default-value="false"/>

-                                </actions>

-                                <widgets>

-                                <section>

-                                    <condition>

-                                        <if-compare operator="equals" value="true" field="selectedDate"/>

-                                    </condition>

-                                    <actions>

-                                        <service service-name="getEbayStoreOrder" result-map="orderResult">

-                                            <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                                            <field-map field-name="fromDate" from-field="parameters.fromDate"/>

-                                            <field-map field-name="thruDate" from-field="parameters.thruDate"/>

-                                        </service>

-                                        <set field="orderList" from-field="orderResult.orderList"/>

-                                        <script location="component://ebaystore/groovyScripts/store/OrderListPrepare.groovy"/>

-                                        <set field="selectedDate" value="false"/>

-                                    </actions>

-                                    <widgets/>

-                                </section>

-                                    <screenlet title="Order Listings (Import many transactions)">

-                                        <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayOrderSubBar"/>

-                                        <include-form name="FindEbayStoreOrders" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                                        <include-form name="OrderList" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>

-                                    </screenlet>

-                                </widgets>

-                            </section>

-                        </fail-widgets>

-                    </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-</screens>

+<!--
+  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"
+        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
+    <!-- Store reserve inventory -->
+    <screen name="ebayStoreInventory">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="inventory"/>
+                <entity-and entity-name="ProductStoreFacility" list="productStoreFacilityList">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </entity-and>
+                <set  field="check"  value="${groovy: 
+                    check= &quot;false&quot;;
+                    if(productStoreFacilityList!=null &amp;&amp; productStoreFacilityList.size()== 1)  check = &quot;true&quot;;
+                    return check;
+                    }" type="String"/>
+                <set field="facilityId"  value="${groovy:
+                    if(check.equals(&quot;true&quot;)) facility = productStoreFacilityList.get(0);
+                    if(facility!=null) facilityId = facility.facilityId;
+                    return facilityId;}" type="String"/>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <if-compare field="check" operator="equals" value="true"/>
+                    </condition>
+                    <widgets>
+                        <section>
+                            <actions>
+                                <set field="parameters.facilityId" value="${facilityId}"/>
+                                <set field="parameters.productStoreId" from-field="parameters.productStoreId"/>
+                                <service service-name="getFolderInEbayStoreInventory" result-map="result">
+                                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                                </service>
+                                <set field="ebayfolderId" value="${result.folderId}"/>
+                            </actions>
+                            <widgets>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field="ebayfolderId"/></not>
+                                    </condition>
+                                    <widgets><include-screen name="ViewInventoryItemDetail"/></widgets>
+                                    <fail-widgets><include-screen name="ebayStoreInventoryFail"/></fail-widgets>
+                                </section>
+                            </widgets>
+                        </section>
+                    </widgets>
+                    <fail-widgets>
+                        <section>
+                            <actions>
+                                <set field="parameters.facilityId" value="${facilityId}"/>
+                                <set field="parameters.productStoreId" from-field="parameters.productStoreId"/>
+                            </actions>
+                            <widgets>
+                                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                                    <decorator-section name="body">
+                                        <screenlet>
+                                            <include-form name="EbayStoreFacilityList" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                                        </screenlet>
+                                    </decorator-section>
+                                </decorator-screen>
+                            </widgets>
+                        </section>
+                    </fail-widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen> 
+    <screen name="ebayLoadStoreInventory">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="inventory"/>
+                <entity-and entity-name="ProductStoreFacility" list="productStoreFacilityList">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <section>
+                    <widgets>
+                        <section>
+                            <actions>
+                                <set field="facilityId" from-field="parameters.facilityId"/>
+                                <set field="productStoreId" from-field="parameters.productStoreId"/>
+                                <set field="ebayfolderId" from-field="parameters.folderId"/>
+                            </actions>
+                            <widgets><include-screen name="ViewInventoryItemDetail"/></widgets>
+                        </section>
+                    </widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="ViewInventoryItemDetail">
+        <section>
+            <actions>
+                <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="titleProperty" value="PageTitleEditInventoryItem"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="inventory"/>
+                <set field="facilityId" from-field="parameters.facilityId"/>
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+                <entity-one entity-name="ProductStore" value-field="productStore">
+                    <field-map field-name="productStoreId" from-field="productStoreId"/>
+                    <select-field field-name="storeName"/>
+                </entity-one>
+                <entity-one entity-name="Facility" value-field="facility">
+                    <field-map field-name="facilityId" from-field="facilityId"/>
+                    <select-field field-name="facilityName"/>
+                </entity-one>
+                <entity-and entity-name="EbayProductStoreInventory" list="ebayProductStoreInventoryList">
+                    <field-map field-name="productStoreId"  from-field="productStoreId"/>
+                    <field-map field-name="facilityId"  from-field="facilityId"/>
+                </entity-and>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.ProductInventoryDetails} ${uiLabelMap.ProductStoreNameId} : ${productStore.storeName}[${productStore.productStoreId}] ${uiLabelMap.FacilityFacility} : ${facility.facilityName}">
+                            <section>
+                                <widgets>
+                                    <link name="updateEbayInventoryStatus" secure="true" target="updateEbayInventoryStatus"  style="buttontext" text="${uiLabelMap.EbayUpdateInventoryStatus}">
+                                        <parameter param-name="productStoreId" from-field="productStoreId"/>
+                                        <parameter param-name="facilityId" from-field="facilityId"/>
+                                    </link>
+                                    <link name="reserveEbayProductInventory" target="reserveEbayProductInventory"  style="buttontext" text="${uiLabelMap.EbayReserveProductInventory}">
+                                        <parameter param-name="productStoreId" from-field="productStoreId"/>
+                                        <parameter param-name="facilityId" from-field="facilityId"/>
+                                    </link>
+                                </widgets>
+                            </section>
+                            <include-form name="ListEbayProductInventoryDetail" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="reserveEbayProductInventory">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="inventory"/>
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+                <entity-one entity-name="Facility" value-field="facility">
+                    <field-map field-name="facilityId"  value="${parameters.facilityId}"/>
+                    <select-field field-name="facilityName"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.EbayReserveProductFrom} : ${facility.facilityName}">
+                            <include-form name="ReserveEbayProductInventory" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="ebayStoreInventoryFail">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="inventory"/>
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="notes">
+                            <label style="label" text="Please subscribed to Selling Manager Pro before you use this function because ebay product inventory will open when you start selling manager pro on ebay site."></label>
+                            <label style="label" text="if you subscribed already then still can not use, please check you internet connection."></label>
+                            <label text="- To subscribe for production site"></label>
+                            <link target="http://pages.ebay.com/selling_manager_pro" text="http://pages.ebay.com/selling_manager_pro"  target-window="_BLANK" url-mode="plain"></link>
+                            <label text="- To upgrade store level sandbox site"></label>
+                            <link target="http://k2b-bulk.sandbox.ebay.com/ws/eBayISAPI.dll?MyeBaySellingPendingListings" target-window="_BLANK" url-mode="plain" text="http://k2b-bulk.sandbox.ebay.com/ws/eBayISAPI.dll?MyeBaySellingPendingListings"></link>
+                        </screenlet>
+                        <screenlet title="How to upgrade sandbox store level?">
+                            <label text="- Click on the link &quot;To upgrade store level for sandbox site&quot;"></label>
+                            <label text="- Go to &quot;Selling Related links&quot; section"></label>
+                            <label text="- Click on &quot;Edit my eBay store&quot;"></label>
+                            <label text="- Page Manage my eBay store will show up"></label>
+                            <label text="- Go to &quot;Store Usage Information&quot; section"></label>
+                            <label text="- Click upgrade at &quot;Subscription level&quot; then select &quot;Premium Store&quot; and &quot;Selling Manager Pro&quot; then submit."></label>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="updateQuantityReserved">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="inventory"/>
+                <entity-one entity-name="EbayProductStoreInventory" value-field="ebayProductStoreInventory">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="facilityId" from-field="parameters.facilityId"/>
+                    <field-map field-name="productId" from-field="parameters.productId"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="Inventory Quantities">
+                            <include-form name="UpdateQuantityReserved" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <!-- Automation Preferences -->
+    <screen name="EbayAutomationPreferences">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="automationPreferences"/>
+                <service service-name="getEbayStoreUser" result-map="result">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <set field="userLoginId" from-field="result.userLoginId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                        <include-screen name="AutomationRelistSoldItems"/>
+                        <include-screen name="AutomationDispute"/>
+                        <screenlet title="${uiLabelMap.EbayTxtAutoPositiveFeedbackBuyer}" id="autoPositiveFeedback" collapsible="true" initially-collapsed="true">
+                            <include-form name="AutoPositiveFeedbackForBuyers" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.EbayIsAutoFeedbackReminder}" id="autoSendFeedbackReminder" collapsible="true" initially-collapsed="true">
+                            <include-form name="AutoSendFeedbackReminder" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.EbayAutoPaymentReceviedEmail}" id="autoSendPaymentReceivedEmail" collapsible="true" initially-collapsed="true">
+                            <include-form name="AutoSendPaymentReceivedEmail" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.EbayCombineOrderSetting}" id="combineOrdersSetting" collapsible="true" initially-collapsed="true">
+                            <include-form name="CombineOrdersSetting" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.EbayAutoSendWinBuyerEmail}" id="winningBuyerNotification" collapsible="true" initially-collapsed="true">
+                            <include-form name="WinningBuyerNotification" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.EbayAutoSendItemDispatchEmail}" id="itemDispatchedNotification" collapsible="true" initially-collapsed="true">
+                            <include-form name="ItemDispatchedNotification" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.EbayBlockItemOutOfStock}" id="blockItemsOutOfStock" collapsible="true" initially-collapsed="true">
+                            <include-form name="BlockItemsOutOfStock" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.AutoBestOfferSetting}" id="bestOfferSetting" collapsible="true" initially-collapsed="true">
+                            <include-form name="BestOffer" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="AutomationRelistSoldItems">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="autoPrefEnumId" value="EBAY_AUTO_RELISTING"/>
+                <set field="serviceName" value="autoRelistingItems"/>
+                <entity-one entity-name="EbayProductStorePref" value-field="ebayPrefRelisting">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="autoPrefEnumId" from-field="autoPrefEnumId"/>
+                </entity-one>
+                 <service service-name="getEbayStoreUser" result-map="result">
+                     <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <set field="userLoginId" from-field="result.userLoginId"/>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.EbayAutomationRelistItems}" collapsible="true" name="EbayAutomationRelistItems">
+                    <include-form name="EditAutomationRelistSoldItems"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="AutomationDispute">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="automaticEbayDisputeItems"/>
+                <set field="autoPrefEnumId1" value="EBAY_AUTO_DISPUTE1"/>
+                <set field="autoPrefEnumId2" value="EBAY_AUTO_DISPUTE2"/>
+                <set field="serviceName1" value="automaticEbayDisputeNotComplete"/>
+                <set field="serviceName2" value="automaticEbayDisputeNotPay"/>
+                <entity-one entity-name="EbayProductStorePref" value-field="ebayPrefDispute1">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="autoPrefEnumId" from-field="autoPrefEnumId1"/>
+                </entity-one>
+                <entity-one entity-name="EbayProductStorePref" value-field="ebayPrefDispute2">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="autoPrefEnumId" from-field="autoPrefEnumId2"/>
+                </entity-one>
+                <script location="component://ebaystore/groovyScripts/automationPreferences/GetDisputeInfo.groovy"/>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.EbayAutomatiionDisputeItems}" collapsible="true" name="AutomationDispute">
+                    <include-form name="AutomationDisputeNotComplete"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                    <include-form name="AutomationDisputeNotPay"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
+    <!-- Sold -->
+    <screen name="EbaySoldListing">
+        <section>
+            <actions>
+                <set field="sellingManagerItem" value="soldListing"/>
+            </actions>
+            <widgets>
+               <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="SoldListing">
+        <section>
+            <actions>
+                <service service-name="getEbaySoldItems" result-map="result">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <set field="soldItemList" from-field="result.soldItems"/>
+                <set field="target" value="soldListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbaySoldListing">
+                    <decorator-section name="body">
+                        <screenlet title="Sold Listing">
+                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="SoldItemList"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="OpenUnpaid">
+        <section>
+            <widgets>
+                <decorator-screen name="EbaySoldListing">
+                    <decorator-section name="body">
+                        <screenlet title="Open Unpaid">
+                               <include-form name="OpenUnpaid" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                           </screenlet>
+                       </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="MakeSecondChanceOffer">
+        <section>
+            <actions>
+                <service service-name="getEbayAllBidders" result-map="results">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="itemId" from-field="parameters.itemId"/>
+                </service>
+                <set field="allBidders" from-field="results.allBidders"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbaySoldListing">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.EbayAddSecondChanceOffer}">
+                            <include-form name="MakeSecondChanceOffer" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EditEmailTemplate">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="automationPreferences"/>
+                <service service-name="getEbayStoreUser" result-map="result">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <service service-name="getEbayUser" result-map="ebayUser">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <set field="userLoginId" from-field="result.userLoginId"/>
+                <set field="emailType" from-field="parameters.emailType"/>
+                <entity-one entity-name="ProductStoreEmailSetting" value-field="emailSetting">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="emailType" from-field="emailType"/>
+                </entity-one>
+                <set field="subject" from-field="emailSetting.subject"/>
+                <set field="bodyScreenLocation" value="component://ebaystore/widget/EbayEmailScreens.xml#EbayEmailTemplate"/>
+                   <set field="fromAddress" from-field="ebayUser.email"/>
+                   <entity-one entity-name="UserLogin" value-field="userLoginCheck">
+                       <field-map field-name="userLoginId" from-field="userLoginId"/>
+                   </entity-one>
+                   <set field="partyId" from-field="userLoginCheck.partyId"/>
+                   <script location="component://ebaystore/groovyScripts/email/GetProductStoreEmailTemplate.groovy"/>
+                   <entity-one entity-name="Content" value-field="templateContent"/>
+                   <get-related-one value-field="templateContent" relation-name="DataResource" to-value-field="templateDataResource"/>
+                   <get-related-one value-field="templateDataResource" relation-name="ElectronicText" to-value-field="templateData"/>
+                   <set field="textData" from-field="templateData.textData"/>
+                   <set field="dataResourceId" from-field="templateData.dataResourceId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.EbayEditEmailTemplate}">
+                            <include-form name="EditEmailTemplate"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EbayActiveListing">
+        <section>
+            <actions>
+                <set field="sellingManagerItem" value="activeListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="ActiveListing">
+        <section>
+            <actions>
+                <service service-name="getMyeBaySelling" result-map="result">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="listingType" from-field="requestParameters.listingType"/>
+                </service>
+                <set field="activeItemList" from-field="result.activeItems"/>
+                <set field="target" value="activeListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayActiveListing">
+                    <decorator-section name="body">
+                        <screenlet title="Active to Open Listings">
+                            <include-form name="ItemOption" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="ActiveItemList"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EbayUnsoldListing">
+        <section>
+            <actions>
+                <set field="sellingManagerItem" value="unsoldListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="UnsoldListing">
+        <section>
+            <actions>
+                <service service-name="getMyeBaySelling" result-map="result">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="listingType" from-field="parameters.listingType"/>
+                </service>
+                <set field="unsoldItemList" from-field="result.unsoldItems"/>
+                <set field="target" value="unsoldListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayUnsoldListing">
+                    <decorator-section name="body">
+                        <screenlet title="Unsold Listing">
+                            <include-form name="ItemOption" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="UnsoldItemList"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="WaitingToShipping">
+        <section>
+            <actions>
+                <set field="sellingManagerItem" value="waitingToShipping"/>
+                <service service-name="getEbaySoldItems" result-map="result">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="filter" value="PAID_NOT_SHIPPED"/>
+                    <field-map field-name="itemId" from-field="parameters.itemId"/>
+                    <field-map field-name="buyerId" from-field="parameters.buyerId"/>
+                </service>
+                <set field="soldItemList" from-field="result.soldItems"/>
+                <set field="target" value="waitingToShipping"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="uiLabelMap.EbayWaitingToShipping">
+                            <include-form name="WaitingToShippingOption" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="SoldItemList"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="ordersImported">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="ordersImported"/>
+                <script location="component://order/groovyScripts/order/FindOrders.groovy"/>
+                <set field="orderList" value="${orderList}" type="List"/>
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="Find Orders Imported">
+                            <include-form name="FindOrdersImported" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <platform-specific>
+                            <html>
+                                <html-template location="component://ebaystore/template/store/OrderImported.ftl"/>
+                            </html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="GetItemProduct">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <service service-name="getEbayStoreProductItem" result-map="result">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="itemId" from-field="parameters.itemId"/>
+                </service>
+                <set field="title" from-field="result.title"/>
+                <set field="description" from-field="result.description"/>
+                <set field="price" from-field="result.price"/>
+                <set field="pictureURL" from-field="result.pictureURL"/>
+                <set field="listingType" from-field="result.listingType"/>
+                <set field="currencyId" from-field="result.currencyId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                            <screenlet title="Edit Product Item" collapsible="true" name="GetItemProduct">
+                                <include-form name="EditItemProduct"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                            </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="customerService">
+        <section>
+            <actions>
+                    <set field="headerItem" value="ebayStore"/>
+                    <service service-name="getEbayStoreUser" result-map="result">
+                        <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    </service>
+                    <set field="productStoreId" from-field="parameters.productStoreId"/>
+                    <set field="userLoginId" from-field="result.userLoginId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet name="ebayCustomerService" title="Customer Offer Included Message" collapsible="true">
+                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="bestOfferIncludeMessage"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="customerOfferData">
+        <section>
+           <actions>
+               <set field="productStoreId" value="${parameters.productStoreId}"/>
+               <set field="itemId" value="${parameters.itemId}"/>
+               <set field="userId" value="${parameters.userId}"/>
+               <set field="itemName" value="${parameters.itemName}"/>
+               <set field="email" value="${parameters.email}"/>
+               <set field="quantity" value="${parameters.quantity}"/>
+               <set field="price" value="${parameters.price}"/>
+               <set field="message" value="${parameters.message}"/>
+               <set field="offerId" value="${parameters.offerId}"/>
+               <set field="contactStatus" value="${parameters.contactStatus}"/>
+           </actions>
+           <widgets>
+               <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                   <decorator-section name="body">
+                       <screenlet name="customerData"  title="Customer Offer Data">
+                           <include-form name="ViewCustomerOfferData" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                       </screenlet>
+                   </decorator-section>
+               </decorator-screen>
+           </widgets>
+        </section>
+    </screen>
+    <screen name="EbayclosedListing">
+        <section>
+            <actions>
+                <set field="sellingManagerItem" value="closedListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="ClosedListing">
+        <section>
+            <actions>
+                <service service-name="geteBayClosedItem" result-map="closedItemMap">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <set field="closedList" from-field="closedItemMap.closedItemList"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayclosedListing">
+                    <decorator-section name="body">
+                        <screenlet title="Closed Item Listings">
+                            <include-form name="ItemOption" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                            <include-grid location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="ClosedItemList"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EbayOrderListing">
+        <section>
+            <actions>
+                <set field="sellingManagerItem" value="orderListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="OrderListing">
+        <section>
+            <actions>
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+                <set field="check" from-field="parameters.formSelect" default-value="transaction"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayOrderListing">
+                    <decorator-section name="body">
+                    <section>
+                        <condition>
+                            <if-compare operator="equals" value="transaction" field="check"/>
+                        </condition>
+                        <widgets>
+                            <section>
+                                <actions>
+                                    <set field="selectedDate" from-field="parameters.selectedDate" default-value="false"/>
+                                </actions>
+                                <widgets>
+                                <section>
+                                    <condition>
+                                        <if-compare operator="equals" value="true" field="selectedDate"/>
+                                    </condition>
+                                    <actions>
+                                        <service service-name="getEbayStoreTransaction" result-map="transactionResult">
+                                            <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                                            <field-map field-name="fromDate" from-field="parameters.fromDate"/>
+                                            <field-map field-name="thruDate" from-field="parameters.thruDate"/>
+                                        </service>
+                                        <set field="transactionsList" from-field="transactionResult.transactionsList"/>
+                                        <set field="selectedDate" value="false"/>
+                                    </actions>
+                                    <widgets/>
+                                </section>
+                                    <screenlet title="Order Listings (Import single Transactions)">
+                                        <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayOrderSubBar"/>
+                                        <include-form name="FindEbayStoreOrders" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                                        <include-form name="TransactionList" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                                    </screenlet>
+                                </widgets>
+                            </section>
+                        </widgets>
+                        <fail-widgets>
+                            <section>
+                                <actions>
+                                    <set field="formSelect" from-field="parameters.formSelect"/>
+                                    <set field="selectedDate" from-field="parameters.selectedDate" default-value="false"/>
+                                </actions>
+                                <widgets>
+                                <section>
+                                    <condition>
+                                        <if-compare operator="equals" value="true" field="selectedDate"/>
+                                    </condition>
+                                    <actions>
+                                        <service service-name="getEbayStoreOrder" result-map="orderResult">
+                                            <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                                            <field-map field-name="fromDate" from-field="parameters.fromDate"/>
+                                            <field-map field-name="thruDate" from-field="parameters.thruDate"/>
+                                        </service>
+                                        <set field="orderList" from-field="orderResult.orderList"/>
+                                        <script location="component://ebaystore/groovyScripts/store/OrderListPrepare.groovy"/>
+                                        <set field="selectedDate" value="false"/>
+                                    </actions>
+                                    <widgets/>
+                                </section>
+                                    <screenlet title="Order Listings (Import many transactions)">
+                                        <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayOrderSubBar"/>
+                                        <include-form name="FindEbayStoreOrders" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                                        <include-form name="OrderList" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                                    </screenlet>
+                                </widgets>
+                            </section>
+                        </fail-widgets>
+                    </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>
diff --git a/plugins/ebaystore/widget/EbayStoreScreens.xml b/plugins/ebaystore/widget/EbayStoreScreens.xml
index bd562a8..15f2db1 100644
--- a/plugins/ebaystore/widget/EbayStoreScreens.xml
+++ b/plugins/ebaystore/widget/EbayStoreScreens.xml
@@ -1,299 +1,299 @@
-<?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.

--->

-

-<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">

-    <screen name="ebayStores">

-        <section>

-            <actions>

-                <set field="titleProperty" value="${uiLabelMap.EbayStore}"/>

-                <set field="headerItem" value="ebayStore"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <include-menu name="EbaySubTabBar" location="component://ebaystore/widget/EbayStoreMenus.xml"/>

-                        <screenlet title="Ebay Accounts">

-                            <include-form name="EbayAccountList" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="ebayStoreDetail">

-        <section>

-            <actions>

-                <set field="titleProperty" value="${uiLabelMap.EbayStoreSetting}"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="ebayStoreSetting"/>

-                <script  location="component://ebaystore/groovyScripts/store/RetrieveStoreOptions.groovy"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="${uiLabelMap.EbayStoreSetting}">

-                            <platform-specific>

-                                <html><html-template location="component://ebaystore/template/store/StoreSetting.ftl"/></html>

-                            </platform-specific>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="exportCategoryEbayStore">

-        <section>

-            <actions>

-                <set field="titleProperty" value="EbayExportAllCategoryToEbayStore"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="ebayExportAllCategoryToEbayStore"/>

-                <set field="productStoreId" value="${parameters.productStoreId}"/>

-                <entity-and entity-name="ProdCatalogCategory" list="categoriesList">

-                    <field-map field-name="prodCatalogId" from-field="parameters.prodCatalogId"/>

-                    <order-by field-name="productCategoryId"/>

-                </entity-and>

-                <entity-one entity-name="ProdCatalog" value-field="prodCatalog">

-                    <field-map field-name="prodCatalogId" from-field="parameters.prodCatalogId"/>

-                    <select-field field-name="catalogName"/>

-                </entity-one>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <section>

-                            <condition>

-                                <not>

-                                    <if-empty field="parameters.productCategoryId"/>

-                                </not>

-                            </condition>

-                            <actions>

-                                <entity-and entity-name="ProductCategoryRollup" list="categoriesRollupList">

-                                    <field-map field-name="parentProductCategoryId" from-field="parameters.productCategoryId"/>

-                                    <order-by field-name="productCategoryId"/>

-                                </entity-and>

-                            </actions>

-                            <widgets>

-                                <section>

-                                    <condition>

-                                        <not>

-                                            <if-empty field="categoriesRollupList"/>

-                                        </not>

-                                    </condition>

-                                    <actions>

-                                        <set field="categoriesList" from-field="nullField"/>

-                                        <set field="categoriesList" from-field="categoriesRollupList"/>

-                                    </actions>

-                                    <widgets>

-                                        <screenlet>

-                                            <screenlet title="${uiLabelMap.EbayExportAllCategoryToEbayStore}">

-                                                <include-form name="ListCurrentStores" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                                            </screenlet>

-                                            <screenlet navigation-form-name="ListCategories" title="List category in ${prodCatalog.catalogName}">

-                                                <include-form name="ListCategories" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                                            </screenlet>

-                                        </screenlet>

-                                    </widgets>

-                                    <fail-widgets>

-                                        <screenlet title="${uiLabelMap.EbayExportAllCategoryToEbayStore}">

-                                            <include-form name="ListCurrentStores" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                                        </screenlet>

-                                        <screenlet navigation-form-name="ListCategories" title="List category in ${prodCatalog.catalogName}">

-                                            <label text="Not found child category"/>

-                                        </screenlet>

-                                    </fail-widgets>

-                                </section>

-                            </widgets>

-                            <fail-widgets>

-                                <screenlet>

-                                    <screenlet title="${uiLabelMap.EbayExportAllCategoryToEbayStore}">

-                                        <include-form name="ListCurrentStores" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                                    </screenlet>

-                                    <screenlet navigation-form-name="ListCategories" title="List category in ${prodCatalog.catalogName}">

-                                        <include-form name="ListCategories" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                                    </screenlet>

-                                    <link name="exportCategoriesSelectedToEbayStore" target="exportCategoriesSelectedToEbayStore"  style="buttontext" text="${uiLabelMap.EbayExportToEbayStore}">

-                                        <parameter param-name="productStoreId" from-field="productStoreId"/>

-                                        <parameter param-name="prodCatalogId" from-field="parameters.prodCatalogId"/>

-                                        <parameter param-name="partyId" from-field="parameters.partyId"/>

-                                    </link>

-                                </screenlet>

-                            </fail-widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <!-- ebay account -->

-    <screen name="NewEbayAccount">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="NewEbayAccount"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="New Ebay Account">

-                            <include-form name="NewEbayAccount" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="AssociateCatalog">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="associateCatalogToStore"/>

-                <entity-and entity-name="ProductStoreCatalog" list="prodStoreCatalogList" filter-by-date="true">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </entity-and>

-                <set field="prodCatalogIds" value="${groovy:org.apache.ofbiz.entity.util.EntityUtil.getFieldListFromEntityList(prodStoreCatalogList, 'prodCatalogId', true);}" type="List"/>

-                <entity-condition entity-name="ProdCatalog" list="prodCatalogList">

-                    <condition-expr field-name="prodCatalogId" operator="not-in" from-field="prodCatalogIds" ignore-if-empty="true"/>

-                </entity-condition>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="Add Catalog To Store">

-                            <include-form name="AddCatalog" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                        </screenlet>

-                        <section>

-                            <condition>

-                                <not>

-                                    <if-empty field="prodStoreCatalogList"/>

-                                </not>

-                            </condition>

-                            <widgets>

-                                <screenlet title="Associated Catalog List">

-                                    <include-grid name="CatalogList" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                                </screenlet>

-                            </widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <!-- Export product listing  -->

-    <screen name="exportProductListing">

-        <section>

-            <actions>

-                <set field="titleProperty" value="PageTitleAdvancedSearch"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="exportProductListing"/>

-                <entity-condition entity-name="ProductCategory" list="productCategories">

-                    <condition-expr field-name="showInSelect" operator="not-equals" value="N"/>

-                    <order-by field-name="description"/>

-                </entity-condition>

-                <script location="component://product/groovyScripts/catalog/find/AdvancedSearchOptions.groovy"/>

-                <script location="component://ebay/groovyScripts/EbayAdvancedSearch.groovy"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <platform-specific>

-                            <html><html-template location="component://ebaystore/template/store/EbayApiKeywordSearch.ftl"/></html>

-                        </platform-specific>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="productSearchResults">

-        <section>

-            <actions>

-                <set field="titleProperty" value="PageTitleSearchResults"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="exportProductListing"/>

-                <set field="toEbayStore"  default-value="Y"/>

-                <set field="productStoreId" from-field="parameters.productStoreId"/>

-                <script location="component://product/groovyScripts/catalog/find/KeywordSearch.groovy"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <platform-specific>

-                            <html><html-template location="component://ebay/template/find/EbayKeywordSearch.ftl"/></html>

-                        </platform-specific>

-                        <platform-specific>

-                            <html><html-template location="component://ebay/template/find/ebayExportLink.ftl"/></html>

-                        </platform-specific>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="prepareProductListing">

-        <section>

-            <actions>

-                <set field="titleProperty" value="PageTitleSearchResults"/>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="exportProductListing"/>

-                <!--set field="layoutSettings.javaScripts[+0]" value="/ebaystore/js/itemSpecifics.js" global="true"/-->

-                <!--entity-condition entity-name="Geo" list="countries">

-                    <condition-expr field-name="geoTypeId" value="COUNTRY"/>

-                    <order-by field-name="geoName"/>

-                </entity-condition-->

-                <set field="productStoreId" from-field="parameters.productStoreId"/>

-                <set field="search_CategoryId" type="String" from-field="parameters.SEARCH_CATEGORY_ID"/>

-                <entity-one entity-name="EbayConfig" value-field="ebayConfig">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                </entity-one>

-                <script location="component://ebaystore/groovyScripts/store/PrepareProductListing.groovy"/>

-                <set field="language" from-field="userLogin.lastLocale" default-value="en"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                            <platform-specific>

-                            <html><html-template location="component://ebaystore/template/store/ProductSearchExport.ftl"/></html>

-                            </platform-specific>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-    <screen name="errorMessageList">

-        <section>

-            <actions>

-                <set field="headerItem" value="ebayStore"/>

-                <set field="tabButtonItem" value="errorMessageList"/>

-                <entity-and entity-name="EBayLogMessagesInfo" list="errorMsgList">

-                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>

-                    <order-by field-name="createDatetime DESC"/>

-                </entity-and>

-            </actions>

-            <widgets>

-                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <screenlet title="${uiLabelMap.EbayErrorMessageList}">

-                            <include-grid name="errorMessageList" location="component://ebaystore/widget/EbayStoreForms.xml"/>

-                        </screenlet>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-</screens>

+<?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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
+    <screen name="ebayStores">
+        <section>
+            <actions>
+                <set field="titleProperty" value="${uiLabelMap.EbayStore}"/>
+                <set field="headerItem" value="ebayStore"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <include-menu name="EbaySubTabBar" location="component://ebaystore/widget/EbayStoreMenus.xml"/>
+                        <screenlet title="Ebay Accounts">
+                            <include-form name="EbayAccountList" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="ebayStoreDetail">
+        <section>
+            <actions>
+                <set field="titleProperty" value="${uiLabelMap.EbayStoreSetting}"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="ebayStoreSetting"/>
+                <script  location="component://ebaystore/groovyScripts/store/RetrieveStoreOptions.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.EbayStoreSetting}">
+                            <platform-specific>
+                                <html><html-template location="component://ebaystore/template/store/StoreSetting.ftl"/></html>
+                            </platform-specific>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="exportCategoryEbayStore">
+        <section>
+            <actions>
+                <set field="titleProperty" value="EbayExportAllCategoryToEbayStore"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="ebayExportAllCategoryToEbayStore"/>
+                <set field="productStoreId" value="${parameters.productStoreId}"/>
+                <entity-and entity-name="ProdCatalogCategory" list="categoriesList">
+                    <field-map field-name="prodCatalogId" from-field="parameters.prodCatalogId"/>
+                    <order-by field-name="productCategoryId"/>
+                </entity-and>
+                <entity-one entity-name="ProdCatalog" value-field="prodCatalog">
+                    <field-map field-name="prodCatalogId" from-field="parameters.prodCatalogId"/>
+                    <select-field field-name="catalogName"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <not>
+                                    <if-empty field="parameters.productCategoryId"/>
+                                </not>
+                            </condition>
+                            <actions>
+                                <entity-and entity-name="ProductCategoryRollup" list="categoriesRollupList">
+                                    <field-map field-name="parentProductCategoryId" from-field="parameters.productCategoryId"/>
+                                    <order-by field-name="productCategoryId"/>
+                                </entity-and>
+                            </actions>
+                            <widgets>
+                                <section>
+                                    <condition>
+                                        <not>
+                                            <if-empty field="categoriesRollupList"/>
+                                        </not>
+                                    </condition>
+                                    <actions>
+                                        <set field="categoriesList" from-field="nullField"/>
+                                        <set field="categoriesList" from-field="categoriesRollupList"/>
+                                    </actions>
+                                    <widgets>
+                                        <screenlet>
+                                            <screenlet title="${uiLabelMap.EbayExportAllCategoryToEbayStore}">
+                                                <include-form name="ListCurrentStores" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                                            </screenlet>
+                                            <screenlet navigation-form-name="ListCategories" title="List category in ${prodCatalog.catalogName}">
+                                                <include-form name="ListCategories" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                                            </screenlet>
+                                        </screenlet>
+                                    </widgets>
+                                    <fail-widgets>
+                                        <screenlet title="${uiLabelMap.EbayExportAllCategoryToEbayStore}">
+                                            <include-form name="ListCurrentStores" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                                        </screenlet>
+                                        <screenlet navigation-form-name="ListCategories" title="List category in ${prodCatalog.catalogName}">
+                                            <label text="Not found child category"/>
+                                        </screenlet>
+                                    </fail-widgets>
+                                </section>
+                            </widgets>
+                            <fail-widgets>
+                                <screenlet>
+                                    <screenlet title="${uiLabelMap.EbayExportAllCategoryToEbayStore}">
+                                        <include-form name="ListCurrentStores" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                                    </screenlet>
+                                    <screenlet navigation-form-name="ListCategories" title="List category in ${prodCatalog.catalogName}">
+                                        <include-form name="ListCategories" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                                    </screenlet>
+                                    <link name="exportCategoriesSelectedToEbayStore" target="exportCategoriesSelectedToEbayStore"  style="buttontext" text="${uiLabelMap.EbayExportToEbayStore}">
+                                        <parameter param-name="productStoreId" from-field="productStoreId"/>
+                                        <parameter param-name="prodCatalogId" from-field="parameters.prodCatalogId"/>
+                                        <parameter param-name="partyId" from-field="parameters.partyId"/>
+                                    </link>
+                                </screenlet>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <!-- ebay account -->
+    <screen name="NewEbayAccount">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="NewEbayAccount"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="New Ebay Account">
+                            <include-form name="NewEbayAccount" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="AssociateCatalog">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="associateCatalogToStore"/>
+                <entity-and entity-name="ProductStoreCatalog" list="prodStoreCatalogList" filter-by-date="true">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </entity-and>
+                <set field="prodCatalogIds" value="${groovy:org.apache.ofbiz.entity.util.EntityUtil.getFieldListFromEntityList(prodStoreCatalogList, 'prodCatalogId', true);}" type="List"/>
+                <entity-condition entity-name="ProdCatalog" list="prodCatalogList">
+                    <condition-expr field-name="prodCatalogId" operator="not-in" from-field="prodCatalogIds" ignore-if-empty="true"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="Add Catalog To Store">
+                            <include-form name="AddCatalog" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                        </screenlet>
+                        <section>
+                            <condition>
+                                <not>
+                                    <if-empty field="prodStoreCatalogList"/>
+                                </not>
+                            </condition>
+                            <widgets>
+                                <screenlet title="Associated Catalog List">
+                                    <include-grid name="CatalogList" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <!-- Export product listing  -->
+    <screen name="exportProductListing">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleAdvancedSearch"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="exportProductListing"/>
+                <entity-condition entity-name="ProductCategory" list="productCategories">
+                    <condition-expr field-name="showInSelect" operator="not-equals" value="N"/>
+                    <order-by field-name="description"/>
+                </entity-condition>
+                <script location="component://product/groovyScripts/catalog/find/AdvancedSearchOptions.groovy"/>
+                <script location="component://ebay/groovyScripts/EbayAdvancedSearch.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://ebaystore/template/store/EbayApiKeywordSearch.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="productSearchResults">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleSearchResults"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="exportProductListing"/>
+                <set field="toEbayStore"  default-value="Y"/>
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+                <script location="component://product/groovyScripts/catalog/find/KeywordSearch.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://ebay/template/find/EbayKeywordSearch.ftl"/></html>
+                        </platform-specific>
+                        <platform-specific>
+                            <html><html-template location="component://ebay/template/find/ebayExportLink.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="prepareProductListing">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleSearchResults"/>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="exportProductListing"/>
+                <!--set field="layoutSettings.javaScripts[+0]" value="/ebaystore/js/itemSpecifics.js" global="true"/-->
+                <!--entity-condition entity-name="Geo" list="countries">
+                    <condition-expr field-name="geoTypeId" value="COUNTRY"/>
+                    <order-by field-name="geoName"/>
+                </entity-condition-->
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+                <set field="search_CategoryId" type="String" from-field="parameters.SEARCH_CATEGORY_ID"/>
+                <entity-one entity-name="EbayConfig" value-field="ebayConfig">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </entity-one>
+                <script location="component://ebaystore/groovyScripts/store/PrepareProductListing.groovy"/>
+                <set field="language" from-field="userLogin.lastLocale" default-value="en"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                            <platform-specific>
+                            <html><html-template location="component://ebaystore/template/store/ProductSearchExport.ftl"/></html>
+                            </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="errorMessageList">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="tabButtonItem" value="errorMessageList"/>
+                <entity-and entity-name="EBayLogMessagesInfo" list="errorMsgList">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <order-by field-name="createDatetime DESC"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.EbayErrorMessageList}">
+                            <include-grid name="errorMessageList" location="component://ebaystore/widget/EbayStoreForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>
diff --git a/plugins/ecommerce/groovyScripts/customer/ContactList.groovy b/plugins/ecommerce/groovyScripts/customer/ContactList.groovy
index b4f3648..938257a 100644
--- a/plugins/ecommerce/groovyScripts/customer/ContactList.groovy
+++ b/plugins/ecommerce/groovyScripts/customer/ContactList.groovy
@@ -1,60 +1,60 @@
-/*

- * 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.

- */

-

-import java.lang.*

-import java.util.*

-import org.apache.ofbiz.base.util.*

-import org.apache.ofbiz.entity.*

-import org.apache.ofbiz.entity.util.*

-import org.apache.ofbiz.entity.condition.*

-import org.apache.ofbiz.party.contact.ContactMechWorker

-import org.apache.ofbiz.product.store.ProductStoreWorker

-import org.apache.ofbiz.webapp.website.WebSiteWorker

-import org.apache.ofbiz.accounting.payment.PaymentWorker

-

-/*publicEmailContactLists = delegator.findByAnd("ContactList", [isPublic : "Y", contactMechTypeId : "EMAIL_ADDRESS"], ["contactListName"], false)

-context.publicEmailContactLists = publicEmailContactLists;*/

-

-webSiteId = WebSiteWorker.getWebSiteId(request)

-exprList = []

-exprListThruDate = []

-exprList.add(EntityCondition.makeCondition("webSiteId", EntityOperator.EQUALS, webSiteId))

-exprListThruDate.add(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null))

-exprListThruDate.add(EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN_EQUAL_TO, UtilDateTime.nowTimestamp()))

-orCond = EntityCondition.makeCondition(exprListThruDate, EntityOperator.OR)

-exprList.add(orCond)

-webSiteContactList = from("WebSiteContactList").where(exprList).queryList()

-

-publicEmailContactLists = []

-webSiteContactList.each { webSiteContactList ->

-    contactList = webSiteContactList.getRelatedOne("ContactList", false)

-    contactListType = contactList.getRelatedOne("ContactListType", false)

-    temp = [:]

-    temp.contactList = contactList

-    temp.contactListType = contactListType

-    publicEmailContactLists.add(temp)

-}

-context.publicEmailContactLists = publicEmailContactLists

-

-if (userLogin) {

-    partyAndContactMechList = from("PartyAndContactMech").where("partyId", partyId, "contactMechTypeId", "EMAIL_ADDRESS").orderBy("-fromDate").filterByDate().queryList()

-    context.partyAndContactMechList = partyAndContactMechList

-}

-

-

+/*
+ * 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.
+ */
+
+import java.lang.*
+import java.util.*
+import org.apache.ofbiz.base.util.*
+import org.apache.ofbiz.entity.*
+import org.apache.ofbiz.entity.util.*
+import org.apache.ofbiz.entity.condition.*
+import org.apache.ofbiz.party.contact.ContactMechWorker
+import org.apache.ofbiz.product.store.ProductStoreWorker
+import org.apache.ofbiz.webapp.website.WebSiteWorker
+import org.apache.ofbiz.accounting.payment.PaymentWorker
+
+/*publicEmailContactLists = delegator.findByAnd("ContactList", [isPublic : "Y", contactMechTypeId : "EMAIL_ADDRESS"], ["contactListName"], false)
+context.publicEmailContactLists = publicEmailContactLists;*/
+
+webSiteId = WebSiteWorker.getWebSiteId(request)
+exprList = []
+exprListThruDate = []
+exprList.add(EntityCondition.makeCondition("webSiteId", EntityOperator.EQUALS, webSiteId))
+exprListThruDate.add(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null))
+exprListThruDate.add(EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN_EQUAL_TO, UtilDateTime.nowTimestamp()))
+orCond = EntityCondition.makeCondition(exprListThruDate, EntityOperator.OR)
+exprList.add(orCond)
+webSiteContactList = from("WebSiteContactList").where(exprList).queryList()
+
+publicEmailContactLists = []
+webSiteContactList.each { webSiteContactList ->
+    contactList = webSiteContactList.getRelatedOne("ContactList", false)
+    contactListType = contactList.getRelatedOne("ContactListType", false)
+    temp = [:]
+    temp.contactList = contactList
+    temp.contactListType = contactListType
+    publicEmailContactLists.add(temp)
+}
+context.publicEmailContactLists = publicEmailContactLists
+
+if (userLogin) {
+    partyAndContactMechList = from("PartyAndContactMech").where("partyId", partyId, "contactMechTypeId", "EMAIL_ADDRESS").orderBy("-fromDate").filterByDate().queryList()
+    context.partyAndContactMechList = partyAndContactMechList
+}
+
+
diff --git a/plugins/ecommerce/widget/blog/BlogScreens.xml b/plugins/ecommerce/widget/blog/BlogScreens.xml
index 21b6fb1..469d0c4 100644
--- a/plugins/ecommerce/widget/blog/BlogScreens.xml
+++ b/plugins/ecommerce/widget/blog/BlogScreens.xml
@@ -1,704 +1,704 @@
-<?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.

-  -->

-

-<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-         xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">

-

-    <screen name="CommonBlogTitle">

-        <section>

-            <condition>

-                <not>

-                    <if-empty field="parameters.blogContentId"/>

-                </not>

-            </condition>

-            <actions>

-                <entity-one entity-name="Content" value-field="blogContent">

-                    <field-map field-name="contentId" from-field="parameters.blogContentId"/>

-                </entity-one>

-

-                <!-- permission fields -->

-                <set field="crPerm.ownerContentId" from-field="blogContentId"/>

-                <set field="crPerm.contentOperationId" value="CONTENT_CREATE"/>

-                <set field="crPerm.contentPurposeTypeId" value="ARTICLE"/>

-            </actions>

-            <widgets>

-                <container style="bloghr">

-                    <container style="leftjustify">

-                        <link text="${blogContent.contentName} - ${blogContent.description}" target="MainBlog" style="blogtitle">

-                            <parameter param-name="blogContentId"/>

-                        </link>

-                    </container>

-                    <container style="rightjustify">

-                        <section>

-                            <condition>

-                                <if-service-permission service-name="genericContentPermission" main-action="CREATE" context-map="crPerm"/>

-                            </condition>

-                            <widgets>

-                                <link text="${uiLabelMap.CommonAddNew}" target="NewBlogArticle" style="buttontext">

-                                    <parameter param-name="blogContentId"/>

-                                </link>

-                            </widgets>

-                        </section>

-                        <link target="ViewBlogRss" target-window="_blank" link-type="anchor">

-                            <parameter param-name="blogContentId" from-field="blogContent.contentId"/>

-                            <parameter param-name="mainLinkReq" value="MainBlog"/>

-                            <parameter param-name="entryLinkReq" value="ViewBlogArticle"/>

-                            <image src="/images/feed-icon-14x14.png" id="feedIcon" height="12px"/>

-                        </link>

-                    </container>

-                </container>

-            </widgets>

-            <fail-widgets>

-                <label text="${uiLabelMap.EcommerceBlogContentNotFound}" style="blogtitle"/>

-            </fail-widgets>

-        </section>

-    </screen>

-

-    <screen name="MainBlog">

-        <section>

-            <actions>

-                <set field="MainColumnStyle" value="nocolumns"/>

-                <set field="blogContentId" from-field="parameters.blogContentId"/>

-                <entity-condition entity-name="ContentAssocViewTo" use-cache="false" list="blogList">

-                    <condition-list combine="and">

-                        <condition-expr field-name="contentIdStart" operator="equals" from-field="blogContentId"/>

-                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="PUBLISH_LINK"/>

-                        <condition-expr field-name="caThruDate" operator="equals" value=""/>

-                        <condition-expr field-name="statusId" operator="equals" value="CTNT_PUBLISHED"/>

-                    </condition-list>

-                    <order-by field-name="caFromDate DESC"/>

-                </entity-condition>

-

-                <!-- permission fields -->

-                <set field="upPerm.contentId" from-field="blogContentId"/>

-                <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>

-                <set field="upPerm.contentPurposeTypeId" value="ARTICLE"/>

-            </actions>

-            <widgets>

-                <section>

-                    <!-- if viewer has update permission, show all blogs, even those that were preview only -->

-                    <condition>

-                        <if-service-permission service-name="genericContentPermission" main-action="UPDATE" context-map="upPerm"/>

-                    </condition>

-                    <actions>

-                        <service service-name="getOwnedOrPublishedBlogEntries" result-map="result">

-                            <field-map field-name="contentId" from-field="blogContentId"/>

-                            <field-map field-name="userLogin" from-field="userLogin"/>

-                        </service>

-                        <set field="blogList" from-field="result.blogList" default-value="${blogList}"/>

-                    </actions>

-                    <widgets/>

-                </section>

-                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <iterate-section list="blogList" entry="blog" paginate="true" paginate-target="MainBlog">

-                            <section name="firstBlog">

-                                <condition>

-                                    <if-compare field="itemIndex" operator="equals" type="Integer" value="0"/>

-                                </condition>

-                                <widgets>

-                                    <container style="blogwrapper">

-                                        <include-menu name="ViewEdit" location="component://ecommerce/widget/blog/BlogMenus.xml"/>

-                                        <platform-specific><html><html-template location="component://ecommerce/template/blog/BlogContentAltLink.ftl"/></html></platform-specific>

-                                        <!--<link text="${blog.contentName} [${blog.contentId}]" target="ViewBlogArticle" style="blogheader">

-                                            <parameter param-name="contentId" from-field="blog.contentId"/>

-                                            <parameter param-name="blogContentId"/>

-                                        </link>-->

-                                        <!--

-                                            <link text="Latest" target="LatestResponses" >

-                                                <parameter param-name="ownerContentId" from-field="blog.ownerContentId"/>

-                                            </link>

-                                        -->

-                                        <container style="blogtext">

-                                            <sub-content map-key="SUMMARY" content-id="${blog.contentId}"/>

-                                        </container>

-                                    </container>

-                                </widgets>

-                            </section>

-                            <section name="allOtherBlogs">

-                                <condition>

-                                    <if-compare field="itemIndex" operator="greater" type="Integer" value="0"/>

-                                </condition>

-                                <widgets>

-                                    <container style="blogwrapper">

-                                        <include-menu name="ViewEdit" location="component://ecommerce/widget/blog/BlogMenus.xml"/>

-                                        <!--<label text="${blog.contentName} [${blog.contentId}]" style="blogheader"/>-->

-                                        <platform-specific><html><html-template location="component://ecommerce/template/blog/BlogContentAltLink.ftl"/></html></platform-specific>

-                                        <!--<link text="${blog.contentName} [${blog.contentId}]" target="ViewBlogArticle" style="blogheader">

-                                            <parameter param-name="contentId" from-field="blog.contentId"/>

-                                            <parameter param-name="blogContentId"/>

-                                        </link>-->

-                                        <!--

-                                            <link text="Latest" target="LatestResponses" >

-                                                <parameter param-name="ownerContentId" from-field="blog.ownerContentId"/>

-                                            </link>

-                                        -->

-                                        <container style="blogtext">

-                                            <label text="${blog.description}" style="blogtext"/>

-                                        </container>

-                                    </container>

-                                </widgets>

-                            </section>

-                        </iterate-section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="NewArticle">

-        <section>

-            <actions>

-                <set field="crPerm.ownerContentId" from-field="parameters.blogContentId"/>

-                <set field="crPerm.contentOperationId" value="CONTENT_CREATE"/>

-                <set field="crPerm.contentPurposeTypeId" value="ARTICLE"/>

-            </actions>

-            <widgets>

-                <section>

-                    <condition>

-                        <if-service-permission service-name="genericContentPermission" main-action="CREATE" context-map="crPerm"/>

-                    </condition>

-                    <widgets>

-                        <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">

-                            <decorator-section name="body">

-                                <include-form name="EditArticle" location="component://content/widget/forum/BlogForms.xml"/>

-                            </decorator-section>

-                        </decorator-screen>

-                    </widgets>

-                    <fail-widgets>

-                        <label text="${uiLabelMap.PageTitleEditBlogArticlePermissionError}"></label>

-                    </fail-widgets>

-                </section>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="EditArticle">

-        <section>

-            <actions>

-                <set field="blogContentId" from-field="parameters.blogContentId"/>

-                <set field="upPerm.contentId" from-field="parameters.blogContentId"/>

-                <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>

-                <set field="upPerm.contentPurposeTypeId" value="ARTICLE"/>

-                <set field="contentId" from-field="parameters.contentId"/>

-            </actions>

-            <widgets>

-                <section>

-                    <!--condition>

-                        <if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>

-                    </condition-->

-                    <actions>

-                        <service service-name="getBlogEntry" result-map="blogEntry" auto-field-map="true"/>

-                    </actions>

-                    <widgets>

-                        <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">

-                            <decorator-section name="body">

-                                <sub-content content-id="${parameters.contentId}" map-key="IMAGE"/>

-                                <include-form name="EditArticle" location="component://content/widget/forum/BlogForms.xml"/>

-                            </decorator-section>

-                        </decorator-screen>

-                    </widgets>

-                    <fail-widgets>

-                        <label text="${uiLabelMap.PageTitleEditBlogArticlePermissionError}: ${contentId} ${uiLabelMap.ContentBlog}: ${blogContentId}"></label>

-                    </fail-widgets>

-                </section>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="ViewArticle">

-        <section>

-            <actions>

-                <set field="articleContentId" from-field="parameters.articleContentId" default-value="${parameters.contentId}"/>

-                <set field="ownerContentId" from-field="parameters.ownerContentId"/>

-                <set field="blogContentId" from-field="parameters.blogContentId"/>

-                <entity-one entity-name="Content" value-field="content" use-cache="true">

-                    <field-map field-name="contentId" from-field="articleContentId"/>

-                </entity-one>

-                <set field="enableEdit" value="false"/>

-                <property-to-field property="root.publish.point.blog" field="webPutPt" resource="blog"/>

-                <set field="rsp.contentName" value="RE: ${content.contentName}"/>

-

-                <!-- for permission service -->

-                <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>

-                <set field="upPerm.contentPurposeTypeId" value="ARTICLE"/>

-                <set field="upPerm.ownerContentId" from-field="ownerContentId"/>

-                <set field="upPerm.contentId" from-field="articleContentId"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <container style="bloghr">

-                            <container style="leftjustify">

-                                <label text="${content.contentName}: ${content.description}" style="blogtitle"/>

-                            </container>

-                            <section>

-                                <condition>

-                                    <if-service-permission service-name="genericContentPermission" main-action="UPDATE" context-map="upPerm"/>

-                                </condition>

-                                <widgets>

-                                    <container style="rightjustify">

-                                        <link text="${uiLabelMap.CommonEdit}" target="EditBlogArticle" style="buttontext">

-                                        <parameter param-name="contentId" from-field="articleContentId"/>

-                                        <parameter param-name="blogContentId"/>

-                                    </link>

-                                    </container>

-                                </widgets>

-                            </section>

-                        </container>

-                        <container style="blogcontentwrapper">

-                            <container style="responsetext">

-                                <label text="${uiLabelMap.EcommerceBlogPostedOn}: ${content.createdDate}" style="responsetext"/>

-                            </container>

-                            <content content-id="${articleContentId}"/>

-                        </container>

-

-                        <include-screen name="BlogResponses"/>

-                        <!--

-                            <link text="Latest" target="LatestResponses" >

-                                <parameter param-name="ownerContentId" from-field="webPubPt"/>

-                            </link>

-                        -->

-                        <include-screen name="AddBlogResponse"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="ViewResponse">

-        <section>

-            <actions>

-                <set field="contentId" from-field="parameters.contentId"/>

-                <set field="responseContentId" from-field="parameters.contentId"/>

-                <set field="articleContentId" from-field="parameters.articleContentId"/>

-                <set field="ownerContentId" from-field="parameters.ownerContentId"/>

-                <set field="blogContentId" from-field="parameters.blogContentId"/>

-                <entity-one entity-name="Content" value-field="content" use-cache="true">

-                    <field-map field-name="contentId" from-field="contentId"/>

-                </entity-one>

-                <entity-one entity-name="Content" value-field="article">

-                    <field-map field-name="contentId" from-field="articleContentId"/>

-                </entity-one>

-

-                <set field="trail" from-field="articleContentId"/>

-                <set field="enableEdit" value="false"/>

-                <property-to-field property="root.publish.point.blog" field="webPubPt" resource="blog"/>

-                <set field="rsp.contentName" value="${content.contentName}"/>

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <container style="bloghr">

-                            <container style="leftjustify">

-                                <link text="${article.contentName}: ${article.description}" target="ViewBlogArticle" style="blogtitle">

-                                    <parameter param-name="articleContentId"/>

-                                    <parameter param-name="blogContentId"/>

-                                </link>

-                                <label text="${content.contentName}: ${content.description}" style="blogtitle"/>

-                            </container>

-                            <section>

-                                <condition>

-                                    <!--

-                                    <if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>

-                                    -->

-                                    <if-empty field="foobar"/>

-                                </condition>

-                                <widgets>

-                                    <container style="rightjustify">

-                                        <section>

-                                            <condition>

-                                                <if-compare field="parameters.edit" operator="not-equals" value="Y"/>

-                                            </condition>

-                                            <widgets>

-                                                <link text="${uiLabelMap.CommonEdit}" target="ViewResponse" style="buttontext">

-                                                    <parameter param-name="contentId" from-field="content.contentId"/>

-                                                    <parameter param-name="ownerContentId" from-field="content.ownerContentId"/>

-                                                    <parameter param-name="articleContentId"/>

-                                                    <parameter param-name="blogContentId"/>

-                                                    <parameter param-name="edit" value="Y"/>

-                                                </link>

-                                            </widgets>

-                                            <fail-widgets>

-                                                <link text="${uiLabelMap.CommonView}" target="ViewResponse" style="buttontext">

-                                                    <parameter param-name="contentId" from-field="content.contentId"/>

-                                                    <parameter param-name="ownerContentId" from-field="content.ownerContentId"/>

-                                                    <parameter param-name="articleContentId"/>

-                                                    <parameter param-name="blogContentId"/>

-                                                    <parameter param-name="edit" value="N"/>

-                                                 </link>

-                                            </fail-widgets>

-                                        </section>

-                                    </container>

-                                </widgets>

-                            </section>

-                        </container>

-                        <container style="blogcontentwrapper">

-                            <content content-id="${contentId}"/>

-                        </container>

-

-                        <include-screen name="AddBlogResponse"/>

-

-                        <container style="bloghr">

-                            <label text="${uiLabelMap.ContentForumThread}: " style="blogtitle"/>

-                        </container>

-                        <include-tree name="ResponseTree" location="component://ecommerce/widget/blog/BlogTrees.xml"/>

-                        <section>

-                            <condition>

-                                <or>

-                                    <if-compare field="content.statusId" operator="equals" value="CTNT_INITIAL_DRAFT"/>

-                                    <and>

-                                        <if-entity-permission entity-id="${content.contentId}" entity-name="Content" target-operation="CONTENT_UPDATE"/>

-                                        <if-compare field="parameters.edit" operator="equals" value="Y"/>

-                                    </and>

-                                </or>

-

-                            </condition>

-                            <widgets>

-                                <container style="bloghr">

-                                    <label text="${uiLabelMap.EcommerceEditThisComment}: " style="blogtitle"/>

-                                </container>

-                                <include-screen name="EditBlogResponse"/>

-                            </widgets>

-                        </section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="BlogContent">

-        <section>

-            <condition>

-                <not>

-                    <if-empty field="contentId"/>

-                </not>

-            </condition>

-            <actions/>

-

-            <widgets>

-                <content content-id="${contentId}"/>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="AdminBlog">

-        <section>

-            <actions/>

-

-            <widgets>

-                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <include-form name="FindBlogContent" location="component://ecommerce/widget/blog/BlogForms.xml"/>

-                        <include-grid name="listFindBlogContent" location="component://ecommerce/widget/blog/BlogForms.xml"/>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="BlogResponses">

-        <section>

-            <actions>

-                <entity-condition entity-name="ContentAssocViewTo" use-cache="true" list="responseList">

-                    <condition-list combine="and">

-                        <condition-expr field-name="caContentId" operator="equals" value="${articleContentId}"/>

-                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE"/>

-                        <condition-expr field-name="caThruDate" operator="equals" value=""/>

-                    </condition-list>

-                    <order-by field-name="caFromDate DESC"/>

-                </entity-condition>

-

-                <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>

-            </actions>

-            <widgets>

-                <container style="bloghr">

-                    <label text="${uiLabelMap.CommonComments}: " style="blogtitle"/>

-                </container>

-                <iterate-section list="responseList" entry="rsp" view-size="10">

-                    <section name="BlogResponses">

-                        <widgets>

-                            <include-screen name="responseTreeLine"/>

-                        </widgets>

-                    </section>

-                </iterate-section>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="LatestResponses">

-        <section>

-            <actions>

-                <entity-condition entity-name="ContentAssocDataResourceViewTo" use-cache="false" list="responseList">

-                    <condition-list combine="and">

-                        <condition-expr field-name="ownerContentId" operator="equals" value="${parameters.ownerContentId}"/>

-                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE"/>

-                        <condition-expr field-name="caThruDate" operator="equals" value=""/>

-                    </condition-list>

-                    <order-by field-name="caFromDate DESC"/>

-                </entity-condition>

-

-            </actions>

-            <widgets>

-                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">

-                    <decorator-section name="body">

-                        <label text="${uiLabelMap.EcommerceBlogLatestResponses}"/>

-                        <iterate-section list="responseList" entry="rsp">

-                            <section name="BlogResponses">

-                                <widgets>

-                                    <include-screen name="responseTreeLine"/>

-                                </widgets>

-                            </section>

-                        </iterate-section>

-                    </decorator-section>

-                </decorator-screen>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="responseTreeLine">

-        <section>

-            <widgets>

-                <section>

-                    <condition>

-                        <if-compare-field field="responseContentId" operator="not-equals" to-field="rsp.contentId"/>

-                    </condition>

-                    <widgets>

-                        <container>

-                            <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewResponse" style="responseheader">

-                                <parameter param-name="contentId" from-field="rsp.contentId"/>

-                                <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>

-                                <parameter param-name="articleContentId"/>

-                                <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>

-                            </link>

-                                            <link text="${uiLabelMap.CommonView}" target="ViewResponse" style="buttontext">

-                                <parameter param-name="contentId" from-field="rsp.contentId"/>

-                                <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>

-                                <parameter param-name="articleContentId"/>

-                                <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>

-                            </link>

-                            <container style="responsetext">

-                                <label text="${rsp.description}" style="responsetext"/>

-                                <label text="(${uiLabelMap.EcommerceBlogPostedOn}: ${rsp.createdDate})" style="responsetext"/>

-                            </container>

-                        </container>

-                    </widgets>

-                </section>

-                <section>

-                    <condition>

-                        <if-compare-field field="responseContentId" operator="equals" to-field="rsp.contentId"/>

-                    </condition>

-                    <widgets>

-                        <container style="responseSelected">

-                            <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewResponse" style="responseheader">

-                                <parameter param-name="contentId" from-field="rsp.contentId"/>

-                                <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>

-                                <parameter param-name="articleContentId"/>

-                                <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>

-                            </link>

-                                            <link text="${uiLabelMap.CommonView}" target="ViewResponse" style="buttontext">

-                                <parameter param-name="contentId" from-field="rsp.contentId"/>

-                                <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>

-                                <parameter param-name="articleContentId"/>

-                                <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>

-                            </link>

-                            <container style="responsetext">

-                                <label text="${rsp.description}" style="responsetext"/>

-                                <label text="(${uiLabelMap.EcommerceBlogPostedOn}: ${rsp.createdDate})" style="responsetext"/>

-                            </container>

-                        </container>

-                    </widgets>

-                </section>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="blogTreeLine">

-        <section>

-            <widgets>

-                <container>

-                    <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewBlogArticle" style="responseheader">

-                        <parameter param-name="articleContentId"/>

-                        <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>

-                        <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>

-                    </link>

-                    <link text="${uiLabelMap.EcommerceBlogViewArticle}" target="ViewBlogArticle" style="buttontext">

-                        <parameter param-name="articleContentId"/>

-                        <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>

-                        <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>

-                    </link>

-                    <container style="responsetext">

-                        <label text="${rsp.description}" style="responsetext"/>

-                        <label text="(${uiLabelMap.EcommerceBlogPostedOn}: ${rsp.createdDate})" style="responsetext"/>

-                    </container>

-                </container>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="AddBlogResponse">

-        <section>

-            <widgets>

-                <section>

-                    <condition>

-                        <if-empty field="parameters.contentId"/>

-                    </condition>

-                    <actions>

-                        <set field="rsp.contentIdFrom" from-field="parameters.articleContentId"/>

-                    </actions>

-                    <widgets/>

-                </section>

-                <section>

-                    <condition>

-                        <not>

-                            <if-empty field="parameters.contentId"/>

-                        </not>

-                    </condition>

-                    <actions>

-                        <set field="rsp.contentIdFrom" from-field="parameters.contentId"/>

-                    </actions>

-                    <widgets/>

-                </section>

-                <section>

-                    <actions>

-                        <set field="rsp.contentTypeId" value="DOCUMENT"/>

-                        <set field="rsp.contentAssocTypeId" value="RESPONSE"/>

-                        <set field="rsp.dataResourceTypeId" value="ELECTRONIC_TEXT"/>

-                        <set field="rsp.contentOperationId" value="CONTENT_CREATE"/>

-                        <set field="rsp.contentPurposeTypeId" value="RESPONSE"/>

-                        <set field="rsp.articleContentId" from-field="articleContentId"/>

-                        <set field="rsp.ownerContentId" from-field="content.contentId"/>

-                        <set field="rsp.blogContentId" from-field="parameters.blogContentId"/>

-                        <set field="useRequestParameters" value="false" type="Boolean"/>

-

-                        <!-- used for permission check -->

-                        <set field="contentPurposeTypeId" value="ARTICLE"/>

-                        <set field="contentOperationId" value="CONTENT_RESPOND"/>

-                        <set field="ownerContentId" from-field="content.contentId"/>

-                    </actions>

-                    <widgets>

-                        <container style="bloghr">

-                            <label text="${uiLabelMap.CommonAdd} ${uiLabelMap.CommonComment} ${content.contentId}: " style="blogtitle"/>

-                            <section>

-                                <condition>

-                                    <if-service-permission service-name="genericContentPermission" main-action="CREATE"/>

-                                </condition>

-

-                                <actions>

-                                    <set field="displayForm" value="Y"/>

-                                </actions>

-                                <widgets/>

-                                <fail-widgets>

-                                    <label text="${uiLabelMap.EcommerceBlogPostComments}"/>

-                                </fail-widgets>

-                            </section>

-                        </container>

-                        <section>

-                            <condition>

-                                <if-compare field="displayForm" operator="equals" value="Y"/>

-                            </condition>

-                            <widgets>

-                                <container style="blogcontentwrapper">

-                                    <include-form name="AddBlogResponse" location="component://ecommerce/widget/blog/BlogForms.xml"/>

-                                </container>

-                            </widgets>

-                        </section>

-                    </widgets>

-                </section>

-            </widgets>

-        </section>

-    </screen>

-

-    <screen name="EditBlogResponse">

-        <section>

-            <actions>

-                <set field="rsp.contentPurposeTypeId" value="RESPONSE"/>

-                <set field="rsp.contentOperationId" value="CONTENT_UPDATE"/>

-                <set field="rsp.ownerContentId" from-field="parameters.ownerContentId"/>

-                <set field="rsp.blogContentId" from-field="parameters.blogContentId"/>

-

-                <!-- permission fields -->

-                <set field="upPerm.ownerContentId" from-field="parameters.ownerContentId"/>

-                <set field="upPerm.contentId" from-field="parameters.contentId"/>

-                <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>

-                <set field="upPerm.contentPurposeTypeId" value="RESPONSE"/>

-            </actions>

-            <widgets>

-                <section>

-                    <!--

-                    <condition>

-                        <if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>

-                    </condition>

-                    -->

-                    <actions>

-                        <set field="rsp.articleContentId" from-field="articleContentId"/>

-                        <entity-one entity-name="DataResource" value-field="dataResource" use-cache="false">

-                            <field-map field-name="dataResourceId" from-field="content.dataResourceId"/>

-                        </entity-one>

-                        <entity-one entity-name="ElectronicText" value-field="electronicText" use-cache="false">

-                            <field-map field-name="dataResourceId" from-field="content.dataResourceId"/>

-                        </entity-one>

-                    </actions>

-                    <widgets>

-                        <container style="blogcontentwrapper">

-                            <include-form name="EditBlogResponse" location="component://ecommerce/widget/blog/BlogForms.xml"/>

-                        </container>

-                    </widgets>

-                    <fail-widgets>

-                        <label text="${uiLabelMap.EcommerceBlogEditComments}"/>

-                    </fail-widgets>

-                </section>

-            </widgets>

-        </section>

-    </screen>

-

-    <!-- Column Included Screens -->

-    <screen name="blogs">

-        <section>

-            <actions>

-                <entity-condition entity-name="ContentAssocViewTo" list="blogs" use-cache="true">

-                    <condition-list combine="and">

-                        <condition-expr field-name="contentIdStart" operator="equals" value="BLOGROOT"/>

-                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="SUB_CONTENT"/>

-                        <condition-list combine="or">

-                            <condition-expr field-name="caFromDate" operator="equals" from-field="null"/>

-                            <condition-expr field-name="caFromDate" operator="less-equals" from-field="nowTimestamp"/>

-                        </condition-list>

-                        <condition-list combine="or">

-                            <condition-expr field-name="caThruDate" operator="equals" from-field="null"/>

-                            <condition-expr field-name="caThruDate" operator="greater-equals" from-field="nowTimestamp"/>

-                        </condition-list>

-                    </condition-list>

-                    <order-by field-name="contentName"/>

-                </entity-condition>

-            </actions>

-            <widgets>

-                <platform-specific>

-                    <html>

-                        <html-template location="component://ecommerce/template/blog/Blogs.ftl"/>

-

-                    </html>

-                </platform-specific>

-            </widgets>

-        </section>

-    </screen>

-</screens>

-

-

+<?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.
+  -->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
+    <screen name="CommonBlogTitle">
+        <section>
+            <condition>
+                <not>
+                    <if-empty field="parameters.blogContentId"/>
+                </not>
+            </condition>
+            <actions>
+                <entity-one entity-name="Content" value-field="blogContent">
+                    <field-map field-name="contentId" from-field="parameters.blogContentId"/>
+                </entity-one>
+
+                <!-- permission fields -->
+                <set field="crPerm.ownerContentId" from-field="blogContentId"/>
+                <set field="crPerm.contentOperationId" value="CONTENT_CREATE"/>
+                <set field="crPerm.contentPurposeTypeId" value="ARTICLE"/>
+            </actions>
+            <widgets>
+                <container style="bloghr">
+                    <container style="leftjustify">
+                        <link text="${blogContent.contentName} - ${blogContent.description}" target="MainBlog" style="blogtitle">
+                            <parameter param-name="blogContentId"/>
+                        </link>
+                    </container>
+                    <container style="rightjustify">
+                        <section>
+                            <condition>
+                                <if-service-permission service-name="genericContentPermission" main-action="CREATE" context-map="crPerm"/>
+                            </condition>
+                            <widgets>
+                                <link text="${uiLabelMap.CommonAddNew}" target="NewBlogArticle" style="buttontext">
+                                    <parameter param-name="blogContentId"/>
+                                </link>
+                            </widgets>
+                        </section>
+                        <link target="ViewBlogRss" target-window="_blank" link-type="anchor">
+                            <parameter param-name="blogContentId" from-field="blogContent.contentId"/>
+                            <parameter param-name="mainLinkReq" value="MainBlog"/>
+                            <parameter param-name="entryLinkReq" value="ViewBlogArticle"/>
+                            <image src="/images/feed-icon-14x14.png" id="feedIcon" height="12px"/>
+                        </link>
+                    </container>
+                </container>
+            </widgets>
+            <fail-widgets>
+                <label text="${uiLabelMap.EcommerceBlogContentNotFound}" style="blogtitle"/>
+            </fail-widgets>
+        </section>
+    </screen>
+
+    <screen name="MainBlog">
+        <section>
+            <actions>
+                <set field="MainColumnStyle" value="nocolumns"/>
+                <set field="blogContentId" from-field="parameters.blogContentId"/>
+                <entity-condition entity-name="ContentAssocViewTo" use-cache="false" list="blogList">
+                    <condition-list combine="and">
+                        <condition-expr field-name="contentIdStart" operator="equals" from-field="blogContentId"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="PUBLISH_LINK"/>
+                        <condition-expr field-name="caThruDate" operator="equals" value=""/>
+                        <condition-expr field-name="statusId" operator="equals" value="CTNT_PUBLISHED"/>
+                    </condition-list>
+                    <order-by field-name="caFromDate DESC"/>
+                </entity-condition>
+
+                <!-- permission fields -->
+                <set field="upPerm.contentId" from-field="blogContentId"/>
+                <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>
+                <set field="upPerm.contentPurposeTypeId" value="ARTICLE"/>
+            </actions>
+            <widgets>
+                <section>
+                    <!-- if viewer has update permission, show all blogs, even those that were preview only -->
+                    <condition>
+                        <if-service-permission service-name="genericContentPermission" main-action="UPDATE" context-map="upPerm"/>
+                    </condition>
+                    <actions>
+                        <service service-name="getOwnedOrPublishedBlogEntries" result-map="result">
+                            <field-map field-name="contentId" from-field="blogContentId"/>
+                            <field-map field-name="userLogin" from-field="userLogin"/>
+                        </service>
+                        <set field="blogList" from-field="result.blogList" default-value="${blogList}"/>
+                    </actions>
+                    <widgets/>
+                </section>
+                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <iterate-section list="blogList" entry="blog" paginate="true" paginate-target="MainBlog">
+                            <section name="firstBlog">
+                                <condition>
+                                    <if-compare field="itemIndex" operator="equals" type="Integer" value="0"/>
+                                </condition>
+                                <widgets>
+                                    <container style="blogwrapper">
+                                        <include-menu name="ViewEdit" location="component://ecommerce/widget/blog/BlogMenus.xml"/>
+                                        <platform-specific><html><html-template location="component://ecommerce/template/blog/BlogContentAltLink.ftl"/></html></platform-specific>
+                                        <!--<link text="${blog.contentName} [${blog.contentId}]" target="ViewBlogArticle" style="blogheader">
+                                            <parameter param-name="contentId" from-field="blog.contentId"/>
+                                            <parameter param-name="blogContentId"/>
+                                        </link>-->
+                                        <!--
+                                            <link text="Latest" target="LatestResponses" >
+                                                <parameter param-name="ownerContentId" from-field="blog.ownerContentId"/>
+                                            </link>
+                                        -->
+                                        <container style="blogtext">
+                                            <sub-content map-key="SUMMARY" content-id="${blog.contentId}"/>
+                                        </container>
+                                    </container>
+                                </widgets>
+                            </section>
+                            <section name="allOtherBlogs">
+                                <condition>
+                                    <if-compare field="itemIndex" operator="greater" type="Integer" value="0"/>
+                                </condition>
+                                <widgets>
+                                    <container style="blogwrapper">
+                                        <include-menu name="ViewEdit" location="component://ecommerce/widget/blog/BlogMenus.xml"/>
+                                        <!--<label text="${blog.contentName} [${blog.contentId}]" style="blogheader"/>-->
+                                        <platform-specific><html><html-template location="component://ecommerce/template/blog/BlogContentAltLink.ftl"/></html></platform-specific>
+                                        <!--<link text="${blog.contentName} [${blog.contentId}]" target="ViewBlogArticle" style="blogheader">
+                                            <parameter param-name="contentId" from-field="blog.contentId"/>
+                                            <parameter param-name="blogContentId"/>
+                                        </link>-->
+                                        <!--
+                                            <link text="Latest" target="LatestResponses" >
+                                                <parameter param-name="ownerContentId" from-field="blog.ownerContentId"/>
+                                            </link>
+                                        -->
+                                        <container style="blogtext">
+                                            <label text="${blog.description}" style="blogtext"/>
+                                        </container>
+                                    </container>
+                                </widgets>
+                            </section>
+                        </iterate-section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="NewArticle">
+        <section>
+            <actions>
+                <set field="crPerm.ownerContentId" from-field="parameters.blogContentId"/>
+                <set field="crPerm.contentOperationId" value="CONTENT_CREATE"/>
+                <set field="crPerm.contentPurposeTypeId" value="ARTICLE"/>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <if-service-permission service-name="genericContentPermission" main-action="CREATE" context-map="crPerm"/>
+                    </condition>
+                    <widgets>
+                        <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
+                            <decorator-section name="body">
+                                <include-form name="EditArticle" location="component://content/widget/forum/BlogForms.xml"/>
+                            </decorator-section>
+                        </decorator-screen>
+                    </widgets>
+                    <fail-widgets>
+                        <label text="${uiLabelMap.PageTitleEditBlogArticlePermissionError}"></label>
+                    </fail-widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="EditArticle">
+        <section>
+            <actions>
+                <set field="blogContentId" from-field="parameters.blogContentId"/>
+                <set field="upPerm.contentId" from-field="parameters.blogContentId"/>
+                <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>
+                <set field="upPerm.contentPurposeTypeId" value="ARTICLE"/>
+                <set field="contentId" from-field="parameters.contentId"/>
+            </actions>
+            <widgets>
+                <section>
+                    <!--condition>
+                        <if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>
+                    </condition-->
+                    <actions>
+                        <service service-name="getBlogEntry" result-map="blogEntry" auto-field-map="true"/>
+                    </actions>
+                    <widgets>
+                        <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
+                            <decorator-section name="body">
+                                <sub-content content-id="${parameters.contentId}" map-key="IMAGE"/>
+                                <include-form name="EditArticle" location="component://content/widget/forum/BlogForms.xml"/>
+                            </decorator-section>
+                        </decorator-screen>
+                    </widgets>
+                    <fail-widgets>
+                        <label text="${uiLabelMap.PageTitleEditBlogArticlePermissionError}: ${contentId} ${uiLabelMap.ContentBlog}: ${blogContentId}"></label>
+                    </fail-widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="ViewArticle">
+        <section>
+            <actions>
+                <set field="articleContentId" from-field="parameters.articleContentId" default-value="${parameters.contentId}"/>
+                <set field="ownerContentId" from-field="parameters.ownerContentId"/>
+                <set field="blogContentId" from-field="parameters.blogContentId"/>
+                <entity-one entity-name="Content" value-field="content" use-cache="true">
+                    <field-map field-name="contentId" from-field="articleContentId"/>
+                </entity-one>
+                <set field="enableEdit" value="false"/>
+                <property-to-field property="root.publish.point.blog" field="webPutPt" resource="blog"/>
+                <set field="rsp.contentName" value="RE: ${content.contentName}"/>
+
+                <!-- for permission service -->
+                <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>
+                <set field="upPerm.contentPurposeTypeId" value="ARTICLE"/>
+                <set field="upPerm.ownerContentId" from-field="ownerContentId"/>
+                <set field="upPerm.contentId" from-field="articleContentId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="bloghr">
+                            <container style="leftjustify">
+                                <label text="${content.contentName}: ${content.description}" style="blogtitle"/>
+                            </container>
+                            <section>
+                                <condition>
+                                    <if-service-permission service-name="genericContentPermission" main-action="UPDATE" context-map="upPerm"/>
+                                </condition>
+                                <widgets>
+                                    <container style="rightjustify">
+                                        <link text="${uiLabelMap.CommonEdit}" target="EditBlogArticle" style="buttontext">
+                                        <parameter param-name="contentId" from-field="articleContentId"/>
+                                        <parameter param-name="blogContentId"/>
+                                    </link>
+                                    </container>
+                                </widgets>
+                            </section>
+                        </container>
+                        <container style="blogcontentwrapper">
+                            <container style="responsetext">
+                                <label text="${uiLabelMap.EcommerceBlogPostedOn}: ${content.createdDate}" style="responsetext"/>
+                            </container>
+                            <content content-id="${articleContentId}"/>
+                        </container>
+
+                        <include-screen name="BlogResponses"/>
+                        <!--
+                            <link text="Latest" target="LatestResponses" >
+                                <parameter param-name="ownerContentId" from-field="webPubPt"/>
+                            </link>
+                        -->
+                        <include-screen name="AddBlogResponse"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="ViewResponse">
+        <section>
+            <actions>
+                <set field="contentId" from-field="parameters.contentId"/>
+                <set field="responseContentId" from-field="parameters.contentId"/>
+                <set field="articleContentId" from-field="parameters.articleContentId"/>
+                <set field="ownerContentId" from-field="parameters.ownerContentId"/>
+                <set field="blogContentId" from-field="parameters.blogContentId"/>
+                <entity-one entity-name="Content" value-field="content" use-cache="true">
+                    <field-map field-name="contentId" from-field="contentId"/>
+                </entity-one>
+                <entity-one entity-name="Content" value-field="article">
+                    <field-map field-name="contentId" from-field="articleContentId"/>
+                </entity-one>
+
+                <set field="trail" from-field="articleContentId"/>
+                <set field="enableEdit" value="false"/>
+                <property-to-field property="root.publish.point.blog" field="webPubPt" resource="blog"/>
+                <set field="rsp.contentName" value="${content.contentName}"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="bloghr">
+                            <container style="leftjustify">
+                                <link text="${article.contentName}: ${article.description}" target="ViewBlogArticle" style="blogtitle">
+                                    <parameter param-name="articleContentId"/>
+                                    <parameter param-name="blogContentId"/>
+                                </link>
+                                <label text="${content.contentName}: ${content.description}" style="blogtitle"/>
+                            </container>
+                            <section>
+                                <condition>
+                                    <!--
+                                    <if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>
+                                    -->
+                                    <if-empty field="foobar"/>
+                                </condition>
+                                <widgets>
+                                    <container style="rightjustify">
+                                        <section>
+                                            <condition>
+                                                <if-compare field="parameters.edit" operator="not-equals" value="Y"/>
+                                            </condition>
+                                            <widgets>
+                                                <link text="${uiLabelMap.CommonEdit}" target="ViewResponse" style="buttontext">
+                                                    <parameter param-name="contentId" from-field="content.contentId"/>
+                                                    <parameter param-name="ownerContentId" from-field="content.ownerContentId"/>
+                                                    <parameter param-name="articleContentId"/>
+                                                    <parameter param-name="blogContentId"/>
+                                                    <parameter param-name="edit" value="Y"/>
+                                                </link>
+                                            </widgets>
+                                            <fail-widgets>
+                                                <link text="${uiLabelMap.CommonView}" target="ViewResponse" style="buttontext">
+                                                    <parameter param-name="contentId" from-field="content.contentId"/>
+                                                    <parameter param-name="ownerContentId" from-field="content.ownerContentId"/>
+                                                    <parameter param-name="articleContentId"/>
+                                                    <parameter param-name="blogContentId"/>
+                                                    <parameter param-name="edit" value="N"/>
+                                                 </link>
+                                            </fail-widgets>
+                                        </section>
+                                    </container>
+                                </widgets>
+                            </section>
+                        </container>
+                        <container style="blogcontentwrapper">
+                            <content content-id="${contentId}"/>
+                        </container>
+
+                        <include-screen name="AddBlogResponse"/>
+
+                        <container style="bloghr">
+                            <label text="${uiLabelMap.ContentForumThread}: " style="blogtitle"/>
+                        </container>
+                        <include-tree name="ResponseTree" location="component://ecommerce/widget/blog/BlogTrees.xml"/>
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-compare field="content.statusId" operator="equals" value="CTNT_INITIAL_DRAFT"/>
+                                    <and>
+                                        <if-entity-permission entity-id="${content.contentId}" entity-name="Content" target-operation="CONTENT_UPDATE"/>
+                                        <if-compare field="parameters.edit" operator="equals" value="Y"/>
+                                    </and>
+                                </or>
+
+                            </condition>
+                            <widgets>
+                                <container style="bloghr">
+                                    <label text="${uiLabelMap.EcommerceEditThisComment}: " style="blogtitle"/>
+                                </container>
+                                <include-screen name="EditBlogResponse"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="BlogContent">
+        <section>
+            <condition>
+                <not>
+                    <if-empty field="contentId"/>
+                </not>
+            </condition>
+            <actions/>
+
+            <widgets>
+                <content content-id="${contentId}"/>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="AdminBlog">
+        <section>
+            <actions/>
+
+            <widgets>
+                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <include-form name="FindBlogContent" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                        <include-grid name="listFindBlogContent" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="BlogResponses">
+        <section>
+            <actions>
+                <entity-condition entity-name="ContentAssocViewTo" use-cache="true" list="responseList">
+                    <condition-list combine="and">
+                        <condition-expr field-name="caContentId" operator="equals" value="${articleContentId}"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE"/>
+                        <condition-expr field-name="caThruDate" operator="equals" value=""/>
+                    </condition-list>
+                    <order-by field-name="caFromDate DESC"/>
+                </entity-condition>
+
+                <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
+            </actions>
+            <widgets>
+                <container style="bloghr">
+                    <label text="${uiLabelMap.CommonComments}: " style="blogtitle"/>
+                </container>
+                <iterate-section list="responseList" entry="rsp" view-size="10">
+                    <section name="BlogResponses">
+                        <widgets>
+                            <include-screen name="responseTreeLine"/>
+                        </widgets>
+                    </section>
+                </iterate-section>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="LatestResponses">
+        <section>
+            <actions>
+                <entity-condition entity-name="ContentAssocDataResourceViewTo" use-cache="false" list="responseList">
+                    <condition-list combine="and">
+                        <condition-expr field-name="ownerContentId" operator="equals" value="${parameters.ownerContentId}"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE"/>
+                        <condition-expr field-name="caThruDate" operator="equals" value=""/>
+                    </condition-list>
+                    <order-by field-name="caFromDate DESC"/>
+                </entity-condition>
+
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <label text="${uiLabelMap.EcommerceBlogLatestResponses}"/>
+                        <iterate-section list="responseList" entry="rsp">
+                            <section name="BlogResponses">
+                                <widgets>
+                                    <include-screen name="responseTreeLine"/>
+                                </widgets>
+                            </section>
+                        </iterate-section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="responseTreeLine">
+        <section>
+            <widgets>
+                <section>
+                    <condition>
+                        <if-compare-field field="responseContentId" operator="not-equals" to-field="rsp.contentId"/>
+                    </condition>
+                    <widgets>
+                        <container>
+                            <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewResponse" style="responseheader">
+                                <parameter param-name="contentId" from-field="rsp.contentId"/>
+                                <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>
+                                <parameter param-name="articleContentId"/>
+                                <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>
+                            </link>
+                                            <link text="${uiLabelMap.CommonView}" target="ViewResponse" style="buttontext">
+                                <parameter param-name="contentId" from-field="rsp.contentId"/>
+                                <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>
+                                <parameter param-name="articleContentId"/>
+                                <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>
+                            </link>
+                            <container style="responsetext">
+                                <label text="${rsp.description}" style="responsetext"/>
+                                <label text="(${uiLabelMap.EcommerceBlogPostedOn}: ${rsp.createdDate})" style="responsetext"/>
+                            </container>
+                        </container>
+                    </widgets>
+                </section>
+                <section>
+                    <condition>
+                        <if-compare-field field="responseContentId" operator="equals" to-field="rsp.contentId"/>
+                    </condition>
+                    <widgets>
+                        <container style="responseSelected">
+                            <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewResponse" style="responseheader">
+                                <parameter param-name="contentId" from-field="rsp.contentId"/>
+                                <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>
+                                <parameter param-name="articleContentId"/>
+                                <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>
+                            </link>
+                                            <link text="${uiLabelMap.CommonView}" target="ViewResponse" style="buttontext">
+                                <parameter param-name="contentId" from-field="rsp.contentId"/>
+                                <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>
+                                <parameter param-name="articleContentId"/>
+                                <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>
+                            </link>
+                            <container style="responsetext">
+                                <label text="${rsp.description}" style="responsetext"/>
+                                <label text="(${uiLabelMap.EcommerceBlogPostedOn}: ${rsp.createdDate})" style="responsetext"/>
+                            </container>
+                        </container>
+                    </widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="blogTreeLine">
+        <section>
+            <widgets>
+                <container>
+                    <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewBlogArticle" style="responseheader">
+                        <parameter param-name="articleContentId"/>
+                        <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>
+                        <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>
+                    </link>
+                    <link text="${uiLabelMap.EcommerceBlogViewArticle}" target="ViewBlogArticle" style="buttontext">
+                        <parameter param-name="articleContentId"/>
+                        <parameter param-name="ownerContentId" from-field="rsp.ownerContentId"/>
+                        <parameter param-name="blogContentId" from-field="parameters.blogContentId"/>
+                    </link>
+                    <container style="responsetext">
+                        <label text="${rsp.description}" style="responsetext"/>
+                        <label text="(${uiLabelMap.EcommerceBlogPostedOn}: ${rsp.createdDate})" style="responsetext"/>
+                    </container>
+                </container>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="AddBlogResponse">
+        <section>
+            <widgets>
+                <section>
+                    <condition>
+                        <if-empty field="parameters.contentId"/>
+                    </condition>
+                    <actions>
+                        <set field="rsp.contentIdFrom" from-field="parameters.articleContentId"/>
+                    </actions>
+                    <widgets/>
+                </section>
+                <section>
+                    <condition>
+                        <not>
+                            <if-empty field="parameters.contentId"/>
+                        </not>
+                    </condition>
+                    <actions>
+                        <set field="rsp.contentIdFrom" from-field="parameters.contentId"/>
+                    </actions>
+                    <widgets/>
+                </section>
+                <section>
+                    <actions>
+                        <set field="rsp.contentTypeId" value="DOCUMENT"/>
+                        <set field="rsp.contentAssocTypeId" value="RESPONSE"/>
+                        <set field="rsp.dataResourceTypeId" value="ELECTRONIC_TEXT"/>
+                        <set field="rsp.contentOperationId" value="CONTENT_CREATE"/>
+                        <set field="rsp.contentPurposeTypeId" value="RESPONSE"/>
+                        <set field="rsp.articleContentId" from-field="articleContentId"/>
+                        <set field="rsp.ownerContentId" from-field="content.contentId"/>
+                        <set field="rsp.blogContentId" from-field="parameters.blogContentId"/>
+                        <set field="useRequestParameters" value="false" type="Boolean"/>
+
+                        <!-- used for permission check -->
+                        <set field="contentPurposeTypeId" value="ARTICLE"/>
+                        <set field="contentOperationId" value="CONTENT_RESPOND"/>
+                        <set field="ownerContentId" from-field="content.contentId"/>
+                    </actions>
+                    <widgets>
+                        <container style="bloghr">
+                            <label text="${uiLabelMap.CommonAdd} ${uiLabelMap.CommonComment} ${content.contentId}: " style="blogtitle"/>
+                            <section>
+                                <condition>
+                                    <if-service-permission service-name="genericContentPermission" main-action="CREATE"/>
+                                </condition>
+
+                                <actions>
+                                    <set field="displayForm" value="Y"/>
+                                </actions>
+                                <widgets/>
+                                <fail-widgets>
+                                    <label text="${uiLabelMap.EcommerceBlogPostComments}"/>
+                                </fail-widgets>
+                            </section>
+                        </container>
+                        <section>
+                            <condition>
+                                <if-compare field="displayForm" operator="equals" value="Y"/>
+                            </condition>
+                            <widgets>
+                                <container style="blogcontentwrapper">
+                                    <include-form name="AddBlogResponse" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                                </container>
+                            </widgets>
+                        </section>
+                    </widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="EditBlogResponse">
+        <section>
+            <actions>
+                <set field="rsp.contentPurposeTypeId" value="RESPONSE"/>
+                <set field="rsp.contentOperationId" value="CONTENT_UPDATE"/>
+                <set field="rsp.ownerContentId" from-field="parameters.ownerContentId"/>
+                <set field="rsp.blogContentId" from-field="parameters.blogContentId"/>
+
+                <!-- permission fields -->
+                <set field="upPerm.ownerContentId" from-field="parameters.ownerContentId"/>
+                <set field="upPerm.contentId" from-field="parameters.contentId"/>
+                <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>
+                <set field="upPerm.contentPurposeTypeId" value="RESPONSE"/>
+            </actions>
+            <widgets>
+                <section>
+                    <!--
+                    <condition>
+                        <if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>
+                    </condition>
+                    -->
+                    <actions>
+                        <set field="rsp.articleContentId" from-field="articleContentId"/>
+                        <entity-one entity-name="DataResource" value-field="dataResource" use-cache="false">
+                            <field-map field-name="dataResourceId" from-field="content.dataResourceId"/>
+                        </entity-one>
+                        <entity-one entity-name="ElectronicText" value-field="electronicText" use-cache="false">
+                            <field-map field-name="dataResourceId" from-field="content.dataResourceId"/>
+                        </entity-one>
+                    </actions>
+                    <widgets>
+                        <container style="blogcontentwrapper">
+                            <include-form name="EditBlogResponse" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                        </container>
+                    </widgets>
+                    <fail-widgets>
+                        <label text="${uiLabelMap.EcommerceBlogEditComments}"/>
+                    </fail-widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
+    <!-- Column Included Screens -->
+    <screen name="blogs">
+        <section>
+            <actions>
+                <entity-condition entity-name="ContentAssocViewTo" list="blogs" use-cache="true">
+                    <condition-list combine="and">
+                        <condition-expr field-name="contentIdStart" operator="equals" value="BLOGROOT"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="SUB_CONTENT"/>
+                        <condition-list combine="or">
+                            <condition-expr field-name="caFromDate" operator="equals" from-field="null"/>
+                            <condition-expr field-name="caFromDate" operator="less-equals" from-field="nowTimestamp"/>
+                        </condition-list>
+                        <condition-list combine="or">
+                            <condition-expr field-name="caThruDate" operator="equals" from-field="null"/>
+                            <condition-expr field-name="caThruDate" operator="greater-equals" from-field="nowTimestamp"/>
+                        </condition-list>
+                    </condition-list>
+                    <order-by field-name="contentName"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <platform-specific>
+                    <html>
+                        <html-template location="component://ecommerce/template/blog/Blogs.ftl"/>
+
+                    </html>
+                </platform-specific>
+            </widgets>
+        </section>
+    </screen>
+</screens>
+
+
diff --git a/plugins/example/data/ExampleHelpData.xml b/plugins/example/data/ExampleHelpData.xml
index c0d775c..ac85929 100644
--- a/plugins/example/data/ExampleHelpData.xml
+++ b/plugins/example/data/ExampleHelpData.xml
@@ -1,48 +1,48 @@
-<?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>

-

-    <DataResource dataResourceId="HELP_EXAMPLE" localeString="en" dataResourceTypeId="OFBIZ_FILE" 

-        objectInfo="plugins/example/data/helpdata/HELP_EXAMPLE.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"

-        dataResourceName="Framework Example" mimeTypeId="text/xml" isPublic="Y" />

-    <Content contentId="HELP_EXAMPLE" contentTypeId="DOCUMENT" contentName="Framework Example" templateDataResourceId="HELP_TEMPL" 

-        dataResourceId="HELP_EXAMPLE" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>

-    <ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_EXAMPLE" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000"/>

-

-    <DataResource dataResourceId="HELP_EXAMPLE_FR" localeString="fr" dataResourceTypeId="OFBIZ_FILE" 

-        objectInfo="plugins/example/data/helpdata/HELP_EXAMPLE_FR.xml" dataTemplateTypeId="NONE"  statusId="CTNT_IN_PROGRESS"

-        dataResourceName="Exemple pour le développement" mimeTypeId="text/xml" isPublic="Y" />

-    <Content contentId="HELP_EXAMPLE_FR" contentTypeId="DOCUMENT" contentName="Exemple pour le développement" templateDataResourceId="HELP_TEMPL" 

-        dataResourceId="HELP_EXAMPLE_FR" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html" localeString="fr" />

-    <ContentAssoc contentId="HELP_EXAMPLE" contentIdTo="HELP_EXAMPLE_FR" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-01-12 01:01:01"/>

-    

-    <DataResource dataResourceId="EXAMPLE_main" localeString="en" dataResourceTypeId="OFBIZ_FILE" 

-        objectInfo="plugins/example/data/helpdata/HELP_EXAMPLE_main.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Example help main page" mimeTypeId="text/xml" isPublic="Y" />

-    <Content contentId="EXAMPLE_main" contentTypeId="DOCUMENT" contentName="Example main menu." templateDataResourceId="HELP_TEMPL" dataResourceId="EXAMPLE_main" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>

-    <ContentAssoc contentId="HELP_EXAMPLE" contentIdTo="EXAMPLE_main" mapKey="EXAMPLE_main" fromDate="2006-01-12 01:01:01" contentAssocTypeId="TREE_CHILD" sequenceNum="000"/>

-    <ContentAssoc contentId="HELP_EXAMPLE" contentIdTo="EXAMPLE_main" mapKey="EXAMPLE_FindExample" fromDate="2006-01-12 01:01:02" sequenceNum="000" contentAssocTypeId="INSTANCE"/>

-

-    <DataResource dataResourceId="EXAMPLE_docbook" localeString="en" dataResourceTypeId="OFBIZ_FILE" 

-        objectInfo="plugins/example/data/helpdata/HELP_EXAMPLE_docbook.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Example docBook usage" mimeTypeId="text/xml" isPublic="Y" />

-    <Content contentId="EXAMPLE_docbook" contentTypeId="DOCUMENT" contentName="Example Docbook usage" templateDataResourceId="HELP_TEMPL" dataResourceId="EXAMPLE_docbook" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>

-    <ContentAssoc contentId="HELP_EXAMPLE" contentIdTo="EXAMPLE_docbook" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000" mapKey="EXAMPLE_docbook"/>

-

-

-</entity-engine-xml>

+<?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>
+
+    <DataResource dataResourceId="HELP_EXAMPLE" localeString="en" dataResourceTypeId="OFBIZ_FILE" 
+        objectInfo="plugins/example/data/helpdata/HELP_EXAMPLE.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
+        dataResourceName="Framework Example" mimeTypeId="text/xml" isPublic="Y" />
+    <Content contentId="HELP_EXAMPLE" contentTypeId="DOCUMENT" contentName="Framework Example" templateDataResourceId="HELP_TEMPL" 
+        dataResourceId="HELP_EXAMPLE" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>
+    <ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_EXAMPLE" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000"/>
+
+    <DataResource dataResourceId="HELP_EXAMPLE_FR" localeString="fr" dataResourceTypeId="OFBIZ_FILE" 
+        objectInfo="plugins/example/data/helpdata/HELP_EXAMPLE_FR.xml" dataTemplateTypeId="NONE"  statusId="CTNT_IN_PROGRESS"
+        dataResourceName="Exemple pour le développement" mimeTypeId="text/xml" isPublic="Y" />
+    <Content contentId="HELP_EXAMPLE_FR" contentTypeId="DOCUMENT" contentName="Exemple pour le développement" templateDataResourceId="HELP_TEMPL" 
+        dataResourceId="HELP_EXAMPLE_FR" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html" localeString="fr" />
+    <ContentAssoc contentId="HELP_EXAMPLE" contentIdTo="HELP_EXAMPLE_FR" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-01-12 01:01:01"/>
+    
+    <DataResource dataResourceId="EXAMPLE_main" localeString="en" dataResourceTypeId="OFBIZ_FILE" 
+        objectInfo="plugins/example/data/helpdata/HELP_EXAMPLE_main.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Example help main page" mimeTypeId="text/xml" isPublic="Y" />
+    <Content contentId="EXAMPLE_main" contentTypeId="DOCUMENT" contentName="Example main menu." templateDataResourceId="HELP_TEMPL" dataResourceId="EXAMPLE_main" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>
+    <ContentAssoc contentId="HELP_EXAMPLE" contentIdTo="EXAMPLE_main" mapKey="EXAMPLE_main" fromDate="2006-01-12 01:01:01" contentAssocTypeId="TREE_CHILD" sequenceNum="000"/>
+    <ContentAssoc contentId="HELP_EXAMPLE" contentIdTo="EXAMPLE_main" mapKey="EXAMPLE_FindExample" fromDate="2006-01-12 01:01:02" sequenceNum="000" contentAssocTypeId="INSTANCE"/>
+
+    <DataResource dataResourceId="EXAMPLE_docbook" localeString="en" dataResourceTypeId="OFBIZ_FILE" 
+        objectInfo="plugins/example/data/helpdata/HELP_EXAMPLE_docbook.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Example docBook usage" mimeTypeId="text/xml" isPublic="Y" />
+    <Content contentId="EXAMPLE_docbook" contentTypeId="DOCUMENT" contentName="Example Docbook usage" templateDataResourceId="HELP_TEMPL" dataResourceId="EXAMPLE_docbook" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>
+    <ContentAssoc contentId="HELP_EXAMPLE" contentIdTo="EXAMPLE_docbook" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000" mapKey="EXAMPLE_docbook"/>
+
+
+</entity-engine-xml>
diff --git a/plugins/example/groovyScripts/PrepareLocalesForDropDown.groovy b/plugins/example/groovyScripts/PrepareLocalesForDropDown.groovy
index d73fae6..f90071b 100644
--- a/plugins/example/groovyScripts/PrepareLocalesForDropDown.groovy
+++ b/plugins/example/groovyScripts/PrepareLocalesForDropDown.groovy
@@ -1,22 +1,22 @@
-/*

-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.

-*/

-

-def localeMap = []

-org.apache.ofbiz.base.util.UtilMisc.availableLocales().each { localeMap.add(localeId:it.toString()) }

-parameters.localeList = localeMap

+/*
+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.
+*/
+
+def localeMap = []
+org.apache.ofbiz.base.util.UtilMisc.availableLocales().each { localeMap.add(localeId:it.toString()) }
+parameters.localeList = localeMap
diff --git a/plugins/pricat/groovyScripts/pricat/FindMyExcelImport.groovy b/plugins/pricat/groovyScripts/pricat/FindMyExcelImport.groovy
index ffa9297..b686b70 100644
--- a/plugins/pricat/groovyScripts/pricat/FindMyExcelImport.groovy
+++ b/plugins/pricat/groovyScripts/pricat/FindMyExcelImport.groovy
@@ -1,24 +1,24 @@
-/*

- * 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.

- */

-import org.apache.ofbiz.base.util.*;

-

-module = "FindMyExcelImport.groovy";

-

-data = delegator.findByAnd("ExcelImportHistory", [userLoginId : userLogin.userLoginId], ["sequenceNum DESC"], false);

-context.data = data;

+/*
+ * 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.
+ */
+import org.apache.ofbiz.base.util.*;
+
+module = "FindMyExcelImport.groovy";
+
+data = delegator.findByAnd("ExcelImportHistory", [userLoginId : userLogin.userLoginId], ["sequenceNum DESC"], false);
+context.data = data;
diff --git a/plugins/pricat/groovyScripts/pricat/FindMyExcelImportLog.groovy b/plugins/pricat/groovyScripts/pricat/FindMyExcelImportLog.groovy
index c03e1c3..334f17d 100644
--- a/plugins/pricat/groovyScripts/pricat/FindMyExcelImportLog.groovy
+++ b/plugins/pricat/groovyScripts/pricat/FindMyExcelImportLog.groovy
@@ -1,53 +1,53 @@
-/*

- * 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.

- */

-import org.apache.ofbiz.base.util.*;

-import java.io.FileInputStream;

-

-module = "FindMyExcelImport.groovy";

-

-context.borderStyle = "2px inset /*begin-color ThreeDHighlight*/#ffffff/*end-color*/";

-context.borderSimpleStyle = "2px solid /*begin-color ThreeDFace*/#f0f0f0/*end-color*/";

-

-sequenceNum = request.getParameter("sequenceNum");

-

-if (sequenceNum == null) {

-    context.logFileContent = "No sequenceNum parameter found.";

-    return; 

-}

-

-historyEntry = delegator.findOne("ExcelImportHistory", [sequenceNum : Long.valueOf(sequenceNum), userLoginId : userLogin.userLoginId], false);

-if (historyEntry == null) {

-    context.logFileContent = "No import history found.";

-    return;

-}

-

-logFile = FileUtil.getFile("runtime/pricat/" + userLogin.userLoginId + "/" + sequenceNum + ".log");

-if (!logFile.exists()) {

-    context.logFileContent = "No log file found.";

-}

-

-FileInputStream fis = new FileInputStream(logFile);

-InputStreamReader isr = new InputStreamReader(fis);

-BufferedReader br = new BufferedReader(isr);

-logFileContent = "";

-while((s = br.readLine())!=null){

-    logFileContent += s;

-}

-context.logFileContent = logFileContent;

-

+/*
+ * 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.
+ */
+import org.apache.ofbiz.base.util.*;
+import java.io.FileInputStream;
+
+module = "FindMyExcelImport.groovy";
+
+context.borderStyle = "2px inset /*begin-color ThreeDHighlight*/#ffffff/*end-color*/";
+context.borderSimpleStyle = "2px solid /*begin-color ThreeDFace*/#f0f0f0/*end-color*/";
+
+sequenceNum = request.getParameter("sequenceNum");
+
+if (sequenceNum == null) {
+    context.logFileContent = "No sequenceNum parameter found.";
+    return; 
+}
+
+historyEntry = delegator.findOne("ExcelImportHistory", [sequenceNum : Long.valueOf(sequenceNum), userLoginId : userLogin.userLoginId], false);
+if (historyEntry == null) {
+    context.logFileContent = "No import history found.";
+    return;
+}
+
+logFile = FileUtil.getFile("runtime/pricat/" + userLogin.userLoginId + "/" + sequenceNum + ".log");
+if (!logFile.exists()) {
+    context.logFileContent = "No log file found.";
+}
+
+FileInputStream fis = new FileInputStream(logFile);
+InputStreamReader isr = new InputStreamReader(fis);
+BufferedReader br = new BufferedReader(isr);
+logFileContent = "";
+while((s = br.readLine())!=null){
+    logFileContent += s;
+}
+context.logFileContent = logFileContent;
+
diff --git a/plugins/pricat/widget/PriCatDemoMenus.xml b/plugins/pricat/widget/PriCatDemoMenus.xml
index 3f147cc..c20c3e1 100644
--- a/plugins/pricat/widget/PriCatDemoMenus.xml
+++ b/plugins/pricat/widget/PriCatDemoMenus.xml
@@ -1,38 +1,38 @@
-<?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.

--->

-<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-    xmlns="http://ofbiz.apache.org/Widget-Menu" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Menu http://ofbiz.apache.org/dtds/widget-menu.xsd">

-    

-    <menu name="PriCatDemoAppBar" title="${uiLabelMap.PriCatDemoApplication}"  extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">

-        <menu-item name="countdownreport" title="${uiLabelMap.PriCatDemoCountDown}">

-            <link target="countdownreport"/>

-        </menu-item>

-        <menu-item name="countupreport" title="${uiLabelMap.PriCatDemoCountUp}">

-            <link target="countupreport"/>

-        </menu-item>

-        <menu-item name="SamplePricat" title="${uiLabelMap.PriCatDemoParseSamplePricat}">

-            <link target="SamplePricat"/>

-        </menu-item>

-        <menu-item name="main" title="${uiLabelMap.CommonMain}">

-            <link target="main"/>

-        </menu-item>

-    </menu>

-    

+<?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.
+-->
+<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://ofbiz.apache.org/Widget-Menu" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Menu http://ofbiz.apache.org/dtds/widget-menu.xsd">
+    
+    <menu name="PriCatDemoAppBar" title="${uiLabelMap.PriCatDemoApplication}"  extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="countdownreport" title="${uiLabelMap.PriCatDemoCountDown}">
+            <link target="countdownreport"/>
+        </menu-item>
+        <menu-item name="countupreport" title="${uiLabelMap.PriCatDemoCountUp}">
+            <link target="countupreport"/>
+        </menu-item>
+        <menu-item name="SamplePricat" title="${uiLabelMap.PriCatDemoParseSamplePricat}">
+            <link target="SamplePricat"/>
+        </menu-item>
+        <menu-item name="main" title="${uiLabelMap.CommonMain}">
+            <link target="main"/>
+        </menu-item>
+    </menu>
+    
 </menus>
\ No newline at end of file
diff --git a/plugins/pricat/widget/PriCatMenus.xml b/plugins/pricat/widget/PriCatMenus.xml
index 953cc6b..98b17c2 100644
--- a/plugins/pricat/widget/PriCatMenus.xml
+++ b/plugins/pricat/widget/PriCatMenus.xml
@@ -1,29 +1,29 @@
-<?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.

--->

-<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-    xmlns="http://ofbiz.apache.org/Widget-Menu" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Menu http://ofbiz.apache.org/dtds/widget-menu.xsd">

-    

-    <menu name="PriCatAppBar" title="${uiLabelMap.PriCatApplication}"  extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">

-        <menu-item name="main" title="${uiLabelMap.ViewExcelImportHistory}">

-            <link target="main"/>

-        </menu-item>

-    </menu>

-    

+<?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.
+-->
+<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://ofbiz.apache.org/Widget-Menu" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Menu http://ofbiz.apache.org/dtds/widget-menu.xsd">
+    
+    <menu name="PriCatAppBar" title="${uiLabelMap.PriCatApplication}"  extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="main" title="${uiLabelMap.ViewExcelImportHistory}">
+            <link target="main"/>
+        </menu-item>
+    </menu>
+    
 </menus>
\ No newline at end of file
diff --git a/plugins/solr/home/solrdefault/conf/clustering/carrot2/kmeans-attributes.xml b/plugins/solr/home/solrdefault/conf/clustering/carrot2/kmeans-attributes.xml
index d7d88c0..d802465 100644
--- a/plugins/solr/home/solrdefault/conf/clustering/carrot2/kmeans-attributes.xml
+++ b/plugins/solr/home/solrdefault/conf/clustering/carrot2/kmeans-attributes.xml
@@ -1,19 +1,19 @@
-<!-- 

-  Default configuration for the bisecting k-means clustering algorithm.

-  

-  This file can be loaded (and saved) by Carrot2 Workbench.

-  http://project.carrot2.org/download.html

--->

-<attribute-sets default="attributes">

-    <attribute-set id="attributes">

-      <value-set>

-        <label>attributes</label>

-          <attribute key="MultilingualClustering.defaultLanguage">

-            <value type="org.carrot2.core.LanguageCode" value="ENGLISH"/>

-          </attribute>

-          <attribute key="MultilingualClustering.languageAggregationStrategy">

-            <value type="org.carrot2.text.clustering.MultilingualClustering$LanguageAggregationStrategy" value="FLATTEN_MAJOR_LANGUAGE"/>

-          </attribute>

-      </value-set>

-  </attribute-set>

-</attribute-sets>

+<!-- 
+  Default configuration for the bisecting k-means clustering algorithm.
+  
+  This file can be loaded (and saved) by Carrot2 Workbench.
+  http://project.carrot2.org/download.html
+-->
+<attribute-sets default="attributes">
+    <attribute-set id="attributes">
+      <value-set>
+        <label>attributes</label>
+          <attribute key="MultilingualClustering.defaultLanguage">
+            <value type="org.carrot2.core.LanguageCode" value="ENGLISH"/>
+          </attribute>
+          <attribute key="MultilingualClustering.languageAggregationStrategy">
+            <value type="org.carrot2.text.clustering.MultilingualClustering$LanguageAggregationStrategy" value="FLATTEN_MAJOR_LANGUAGE"/>
+          </attribute>
+      </value-set>
+  </attribute-set>
+</attribute-sets>
diff --git a/plugins/solr/home/solrdefault/conf/clustering/carrot2/lingo-attributes.xml b/plugins/solr/home/solrdefault/conf/clustering/carrot2/lingo-attributes.xml
index 16bb1fa..5febfc3 100644
--- a/plugins/solr/home/solrdefault/conf/clustering/carrot2/lingo-attributes.xml
+++ b/plugins/solr/home/solrdefault/conf/clustering/carrot2/lingo-attributes.xml
@@ -1,24 +1,24 @@
-<!-- 

-  Default configuration for the Lingo clustering algorithm.

-

-  This file can be loaded (and saved) by Carrot2 Workbench.

-  http://project.carrot2.org/download.html

--->

-<attribute-sets default="attributes">

-    <attribute-set id="attributes">

-      <value-set>

-        <label>attributes</label>

-          <!-- 

-          The language to assume for clustered documents.

-          For a list of allowed values, see: 

-          http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage

-          -->

-          <attribute key="MultilingualClustering.defaultLanguage">

-            <value type="org.carrot2.core.LanguageCode" value="ENGLISH"/>

-          </attribute>

-          <attribute key="LingoClusteringAlgorithm.desiredClusterCountBase">

-            <value type="java.lang.Integer" value="20"/>

-          </attribute>

-      </value-set>

-  </attribute-set>

-</attribute-sets>

+<!-- 
+  Default configuration for the Lingo clustering algorithm.
+
+  This file can be loaded (and saved) by Carrot2 Workbench.
+  http://project.carrot2.org/download.html
+-->
+<attribute-sets default="attributes">
+    <attribute-set id="attributes">
+      <value-set>
+        <label>attributes</label>
+          <!-- 
+          The language to assume for clustered documents.
+          For a list of allowed values, see: 
+          http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
+          -->
+          <attribute key="MultilingualClustering.defaultLanguage">
+            <value type="org.carrot2.core.LanguageCode" value="ENGLISH"/>
+          </attribute>
+          <attribute key="LingoClusteringAlgorithm.desiredClusterCountBase">
+            <value type="java.lang.Integer" value="20"/>
+          </attribute>
+      </value-set>
+  </attribute-set>
+</attribute-sets>
diff --git a/plugins/solr/home/solrdefault/conf/clustering/carrot2/stc-attributes.xml b/plugins/solr/home/solrdefault/conf/clustering/carrot2/stc-attributes.xml
index 3643160..c1bf110 100644
--- a/plugins/solr/home/solrdefault/conf/clustering/carrot2/stc-attributes.xml
+++ b/plugins/solr/home/solrdefault/conf/clustering/carrot2/stc-attributes.xml
@@ -1,19 +1,19 @@
-<!-- 

-  Default configuration for the STC clustering algorithm.

-

-  This file can be loaded (and saved) by Carrot2 Workbench.

-  http://project.carrot2.org/download.html

--->

-<attribute-sets default="attributes">

-    <attribute-set id="attributes">

-      <value-set>

-        <label>attributes</label>

-          <attribute key="MultilingualClustering.defaultLanguage">

-            <value type="org.carrot2.core.LanguageCode" value="ENGLISH"/>

-          </attribute>

-          <attribute key="MultilingualClustering.languageAggregationStrategy">

-            <value type="org.carrot2.text.clustering.MultilingualClustering$LanguageAggregationStrategy" value="FLATTEN_MAJOR_LANGUAGE"/>

-          </attribute>

-      </value-set>

-  </attribute-set>

-</attribute-sets>

+<!-- 
+  Default configuration for the STC clustering algorithm.
+
+  This file can be loaded (and saved) by Carrot2 Workbench.
+  http://project.carrot2.org/download.html
+-->
+<attribute-sets default="attributes">
+    <attribute-set id="attributes">
+      <value-set>
+        <label>attributes</label>
+          <attribute key="MultilingualClustering.defaultLanguage">
+            <value type="org.carrot2.core.LanguageCode" value="ENGLISH"/>
+          </attribute>
+          <attribute key="MultilingualClustering.languageAggregationStrategy">
+            <value type="org.carrot2.text.clustering.MultilingualClustering$LanguageAggregationStrategy" value="FLATTEN_MAJOR_LANGUAGE"/>
+          </attribute>
+      </value-set>
+  </attribute-set>
+</attribute-sets>
diff --git a/plugins/solr/home/solrdefault/conf/currency.xml b/plugins/solr/home/solrdefault/conf/currency.xml
index 5c6cfaf..3a9c58a 100644
--- a/plugins/solr/home/solrdefault/conf/currency.xml
+++ b/plugins/solr/home/solrdefault/conf/currency.xml
@@ -1,67 +1,67 @@
-<?xml version="1.0" ?>

-<!--

- 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.

--->

-

-<!-- Example exchange rates file for CurrencyField type named "currency" in example schema -->

-

-<currencyConfig version="1.0">

-  <rates>

-    <!-- Updated from http://www.exchangerate.com/ at 2011-09-27 -->

-    <rate from="USD" to="ARS" rate="4.333871" comment="ARGENTINA Peso" />

-    <rate from="USD" to="AUD" rate="1.025768" comment="AUSTRALIA Dollar" />

-    <rate from="USD" to="EUR" rate="0.743676" comment="European Euro" />

-    <rate from="USD" to="BRL" rate="1.881093" comment="BRAZIL Real" />

-    <rate from="USD" to="CAD" rate="1.030815" comment="CANADA Dollar" />

-    <rate from="USD" to="CLP" rate="519.0996" comment="CHILE Peso" />

-    <rate from="USD" to="CNY" rate="6.387310" comment="CHINA Yuan" />

-    <rate from="USD" to="CZK" rate="18.47134" comment="CZECH REP. Koruna" />

-    <rate from="USD" to="DKK" rate="5.515436" comment="DENMARK Krone" />

-    <rate from="USD" to="HKD" rate="7.801922" comment="HONG KONG Dollar" />

-    <rate from="USD" to="HUF" rate="215.6169" comment="HUNGARY Forint" />

-    <rate from="USD" to="ISK" rate="118.1280" comment="ICELAND Krona" />

-    <rate from="USD" to="INR" rate="49.49088" comment="INDIA Rupee" />

-    <rate from="USD" to="XDR" rate="0.641358" comment="INTNL MON. FUND SDR" />

-    <rate from="USD" to="ILS" rate="3.709739" comment="ISRAEL Sheqel" />

-    <rate from="USD" to="JPY" rate="76.32419" comment="JAPAN Yen" />

-    <rate from="USD" to="KRW" rate="1169.173" comment="KOREA (SOUTH) Won" />

-    <rate from="USD" to="KWD" rate="0.275142" comment="KUWAIT Dinar" />

-    <rate from="USD" to="MXN" rate="13.85895" comment="MEXICO Peso" />

-    <rate from="USD" to="NZD" rate="1.285159" comment="NEW ZEALAND Dollar" />

-    <rate from="USD" to="NOK" rate="5.859035" comment="NORWAY Krone" />

-    <rate from="USD" to="PKR" rate="87.57007" comment="PAKISTAN Rupee" />

-    <rate from="USD" to="PEN" rate="2.730683" comment="PERU Sol" />

-    <rate from="USD" to="PHP" rate="43.62039" comment="PHILIPPINES Peso" />

-    <rate from="USD" to="PLN" rate="3.310139" comment="POLAND Zloty" />

-    <rate from="USD" to="RON" rate="3.100932" comment="ROMANIA Leu" />

-    <rate from="USD" to="RUB" rate="32.14663" comment="RUSSIA Ruble" />

-    <rate from="USD" to="SAR" rate="3.750465" comment="SAUDI ARABIA Riyal" />

-    <rate from="USD" to="SGD" rate="1.299352" comment="SINGAPORE Dollar" />

-    <rate from="USD" to="ZAR" rate="8.329761" comment="SOUTH AFRICA Rand" />

-    <rate from="USD" to="SEK" rate="6.883442" comment="SWEDEN Krona" />

-    <rate from="USD" to="CHF" rate="0.906035" comment="SWITZERLAND Franc" />

-    <rate from="USD" to="TWD" rate="30.40283" comment="TAIWAN Dollar" />

-    <rate from="USD" to="THB" rate="30.89487" comment="THAILAND Baht" />

-    <rate from="USD" to="AED" rate="3.672955" comment="U.A.E. Dirham" />

-    <rate from="USD" to="UAH" rate="7.988582" comment="UKRAINE Hryvnia" />

-    <rate from="USD" to="GBP" rate="0.647910" comment="UNITED KINGDOM Pound" />

-    

-    <!-- Cross-rates for some common currencies -->

-    <rate from="EUR" to="GBP" rate="0.869914" />  

-    <rate from="EUR" to="NOK" rate="7.800095" />  

-    <rate from="GBP" to="NOK" rate="8.966508" />  

-  </rates>

-</currencyConfig>

+<?xml version="1.0" ?>
+<!--
+ 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.
+-->
+
+<!-- Example exchange rates file for CurrencyField type named "currency" in example schema -->
+
+<currencyConfig version="1.0">
+  <rates>
+    <!-- Updated from http://www.exchangerate.com/ at 2011-09-27 -->
+    <rate from="USD" to="ARS" rate="4.333871" comment="ARGENTINA Peso" />
+    <rate from="USD" to="AUD" rate="1.025768" comment="AUSTRALIA Dollar" />
+    <rate from="USD" to="EUR" rate="0.743676" comment="European Euro" />
+    <rate from="USD" to="BRL" rate="1.881093" comment="BRAZIL Real" />
+    <rate from="USD" to="CAD" rate="1.030815" comment="CANADA Dollar" />
+    <rate from="USD" to="CLP" rate="519.0996" comment="CHILE Peso" />
+    <rate from="USD" to="CNY" rate="6.387310" comment="CHINA Yuan" />
+    <rate from="USD" to="CZK" rate="18.47134" comment="CZECH REP. Koruna" />
+    <rate from="USD" to="DKK" rate="5.515436" comment="DENMARK Krone" />
+    <rate from="USD" to="HKD" rate="7.801922" comment="HONG KONG Dollar" />
+    <rate from="USD" to="HUF" rate="215.6169" comment="HUNGARY Forint" />
+    <rate from="USD" to="ISK" rate="118.1280" comment="ICELAND Krona" />
+    <rate from="USD" to="INR" rate="49.49088" comment="INDIA Rupee" />
+    <rate from="USD" to="XDR" rate="0.641358" comment="INTNL MON. FUND SDR" />
+    <rate from="USD" to="ILS" rate="3.709739" comment="ISRAEL Sheqel" />
+    <rate from="USD" to="JPY" rate="76.32419" comment="JAPAN Yen" />
+    <rate from="USD" to="KRW" rate="1169.173" comment="KOREA (SOUTH) Won" />
+    <rate from="USD" to="KWD" rate="0.275142" comment="KUWAIT Dinar" />
+    <rate from="USD" to="MXN" rate="13.85895" comment="MEXICO Peso" />
+    <rate from="USD" to="NZD" rate="1.285159" comment="NEW ZEALAND Dollar" />
+    <rate from="USD" to="NOK" rate="5.859035" comment="NORWAY Krone" />
+    <rate from="USD" to="PKR" rate="87.57007" comment="PAKISTAN Rupee" />
+    <rate from="USD" to="PEN" rate="2.730683" comment="PERU Sol" />
+    <rate from="USD" to="PHP" rate="43.62039" comment="PHILIPPINES Peso" />
+    <rate from="USD" to="PLN" rate="3.310139" comment="POLAND Zloty" />
+    <rate from="USD" to="RON" rate="3.100932" comment="ROMANIA Leu" />
+    <rate from="USD" to="RUB" rate="32.14663" comment="RUSSIA Ruble" />
+    <rate from="USD" to="SAR" rate="3.750465" comment="SAUDI ARABIA Riyal" />
+    <rate from="USD" to="SGD" rate="1.299352" comment="SINGAPORE Dollar" />
+    <rate from="USD" to="ZAR" rate="8.329761" comment="SOUTH AFRICA Rand" />
+    <rate from="USD" to="SEK" rate="6.883442" comment="SWEDEN Krona" />
+    <rate from="USD" to="CHF" rate="0.906035" comment="SWITZERLAND Franc" />
+    <rate from="USD" to="TWD" rate="30.40283" comment="TAIWAN Dollar" />
+    <rate from="USD" to="THB" rate="30.89487" comment="THAILAND Baht" />
+    <rate from="USD" to="AED" rate="3.672955" comment="U.A.E. Dirham" />
+    <rate from="USD" to="UAH" rate="7.988582" comment="UKRAINE Hryvnia" />
+    <rate from="USD" to="GBP" rate="0.647910" comment="UNITED KINGDOM Pound" />
+    
+    <!-- Cross-rates for some common currencies -->
+    <rate from="EUR" to="GBP" rate="0.869914" />  
+    <rate from="EUR" to="NOK" rate="7.800095" />  
+    <rate from="GBP" to="NOK" rate="8.966508" />  
+  </rates>
+</currencyConfig>
diff --git a/plugins/solr/home/solrdefault/conf/elevate.xml b/plugins/solr/home/solrdefault/conf/elevate.xml
index e4769cc..25d5ceb 100644
--- a/plugins/solr/home/solrdefault/conf/elevate.xml
+++ b/plugins/solr/home/solrdefault/conf/elevate.xml
@@ -1,38 +1,38 @@
-<?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.

--->

-

-<!-- If this file is found in the config directory, it will only be

-     loaded once at startup.  If it is found in Solr's data

-     directory, it will be re-loaded every commit.

-

-   See http://wiki.apache.org/solr/QueryElevationComponent for more info

-

--->

-<elevate>

- <query text="foo bar">

-  <doc id="1" />

-  <doc id="2" />

-  <doc id="3" />

- </query>

- 

- <query text="ipod">

-   <doc id="MA147LL/A" />  <!-- put the actual ipod at the top -->

-   <doc id="IW-02" exclude="true" /> <!-- exclude this cable -->

- </query>

- 

-</elevate>

+<?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.
+-->
+
+<!-- If this file is found in the config directory, it will only be
+     loaded once at startup.  If it is found in Solr's data
+     directory, it will be re-loaded every commit.
+
+   See http://wiki.apache.org/solr/QueryElevationComponent for more info
+
+-->
+<elevate>
+ <query text="foo bar">
+  <doc id="1" />
+  <doc id="2" />
+  <doc id="3" />
+ </query>
+ 
+ <query text="ipod">
+   <doc id="MA147LL/A" />  <!-- put the actual ipod at the top -->
+   <doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
+ </query>
+ 
+</elevate>
diff --git a/plugins/solr/home/solrdefault/conf/schema.xml b/plugins/solr/home/solrdefault/conf/schema.xml
index c036022..92422ee 100644
--- a/plugins/solr/home/solrdefault/conf/schema.xml
+++ b/plugins/solr/home/solrdefault/conf/schema.xml
@@ -1,1155 +1,1155 @@
-<?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.

--->

-

-<!--  

- This is the Solr schema file. This file should be named "schema.xml" and

- should be in the conf directory under the solr home

- (i.e. ./solr/conf/schema.xml by default) 

- or located where the classloader for the Solr webapp can find it.

-

- This example schema is the recommended starting point for users.

- It should be kept correct and concise, usable out-of-the-box.

-

- For more information, on how to customize this file, please see

- http://wiki.apache.org/solr/SchemaXml

-

- PERFORMANCE NOTE: this schema includes many optional features and should not

- be used for benchmarking.  To improve performance one could

-  - set stored="false" for all fields possible (esp large fields) when you

-    only need to search on the field but don't need to return the original

-    value.

-  - set indexed="false" if you don't need to search on the field, but only

-    return the field as a result of searching on other indexed fields.

-  - remove all unneeded copyField statements

-  - for best index size and searching performance, set "index" to false

-    for all general text fields, use copyField to copy them to the

-    catchall "text" field, and use that for searching.

-  - For maximum indexing performance, use the ConcurrentUpdateSolrServer

-    java client.

-  - Remember to run the JVM in server mode, and use a higher logging level

-    that avoids logging every request

--->

-

-<schema name="products" version="1.5">

-  <!-- attribute "name" is the name of this schema and is only used for display purposes.

-       version="x.y" is Solr's version number for the schema syntax and 

-       semantics.  It should not normally be changed by applications.

-

-       1.0: multiValued attribute did not exist, all fields are multiValued 

-            by nature

-       1.1: multiValued attribute introduced, false by default 

-       1.2: omitTermFreqAndPositions attribute introduced, true by default 

-            except for text fields.

-       1.3: removed optional field compress feature

-       1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser

-            behavior when a single string produces multiple tokens.  Defaults 

-            to off for version >= 1.4

-       1.5: omitNorms defaults to true for primitive field types 

-            (int, float, boolean, string...)

-     -->

-

-

-   <!-- Valid attributes for fields:

-     name: mandatory - the name for the field

-     type: mandatory - the name of a field type from the 

-       <types> fieldType section

-     indexed: true if this field should be indexed (searchable or sortable)

-     stored: true if this field should be retrievable

-     docValues: true if this field should have doc values. Doc values are

-       useful for faceting, grouping, sorting and function queries. Although not

-       required, doc values will make the index faster to load, more

-       NRT-friendly and more memory-efficient. They however come with some

-       limitations: they are currently only supported by StrField, UUIDField

-       and all Trie*Fields, and depending on the field type, they might

-       require the field to be single-valued, be required or have a default

-       value (check the documentation of the field type you're interested in

-       for more information)

-     multiValued: true if this field may contain multiple values per document

-     omitNorms: (expert) set to true to omit the norms associated with

-       this field (this disables length normalization and index-time

-       boosting for the field, and saves some memory).  Only full-text

-       fields or fields that need an index-time boost need norms.

-       Norms are omitted for primitive (non-analyzed) types by default.

-     termVectors: [false] set to true to store the term vector for a

-       given field.

-       When using MoreLikeThis, fields used for similarity should be

-       stored for best performance.

-     termPositions: Store position information with the term vector.  

-       This will increase storage costs.

-     termOffsets: Store offset information with the term vector. This 

-       will increase storage costs.

-     termPayloads: Store payload information with the term vector. This

-       will increase storage costs.

-     required: The field is required.  It will throw an error if the

-       value does not exist

-     default: a value that should be used if no value is specified

-       when adding a document.

-   -->

-

-   <!-- field names should consist of alphanumeric or underscore characters only and

-      not start with a digit.  This is not currently strictly enforced,

-      but other field names will not have first class support from all components

-      and back compatibility is not guaranteed.  Names with both leading and

-      trailing underscores (e.g. _version_) are reserved.

-   -->

-

-   <!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml

-      or Solr won't start. _version_ and update log are required for SolrCloud

-   --> 

-   <field name="_version_" type="long" indexed="true" stored="true"/>

-   

-   <!-- points to the root document of a block of nested documents. Required for nested

-      document support, may be removed otherwise

-   -->

-   <field name="_root_" type="string" indexed="true" stored="false"/>

-

-   <!-- Only remove the "id" field if you have a very good reason to. While not strictly

-     required, it is highly recommended. A <uniqueKey> is present in almost all Solr 

-     installations. See the <uniqueKey> declaration below where <uniqueKey> is set to "id".

-     Do NOT change the type and apply index-time analysis to the <uniqueKey> as it will likely 

-     make routing in SolrCloud and document replacement in general fail. Limited _query_ time

-     analysis is possible as long as the indexing process is guaranteed to index the term

-     in a compatible way. Any analysis applied to the <uniqueKey> should _not_ produce multiple

-     tokens

-   -->   

-   <!-- <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" /> -->

-        

-   <field name="productId" type="string" indexed="true" stored="true" required="true" multiValued="false" />

-

-   <field name="sku" type="text_general" indexed="true" stored="true"/>

-   <field name="internalName" type="text_general" indexed="true" stored="true" multiValued="true"/>

-   <field name="alphaNameSort" type="alphaOnlySort" indexed="true" stored="false"/>

-   <field name="manu" type="text_general" indexed="true" stored="true" omitNorms="true"/>

-   <field name="cat" type="string" indexed="true" stored="true" multiValued="true"/>

-   <field name="catalog" type="string" indexed="true" stored="true" multiValued="true"/>

-   <field name="features" type="text_general" indexed="true" stored="true" multiValued="true"/>

-   <field name="attributes" type="text_general" indexed="true" stored="true" multiValued="true"/>

-   <field name="weight" type="float" indexed="true" stored="true"/>

-   <field name="listPrice"  type="float" indexed="true" stored="true"/>

-   <field name="defaultPrice"  type="float" indexed="true" stored="true"/>

-   <field name="popularity" type="int" indexed="true" stored="true" />

-   <field name="inStock" type="int" indexed="true" stored="true" />

-   <field name="isVirtual" type="boolean" indexed="true" stored="true" />

-   <field name="isDigital" type="boolean" indexed="true" stored="true" />

-   <field name="isPhysical" type="boolean" indexed="true" stored="true" />

-  

-   <field name="store" type="location" indexed="true" stored="true"/>

-

-   <!-- Common metadata fields, named specifically to match up with

-     SolrCell metadata when parsing rich documents such as Word, PDF.

-     Some fields are multiValued only because Tika currently may return

-     multiple values for them. Some metadata is parsed from the documents,

-     but there are some which come from the client context:

-       "content_type": From the HTTP headers of incoming stream

-       "resourcename": From SolrCell request param resource.name

-   -->

-   <field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/>

-   <field name="title_i18n_en" type="text_general" indexed="true" stored="true" multiValued="true"/>

-   <field name="title_i18n_de" type="text_general" indexed="true" stored="true" multiValued="true"/>

-   <field name="title_i18n_fr" type="text_general" indexed="true" stored="true" multiValued="true"/>

-   <field name="subject" type="text_general" indexed="true" stored="true"/>

-   <field name="description" type="text_general" indexed="true" stored="true"/>

-   <field name="description_i18n_en" type="text_general" indexed="true" stored="true"/>

-   <field name="description_i18n_de" type="text_general" indexed="true" stored="true"/>

-   <field name="description_i18n_fr" type="text_general" indexed="true" stored="true"/>

-   <field name="longdescription" type="text_general" indexed="true" stored="true"/>

-   <field name="longdescription_i18n_en" type="text_general" indexed="true" stored="true"/>

-   <field name="longdescription_i18n_de" type="text_general" indexed="true" stored="true"/>

-   <field name="longdescription_i18n_fr" type="text_general" indexed="true" stored="true"/>

-   <field name="comments" type="text_general" indexed="true" stored="true"/>

-   <field name="author" type="text_general" indexed="true" stored="true"/>

-   <field name="keywords" type="text_general" indexed="true" stored="true"/>

-   <field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>

-   <field name="last_modified" type="date" indexed="true" stored="true"/>

-   <field name="links" type="string" indexed="true" stored="true" multiValued="true"/>

-   <field name="smallImage" type="text_general" indexed="true" stored="true"/>

-   <field name="mediumImage" type="text_general" indexed="true" stored="true"/>

-   <field name="largeImage" type="text_general" indexed="true" stored="true"/>

-

-   <!-- Main body of document extracted by SolrCell.

-        NOTE: This field is not indexed by default, since it is also copied to "text"

-        using copyField below. This is to save space. Use this field for returning and

-        highlighting document content. Use the "text" field to search the content. -->

-   <field name="content" type="text_general" indexed="false" stored="true" multiValued="true"/>

-   

-

-   <!-- catchall field, containing all other searchable text fields (implemented

-        via copyField further on in this schema  -->

-   <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>

-

-   <!-- catchall text field that indexes tokens both normally and in reverse for efficient

-        leading wildcard queries. -->

-   <field name="text_rev" type="text_general_rev" indexed="true" stored="false" multiValued="true"/>

-

-   <!-- non-tokenized version of manufacturer to make it easier to sort or group

-        results by manufacturer.  copied from "manu" via copyField -->

-   <field name="manu_exact" type="string" indexed="true" stored="false"/>

-

-   <field name="payloads" type="payloads" indexed="true" stored="true"/>

-

-

-   <!--

-     Some fields such as popularity and manu_exact could be modified to

-     leverage doc values:

-     <field name="popularity" type="int" indexed="true" stored="true" docValues="true" />

-     <field name="manu_exact" type="string" indexed="false" stored="false" docValues="true" />

-     <field name="cat" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>

-

-

-     Although it would make indexing slightly slower and the index bigger, it

-     would also make the index faster to load, more memory-efficient and more

-     NRT-friendly.

-     -->

-

-   <!-- Dynamic field definitions allow using convention over configuration

-       for fields via the specification of patterns to match field names. 

-       EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)

-       RESTRICTION: the glob-like pattern in the name attribute must have

-       a "*" only at the start or the end.  -->

-   

-   <dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/>

-   <dynamicField name="*_is" type="int"    indexed="true"  stored="true"  multiValued="true"/>

-   <dynamicField name="*_s"  type="string"  indexed="true"  stored="true" />

-   <dynamicField name="*_ss" type="string"  indexed="true"  stored="true" multiValued="true"/>

-   <dynamicField name="*_l"  type="long"   indexed="true"  stored="true"/>

-   <dynamicField name="*_ls" type="long"   indexed="true"  stored="true"  multiValued="true"/>

-   <dynamicField name="*_t"  type="text_general"    indexed="true"  stored="true"/>

-   <dynamicField name="*_txt" type="text_general"   indexed="true"  stored="true" multiValued="true"/>

-   <dynamicField name="*_en"  type="text_en"    indexed="true"  stored="true" multiValued="true"/>

-   <dynamicField name="*_b"  type="boolean" indexed="true" stored="true"/>

-   <dynamicField name="*_bs" type="boolean" indexed="true" stored="true"  multiValued="true"/>

-   <dynamicField name="*_f"  type="float"  indexed="true"  stored="true"/>

-   <dynamicField name="*_fs" type="float"  indexed="true"  stored="true"  multiValued="true"/>

-   <dynamicField name="*_d"  type="double" indexed="true"  stored="true"/>

-   <dynamicField name="*_ds" type="double" indexed="true"  stored="true"  multiValued="true"/>

-

-   <!-- Type used to index the lat and lon components for the "location" FieldType -->

-   <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false" />

-

-   <dynamicField name="*_dt"  type="date"    indexed="true"  stored="true"/>

-   <dynamicField name="*_dts" type="date"    indexed="true"  stored="true" multiValued="true"/>

-   <dynamicField name="*_p"  type="location" indexed="true" stored="true"/>

-

-   <!-- some trie-coded dynamic fields for faster range queries -->

-   <dynamicField name="*_ti" type="tint"    indexed="true"  stored="true"/>

-   <dynamicField name="*_tl" type="tlong"   indexed="true"  stored="true"/>

-   <dynamicField name="*_tf" type="tfloat"  indexed="true"  stored="true"/>

-   <dynamicField name="*_td" type="tdouble" indexed="true"  stored="true"/>

-   <dynamicField name="*_tdt" type="tdate"  indexed="true"  stored="true"/>

-

-   <dynamicField name="*_c"   type="currency" indexed="true"  stored="true"/>

-

-   <dynamicField name="ignored_*" type="ignored" multiValued="true"/>

-   <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>

-

-   <dynamicField name="random_*" type="random" />

-

-   <!-- uncomment the following to ignore any fields that don't already match an existing 

-        field name or dynamic field, rather than reporting them as an error. 

-        alternately, change the type="ignored" to some other type e.g. "text" if you want 

-        unknown fields indexed and/or stored by default --> 

-   <!--dynamicField name="*" type="ignored" multiValued="true" /-->

-   

-

-

-

- <!-- Field to use to determine and enforce document uniqueness. 

-      Unless this field is marked with required="false", it will be a required field

-   -->

- <uniqueKey>productId</uniqueKey>

-

- <!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when

-  parsing a query string that isn't explicit about the field.  Machine (non-user)

-  generated queries are best made explicit, or they can use the "df" request parameter

-  which takes precedence over this.

-  Note: Un-commenting defaultSearchField will be insufficient if your request handler

-  in solrconfig.xml defines "df", which takes precedence. That would need to be removed.

- <defaultSearchField>text</defaultSearchField> -->

-

- <!-- DEPRECATED: The defaultOperator (AND|OR) is consulted by various query parsers

-  when parsing a query string to determine if a clause of the query should be marked as

-  required or optional, assuming the clause isn't already marked by some operator.

-  The default is OR, which is generally assumed so it is not a good idea to change it

-  globally here.  The "q.op" request parameter takes precedence over this.

- <solrQueryParser defaultOperator="OR"/> -->

-

-  <!-- copyField commands copy one field to another at the time a document

-        is added to the index.  It's used either to index the same field differently,

-        or to add multiple fields to the same field for easier/faster searching.  -->

-

-   <copyField source="cat" dest="text"/>

-   <copyField source="internalName" dest="text"/>

-   <copyField source="manu" dest="text"/>

-   <copyField source="features" dest="text"/>

-   <copyField source="attributes" dest="text"/>

-   <copyField source="*_i18n_en"  dest="text" />

-   <copyField source="*_i18n_de"  dest="text" />

-   <copyField source="*_i18n_fr"  dest="text" />

-   <copyField source="manu" dest="manu_exact"/>

-

-   <!-- Above, multiple source fields are copied to the [text] field. 

-      Another way to map multiple source fields to the same 

-      destination field is to use the dynamic field syntax. 

-      copyField also supports a maxChars to copy setting.  -->

-       

-   <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->

-

-   <!-- copy name to alphaNameSort, a field designed for sorting by name -->

-   <!-- <copyField source="name" dest="alphaNameSort"/> -->

- 

-  

-    <!-- field type definitions. The "name" attribute is

-       just a label to be used by field definitions.  The "class"

-       attribute and any other attributes determine the real

-       behavior of the fieldType.

-         Class names starting with "solr" refer to java classes in a

-       standard package such as org.apache.solr.analysis

-    -->

-

-    <!-- The StrField type is not analyzed, but indexed/stored verbatim.

-       It supports doc values but in that case the field needs to be

-       single-valued and either required or have a default value.

-      -->

-    <fieldType name="string" class="solr.StrField" sortMissingLast="true" />

-

-    <!-- boolean type: "true" or "false" -->

-    <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>

-

-    <!-- sortMissingLast and sortMissingFirst attributes are optional attributes are

-         currently supported on types that are sorted internally as strings

-         and on numeric types.

-         This includes "string","boolean", and, as of 3.5 (and 4.x),

-         int, float, long, date, double, including the "Trie" variants.

-       - If sortMissingLast="true", then a sort on this field will cause documents

-         without the field to come after documents with the field,

-         regardless of the requested sort order (asc or desc).

-       - If sortMissingFirst="true", then a sort on this field will cause documents

-         without the field to come before documents with the field,

-         regardless of the requested sort order.

-       - If sortMissingLast="false" and sortMissingFirst="false" (the default),

-         then default lucene sorting will be used which places docs without the

-         field first in an ascending sort and last in a descending sort.

-    -->    

-

-    <!--

-      Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.

-

-      These fields support doc values, but they require the field to be

-      single-valued and either be required or have a default value.

-    -->

-    <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>

-    <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>

-    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>

-    <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>

-

-    <!--

-     Numeric field types that index each value at various levels of precision

-     to accelerate range queries when the number of values between the range

-     endpoints is large. See the javadoc for NumericRangeQuery for internal

-     implementation details.

-

-     Smaller precisionStep values (specified in bits) will lead to more tokens

-     indexed per value, slightly larger index size, and faster range queries.

-     A precisionStep of 0 disables indexing at different precision levels.

-    -->

-    <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>

-    <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>

-    <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>

-    <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>

-

-    <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and

-         is a more restricted form of the canonical representation of dateTime

-         http://www.w3.org/TR/xmlschema-2/#dateTime    

-         The trailing "Z" designates UTC time and is mandatory.

-         Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z

-         All other components are mandatory.

-

-         Expressions can also be used to denote calculations that should be

-         performed relative to "NOW" to determine the value, ie...

-

-               NOW/HOUR

-                  ... Round to the start of the current hour

-               NOW-1DAY

-                  ... Exactly 1 day prior to now

-               NOW/DAY+6MONTHS+3DAYS

-                  ... 6 months and 3 days in the future from the start of

-                      the current day

-                      

-         Consult the TrieDateField javadocs for more information.

-

-         Note: For faster range queries, consider the tdate type

-      -->

-    <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>

-

-    <!-- A Trie based date field for faster date range queries and date faceting. -->

-    <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>

-

-

-    <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->

-    <fieldType name="binary" class="solr.BinaryField"/>

-

-    <!-- The "RandomSortField" is not used to store or search any

-         data.  You can declare fields of this type it in your schema

-         to generate pseudo-random orderings of your docs for sorting 

-         or function purposes.  The ordering is generated based on the field

-         name and the version of the index. As long as the index version

-         remains unchanged, and the same field name is reused,

-         the ordering of the docs will be consistent.  

-         If you want different psuedo-random orderings of documents,

-         for the same version of the index, use a dynamicField and

-         change the field name in the request.

-     -->

-    <fieldType name="random" class="solr.RandomSortField" indexed="true" />

-

-    <!-- solr.TextField allows the specification of custom text analyzers

-         specified as a tokenizer and a list of token filters. Different

-         analyzers may be specified for indexing and querying.

-

-         The optional positionIncrementGap puts space between multiple fields of

-         this type on the same document, with the purpose of preventing false phrase

-         matching across fields.

-

-         For more info on customizing your analyzer chain, please see

-         http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters

-     -->

-

-    <!-- One can also specify an existing Analyzer class that has a

-         default constructor via the class attribute on the analyzer element.

-         Example:

-    <fieldType name="text_greek" class="solr.TextField">

-      <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>

-    </fieldType>

-    -->

-

-    <!-- A text field that only splits on whitespace for exact matching of words -->

-    <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">

-      <analyzer>

-        <tokenizer class="solr.WhitespaceTokenizerFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- A text type for English text where stopwords and synonyms are managed using the REST API -->

-    <fieldType name="managed_en" class="solr.TextField" positionIncrementGap="100">

-      <analyzer>

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.ManagedStopFilterFactory" managed="english" />

-        <filter class="solr.ManagedSynonymFilterFactory" managed="english" />

-      </analyzer>

-    </fieldType>

-

-    <!-- A general text field that has reasonable, generic

-         cross-language defaults: it tokenizes with StandardTokenizer,

-     removes stop words from case-insensitive "stopwords.txt"

-     (empty by default), and down cases.  At query time only, it

-     also applies synonyms. -->

-    <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">

-      <analyzer type="index">

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />

-        <!-- in this example, we will only use synonyms at query time

-        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>

-        -->

-        <filter class="solr.LowerCaseFilterFactory"/>

-      </analyzer>

-      <analyzer type="query">

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />

-        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- A text field with defaults appropriate for English: it

-         tokenizes with StandardTokenizer, removes English stop words

-         (lang/stopwords_en.txt), down cases, protects words from protwords.txt, and

-         finally applies Porter's stemming.  The query time analyzer

-         also applies synonyms from synonyms.txt. -->

-    <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">

-      <analyzer type="index">

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <!-- in this example, we will only use synonyms at query time

-        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>

-        -->

-        <!-- Case insensitive stop word removal.

-        -->

-        <filter class="solr.StopFilterFactory"

-                ignoreCase="true"

-                words="lang/stopwords_en.txt"

-                />

-        <filter class="solr.LowerCaseFilterFactory"/>

-    <filter class="solr.EnglishPossessiveFilterFactory"/>

-        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>

-    <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:

-        <filter class="solr.EnglishMinimalStemFilterFactory"/>

-    -->

-        <filter class="solr.PorterStemFilterFactory"/>

-      </analyzer>

-      <analyzer type="query">

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>

-        <filter class="solr.StopFilterFactory"

-                ignoreCase="true"

-                words="lang/stopwords_en.txt"

-                />

-        <filter class="solr.LowerCaseFilterFactory"/>

-    <filter class="solr.EnglishPossessiveFilterFactory"/>

-        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>

-    <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:

-        <filter class="solr.EnglishMinimalStemFilterFactory"/>

-    -->

-        <filter class="solr.PorterStemFilterFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- A text field with defaults appropriate for English, plus

-     aggressive word-splitting and autophrase features enabled.

-     This field is just like text_en, except it adds

-     WordDelimiterFilter to enable splitting and matching of

-     words on case-change, alpha numeric boundaries, and

-     non-alphanumeric chars.  This means certain compound word

-     cases will work, for example query "wi fi" will match

-     document "WiFi" or "wi-fi".

-        -->

-    <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">

-      <analyzer type="index">

-        <tokenizer class="solr.WhitespaceTokenizerFactory"/>

-        <!-- in this example, we will only use synonyms at query time

-        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>

-        -->

-        <!-- Case insensitive stop word removal.

-        -->

-        <filter class="solr.StopFilterFactory"

-                ignoreCase="true"

-                words="lang/stopwords_en.txt"

-                />

-        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>

-        <filter class="solr.PorterStemFilterFactory"/>

-      </analyzer>

-      <analyzer type="query">

-        <tokenizer class="solr.WhitespaceTokenizerFactory"/>

-        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>

-        <filter class="solr.StopFilterFactory"

-                ignoreCase="true"

-                words="lang/stopwords_en.txt"

-                />

-        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>

-        <filter class="solr.PorterStemFilterFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,

-         but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->

-    <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">

-      <analyzer>

-        <tokenizer class="solr.WhitespaceTokenizerFactory"/>

-        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt"/>

-        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>

-        <filter class="solr.EnglishMinimalStemFilterFactory"/>

-        <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes

-             possible with WordDelimiterFilter in conjuncton with stemming. -->

-        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- Just like text_general except it reverses the characters of

-     each token, to enable more efficient leading wildcard queries. -->

-    <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">

-      <analyzer type="index">

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"

-           maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>

-      </analyzer>

-      <analyzer type="query">

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />

-        <filter class="solr.LowerCaseFilterFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- charFilter + WhitespaceTokenizer  -->

-    <!--

-    <fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" >

-      <analyzer>

-        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>

-        <tokenizer class="solr.WhitespaceTokenizerFactory"/>

-      </analyzer>

-    </fieldType>

-    -->

-

-    <!-- This is an example of using the KeywordTokenizer along

-         With various TokenFilterFactories to produce a sortable field

-         that does not include some properties of the source text

-      -->

-    <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">

-      <analyzer>

-        <!-- KeywordTokenizer does no actual tokenizing, so the entire

-             input string is preserved as a single token

-          -->

-        <tokenizer class="solr.KeywordTokenizerFactory"/>

-        <!-- The LowerCase TokenFilter does what you expect, which can be

-             when you want your sorting to be case insensitive

-          -->

-        <filter class="solr.LowerCaseFilterFactory" />

-        <!-- The TrimFilter removes any leading or trailing whitespace -->

-        <filter class="solr.TrimFilterFactory" />

-        <!-- The PatternReplaceFilter gives you the flexibility to use

-             Java Regular expression to replace any sequence of characters

-             matching a pattern with an arbitrary replacement string, 

-             which may include back references to portions of the original

-             string matched by the pattern.

-             

-             See the Java Regular Expression documentation for more

-             information on pattern and replacement string syntax.

-             

-             http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html

-          -->

-        <filter class="solr.PatternReplaceFilterFactory"

-                pattern="([^a-z])" replacement="" replace="all"

-        />

-      </analyzer>

-    </fieldType>

-    

-    <fieldType name="phonetic" stored="false" indexed="true" class="solr.TextField" >

-      <analyzer>

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>

-      </analyzer>

-    </fieldType>

-

-    <fieldType name="payloads" stored="false" indexed="true" class="solr.TextField" >

-      <analyzer>

-        <tokenizer class="solr.WhitespaceTokenizerFactory"/>

-        <!--

-        The DelimitedPayloadTokenFilter can put payloads on tokens... for example,

-        a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f

-        Attributes of the DelimitedPayloadTokenFilterFactory : 

-         "delimiter" - a one character delimiter. Default is | (pipe)

-     "encoder" - how to encode the following value into a playload

-        float -> org.apache.lucene.analysis.payloads.FloatEncoder,

-        integer -> o.a.l.a.p.IntegerEncoder

-        identity -> o.a.l.a.p.IdentityEncoder

-            Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.

-         -->

-        <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- lowercases the entire field value, keeping it as a single token.  -->

-    <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">

-      <analyzer>

-        <tokenizer class="solr.KeywordTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory" />

-      </analyzer>

-    </fieldType>

-

-    <!-- 

-      Example of using PathHierarchyTokenizerFactory at index time, so

-      queries for paths match documents at that path, or in descendent paths

-    -->

-    <fieldType name="descendent_path" class="solr.TextField">

-      <analyzer type="index">

-    <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />

-      </analyzer>

-      <analyzer type="query">

-    <tokenizer class="solr.KeywordTokenizerFactory" />

-      </analyzer>

-    </fieldType>

-    <!-- 

-      Example of using PathHierarchyTokenizerFactory at query time, so

-      queries for paths match documents at that path, or in ancestor paths

-    -->

-    <fieldType name="ancestor_path" class="solr.TextField">

-      <analyzer type="index">

-    <tokenizer class="solr.KeywordTokenizerFactory" />

-      </analyzer>

-      <analyzer type="query">

-    <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />

-      </analyzer>

-    </fieldType>

-

-    <!-- since fields of this type are by default not stored or indexed,

-         any data added to them will be ignored outright.  --> 

-    <fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />

-

-    <!-- This point type indexes the coordinates as separate fields (subFields)

-      If subFieldType is defined, it references a type, and a dynamic field

-      definition is created matching *___<typename>.  Alternately, if 

-      subFieldSuffix is defined, that is used to create the subFields.

-      Example: if subFieldType="double", then the coordinates would be

-        indexed in fields myloc_0___double,myloc_1___double.

-      Example: if subFieldSuffix="_d" then the coordinates would be indexed

-        in fields myloc_0_d,myloc_1_d

-      The subFields are an implementation detail of the fieldType, and end

-      users normally should not need to know about them.

-     -->

-    <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>

-

-    <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->

-    <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>

-

-    <!-- An alternative geospatial field type new to Solr 4.  It supports multiValued and polygon shapes.

-      For more information about this and other Spatial fields new to Solr 4, see:

-      http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4

-    -->

-    <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"

-        geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers" />

-

-    <!-- Spatial rectangle (bounding box) field. It supports most spatial predicates, and has

-     special relevancy modes: score=overlapRatio|area|area2D (local-param to the query).  DocValues is recommended for

-     relevancy. -->

-    <fieldType name="bbox" class="solr.BBoxField"

-               geo="true" distanceUnits="kilometers" numberType="_bbox_coord" />

-    <fieldType name="_bbox_coord" class="solr.TrieDoubleField" precisionStep="8" docValues="true" stored="false"/>

-

-   <!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType

-        Parameters:

-          defaultCurrency: Specifies the default currency if none specified. Defaults to "USD"

-          precisionStep:   Specifies the precisionStep for the TrieLong field used for the amount

-          providerClass:   Lets you plug in other exchange provider backend:

-                           solr.FileExchangeRateProvider is the default and takes one parameter:

-                             currencyConfig: name of an xml file holding exchange rates

-                           solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org:

-                             ratesFileLocation: URL or path to rates JSON file (default latest.json on the web)

-                             refreshInterval: Number of minutes between each rates fetch (default: 1440, min: 60)

-   -->

-    <fieldType name="currency" class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml" />

-             

-

-

-   <!-- some examples for different languages (generally ordered by ISO code) -->

-

-    <!-- Arabic -->

-    <fieldType name="text_ar" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <!-- for any non-arabic -->

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ar.txt" />

-        <!-- normalizes ﻯ to ﻱ, etc -->

-        <filter class="solr.ArabicNormalizationFilterFactory"/>

-        <filter class="solr.ArabicStemFilterFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- Bulgarian -->

-    <fieldType name="text_bg" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/> 

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_bg.txt" /> 

-        <filter class="solr.BulgarianStemFilterFactory"/>       

-      </analyzer>

-    </fieldType>

-    

-    <!-- Catalan -->

-    <fieldType name="text_ca" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <!-- removes l', etc -->

-        <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ca.txt"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ca.txt" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Catalan"/>       

-      </analyzer>

-    </fieldType>

-    

-    <!-- CJK bigram (see text_ja for a Japanese configuration using morphological analysis) -->

-    <fieldType name="text_cjk" class="solr.TextField" positionIncrementGap="100">

-      <analyzer>

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <!-- normalize width before bigram, as e.g. half-width dakuten combine  -->

-        <filter class="solr.CJKWidthFilterFactory"/>

-        <!-- for any non-CJK -->

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.CJKBigramFilterFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- Kurdish -->

-    <fieldType name="text_ckb" class="solr.TextField" positionIncrementGap="100">

-      <analyzer>

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.SoraniNormalizationFilterFactory"/>

-        <!-- for any latin text -->

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ckb.txt"/>

-        <filter class="solr.SoraniStemFilterFactory"/>

-      </analyzer>

-    </fieldType>

-

-    <!-- Czech -->

-    <fieldType name="text_cz" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_cz.txt" />

-        <filter class="solr.CzechStemFilterFactory"/>       

-      </analyzer>

-    </fieldType>

-    

-    <!-- Danish -->

-    <fieldType name="text_da" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_da.txt" format="snowball" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Danish"/>       

-      </analyzer>

-    </fieldType>

-    

-    <!-- German -->

-    <fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_de.txt" format="snowball" />

-        <filter class="solr.GermanNormalizationFilterFactory"/>

-        <filter class="solr.GermanLightStemFilterFactory"/>

-        <!-- less aggressive: <filter class="solr.GermanMinimalStemFilterFactory"/> -->

-        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="German2"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Greek -->

-    <fieldType name="text_el" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <!-- greek specific lowercase for sigma -->

-        <filter class="solr.GreekLowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_el.txt" />

-        <filter class="solr.GreekStemFilterFactory"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Spanish -->

-    <fieldType name="text_es" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_es.txt" format="snowball" />

-        <filter class="solr.SpanishLightStemFilterFactory"/>

-        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Spanish"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Basque -->

-    <fieldType name="text_eu" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_eu.txt" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Basque"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Persian -->

-    <fieldType name="text_fa" class="solr.TextField" positionIncrementGap="100">

-      <analyzer>

-        <!-- for ZWNJ -->

-        <charFilter class="solr.PersianCharFilterFactory"/>

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.ArabicNormalizationFilterFactory"/>

-        <filter class="solr.PersianNormalizationFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fa.txt" />

-      </analyzer>

-    </fieldType>

-    

-    <!-- Finnish -->

-    <fieldType name="text_fi" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fi.txt" format="snowball" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Finnish"/>

-        <!-- less aggressive: <filter class="solr.FinnishLightStemFilterFactory"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- French -->

-    <fieldType name="text_fr" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <!-- removes l', etc -->

-        <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_fr.txt"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fr.txt" format="snowball" />

-        <filter class="solr.FrenchLightStemFilterFactory"/>

-        <!-- less aggressive: <filter class="solr.FrenchMinimalStemFilterFactory"/> -->

-        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="French"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Irish -->

-    <fieldType name="text_ga" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <!-- removes d', etc -->

-        <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ga.txt"/>

-        <!-- removes n-, etc. position increments is intentionally false! -->

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/hyphenations_ga.txt"/>

-        <filter class="solr.IrishLowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ga.txt"/>

-        <filter class="solr.SnowballPorterFilterFactory" language="Irish"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Galician -->

-    <fieldType name="text_gl" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_gl.txt" />

-        <filter class="solr.GalicianStemFilterFactory"/>

-        <!-- less aggressive: <filter class="solr.GalicianMinimalStemFilterFactory"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Hindi -->

-    <fieldType name="text_hi" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <!-- normalizes unicode representation -->

-        <filter class="solr.IndicNormalizationFilterFactory"/>

-        <!-- normalizes variation in spelling -->

-        <filter class="solr.HindiNormalizationFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hi.txt" />

-        <filter class="solr.HindiStemFilterFactory"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Hungarian -->

-    <fieldType name="text_hu" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hu.txt" format="snowball" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Hungarian"/>

-        <!-- less aggressive: <filter class="solr.HungarianLightStemFilterFactory"/> -->   

-      </analyzer>

-    </fieldType>

-    

-    <!-- Armenian -->

-    <fieldType name="text_hy" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hy.txt" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Armenian"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Indonesian -->

-    <fieldType name="text_id" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_id.txt" />

-        <!-- for a less aggressive approach (only inflectional suffixes), set stemDerivational to false -->

-        <filter class="solr.IndonesianStemFilterFactory" stemDerivational="true"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Italian -->

-    <fieldType name="text_it" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <!-- removes l', etc -->

-        <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_it.txt"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_it.txt" format="snowball" />

-        <filter class="solr.ItalianLightStemFilterFactory"/>

-        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Italian"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Japanese using morphological analysis (see text_cjk for a configuration using bigramming)

-

-         NOTE: If you want to optimize search for precision, use default operator AND in your query

-         parser config with <solrQueryParser defaultOperator="AND"/> further down in this file.  Use 

-         OR if you would like to optimize for recall (default).

-    -->

-    <fieldType name="text_ja" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="false">

-      <analyzer>

-      <!-- Kuromoji Japanese morphological analyzer/tokenizer (JapaneseTokenizer)

-

-           Kuromoji has a search mode (default) that does segmentation useful for search.  A heuristic

-           is used to segment compounds into its parts and the compound itself is kept as synonym.

-

-           Valid values for attribute mode are:

-              normal: regular segmentation

-              search: segmentation useful for search with synonyms compounds (default)

-            extended: same as search mode, but unigrams unknown words (experimental)

-

-           For some applications it might be good to use search mode for indexing and normal mode for

-           queries to reduce recall and prevent parts of compounds from being matched and highlighted.

-           Use <analyzer type="index"> and <analyzer type="query"> for this and mode normal in query.

-

-           Kuromoji also has a convenient user dictionary feature that allows overriding the statistical

-           model with your own entries for segmentation, part-of-speech tags and readings without a need

-           to specify weights.  Notice that user dictionaries have not been subject to extensive testing.

-

-           User dictionary attributes are:

-                     userDictionary: user dictionary filename

-             userDictionaryEncoding: user dictionary encoding (default is UTF-8)

-

-           See lang/userdict_ja.txt for a sample user dictionary file.

-

-           Punctuation characters are discarded by default.  Use discardPunctuation="false" to keep them.

-

-           See http://wiki.apache.org/solr/JapaneseLanguageSupport for more on Japanese language support.

-        -->

-        <tokenizer class="solr.JapaneseTokenizerFactory" mode="search"/>

-        <!--<tokenizer class="solr.JapaneseTokenizerFactory" mode="search" userDictionary="lang/userdict_ja.txt"/>-->

-        <!-- Reduces inflected verbs and adjectives to their base/dictionary forms (辞書形) -->

-        <filter class="solr.JapaneseBaseFormFilterFactory"/>

-        <!-- Removes tokens with certain part-of-speech tags -->

-        <filter class="solr.JapanesePartOfSpeechStopFilterFactory" tags="lang/stoptags_ja.txt" />

-        <!-- Normalizes full-width romaji to half-width and half-width kana to full-width (Unicode NFKC subset) -->

-        <filter class="solr.CJKWidthFilterFactory"/>

-        <!-- Removes common tokens typically not useful for search, but have a negative effect on ranking -->

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ja.txt" />

-        <!-- Normalizes common katakana spelling variations by removing any last long sound character (U+30FC) -->

-        <filter class="solr.JapaneseKatakanaStemFilterFactory" minimumLength="4"/>

-        <!-- Lower-cases romaji characters -->

-        <filter class="solr.LowerCaseFilterFactory"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Latvian -->

-    <fieldType name="text_lv" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_lv.txt" />

-        <filter class="solr.LatvianStemFilterFactory"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Dutch -->

-    <fieldType name="text_nl" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_nl.txt" format="snowball" />

-        <filter class="solr.StemmerOverrideFilterFactory" dictionary="lang/stemdict_nl.txt" ignoreCase="false"/>

-        <filter class="solr.SnowballPorterFilterFactory" language="Dutch"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Norwegian -->

-    <fieldType name="text_no" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_no.txt" format="snowball" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Norwegian"/>

-        <!-- less aggressive: <filter class="solr.NorwegianLightStemFilterFactory" variant="nb"/> -->

-        <!-- singular/plural: <filter class="solr.NorwegianMinimalStemFilterFactory" variant="nb"/> -->

-        <!-- The "light" and "minimal" stemmers support variants: nb=Bokmål, nn=Nynorsk, no=Both -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Portuguese -->

-    <fieldType name="text_pt" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pt.txt" format="snowball" />

-        <filter class="solr.PortugueseLightStemFilterFactory"/>

-        <!-- less aggressive: <filter class="solr.PortugueseMinimalStemFilterFactory"/> -->

-        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Portuguese"/> -->

-        <!-- most aggressive: <filter class="solr.PortugueseStemFilterFactory"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Romanian -->

-    <fieldType name="text_ro" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ro.txt" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Romanian"/>

-      </analyzer>

-    </fieldType>

-    

-    <!-- Russian -->

-    <fieldType name="text_ru" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ru.txt" format="snowball" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Russian"/>

-        <!-- less aggressive: <filter class="solr.RussianLightStemFilterFactory"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Swedish -->

-    <fieldType name="text_sv" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_sv.txt" format="snowball" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Swedish"/>

-        <!-- less aggressive: <filter class="solr.SwedishLightStemFilterFactory"/> -->

-      </analyzer>

-    </fieldType>

-    

-    <!-- Thai -->

-    <fieldType name="text_th" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.ThaiTokenizerFactory"/>

-        <filter class="solr.LowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_th.txt" />

-      </analyzer>

-    </fieldType>

-    

-    <!-- Turkish -->

-    <fieldType name="text_tr" class="solr.TextField" positionIncrementGap="100">

-      <analyzer> 

-        <tokenizer class="solr.StandardTokenizerFactory"/>

-        <filter class="solr.ApostropheFilterFactory"/>

-        <filter class="solr.TurkishLowerCaseFilterFactory"/>

-        <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_tr.txt" />

-        <filter class="solr.SnowballPorterFilterFactory" language="Turkish"/>

-      </analyzer>

-    </fieldType>

-  

-  <!-- Similarity is the scoring routine for each document vs. a query.

-       A custom Similarity or SimilarityFactory may be specified here, but 

-       the default is fine for most applications.  

-       For more info: http://wiki.apache.org/solr/SchemaXml#Similarity

-    -->

-  <!--

-     <similarity class="com.example.solr.CustomSimilarityFactory">

-       <str name="paramkey">param value</str>

-     </similarity>

-    -->

-

-</schema>

+<?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.
+-->
+
+<!--  
+ This is the Solr schema file. This file should be named "schema.xml" and
+ should be in the conf directory under the solr home
+ (i.e. ./solr/conf/schema.xml by default) 
+ or located where the classloader for the Solr webapp can find it.
+
+ This example schema is the recommended starting point for users.
+ It should be kept correct and concise, usable out-of-the-box.
+
+ For more information, on how to customize this file, please see
+ http://wiki.apache.org/solr/SchemaXml
+
+ PERFORMANCE NOTE: this schema includes many optional features and should not
+ be used for benchmarking.  To improve performance one could
+  - set stored="false" for all fields possible (esp large fields) when you
+    only need to search on the field but don't need to return the original
+    value.
+  - set indexed="false" if you don't need to search on the field, but only
+    return the field as a result of searching on other indexed fields.
+  - remove all unneeded copyField statements
+  - for best index size and searching performance, set "index" to false
+    for all general text fields, use copyField to copy them to the
+    catchall "text" field, and use that for searching.
+  - For maximum indexing performance, use the ConcurrentUpdateSolrServer
+    java client.
+  - Remember to run the JVM in server mode, and use a higher logging level
+    that avoids logging every request
+-->
+
+<schema name="products" version="1.5">
+  <!-- attribute "name" is the name of this schema and is only used for display purposes.
+       version="x.y" is Solr's version number for the schema syntax and 
+       semantics.  It should not normally be changed by applications.
+
+       1.0: multiValued attribute did not exist, all fields are multiValued 
+            by nature
+       1.1: multiValued attribute introduced, false by default 
+       1.2: omitTermFreqAndPositions attribute introduced, true by default 
+            except for text fields.
+       1.3: removed optional field compress feature
+       1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
+            behavior when a single string produces multiple tokens.  Defaults 
+            to off for version >= 1.4
+       1.5: omitNorms defaults to true for primitive field types 
+            (int, float, boolean, string...)
+     -->
+
+
+   <!-- Valid attributes for fields:
+     name: mandatory - the name for the field
+     type: mandatory - the name of a field type from the 
+       <types> fieldType section
+     indexed: true if this field should be indexed (searchable or sortable)
+     stored: true if this field should be retrievable
+     docValues: true if this field should have doc values. Doc values are
+       useful for faceting, grouping, sorting and function queries. Although not
+       required, doc values will make the index faster to load, more
+       NRT-friendly and more memory-efficient. They however come with some
+       limitations: they are currently only supported by StrField, UUIDField
+       and all Trie*Fields, and depending on the field type, they might
+       require the field to be single-valued, be required or have a default
+       value (check the documentation of the field type you're interested in
+       for more information)
+     multiValued: true if this field may contain multiple values per document
+     omitNorms: (expert) set to true to omit the norms associated with
+       this field (this disables length normalization and index-time
+       boosting for the field, and saves some memory).  Only full-text
+       fields or fields that need an index-time boost need norms.
+       Norms are omitted for primitive (non-analyzed) types by default.
+     termVectors: [false] set to true to store the term vector for a
+       given field.
+       When using MoreLikeThis, fields used for similarity should be
+       stored for best performance.
+     termPositions: Store position information with the term vector.  
+       This will increase storage costs.
+     termOffsets: Store offset information with the term vector. This 
+       will increase storage costs.
+     termPayloads: Store payload information with the term vector. This
+       will increase storage costs.
+     required: The field is required.  It will throw an error if the
+       value does not exist
+     default: a value that should be used if no value is specified
+       when adding a document.
+   -->
+
+   <!-- field names should consist of alphanumeric or underscore characters only and
+      not start with a digit.  This is not currently strictly enforced,
+      but other field names will not have first class support from all components
+      and back compatibility is not guaranteed.  Names with both leading and
+      trailing underscores (e.g. _version_) are reserved.
+   -->
+
+   <!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml
+      or Solr won't start. _version_ and update log are required for SolrCloud
+   --> 
+   <field name="_version_" type="long" indexed="true" stored="true"/>
+   
+   <!-- points to the root document of a block of nested documents. Required for nested
+      document support, may be removed otherwise
+   -->
+   <field name="_root_" type="string" indexed="true" stored="false"/>
+
+   <!-- Only remove the "id" field if you have a very good reason to. While not strictly
+     required, it is highly recommended. A <uniqueKey> is present in almost all Solr 
+     installations. See the <uniqueKey> declaration below where <uniqueKey> is set to "id".
+     Do NOT change the type and apply index-time analysis to the <uniqueKey> as it will likely 
+     make routing in SolrCloud and document replacement in general fail. Limited _query_ time
+     analysis is possible as long as the indexing process is guaranteed to index the term
+     in a compatible way. Any analysis applied to the <uniqueKey> should _not_ produce multiple
+     tokens
+   -->   
+   <!-- <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" /> -->
+        
+   <field name="productId" type="string" indexed="true" stored="true" required="true" multiValued="false" />
+
+   <field name="sku" type="text_general" indexed="true" stored="true"/>
+   <field name="internalName" type="text_general" indexed="true" stored="true" multiValued="true"/>
+   <field name="alphaNameSort" type="alphaOnlySort" indexed="true" stored="false"/>
+   <field name="manu" type="text_general" indexed="true" stored="true" omitNorms="true"/>
+   <field name="cat" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="catalog" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="features" type="text_general" indexed="true" stored="true" multiValued="true"/>
+   <field name="attributes" type="text_general" indexed="true" stored="true" multiValued="true"/>
+   <field name="weight" type="float" indexed="true" stored="true"/>
+   <field name="listPrice"  type="float" indexed="true" stored="true"/>
+   <field name="defaultPrice"  type="float" indexed="true" stored="true"/>
+   <field name="popularity" type="int" indexed="true" stored="true" />
+   <field name="inStock" type="int" indexed="true" stored="true" />
+   <field name="isVirtual" type="boolean" indexed="true" stored="true" />
+   <field name="isDigital" type="boolean" indexed="true" stored="true" />
+   <field name="isPhysical" type="boolean" indexed="true" stored="true" />
+  
+   <field name="store" type="location" indexed="true" stored="true"/>
+
+   <!-- Common metadata fields, named specifically to match up with
+     SolrCell metadata when parsing rich documents such as Word, PDF.
+     Some fields are multiValued only because Tika currently may return
+     multiple values for them. Some metadata is parsed from the documents,
+     but there are some which come from the client context:
+       "content_type": From the HTTP headers of incoming stream
+       "resourcename": From SolrCell request param resource.name
+   -->
+   <field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/>
+   <field name="title_i18n_en" type="text_general" indexed="true" stored="true" multiValued="true"/>
+   <field name="title_i18n_de" type="text_general" indexed="true" stored="true" multiValued="true"/>
+   <field name="title_i18n_fr" type="text_general" indexed="true" stored="true" multiValued="true"/>
+   <field name="subject" type="text_general" indexed="true" stored="true"/>
+   <field name="description" type="text_general" indexed="true" stored="true"/>
+   <field name="description_i18n_en" type="text_general" indexed="true" stored="true"/>
+   <field name="description_i18n_de" type="text_general" indexed="true" stored="true"/>
+   <field name="description_i18n_fr" type="text_general" indexed="true" stored="true"/>
+   <field name="longdescription" type="text_general" indexed="true" stored="true"/>
+   <field name="longdescription_i18n_en" type="text_general" indexed="true" stored="true"/>
+   <field name="longdescription_i18n_de" type="text_general" indexed="true" stored="true"/>
+   <field name="longdescription_i18n_fr" type="text_general" indexed="true" stored="true"/>
+   <field name="comments" type="text_general" indexed="true" stored="true"/>
+   <field name="author" type="text_general" indexed="true" stored="true"/>
+   <field name="keywords" type="text_general" indexed="true" stored="true"/>
+   <field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="last_modified" type="date" indexed="true" stored="true"/>
+   <field name="links" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="smallImage" type="text_general" indexed="true" stored="true"/>
+   <field name="mediumImage" type="text_general" indexed="true" stored="true"/>
+   <field name="largeImage" type="text_general" indexed="true" stored="true"/>
+
+   <!-- Main body of document extracted by SolrCell.
+        NOTE: This field is not indexed by default, since it is also copied to "text"
+        using copyField below. This is to save space. Use this field for returning and
+        highlighting document content. Use the "text" field to search the content. -->
+   <field name="content" type="text_general" indexed="false" stored="true" multiValued="true"/>
+   
+
+   <!-- catchall field, containing all other searchable text fields (implemented
+        via copyField further on in this schema  -->
+   <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
+
+   <!-- catchall text field that indexes tokens both normally and in reverse for efficient
+        leading wildcard queries. -->
+   <field name="text_rev" type="text_general_rev" indexed="true" stored="false" multiValued="true"/>
+
+   <!-- non-tokenized version of manufacturer to make it easier to sort or group
+        results by manufacturer.  copied from "manu" via copyField -->
+   <field name="manu_exact" type="string" indexed="true" stored="false"/>
+
+   <field name="payloads" type="payloads" indexed="true" stored="true"/>
+
+
+   <!--
+     Some fields such as popularity and manu_exact could be modified to
+     leverage doc values:
+     <field name="popularity" type="int" indexed="true" stored="true" docValues="true" />
+     <field name="manu_exact" type="string" indexed="false" stored="false" docValues="true" />
+     <field name="cat" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>
+
+
+     Although it would make indexing slightly slower and the index bigger, it
+     would also make the index faster to load, more memory-efficient and more
+     NRT-friendly.
+     -->
+
+   <!-- Dynamic field definitions allow using convention over configuration
+       for fields via the specification of patterns to match field names. 
+       EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)
+       RESTRICTION: the glob-like pattern in the name attribute must have
+       a "*" only at the start or the end.  -->
+   
+   <dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/>
+   <dynamicField name="*_is" type="int"    indexed="true"  stored="true"  multiValued="true"/>
+   <dynamicField name="*_s"  type="string"  indexed="true"  stored="true" />
+   <dynamicField name="*_ss" type="string"  indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="*_l"  type="long"   indexed="true"  stored="true"/>
+   <dynamicField name="*_ls" type="long"   indexed="true"  stored="true"  multiValued="true"/>
+   <dynamicField name="*_t"  type="text_general"    indexed="true"  stored="true"/>
+   <dynamicField name="*_txt" type="text_general"   indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="*_en"  type="text_en"    indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="*_b"  type="boolean" indexed="true" stored="true"/>
+   <dynamicField name="*_bs" type="boolean" indexed="true" stored="true"  multiValued="true"/>
+   <dynamicField name="*_f"  type="float"  indexed="true"  stored="true"/>
+   <dynamicField name="*_fs" type="float"  indexed="true"  stored="true"  multiValued="true"/>
+   <dynamicField name="*_d"  type="double" indexed="true"  stored="true"/>
+   <dynamicField name="*_ds" type="double" indexed="true"  stored="true"  multiValued="true"/>
+
+   <!-- Type used to index the lat and lon components for the "location" FieldType -->
+   <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false" />
+
+   <dynamicField name="*_dt"  type="date"    indexed="true"  stored="true"/>
+   <dynamicField name="*_dts" type="date"    indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="*_p"  type="location" indexed="true" stored="true"/>
+
+   <!-- some trie-coded dynamic fields for faster range queries -->
+   <dynamicField name="*_ti" type="tint"    indexed="true"  stored="true"/>
+   <dynamicField name="*_tl" type="tlong"   indexed="true"  stored="true"/>
+   <dynamicField name="*_tf" type="tfloat"  indexed="true"  stored="true"/>
+   <dynamicField name="*_td" type="tdouble" indexed="true"  stored="true"/>
+   <dynamicField name="*_tdt" type="tdate"  indexed="true"  stored="true"/>
+
+   <dynamicField name="*_c"   type="currency" indexed="true"  stored="true"/>
+
+   <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
+   <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>
+
+   <dynamicField name="random_*" type="random" />
+
+   <!-- uncomment the following to ignore any fields that don't already match an existing 
+        field name or dynamic field, rather than reporting them as an error. 
+        alternately, change the type="ignored" to some other type e.g. "text" if you want 
+        unknown fields indexed and/or stored by default --> 
+   <!--dynamicField name="*" type="ignored" multiValued="true" /-->
+   
+
+
+
+ <!-- Field to use to determine and enforce document uniqueness. 
+      Unless this field is marked with required="false", it will be a required field
+   -->
+ <uniqueKey>productId</uniqueKey>
+
+ <!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when
+  parsing a query string that isn't explicit about the field.  Machine (non-user)
+  generated queries are best made explicit, or they can use the "df" request parameter
+  which takes precedence over this.
+  Note: Un-commenting defaultSearchField will be insufficient if your request handler
+  in solrconfig.xml defines "df", which takes precedence. That would need to be removed.
+ <defaultSearchField>text</defaultSearchField> -->
+
+ <!-- DEPRECATED: The defaultOperator (AND|OR) is consulted by various query parsers
+  when parsing a query string to determine if a clause of the query should be marked as
+  required or optional, assuming the clause isn't already marked by some operator.
+  The default is OR, which is generally assumed so it is not a good idea to change it
+  globally here.  The "q.op" request parameter takes precedence over this.
+ <solrQueryParser defaultOperator="OR"/> -->
+
+  <!-- copyField commands copy one field to another at the time a document
+        is added to the index.  It's used either to index the same field differently,
+        or to add multiple fields to the same field for easier/faster searching.  -->
+
+   <copyField source="cat" dest="text"/>
+   <copyField source="internalName" dest="text"/>
+   <copyField source="manu" dest="text"/>
+   <copyField source="features" dest="text"/>
+   <copyField source="attributes" dest="text"/>
+   <copyField source="*_i18n_en"  dest="text" />
+   <copyField source="*_i18n_de"  dest="text" />
+   <copyField source="*_i18n_fr"  dest="text" />
+   <copyField source="manu" dest="manu_exact"/>
+
+   <!-- Above, multiple source fields are copied to the [text] field. 
+      Another way to map multiple source fields to the same 
+      destination field is to use the dynamic field syntax. 
+      copyField also supports a maxChars to copy setting.  -->
+       
+   <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
+
+   <!-- copy name to alphaNameSort, a field designed for sorting by name -->
+   <!-- <copyField source="name" dest="alphaNameSort"/> -->
+ 
+  
+    <!-- field type definitions. The "name" attribute is
+       just a label to be used by field definitions.  The "class"
+       attribute and any other attributes determine the real
+       behavior of the fieldType.
+         Class names starting with "solr" refer to java classes in a
+       standard package such as org.apache.solr.analysis
+    -->
+
+    <!-- The StrField type is not analyzed, but indexed/stored verbatim.
+       It supports doc values but in that case the field needs to be
+       single-valued and either required or have a default value.
+      -->
+    <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
+
+    <!-- boolean type: "true" or "false" -->
+    <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
+
+    <!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
+         currently supported on types that are sorted internally as strings
+         and on numeric types.
+         This includes "string","boolean", and, as of 3.5 (and 4.x),
+         int, float, long, date, double, including the "Trie" variants.
+       - If sortMissingLast="true", then a sort on this field will cause documents
+         without the field to come after documents with the field,
+         regardless of the requested sort order (asc or desc).
+       - If sortMissingFirst="true", then a sort on this field will cause documents
+         without the field to come before documents with the field,
+         regardless of the requested sort order.
+       - If sortMissingLast="false" and sortMissingFirst="false" (the default),
+         then default lucene sorting will be used which places docs without the
+         field first in an ascending sort and last in a descending sort.
+    -->    
+
+    <!--
+      Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
+
+      These fields support doc values, but they require the field to be
+      single-valued and either be required or have a default value.
+    -->
+    <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
+    <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
+    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
+    <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
+
+    <!--
+     Numeric field types that index each value at various levels of precision
+     to accelerate range queries when the number of values between the range
+     endpoints is large. See the javadoc for NumericRangeQuery for internal
+     implementation details.
+
+     Smaller precisionStep values (specified in bits) will lead to more tokens
+     indexed per value, slightly larger index size, and faster range queries.
+     A precisionStep of 0 disables indexing at different precision levels.
+    -->
+    <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
+    <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
+    <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
+    <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
+
+    <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
+         is a more restricted form of the canonical representation of dateTime
+         http://www.w3.org/TR/xmlschema-2/#dateTime    
+         The trailing "Z" designates UTC time and is mandatory.
+         Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
+         All other components are mandatory.
+
+         Expressions can also be used to denote calculations that should be
+         performed relative to "NOW" to determine the value, ie...
+
+               NOW/HOUR
+                  ... Round to the start of the current hour
+               NOW-1DAY
+                  ... Exactly 1 day prior to now
+               NOW/DAY+6MONTHS+3DAYS
+                  ... 6 months and 3 days in the future from the start of
+                      the current day
+                      
+         Consult the TrieDateField javadocs for more information.
+
+         Note: For faster range queries, consider the tdate type
+      -->
+    <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
+
+    <!-- A Trie based date field for faster date range queries and date faceting. -->
+    <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
+
+
+    <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
+    <fieldType name="binary" class="solr.BinaryField"/>
+
+    <!-- The "RandomSortField" is not used to store or search any
+         data.  You can declare fields of this type it in your schema
+         to generate pseudo-random orderings of your docs for sorting 
+         or function purposes.  The ordering is generated based on the field
+         name and the version of the index. As long as the index version
+         remains unchanged, and the same field name is reused,
+         the ordering of the docs will be consistent.  
+         If you want different psuedo-random orderings of documents,
+         for the same version of the index, use a dynamicField and
+         change the field name in the request.
+     -->
+    <fieldType name="random" class="solr.RandomSortField" indexed="true" />
+
+    <!-- solr.TextField allows the specification of custom text analyzers
+         specified as a tokenizer and a list of token filters. Different
+         analyzers may be specified for indexing and querying.
+
+         The optional positionIncrementGap puts space between multiple fields of
+         this type on the same document, with the purpose of preventing false phrase
+         matching across fields.
+
+         For more info on customizing your analyzer chain, please see
+         http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
+     -->
+
+    <!-- One can also specify an existing Analyzer class that has a
+         default constructor via the class attribute on the analyzer element.
+         Example:
+    <fieldType name="text_greek" class="solr.TextField">
+      <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
+    </fieldType>
+    -->
+
+    <!-- A text field that only splits on whitespace for exact matching of words -->
+    <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- A text type for English text where stopwords and synonyms are managed using the REST API -->
+    <fieldType name="managed_en" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.ManagedStopFilterFactory" managed="english" />
+        <filter class="solr.ManagedSynonymFilterFactory" managed="english" />
+      </analyzer>
+    </fieldType>
+
+    <!-- A general text field that has reasonable, generic
+         cross-language defaults: it tokenizes with StandardTokenizer,
+     removes stop words from case-insensitive "stopwords.txt"
+     (empty by default), and down cases.  At query time only, it
+     also applies synonyms. -->
+    <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
+      <analyzer type="index">
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
+        <!-- in this example, we will only use synonyms at query time
+        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
+        -->
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- A text field with defaults appropriate for English: it
+         tokenizes with StandardTokenizer, removes English stop words
+         (lang/stopwords_en.txt), down cases, protects words from protwords.txt, and
+         finally applies Porter's stemming.  The query time analyzer
+         also applies synonyms from synonyms.txt. -->
+    <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
+      <analyzer type="index">
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <!-- in this example, we will only use synonyms at query time
+        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
+        -->
+        <!-- Case insensitive stop word removal.
+        -->
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="lang/stopwords_en.txt"
+                />
+        <filter class="solr.LowerCaseFilterFactory"/>
+    <filter class="solr.EnglishPossessiveFilterFactory"/>
+        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
+    <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
+        <filter class="solr.EnglishMinimalStemFilterFactory"/>
+    -->
+        <filter class="solr.PorterStemFilterFactory"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="lang/stopwords_en.txt"
+                />
+        <filter class="solr.LowerCaseFilterFactory"/>
+    <filter class="solr.EnglishPossessiveFilterFactory"/>
+        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
+    <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
+        <filter class="solr.EnglishMinimalStemFilterFactory"/>
+    -->
+        <filter class="solr.PorterStemFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- A text field with defaults appropriate for English, plus
+     aggressive word-splitting and autophrase features enabled.
+     This field is just like text_en, except it adds
+     WordDelimiterFilter to enable splitting and matching of
+     words on case-change, alpha numeric boundaries, and
+     non-alphanumeric chars.  This means certain compound word
+     cases will work, for example query "wi fi" will match
+     document "WiFi" or "wi-fi".
+        -->
+    <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
+      <analyzer type="index">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <!-- in this example, we will only use synonyms at query time
+        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
+        -->
+        <!-- Case insensitive stop word removal.
+        -->
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="lang/stopwords_en.txt"
+                />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.PorterStemFilterFactory"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="lang/stopwords_en.txt"
+                />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.PorterStemFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
+         but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
+    <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt"/>
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.EnglishMinimalStemFilterFactory"/>
+        <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
+             possible with WordDelimiterFilter in conjuncton with stemming. -->
+        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- Just like text_general except it reverses the characters of
+     each token, to enable more efficient leading wildcard queries. -->
+    <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
+      <analyzer type="index">
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
+           maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- charFilter + WhitespaceTokenizer  -->
+    <!--
+    <fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" >
+      <analyzer>
+        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      </analyzer>
+    </fieldType>
+    -->
+
+    <!-- This is an example of using the KeywordTokenizer along
+         With various TokenFilterFactories to produce a sortable field
+         that does not include some properties of the source text
+      -->
+    <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
+      <analyzer>
+        <!-- KeywordTokenizer does no actual tokenizing, so the entire
+             input string is preserved as a single token
+          -->
+        <tokenizer class="solr.KeywordTokenizerFactory"/>
+        <!-- The LowerCase TokenFilter does what you expect, which can be
+             when you want your sorting to be case insensitive
+          -->
+        <filter class="solr.LowerCaseFilterFactory" />
+        <!-- The TrimFilter removes any leading or trailing whitespace -->
+        <filter class="solr.TrimFilterFactory" />
+        <!-- The PatternReplaceFilter gives you the flexibility to use
+             Java Regular expression to replace any sequence of characters
+             matching a pattern with an arbitrary replacement string, 
+             which may include back references to portions of the original
+             string matched by the pattern.
+             
+             See the Java Regular Expression documentation for more
+             information on pattern and replacement string syntax.
+             
+             http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html
+          -->
+        <filter class="solr.PatternReplaceFilterFactory"
+                pattern="([^a-z])" replacement="" replace="all"
+        />
+      </analyzer>
+    </fieldType>
+    
+    <fieldType name="phonetic" stored="false" indexed="true" class="solr.TextField" >
+      <analyzer>
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
+      </analyzer>
+    </fieldType>
+
+    <fieldType name="payloads" stored="false" indexed="true" class="solr.TextField" >
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <!--
+        The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
+        a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f
+        Attributes of the DelimitedPayloadTokenFilterFactory : 
+         "delimiter" - a one character delimiter. Default is | (pipe)
+     "encoder" - how to encode the following value into a playload
+        float -> org.apache.lucene.analysis.payloads.FloatEncoder,
+        integer -> o.a.l.a.p.IntegerEncoder
+        identity -> o.a.l.a.p.IdentityEncoder
+            Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
+         -->
+        <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- lowercases the entire field value, keeping it as a single token.  -->
+    <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.KeywordTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory" />
+      </analyzer>
+    </fieldType>
+
+    <!-- 
+      Example of using PathHierarchyTokenizerFactory at index time, so
+      queries for paths match documents at that path, or in descendent paths
+    -->
+    <fieldType name="descendent_path" class="solr.TextField">
+      <analyzer type="index">
+    <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
+      </analyzer>
+      <analyzer type="query">
+    <tokenizer class="solr.KeywordTokenizerFactory" />
+      </analyzer>
+    </fieldType>
+    <!-- 
+      Example of using PathHierarchyTokenizerFactory at query time, so
+      queries for paths match documents at that path, or in ancestor paths
+    -->
+    <fieldType name="ancestor_path" class="solr.TextField">
+      <analyzer type="index">
+    <tokenizer class="solr.KeywordTokenizerFactory" />
+      </analyzer>
+      <analyzer type="query">
+    <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
+      </analyzer>
+    </fieldType>
+
+    <!-- since fields of this type are by default not stored or indexed,
+         any data added to them will be ignored outright.  --> 
+    <fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
+
+    <!-- This point type indexes the coordinates as separate fields (subFields)
+      If subFieldType is defined, it references a type, and a dynamic field
+      definition is created matching *___<typename>.  Alternately, if 
+      subFieldSuffix is defined, that is used to create the subFields.
+      Example: if subFieldType="double", then the coordinates would be
+        indexed in fields myloc_0___double,myloc_1___double.
+      Example: if subFieldSuffix="_d" then the coordinates would be indexed
+        in fields myloc_0_d,myloc_1_d
+      The subFields are an implementation detail of the fieldType, and end
+      users normally should not need to know about them.
+     -->
+    <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
+
+    <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
+    <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
+
+    <!-- An alternative geospatial field type new to Solr 4.  It supports multiValued and polygon shapes.
+      For more information about this and other Spatial fields new to Solr 4, see:
+      http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
+    -->
+    <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
+        geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers" />
+
+    <!-- Spatial rectangle (bounding box) field. It supports most spatial predicates, and has
+     special relevancy modes: score=overlapRatio|area|area2D (local-param to the query).  DocValues is recommended for
+     relevancy. -->
+    <fieldType name="bbox" class="solr.BBoxField"
+               geo="true" distanceUnits="kilometers" numberType="_bbox_coord" />
+    <fieldType name="_bbox_coord" class="solr.TrieDoubleField" precisionStep="8" docValues="true" stored="false"/>
+
+   <!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType
+        Parameters:
+          defaultCurrency: Specifies the default currency if none specified. Defaults to "USD"
+          precisionStep:   Specifies the precisionStep for the TrieLong field used for the amount
+          providerClass:   Lets you plug in other exchange provider backend:
+                           solr.FileExchangeRateProvider is the default and takes one parameter:
+                             currencyConfig: name of an xml file holding exchange rates
+                           solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org:
+                             ratesFileLocation: URL or path to rates JSON file (default latest.json on the web)
+                             refreshInterval: Number of minutes between each rates fetch (default: 1440, min: 60)
+   -->
+    <fieldType name="currency" class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml" />
+             
+
+
+   <!-- some examples for different languages (generally ordered by ISO code) -->
+
+    <!-- Arabic -->
+    <fieldType name="text_ar" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <!-- for any non-arabic -->
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ar.txt" />
+        <!-- normalizes ﻯ to ﻱ, etc -->
+        <filter class="solr.ArabicNormalizationFilterFactory"/>
+        <filter class="solr.ArabicStemFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- Bulgarian -->
+    <fieldType name="text_bg" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/> 
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_bg.txt" /> 
+        <filter class="solr.BulgarianStemFilterFactory"/>       
+      </analyzer>
+    </fieldType>
+    
+    <!-- Catalan -->
+    <fieldType name="text_ca" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <!-- removes l', etc -->
+        <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ca.txt"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ca.txt" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Catalan"/>       
+      </analyzer>
+    </fieldType>
+    
+    <!-- CJK bigram (see text_ja for a Japanese configuration using morphological analysis) -->
+    <fieldType name="text_cjk" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <!-- normalize width before bigram, as e.g. half-width dakuten combine  -->
+        <filter class="solr.CJKWidthFilterFactory"/>
+        <!-- for any non-CJK -->
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.CJKBigramFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- Kurdish -->
+    <fieldType name="text_ckb" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.SoraniNormalizationFilterFactory"/>
+        <!-- for any latin text -->
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ckb.txt"/>
+        <filter class="solr.SoraniStemFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- Czech -->
+    <fieldType name="text_cz" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_cz.txt" />
+        <filter class="solr.CzechStemFilterFactory"/>       
+      </analyzer>
+    </fieldType>
+    
+    <!-- Danish -->
+    <fieldType name="text_da" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_da.txt" format="snowball" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Danish"/>       
+      </analyzer>
+    </fieldType>
+    
+    <!-- German -->
+    <fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_de.txt" format="snowball" />
+        <filter class="solr.GermanNormalizationFilterFactory"/>
+        <filter class="solr.GermanLightStemFilterFactory"/>
+        <!-- less aggressive: <filter class="solr.GermanMinimalStemFilterFactory"/> -->
+        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="German2"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Greek -->
+    <fieldType name="text_el" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <!-- greek specific lowercase for sigma -->
+        <filter class="solr.GreekLowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_el.txt" />
+        <filter class="solr.GreekStemFilterFactory"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Spanish -->
+    <fieldType name="text_es" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_es.txt" format="snowball" />
+        <filter class="solr.SpanishLightStemFilterFactory"/>
+        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Spanish"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Basque -->
+    <fieldType name="text_eu" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_eu.txt" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Basque"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Persian -->
+    <fieldType name="text_fa" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <!-- for ZWNJ -->
+        <charFilter class="solr.PersianCharFilterFactory"/>
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.ArabicNormalizationFilterFactory"/>
+        <filter class="solr.PersianNormalizationFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fa.txt" />
+      </analyzer>
+    </fieldType>
+    
+    <!-- Finnish -->
+    <fieldType name="text_fi" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fi.txt" format="snowball" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Finnish"/>
+        <!-- less aggressive: <filter class="solr.FinnishLightStemFilterFactory"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- French -->
+    <fieldType name="text_fr" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <!-- removes l', etc -->
+        <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_fr.txt"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fr.txt" format="snowball" />
+        <filter class="solr.FrenchLightStemFilterFactory"/>
+        <!-- less aggressive: <filter class="solr.FrenchMinimalStemFilterFactory"/> -->
+        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="French"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Irish -->
+    <fieldType name="text_ga" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <!-- removes d', etc -->
+        <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ga.txt"/>
+        <!-- removes n-, etc. position increments is intentionally false! -->
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/hyphenations_ga.txt"/>
+        <filter class="solr.IrishLowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ga.txt"/>
+        <filter class="solr.SnowballPorterFilterFactory" language="Irish"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Galician -->
+    <fieldType name="text_gl" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_gl.txt" />
+        <filter class="solr.GalicianStemFilterFactory"/>
+        <!-- less aggressive: <filter class="solr.GalicianMinimalStemFilterFactory"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Hindi -->
+    <fieldType name="text_hi" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <!-- normalizes unicode representation -->
+        <filter class="solr.IndicNormalizationFilterFactory"/>
+        <!-- normalizes variation in spelling -->
+        <filter class="solr.HindiNormalizationFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hi.txt" />
+        <filter class="solr.HindiStemFilterFactory"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Hungarian -->
+    <fieldType name="text_hu" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hu.txt" format="snowball" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Hungarian"/>
+        <!-- less aggressive: <filter class="solr.HungarianLightStemFilterFactory"/> -->   
+      </analyzer>
+    </fieldType>
+    
+    <!-- Armenian -->
+    <fieldType name="text_hy" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hy.txt" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Armenian"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Indonesian -->
+    <fieldType name="text_id" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_id.txt" />
+        <!-- for a less aggressive approach (only inflectional suffixes), set stemDerivational to false -->
+        <filter class="solr.IndonesianStemFilterFactory" stemDerivational="true"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Italian -->
+    <fieldType name="text_it" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <!-- removes l', etc -->
+        <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_it.txt"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_it.txt" format="snowball" />
+        <filter class="solr.ItalianLightStemFilterFactory"/>
+        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Italian"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Japanese using morphological analysis (see text_cjk for a configuration using bigramming)
+
+         NOTE: If you want to optimize search for precision, use default operator AND in your query
+         parser config with <solrQueryParser defaultOperator="AND"/> further down in this file.  Use 
+         OR if you would like to optimize for recall (default).
+    -->
+    <fieldType name="text_ja" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="false">
+      <analyzer>
+      <!-- Kuromoji Japanese morphological analyzer/tokenizer (JapaneseTokenizer)
+
+           Kuromoji has a search mode (default) that does segmentation useful for search.  A heuristic
+           is used to segment compounds into its parts and the compound itself is kept as synonym.
+
+           Valid values for attribute mode are:
+              normal: regular segmentation
+              search: segmentation useful for search with synonyms compounds (default)
+            extended: same as search mode, but unigrams unknown words (experimental)
+
+           For some applications it might be good to use search mode for indexing and normal mode for
+           queries to reduce recall and prevent parts of compounds from being matched and highlighted.
+           Use <analyzer type="index"> and <analyzer type="query"> for this and mode normal in query.
+
+           Kuromoji also has a convenient user dictionary feature that allows overriding the statistical
+           model with your own entries for segmentation, part-of-speech tags and readings without a need
+           to specify weights.  Notice that user dictionaries have not been subject to extensive testing.
+
+           User dictionary attributes are:
+                     userDictionary: user dictionary filename
+             userDictionaryEncoding: user dictionary encoding (default is UTF-8)
+
+           See lang/userdict_ja.txt for a sample user dictionary file.
+
+           Punctuation characters are discarded by default.  Use discardPunctuation="false" to keep them.
+
+           See http://wiki.apache.org/solr/JapaneseLanguageSupport for more on Japanese language support.
+        -->
+        <tokenizer class="solr.JapaneseTokenizerFactory" mode="search"/>
+        <!--<tokenizer class="solr.JapaneseTokenizerFactory" mode="search" userDictionary="lang/userdict_ja.txt"/>-->
+        <!-- Reduces inflected verbs and adjectives to their base/dictionary forms (辞書形) -->
+        <filter class="solr.JapaneseBaseFormFilterFactory"/>
+        <!-- Removes tokens with certain part-of-speech tags -->
+        <filter class="solr.JapanesePartOfSpeechStopFilterFactory" tags="lang/stoptags_ja.txt" />
+        <!-- Normalizes full-width romaji to half-width and half-width kana to full-width (Unicode NFKC subset) -->
+        <filter class="solr.CJKWidthFilterFactory"/>
+        <!-- Removes common tokens typically not useful for search, but have a negative effect on ranking -->
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ja.txt" />
+        <!-- Normalizes common katakana spelling variations by removing any last long sound character (U+30FC) -->
+        <filter class="solr.JapaneseKatakanaStemFilterFactory" minimumLength="4"/>
+        <!-- Lower-cases romaji characters -->
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Latvian -->
+    <fieldType name="text_lv" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_lv.txt" />
+        <filter class="solr.LatvianStemFilterFactory"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Dutch -->
+    <fieldType name="text_nl" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_nl.txt" format="snowball" />
+        <filter class="solr.StemmerOverrideFilterFactory" dictionary="lang/stemdict_nl.txt" ignoreCase="false"/>
+        <filter class="solr.SnowballPorterFilterFactory" language="Dutch"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Norwegian -->
+    <fieldType name="text_no" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_no.txt" format="snowball" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Norwegian"/>
+        <!-- less aggressive: <filter class="solr.NorwegianLightStemFilterFactory" variant="nb"/> -->
+        <!-- singular/plural: <filter class="solr.NorwegianMinimalStemFilterFactory" variant="nb"/> -->
+        <!-- The "light" and "minimal" stemmers support variants: nb=Bokmål, nn=Nynorsk, no=Both -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Portuguese -->
+    <fieldType name="text_pt" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pt.txt" format="snowball" />
+        <filter class="solr.PortugueseLightStemFilterFactory"/>
+        <!-- less aggressive: <filter class="solr.PortugueseMinimalStemFilterFactory"/> -->
+        <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Portuguese"/> -->
+        <!-- most aggressive: <filter class="solr.PortugueseStemFilterFactory"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Romanian -->
+    <fieldType name="text_ro" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ro.txt" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Romanian"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Russian -->
+    <fieldType name="text_ru" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ru.txt" format="snowball" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Russian"/>
+        <!-- less aggressive: <filter class="solr.RussianLightStemFilterFactory"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Swedish -->
+    <fieldType name="text_sv" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_sv.txt" format="snowball" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Swedish"/>
+        <!-- less aggressive: <filter class="solr.SwedishLightStemFilterFactory"/> -->
+      </analyzer>
+    </fieldType>
+    
+    <!-- Thai -->
+    <fieldType name="text_th" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.ThaiTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_th.txt" />
+      </analyzer>
+    </fieldType>
+    
+    <!-- Turkish -->
+    <fieldType name="text_tr" class="solr.TextField" positionIncrementGap="100">
+      <analyzer> 
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.ApostropheFilterFactory"/>
+        <filter class="solr.TurkishLowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_tr.txt" />
+        <filter class="solr.SnowballPorterFilterFactory" language="Turkish"/>
+      </analyzer>
+    </fieldType>
+  
+  <!-- Similarity is the scoring routine for each document vs. a query.
+       A custom Similarity or SimilarityFactory may be specified here, but 
+       the default is fine for most applications.  
+       For more info: http://wiki.apache.org/solr/SchemaXml#Similarity
+    -->
+  <!--
+     <similarity class="com.example.solr.CustomSimilarityFactory">
+       <str name="paramkey">param value</str>
+     </similarity>
+    -->
+
+</schema>
diff --git a/plugins/solr/home/solrdefault/conf/solrconfig.xml b/plugins/solr/home/solrdefault/conf/solrconfig.xml
index 3b2c9bb..316cd67 100644
--- a/plugins/solr/home/solrdefault/conf/solrconfig.xml
+++ b/plugins/solr/home/solrdefault/conf/solrconfig.xml
@@ -1,1786 +1,1786 @@
-<?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.

--->

-

-<!-- 

-     For more details about configurations options that may appear in

-     this file, see http://wiki.apache.org/solr/SolrConfigXml. 

--->

-<config>

-  <!-- In all configuration below, a prefix of "solr." for class names

-       is an alias that causes solr to search appropriate packages,

-       including org.apache.solr.(search|update|request|core|analysis)

-

-       You may also specify a fully qualified Java classname if you

-       have your own custom plugins.

-    -->

-

-  <!-- Controls what version of Lucene various components of Solr

-       adhere to.  Generally, you want to use the latest version to

-       get all bug fixes and improvements. It is highly recommended

-       that you fully re-index after changing this setting as it can

-       affect both how text is indexed and queried.

-  -->

-  <luceneMatchVersion>6.2.1</luceneMatchVersion>

-

-  <!-- <lib/> directives can be used to instruct Solr to load any Jars

-       identified and use them to resolve any "plugins" specified in

-       your solrconfig.xml or schema.xml (ie: Analyzers, Request

-       Handlers, etc...).

-

-       All directories and paths are resolved relative to the

-       instanceDir.

-

-       Please note that <lib/> directives are processed in the order

-       that they appear in your solrconfig.xml file, and are "stacked" 

-       on top of each other when building a ClassLoader - so if you have 

-       plugin jars with dependencies on other jars, the "lower level" 

-       dependency jars should be loaded first.

-

-       If a "./lib" directory exists in your instanceDir, all files

-       found in it are included as if you had used the following

-       syntax...

-       

-              <lib dir="./lib" />

-    -->

-

-  <!-- A 'dir' option by itself adds any files found in the directory 

-       to the classpath, this is useful for including all jars in a

-       directory.

-

-       When a 'regex' is specified in addition to a 'dir', only the

-       files in that directory which completely match the regex

-       (anchored on both ends) will be included.

-

-       If a 'dir' option (with or without a regex) is used and nothing

-       is found that matches, a warning will be logged.

-

-       The examples below can be used to load some solr-contribs along 

-       with their external dependencies.

-    -->

-  <!-- 

-  <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />

-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />

-

-  <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />

-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />

-

-  <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />

-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />

-

-  <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />

-  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />

-    -->

-

-  <!-- an exact 'path' can be used instead of a 'dir' to specify a 

-       specific jar file.  This will cause a serious error to be logged 

-       if it can't be loaded.

-    -->

-  <!--

-     <lib path="../a-jar-that-does-not-exist.jar" /> 

-  -->

-  

-  <!-- Data Directory

-

-       Used to specify an alternate directory to hold all index data

-       other than the default ./data under the Solr home.  If

-       replication is in use, this should match the replication

-       configuration.

-    -->

-  <dataDir>${solr.data.dir:runtime/indexes}</dataDir>

-

-

-  <!-- The DirectoryFactory to use for indexes.

-       

-       solr.StandardDirectoryFactory is filesystem

-       based and tries to pick the best implementation for the current

-       JVM and platform.  solr.NRTCachingDirectoryFactory, the default,

-       wraps solr.StandardDirectoryFactory and caches small files in memory

-       for better NRT performance.

-

-       One can force a particular implementation via solr.MMapDirectoryFactory,

-       solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.

-

-       solr.RAMDirectoryFactory is memory based, not

-       persistent, and doesn't work with replication.

-    -->

-  <directoryFactory name="DirectoryFactory" 

-                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>

-

-  <!-- The CodecFactory for defining the format of the inverted index.

-       The default implementation is SchemaCodecFactory, which is the official Lucene

-       index format, but hooks into the schema to provide per-field customization of

-       the postings lists and per-document values in the fieldType element

-       (postingsFormat/docValuesFormat). Note that most of the alternative implementations

-       are experimental, so if you choose to customize the index format, it's a good

-       idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)

-       before upgrading to a newer version to avoid unnecessary reindexing.

-  -->

-  <codecFactory class="solr.SchemaCodecFactory"/>

-

-  <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:

-  

-       <schemaFactory class="ManagedIndexSchemaFactory">

-         <bool name="mutable">true</bool>

-         <str name="managedSchemaResourceName">managed-schema</str>

-       </schemaFactory>

-       

-       When ManagedIndexSchemaFactory is specified, Solr will load the schema from

-       the resource named in 'managedSchemaResourceName', rather than from schema.xml.

-       Note that the managed schema resource CANNOT be named schema.xml.  If the managed

-       schema does not exist, Solr will create it after reading schema.xml, then rename

-       'schema.xml' to 'schema.xml.bak'. 

-       

-       Do NOT hand edit the managed schema - external modifications will be ignored and

-       overwritten as a result of schema modification REST API calls.

-

-       When ManagedIndexSchemaFactory is specified with mutable = true, schema

-       modification REST API calls will be allowed; otherwise, error responses will be

-       sent back for these requests. 

-  -->

-  <schemaFactory class="ClassicIndexSchemaFactory"/>

-

-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-       Index Config - These settings control low-level behavior of indexing

-       Most example settings here show the default value, but are commented

-       out, to more easily see where customizations have been made.

-       

-       Note: This replaces <indexDefaults> and <mainIndex> from older versions

-       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

-  <indexConfig>

-    <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a 

-         LimitTokenCountFilterFactory in your fieldType definition. E.g. 

-     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>

-    -->

-    <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->

-    <!-- <writeLockTimeout>1000</writeLockTimeout>  -->

-

-    <!-- Expert: Enabling compound file will use less files for the index, 

-         using fewer file descriptors on the expense of performance decrease. 

-         Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->

-    <!-- <useCompoundFile>false</useCompoundFile> -->

-

-    <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene

-         indexing for buffering added documents and deletions before they are

-         flushed to the Directory.

-         maxBufferedDocs sets a limit on the number of documents buffered

-         before flushing.

-         If both ramBufferSizeMB and maxBufferedDocs is set, then

-         Lucene will flush based on whichever limit is hit first.

-         The default is 100 MB.  -->

-    <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->

-    <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->

-

-    <!-- Expert: Merge Policy 

-         The Merge Policy in Lucene controls how merging of segments is done.

-         The default since Solr/Lucene 3.3 is TieredMergePolicy.

-         The default since Lucene 2.3 was the LogByteSizeMergePolicy,

-         Even older versions of Lucene used LogDocMergePolicy.

-      -->

-    <!--

-        <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">

-          <int name="maxMergeAtOnce">10</int>

-          <int name="segmentsPerTier">10</int>

-          <double name="noCFSRatio">0.1</double>

-        </mergePolicy>

-      -->

-       

-    <!-- Merge Factor

-         The merge factor controls how many segments will get merged at a time.

-         For TieredMergePolicy, mergeFactor is a convenience parameter which

-         will set both MaxMergeAtOnce and SegmentsPerTier at once.

-         For LogByteSizeMergePolicy, mergeFactor decides how many new segments

-         will be allowed before they are merged into one.

-         Default is 10 for both merge policies.

-      -->

-    <!-- 

-    <mergeFactor>10</mergeFactor>

-      -->

-

-    <!-- Expert: Merge Scheduler

-         The Merge Scheduler in Lucene controls how merges are

-         performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)

-         can perform merges in the background using separate threads.

-         The SerialMergeScheduler (Lucene 2.2 default) does not.

-     -->

-    <!-- 

-       <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>

-       -->

-

-    <!-- LockFactory 

-

-         This option specifies which Lucene LockFactory implementation

-         to use.

-      

-         single = SingleInstanceLockFactory - suggested for a

-                  read-only index or when there is no possibility of

-                  another process trying to modify the index.

-         native = NativeFSLockFactory - uses OS native file locking.

-                  Do not use when multiple solr webapps in the same

-                  JVM are attempting to share a single index.

-         simple = SimpleFSLockFactory  - uses a plain file for locking

-

-         Defaults: 'native' is default for Solr3.6 and later, otherwise

-                   'simple' is the default

-

-         More details on the nuances of each LockFactory...

-         http://wiki.apache.org/lucene-java/AvailableLockFactories

-    -->

-    <lockType>${solr.lock.type:native}</lockType>

-

-    <!-- Commit Deletion Policy

-         Custom deletion policies can be specified here. The class must

-         implement org.apache.lucene.index.IndexDeletionPolicy.

-

-         The default Solr IndexDeletionPolicy implementation supports

-         deleting index commit points on number of commits, age of

-         commit point and optimized status.

-         

-         The latest commit point should always be preserved regardless

-         of the criteria.

-    -->

-    <!-- 

-    <deletionPolicy class="solr.SolrDeletionPolicy">

-    -->

-      <!-- The number of commit points to be kept -->

-      <!-- <str name="maxCommitsToKeep">1</str> -->

-      <!-- The number of optimized commit points to be kept -->

-      <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->

-      <!--

-          Delete all commit points once they have reached the given age.

-          Supports DateMathParser syntax e.g.

-        -->

-      <!--

-         <str name="maxCommitAge">30MINUTES</str>

-         <str name="maxCommitAge">1DAY</str>

-      -->

-    <!-- 

-    </deletionPolicy>

-    -->

-

-    <!-- Lucene Infostream

-       

-         To aid in advanced debugging, Lucene provides an "InfoStream"

-         of detailed information when indexing.

-

-         Setting the value to true will instruct the underlying Lucene

-         IndexWriter to write its info stream to solr's log. By default,

-         this is enabled here, and controlled through log4j.properties.

-      -->

-     <infoStream>true</infoStream>

-  </indexConfig>

-

-

-  <!-- JMX

-       

-       This example enables JMX if and only if an existing MBeanServer

-       is found, use this if you want to configure JMX through JVM

-       parameters. Remove this to disable exposing Solr configuration

-       and statistics to JMX.

-

-       For more details see http://wiki.apache.org/solr/SolrJmx

-    -->

-  <jmx />

-  <!-- If you want to connect to a particular server, specify the

-       agentId 

-    -->

-  <!-- <jmx agentId="myAgent" /> -->

-  <!-- If you want to start a new MBeanServer, specify the serviceUrl -->

-  <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>

-    -->

-

-  <!-- The default high-performance update handler -->

-  <updateHandler class="solr.DirectUpdateHandler2">

-

-    <!-- Enables a transaction log, used for real-time get, durability, and

-         and solr cloud replica recovery.  The log can grow as big as

-         uncommitted changes to the index, so use of a hard autoCommit

-         is recommended (see below).

-         "dir" - the target directory for transaction logs, defaults to the

-                solr data directory.

-         "numVersionBuckets" - sets the number of buckets used to keep

-                track of max version values when checking for re-ordered

-                updates; increase this value to reduce the cost of

-                synchronizing access to version buckets during high-volume

-                indexing, this requires 8 bytes (long) * numVersionBuckets

-                of heap space per Solr core.

-    -->

-    <updateLog>

-      <str name="dir">${solr.ulog.dir:}</str>

-      <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>

-    </updateLog>

- 

-    <!-- AutoCommit

-

-         Perform a hard commit automatically under certain conditions.

-         Instead of enabling autoCommit, consider using "commitWithin"

-         when adding documents. 

-

-         http://wiki.apache.org/solr/UpdateXmlMessages

-

-         maxDocs - Maximum number of documents to add since the last

-                   commit before automatically triggering a new commit.

-

-         maxTime - Maximum amount of time in ms that is allowed to pass

-                   since a document was added before automatically

-                   triggering a new commit. 

-         openSearcher - if false, the commit causes recent index changes

-           to be flushed to stable storage, but does not cause a new

-           searcher to be opened to make those changes visible.

-

-         If the updateLog is enabled, then it's highly recommended to

-         have some sort of hard autoCommit to limit the log size.

-      -->

-     <autoCommit> 

-       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime> 

-       <openSearcher>false</openSearcher> 

-     </autoCommit>

-

-    <!-- softAutoCommit is like autoCommit except it causes a

-         'soft' commit which only ensures that changes are visible

-         but does not ensure that data is synced to disk.  This is

-         faster and more near-realtime friendly than a hard commit.

-      -->

-

-     <autoSoftCommit> 

-       <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> 

-     </autoSoftCommit>

-

-    <!-- Update Related Event Listeners

-         

-         Various IndexWriter related events can trigger Listeners to

-         take actions.

-

-         postCommit - fired after every commit or optimize command

-         postOptimize - fired after every optimize command

-      -->

-    <!-- The RunExecutableListener executes an external command from a

-         hook such as postCommit or postOptimize.

-         

-         exe - the name of the executable to run

-         dir - dir to use as the current working directory. (default=".")

-         wait - the calling thread waits until the executable returns. 

-                (default="true")

-         args - the arguments to pass to the program.  (default is none)

-         env - environment variables to set.  (default is none)

-      -->

-    <!-- This example shows how RunExecutableListener could be used

-         with the script based replication...

-         http://wiki.apache.org/solr/CollectionDistribution

-      -->

-    <!--

-       <listener event="postCommit" class="solr.RunExecutableListener">

-         <str name="exe">solr/bin/snapshooter</str>

-         <str name="dir">.</str>

-         <bool name="wait">true</bool>

-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>

-         <arr name="env"> <str>MYVAR=val1</str> </arr>

-       </listener>

-      -->

-

-  </updateHandler>

-  

-  <!-- IndexReaderFactory

-

-       Use the following format to specify a custom IndexReaderFactory,

-       which allows for alternate IndexReader implementations.

-

-       ** Experimental Feature **

-

-       Please note - Using a custom IndexReaderFactory may prevent

-       certain other features from working. The API to

-       IndexReaderFactory may change without warning or may even be

-       removed from future releases if the problems cannot be

-       resolved.

-

-

-       ** Features that may not work with custom IndexReaderFactory **

-

-       The ReplicationHandler assumes a disk-resident index. Using a

-       custom IndexReader implementation may cause incompatibility

-       with ReplicationHandler and may cause replication to not work

-       correctly. See SOLR-1366 for details.

-

-    -->

-  <!--

-  <indexReaderFactory name="IndexReaderFactory" class="package.class">

-    <str name="someArg">Some Value</str>

-  </indexReaderFactory >

-  -->

-

-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-       Query section - these settings control query time things like caches

-       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

-  <query>

-    <!-- Max Boolean Clauses

-

-         Maximum number of clauses in each BooleanQuery,  an exception

-         is thrown if exceeded.

-

-         ** WARNING **

-         

-         This option actually modifies a global Lucene property that

-         will affect all SolrCores.  If multiple solrconfig.xml files

-         disagree on this property, the value at any given moment will

-         be based on the last SolrCore to be initialized.

-         

-      -->

-    <maxBooleanClauses>1024</maxBooleanClauses>

-

- 

-    <!-- Slow Query Threshold (in millis)

-    

-         At high request rates, logging all requests can become a bottleneck 

-         and therefore INFO logging is often turned off. However, it is still

-         useful to be able to set a latency threshold above which a request

-         is considered "slow" and log that request at WARN level so we can

-         easily identify slow queries.

-    --> 

-    <slowQueryThresholdMillis>-1</slowQueryThresholdMillis>

-

-

-    <!-- Solr Internal Query Caches

-

-         There are two implementations of cache available for Solr,

-         LRUCache, based on a synchronized LinkedHashMap, and

-         FastLRUCache, based on a ConcurrentHashMap.  

-

-         FastLRUCache has faster gets and slower puts in single

-         threaded operation and thus is generally faster than LRUCache

-         when the hit ratio of the cache is high (> 75%), and may be

-         faster under other scenarios on multi-cpu systems.

-    -->

-

-    <!-- Filter Cache

-

-         Cache used by SolrIndexSearcher for filters (DocSets),

-         unordered sets of *all* documents that match a query.  When a

-         new searcher is opened, its caches may be prepopulated or

-         "autowarmed" using data from caches in the old searcher.

-         autowarmCount is the number of items to prepopulate.  For

-         LRUCache, the autowarmed items will be the most recently

-         accessed items.

-

-         Parameters:

-           class - the SolrCache implementation LRUCache or

-               (LRUCache or FastLRUCache)

-           size - the maximum number of entries in the cache

-           initialSize - the initial capacity (number of entries) of

-               the cache.  (see java.util.HashMap)

-           autowarmCount - the number of entries to prepopulate from

-               and old cache.  

-      -->

-    <filterCache class="solr.FastLRUCache"

-                 size="512"

-                 initialSize="512"

-                 autowarmCount="0"/>

-

-    <!-- Query Result Cache

-

-        Caches results of searches - ordered lists of document ids

-        (DocList) based on a query, a sort, and the range of documents requested.

-        Additional supported parameter by LRUCache:

-           maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed

-                      to occupy

-     -->

-    <queryResultCache class="solr.LRUCache"

-                     size="512"

-                     initialSize="512"

-                     autowarmCount="0"/>

-   

-    <!-- Document Cache

-

-         Caches Lucene Document objects (the stored fields for each

-         document).  Since Lucene internal document ids are transient,

-         this cache will not be autowarmed.  

-      -->

-    <documentCache class="solr.LRUCache"

-                   size="512"

-                   initialSize="512"

-                   autowarmCount="0"/>

-    

-    <!-- custom cache currently used by block join --> 

-    <cache name="perSegFilter"

-      class="solr.search.LRUCache"

-      size="10"

-      initialSize="0"

-      autowarmCount="10"

-      regenerator="solr.NoOpRegenerator" />

-

-    <!-- Field Value Cache

-         

-         Cache used to hold field values that are quickly accessible

-         by document id.  The fieldValueCache is created by default

-         even if not configured here.

-      -->

-    <!--

-       <fieldValueCache class="solr.FastLRUCache"

-                        size="512"

-                        autowarmCount="128"

-                        showItems="32" />

-      -->

-

-    <!-- Custom Cache

-

-         Example of a generic cache.  These caches may be accessed by

-         name through SolrIndexSearcher.getCache(),cacheLookup(), and

-         cacheInsert().  The purpose is to enable easy caching of

-         user/application level data.  The regenerator argument should

-         be specified as an implementation of solr.CacheRegenerator 

-         if autowarming is desired.  

-      -->

-    <!--

-       <cache name="myUserCache"

-              class="solr.LRUCache"

-              size="4096"

-              initialSize="1024"

-              autowarmCount="1024"

-              regenerator="com.mycompany.MyRegenerator"

-              />

-      -->

-

-

-    <!-- Lazy Field Loading

-

-         If true, stored fields that are not requested will be loaded

-         lazily.  This can result in a significant speed improvement

-         if the usual case is to not load all stored fields,

-         especially if the skipped fields are large compressed text

-         fields.

-    -->

-    <enableLazyFieldLoading>true</enableLazyFieldLoading>

-

-   <!-- Use Filter For Sorted Query

-

-        A possible optimization that attempts to use a filter to

-        satisfy a search.  If the requested sort does not include

-        score, then the filterCache will be checked for a filter

-        matching the query. If found, the filter will be used as the

-        source of document ids, and then the sort will be applied to

-        that.

-

-        For most situations, this will not be useful unless you

-        frequently get the same search repeatedly with different sort

-        options, and none of them ever use "score"

-     -->

-   <!--

-      <useFilterForSortedQuery>true</useFilterForSortedQuery>

-     -->

-

-   <!-- Result Window Size

-

-        An optimization for use with the queryResultCache.  When a search

-        is requested, a superset of the requested number of document ids

-        are collected.  For example, if a search for a particular query

-        requests matching documents 10 through 19, and queryWindowSize is 50,

-        then documents 0 through 49 will be collected and cached.  Any further

-        requests in that range can be satisfied via the cache.  

-     -->

-   <queryResultWindowSize>20</queryResultWindowSize>

-

-   <!-- Maximum number of documents to cache for any entry in the

-        queryResultCache. 

-     -->

-   <queryResultMaxDocsCached>200</queryResultMaxDocsCached>

-

-   <!-- Query Related Event Listeners

-

-        Various IndexSearcher related events can trigger Listeners to

-        take actions.

-

-        newSearcher - fired whenever a new searcher is being prepared

-        and there is a current searcher handling requests (aka

-        registered).  It can be used to prime certain caches to

-        prevent long request times for certain requests.

-

-        firstSearcher - fired whenever a new searcher is being

-        prepared but there is no current registered searcher to handle

-        requests or to gain autowarming data from.

-

-        

-     -->

-    <!-- QuerySenderListener takes an array of NamedList and executes a

-         local query request for each NamedList in sequence. 

-      -->

-    <listener event="newSearcher" class="solr.QuerySenderListener">

-      <arr name="queries">

-        <!--

-           <lst><str name="q">solr</str><str name="sort">price asc</str></lst>

-           <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>

-          -->

-      </arr>

-    </listener>

-    <listener event="firstSearcher" class="solr.QuerySenderListener">

-      <arr name="queries">

-        <lst>

-          <str name="q">static firstSearcher warming in solrconfig.xml</str>

-        </lst>

-      </arr>

-    </listener>

-

-    <!-- Use Cold Searcher

-

-         If a search request comes in and there is no current

-         registered searcher, then immediately register the still

-         warming searcher and use it.  If "false" then all requests

-         will block until the first searcher is done warming.

-      -->

-    <useColdSearcher>false</useColdSearcher>

-

-    <!-- Max Warming Searchers

-         

-         Maximum number of searchers that may be warming in the

-         background concurrently.  An error is returned if this limit

-         is exceeded.

-

-         Recommend values of 1-2 for read-only slaves, higher for

-         masters w/o cache warming.

-      -->

-    <maxWarmingSearchers>2</maxWarmingSearchers>

-

-  </query>

-

-

-  <!-- Request Dispatcher

-

-       This section contains instructions for how the SolrDispatchFilter

-       should behave when processing requests for this SolrCore.

-

-       handleSelect is a legacy option that affects the behavior of requests

-       such as /select?qt=XXX

-

-       handleSelect="true" will cause the SolrDispatchFilter to process

-       the request and dispatch the query to a handler specified by the 

-       "qt" param, assuming "/select" isn't already registered.

-

-       handleSelect="false" will cause the SolrDispatchFilter to

-       ignore "/select" requests, resulting in a 404 unless a handler

-       is explicitly registered with the name "/select"

-

-       handleSelect="true" is not recommended for new users, but is the default

-       for backwards compatibility

-    -->

-  <requestDispatcher handleSelect="false" >

-    <!-- Request Parsing

-

-         These settings indicate how Solr Requests may be parsed, and

-         what restrictions may be placed on the ContentStreams from

-         those requests

-

-         enableRemoteStreaming - enables use of the stream.file

-         and stream.url parameters for specifying remote streams.

-

-         multipartUploadLimitInKB - specifies the max size (in KiB) of

-         Multipart File Uploads that Solr will allow in a Request.

-         

-         formdataUploadLimitInKB - specifies the max size (in KiB) of

-         form data (application/x-www-form-urlencoded) sent via

-         POST. You can use POST to pass request parameters not

-         fitting into the URL.

-         

-         addHttpRequestToContext - if set to true, it will instruct

-         the requestParsers to include the original HttpServletRequest

-         object in the context map of the SolrQueryRequest under the 

-         key "httpRequest". It will not be used by any of the existing

-         Solr components, but may be useful when developing custom 

-         plugins.

-         

-         *** WARNING ***

-         The settings below authorize Solr to fetch remote files, You

-         should make sure your system has some authentication before

-         using enableRemoteStreaming="true"

-

-      --> 

-    <requestParsers enableRemoteStreaming="true" 

-                    multipartUploadLimitInKB="2048000"

-                    formdataUploadLimitInKB="2048"

-                    addHttpRequestToContext="false"/>

-

-    <!-- HTTP Caching

-

-         Set HTTP caching related parameters (for proxy caches and clients).

-

-         The options below instruct Solr not to output any HTTP Caching

-         related headers

-      -->

-    <httpCaching never304="true" />

-    <!-- If you include a <cacheControl> directive, it will be used to

-         generate a Cache-Control header (as well as an Expires header

-         if the value contains "max-age=")

-         

-         By default, no Cache-Control header is generated.

-         

-         You can use the <cacheControl> option even if you have set

-         never304="true"

-      -->

-    <!--

-       <httpCaching never304="true" >

-         <cacheControl>max-age=30, public</cacheControl> 

-       </httpCaching>

-      -->

-    <!-- To enable Solr to respond with automatically generated HTTP

-         Caching headers, and to response to Cache Validation requests

-         correctly, set the value of never304="false"

-         

-         This will cause Solr to generate Last-Modified and ETag

-         headers based on the properties of the Index.

-

-         The following options can also be specified to affect the

-         values of these headers...

-

-         lastModFrom - the default value is "openTime" which means the

-         Last-Modified value (and validation against If-Modified-Since

-         requests) will all be relative to when the current Searcher

-         was opened.  You can change it to lastModFrom="dirLastMod" if

-         you want the value to exactly correspond to when the physical

-         index was last modified.

-

-         etagSeed="..." is an option you can change to force the ETag

-         header (and validation against If-None-Match requests) to be

-         different even if the index has not changed (ie: when making

-         significant changes to your config file)

-

-         (lastModifiedFrom and etagSeed are both ignored if you use

-         the never304="true" option)

-      -->

-    <!--

-       <httpCaching lastModifiedFrom="openTime"

-                    etagSeed="Solr">

-         <cacheControl>max-age=30, public</cacheControl> 

-       </httpCaching>

-      -->

-  </requestDispatcher>

-

-  <!-- Request Handlers 

-

-       http://wiki.apache.org/solr/SolrRequestHandler

-

-       Incoming queries will be dispatched to a specific handler by name

-       based on the path specified in the request.

-

-       Legacy behavior: If the request path uses "/select" but no Request

-       Handler has that name, and if handleSelect="true" has been specified in

-       the requestDispatcher, then the Request Handler is dispatched based on

-       the qt parameter.  Handlers without a leading '/' are accessed this way

-       like so: http://host/app/[core/]select?qt=name  If no qt is

-       given, then the requestHandler that declares default="true" will be

-       used or the one named "standard".

-

-       If a Request Handler is declared with startup="lazy", then it will

-       not be initialized until the first request that uses it.

-

-    -->

-  <!-- SearchHandler

-

-       http://wiki.apache.org/solr/SearchHandler

-

-       For processing Search Queries, the primary Request Handler

-       provided with Solr is "SearchHandler" It delegates to a sequent

-       of SearchComponents (see below) and supports distributed

-       queries across multiple shards

-    -->

-  <requestHandler name="/select" class="solr.SearchHandler">

-    <!-- default values for query parameters can be specified, these

-         will be overridden by parameters in the request

-      -->

-     <lst name="defaults">

-       <str name="echoParams">explicit</str>

-       <int name="rows">10</int>

-       <!-- Controls the distribution of a query to shards other than itself.

-            Consider making 'preferLocalShards' true when:

-              1) maxShardsPerNode > 1

-              2) Number of shards > 1

-              3) CloudSolrClient or LbHttpSolrServer is used by clients.

-            Without this option, every core broadcasts the distributed query to

-            a replica of each shard where the replicas are chosen randomly.

-            This option directs the cores to prefer cores hosted locally, thus

-            preventing network delays between machines.

-            This behavior also immunizes a bad/slow machine from slowing down all

-            the good machines (if those good machines were querying this bad one).

-

-            Specify this option=false for clients connecting through HttpSolrServer

-       -->

-       <bool name="preferLocalShards">false</bool>

-     </lst>

-    <!-- In addition to defaults, "appends" params can be specified

-         to identify values which should be appended to the list of

-         multi-val params from the query (or the existing "defaults").

-      -->

-    <!-- In this example, the param "fq=instock:true" would be appended to

-         any query time fq params the user may specify, as a mechanism for

-         partitioning the index, independent of any user selected filtering

-         that may also be desired (perhaps as a result of faceted searching).

-

-         NOTE: there is *absolutely* nothing a client can do to prevent these

-         "appends" values from being used, so don't use this mechanism

-         unless you are sure you always want it.

-      -->

-    <!--

-       <lst name="appends">

-         <str name="fq">inStock:true</str>

-       </lst>

-      -->

-    <!-- "invariants" are a way of letting the Solr maintainer lock down

-         the options available to Solr clients.  Any params values

-         specified here are used regardless of what values may be specified

-         in either the query, the "defaults", or the "appends" params.

-

-         In this example, the facet.field and facet.query params would

-         be fixed, limiting the facets clients can use.  Faceting is

-         not turned on by default - but if the client does specify

-         facet=true in the request, these are the only facets they

-         will be able to see counts for; regardless of what other

-         facet.field or facet.query params they may specify.

-

-         NOTE: there is *absolutely* nothing a client can do to prevent these

-         "invariants" values from being used, so don't use this mechanism

-         unless you are sure you always want it.

-      -->

-    <!--

-       <lst name="invariants">

-         <str name="facet.field">cat</str>

-         <str name="facet.field">manu_exact</str>

-         <str name="facet.query">price:[* TO 500]</str>

-         <str name="facet.query">price:[500 TO *]</str>

-       </lst>

-      -->

-    <!-- If the default list of SearchComponents is not desired, that

-         list can either be overridden completely, or components can be

-         prepended or appended to the default list.  (see below)

-      -->

-    <!--

-       <arr name="components">

-         <str>nameOfCustomComponent1</str>

-         <str>nameOfCustomComponent2</str>

-       </arr>

-      -->

-    </requestHandler>

-

-  <!-- A request handler that returns indented JSON by default -->

-  <requestHandler name="/query" class="solr.SearchHandler">

-     <lst name="defaults">

-       <str name="echoParams">explicit</str>

-       <str name="wt">json</str>

-       <str name="indent">true</str>

-       <str name="df">text</str>

-     </lst>

-  </requestHandler>

-

-

-

-  <!--

-    The export request handler is used to export full sorted result sets.

-    Do not change these defaults.

-  -->

-

-  <requestHandler name="/export" class="solr.SearchHandler">

-    <lst name="invariants">

-      <str name="rq">{!xport}</str>

-      <str name="wt">xsort</str>

-      <str name="distrib">false</str>

-    </lst>

-

-    <arr name="components">

-      <str>query</str>

-    </arr>

-  </requestHandler>

-

-

-  <!--

-  Distributed Stream processing.

-  -->

-

-  <requestHandler name="/stream" class="solr.StreamHandler">

-    <lst name="invariants">

-      <str name="wt">json</str>

-      <str name="distrib">false</str>

-    </lst>

-  </requestHandler>

-

-

-

-

-

-

-  <!-- A Robust Example 

-       

-       This example SearchHandler declaration shows off usage of the

-       SearchHandler with many defaults declared

-

-       Note that multiple instances of the same Request Handler

-       (SearchHandler) can be registered multiple times with different

-       names (and different init parameters)

-    -->

-  <requestHandler name="/browse" class="solr.SearchHandler">

-     <lst name="defaults">

-       <str name="echoParams">explicit</str>

-

-       <!-- VelocityResponseWriter settings -->

-       <str name="wt">velocity</str>

-       <str name="v.template">browse</str>

-       <str name="v.layout">layout</str>

-       <str name="title">Solritas</str>

-

-       <!-- Query settings -->

-       <str name="defType">edismax</str>

-       <str name="qf">

-          text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4

-          title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0

-       </str>

-       <str name="mm">100%</str>

-       <str name="q.alt">*:*</str>

-       <str name="rows">10</str>

-       <str name="fl">*,score</str>

-

-       <str name="mlt.qf">

-         text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4

-         title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0

-       </str>

-       <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>

-       <int name="mlt.count">3</int>

-

-       <!-- Faceting defaults -->

-       <str name="facet">on</str>

-       <str name="facet.missing">true</str>

-       <str name="facet.field">cat</str>

-       <str name="facet.field">manu_exact</str>

-       <str name="facet.field">content_type</str>

-       <str name="facet.field">author_s</str>

-       <str name="facet.query">ipod</str>

-       <str name="facet.query">GB</str>

-       <str name="facet.mincount">1</str>

-       <str name="facet.pivot">cat,inStock</str>

-       <str name="facet.range.other">after</str>

-       <str name="facet.range">price</str>

-       <int name="f.price.facet.range.start">0</int>

-       <int name="f.price.facet.range.end">600</int>

-       <int name="f.price.facet.range.gap">50</int>

-       <str name="facet.range">popularity</str>

-       <int name="f.popularity.facet.range.start">0</int>

-       <int name="f.popularity.facet.range.end">10</int>

-       <int name="f.popularity.facet.range.gap">3</int>

-       <str name="facet.range">manufacturedate_dt</str>

-       <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>

-       <str name="f.manufacturedate_dt.facet.range.end">NOW</str>

-       <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>

-       <str name="f.manufacturedate_dt.facet.range.other">before</str>

-       <str name="f.manufacturedate_dt.facet.range.other">after</str>

-

-       <!-- Highlighting defaults -->

-       <str name="hl">on</str>

-       <str name="hl.fl">content features title name</str>

-       <str name="hl.preserveMulti">true</str>

-       <str name="hl.encoder">html</str>

-       <str name="hl.simple.pre">&lt;b&gt;</str>

-       <str name="hl.simple.post">&lt;/b&gt;</str>

-       <str name="f.title.hl.fragsize">0</str>

-       <str name="f.title.hl.alternateField">title</str>

-       <str name="f.name.hl.fragsize">0</str>

-       <str name="f.name.hl.alternateField">name</str>

-       <str name="f.content.hl.snippets">3</str>

-       <str name="f.content.hl.fragsize">200</str>

-       <str name="f.content.hl.alternateField">content</str>

-       <str name="f.content.hl.maxAlternateFieldLength">750</str>

-

-       <!-- Spell checking defaults -->

-       <str name="spellcheck">on</str>

-       <str name="spellcheck.extendedResults">false</str>       

-       <str name="spellcheck.count">5</str>

-       <str name="spellcheck.alternativeTermCount">2</str>

-       <str name="spellcheck.maxResultsForSuggest">5</str>       

-       <str name="spellcheck.collate">true</str>

-       <str name="spellcheck.collateExtendedResults">true</str>  

-       <str name="spellcheck.maxCollationTries">5</str>

-       <str name="spellcheck.maxCollations">3</str>           

-     </lst>

-

-     <!-- append spellchecking to our list of components -->

-     <arr name="last-components">

-       <str>spellcheck</str>

-     </arr>

-  </requestHandler>

-

-

-  <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">

-    <lst name="defaults">

-      <str name="df">text</str>

-    </lst>

-  </initParams>

-

-  <initParams path="/update/json/docs">

-    <lst name="defaults">

-      <!--this ensures that the entire json doc will be stored verbatim into one field-->

-      <str name="srcField">_src_</str>

-      <!--This means a the uniqueKeyField will be extracted from the fields and

-       all fields go into the 'df' field. In this config df is already configured to be 'text'

-        -->

-      <str name="mapUniqueKeyOnly">true</str>

-    </lst>

-

-  </initParams>

-

-  <!-- The following are implicitly added

-  <requestHandler name="/update/json" class="solr.UpdateRequestHandler">

-        <lst name="defaults">

-         <str name="stream.contentType">application/json</str>

-       </lst>

-  </requestHandler>

-  <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">

-        <lst name="defaults">

-         <str name="stream.contentType">application/csv</str>

-       </lst>

-  </requestHandler>

-  -->

-

-  <!-- Solr Cell Update Request Handler

-

-       http://wiki.apache.org/solr/ExtractingRequestHandler 

-

-    -->

-  <requestHandler name="/update/extract" 

-                  startup="lazy"

-                  class="solr.extraction.ExtractingRequestHandler" >

-    <lst name="defaults">

-      <str name="lowernames">true</str>

-      <str name="uprefix">ignored_</str>

-

-      <!-- capture link hrefs but ignore div attributes -->

-      <str name="captureAttr">true</str>

-      <str name="fmap.a">links</str>

-      <str name="fmap.div">ignored_</str>

-    </lst>

-  </requestHandler>

-

-

-  <!-- Field Analysis Request Handler

-

-       RequestHandler that provides much the same functionality as

-       analysis.jsp. Provides the ability to specify multiple field

-       types and field names in the same request and outputs

-       index-time and query-time analysis for each of them.

-

-       Request parameters are:

-       analysis.fieldname - field name whose analyzers are to be used

-

-       analysis.fieldtype - field type whose analyzers are to be used

-       analysis.fieldvalue - text for index-time analysis

-       q (or analysis.q) - text for query time analysis

-       analysis.showmatch (true|false) - When set to true and when

-           query analysis is performed, the produced tokens of the

-           field value analysis will be marked as "matched" for every

-           token that is produces by the query analysis

-   -->

-  <requestHandler name="/analysis/field" 

-                  startup="lazy"

-                  class="solr.FieldAnalysisRequestHandler" />

-

-

-  <!-- Document Analysis Handler

-

-       http://wiki.apache.org/solr/AnalysisRequestHandler

-

-       An analysis handler that provides a breakdown of the analysis

-       process of provided documents. This handler expects a (single)

-       content stream with the following format:

-

-       <docs>

-         <doc>

-           <field name="id">1</field>

-           <field name="name">The Name</field>

-           <field name="text">The Text Value</field>

-         </doc>

-         <doc>...</doc>

-         <doc>...</doc>

-         ...

-       </docs>

-

-    Note: Each document must contain a field which serves as the

-    unique key. This key is used in the returned response to associate

-    an analysis breakdown to the analyzed document.

-

-    Like the FieldAnalysisRequestHandler, this handler also supports

-    query analysis by sending either an "analysis.query" or "q"

-    request parameter that holds the query text to be analyzed. It

-    also supports the "analysis.showmatch" parameter which when set to

-    true, all field tokens that match the query tokens will be marked

-    as a "match". 

-  -->

-  <requestHandler name="/analysis/document" 

-                  class="solr.DocumentAnalysisRequestHandler" 

-                  startup="lazy" />

-

-  <!-- Echo the request contents back to the client -->

-  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >

-    <lst name="defaults">

-     <str name="echoParams">explicit</str> 

-     <str name="echoHandler">true</str>

-    </lst>

-  </requestHandler>

-  

-  <!-- Search Components

-

-       Search components are registered to SolrCore and used by 

-       instances of SearchHandler (which can access them by name)

-       

-       By default, the following components are available:

-       

-       <searchComponent name="query"     class="solr.QueryComponent" />

-       <searchComponent name="facet"     class="solr.FacetComponent" />

-       <searchComponent name="mlt"       class="solr.MoreLikeThisComponent" />

-       <searchComponent name="highlight" class="solr.HighlightComponent" />

-       <searchComponent name="stats"     class="solr.StatsComponent" />

-       <searchComponent name="debug"     class="solr.DebugComponent" />

-   

-       Default configuration in a requestHandler would look like:

-

-       <arr name="components">

-         <str>query</str>

-         <str>facet</str>

-         <str>mlt</str>

-         <str>highlight</str>

-         <str>stats</str>

-         <str>debug</str>

-       </arr>

-

-       If you register a searchComponent to one of the standard names, 

-       that will be used instead of the default.

-

-       To insert components before or after the 'standard' components, use:

-    

-       <arr name="first-components">

-         <str>myFirstComponentName</str>

-       </arr>

-    

-       <arr name="last-components">

-         <str>myLastComponentName</str>

-       </arr>

-

-       NOTE: The component registered with the name "debug" will

-       always be executed after the "last-components" 

-       

-     -->

-  

-   <!-- Spell Check

-

-        The spell check component can return a list of alternative spelling

-        suggestions.  

-

-        http://wiki.apache.org/solr/SpellCheckComponent

-     -->

-  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">

-

-    <str name="queryAnalyzerFieldType">text_general</str>

-

-    <!-- Multiple "Spell Checkers" can be declared and used by this

-         component

-      -->

-

-    <!-- a spellchecker built from a field of the main index -->

-    <lst name="spellchecker">

-      <str name="name">default</str>

-      <str name="field">text</str>

-      <str name="classname">solr.DirectSolrSpellChecker</str>

-      <!-- the spellcheck distance measure used, the default is the internal levenshtein -->

-      <str name="distanceMeasure">internal</str>

-      <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->

-      <float name="accuracy">0.5</float>

-      <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->

-      <int name="maxEdits">2</int>

-      <!-- the minimum shared prefix when enumerating terms -->

-      <int name="minPrefix">1</int>

-      <!-- maximum number of inspections per result. -->

-      <int name="maxInspections">5</int>

-      <!-- minimum length of a query term to be considered for correction -->

-      <int name="minQueryLength">4</int>

-      <!-- maximum threshold of documents a query term can appear to be considered for correction -->

-      <float name="maxQueryFrequency">0.01</float>

-      <!-- uncomment this to require suggestions to occur in 1% of the documents

-        <float name="thresholdTokenFrequency">.01</float>

-      -->

-    </lst>

-    

-    <!-- a spellchecker that can break or combine words.  See "/spell" handler below for usage -->

-    <lst name="spellchecker">

-      <str name="name">wordbreak</str>

-      <str name="classname">solr.WordBreakSolrSpellChecker</str>      

-      <str name="field">name</str>

-      <str name="combineWords">true</str>

-      <str name="breakWords">true</str>

-      <int name="maxChanges">10</int>

-    </lst>

-

-    <!-- a spellchecker that uses a different distance measure -->

-    <!--

-       <lst name="spellchecker">

-         <str name="name">jarowinkler</str>

-         <str name="field">spell</str>

-         <str name="classname">solr.DirectSolrSpellChecker</str>

-         <str name="distanceMeasure">

-           org.apache.lucene.search.spell.JaroWinklerDistance

-         </str>

-       </lst>

-     -->

-

-    <!-- a spellchecker that use an alternate comparator 

-

-         comparatorClass be one of:

-          1. score (default)

-          2. freq (Frequency first, then score)

-          3. A fully qualified class name

-      -->

-    <!--

-       <lst name="spellchecker">

-         <str name="name">freq</str>

-         <str name="field">lowerfilt</str>

-         <str name="classname">solr.DirectSolrSpellChecker</str>

-         <str name="comparatorClass">freq</str>

-      -->

-

-    <!-- A spellchecker that reads the list of words from a file -->

-    <!--

-       <lst name="spellchecker">

-         <str name="classname">solr.FileBasedSpellChecker</str>

-         <str name="name">file</str>

-         <str name="sourceLocation">spellings.txt</str>

-         <str name="characterEncoding">UTF-8</str>

-         <str name="spellcheckIndexDir">spellcheckerFile</str>

-       </lst>

-      -->

-  </searchComponent>

-  

-  <!-- A request handler for demonstrating the spellcheck component.  

-

-       NOTE: This is purely as an example.  The whole purpose of the

-       SpellCheckComponent is to hook it into the request handler that

-       handles your normal user queries so that a separate request is

-       not needed to get suggestions.

-

-       IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS

-       NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!

-       

-       See http://wiki.apache.org/solr/SpellCheckComponent for details

-       on the request parameters.

-    -->

-  <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">

-    <lst name="defaults">

-      <!-- Solr will use suggestions from both the 'default' spellchecker

-           and from the 'wordbreak' spellchecker and combine them.

-           collations (re-written queries) can include a combination of

-           corrections from both spellcheckers -->

-      <str name="spellcheck.dictionary">default</str>

-      <str name="spellcheck.dictionary">wordbreak</str>

-      <str name="spellcheck">on</str>

-      <str name="spellcheck.extendedResults">true</str>       

-      <str name="spellcheck.count">10</str>

-      <str name="spellcheck.alternativeTermCount">5</str>

-      <str name="spellcheck.maxResultsForSuggest">5</str>       

-      <str name="spellcheck.collate">true</str>

-      <str name="spellcheck.collateExtendedResults">true</str>  

-      <str name="spellcheck.maxCollationTries">10</str>

-      <str name="spellcheck.maxCollations">5</str>         

-    </lst>

-    <arr name="last-components">

-      <str>spellcheck</str>

-    </arr>

-  </requestHandler>

-

-  <!-- The SuggestComponent in Solr provides users with automatic suggestions for query terms. 

-       You can use this to implement a powerful auto-suggest feature in your search application.

-       As with the rest of this solrconfig.xml file, the configuration of this component is purely

-       an example that applies specifically to this configset and example documents. 

-       

-       More information about this component and other configuration options are described in the

-       "Suggester" section of the reference guide available at 

-       http://archive.apache.org/dist/lucene/solr/ref-guide

-    -->

-  <searchComponent name="suggest" class="solr.SuggestComponent">

-    <lst name="suggester">

-      <str name="name">mySuggester</str>

-      <str name="lookupImpl">FuzzyLookupFactory</str>      

-      <str name="dictionaryImpl">DocumentDictionaryFactory</str>

-      <str name="field">cat</str>

-      <str name="weightField">price</str>

-      <str name="suggestAnalyzerFieldType">string</str>

-      <str name="buildOnStartup">false</str>

-    </lst>

-  </searchComponent>

-

-  <requestHandler name="/suggest" class="solr.SearchHandler" 

-                  startup="lazy" >

-    <lst name="defaults">

-      <str name="suggest">true</str>

-      <str name="suggest.count">10</str>

-    </lst>

-    <arr name="components">

-      <str>suggest</str>

-    </arr>

-  </requestHandler>

-

-

-  <!-- Term Vector Component

-

-       http://wiki.apache.org/solr/TermVectorComponent

-    -->

-  <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>

-

-  <!-- A request handler for demonstrating the term vector component

-

-       This is purely as an example.

-

-       In reality you will likely want to add the component to your 

-       already specified request handlers. 

-    -->

-  <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">

-    <lst name="defaults">

-      <bool name="tv">true</bool>

-    </lst>

-    <arr name="last-components">

-      <str>tvComponent</str>

-    </arr>

-  </requestHandler>

-

-  <!-- Clustering Component

-

-       You'll need to set the solr.clustering.enabled system property

-       when running solr to run with clustering enabled:

-

-            java -Dsolr.clustering.enabled=true -jar start.jar

-

-       http://wiki.apache.org/solr/ClusteringComponent

-       http://carrot2.github.io/solr-integration-strategies/

-    -->

-  <searchComponent name="clustering"

-                   enable="${solr.clustering.enabled:false}"

-                   class="solr.clustering.ClusteringComponent" >

-    <lst name="engine">

-      <str name="name">lingo</str>

-

-      <!-- Class name of a clustering algorithm compatible with the Carrot2 framework.

-

-           Currently available open source algorithms are:

-           * org.carrot2.clustering.lingo.LingoClusteringAlgorithm

-           * org.carrot2.clustering.stc.STCClusteringAlgorithm

-           * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm

-

-           See http://project.carrot2.org/algorithms.html for more information.

-

-           A commercial algorithm Lingo3G (needs to be installed separately) is defined as:

-           * com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm

-        -->

-      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>

-

-      <!-- Override location of the clustering algorithm's resources 

-           (attribute definitions and lexical resources).

-

-           A directory from which to load algorithm-specific stop words,

-           stop labels and attribute definition XMLs. 

-

-           For an overview of Carrot2 lexical resources, see:

-           http://download.carrot2.org/head/manual/#chapter.lexical-resources

-

-           For an overview of Lingo3G lexical resources, see:

-           http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources

-       -->

-      <str name="carrot.resourcesDir">clustering/carrot2</str>

-    </lst>

-

-    <!-- An example definition for the STC clustering algorithm. -->

-    <lst name="engine">

-      <str name="name">stc</str>

-      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>

-    </lst>

-

-    <!-- An example definition for the bisecting kmeans clustering algorithm. -->

-    <lst name="engine">

-      <str name="name">kmeans</str>

-      <str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str>

-    </lst>

-  </searchComponent>

-

-  <!-- A request handler for demonstrating the clustering component

-

-       This is purely as an example.

-

-       In reality you will likely want to add the component to your 

-       already specified request handlers. 

-    -->

-  <requestHandler name="/clustering"

-                  startup="lazy"

-                  enable="${solr.clustering.enabled:false}"

-                  class="solr.SearchHandler">

-    <lst name="defaults">

-      <bool name="clustering">true</bool>

-      <bool name="clustering.results">true</bool>

-      <!-- Field name with the logical "title" of a each document (optional) -->

-      <str name="carrot.title">name</str>

-      <!-- Field name with the logical "URL" of a each document (optional) -->

-      <str name="carrot.url">id</str>

-      <!-- Field name with the logical "content" of a each document (optional) -->

-      <str name="carrot.snippet">features</str>

-      <!-- Apply highlighter to the title/ content and use this for clustering. -->

-      <bool name="carrot.produceSummary">true</bool>

-      <!-- the maximum number of labels per cluster -->

-      <!--<int name="carrot.numDescriptions">5</int>-->

-      <!-- produce sub clusters -->

-      <bool name="carrot.outputSubClusters">false</bool>

-

-      <!-- Configure the remaining request handler parameters. -->

-      <str name="defType">edismax</str>

-      <str name="qf">

-        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4

-      </str>

-      <str name="q.alt">*:*</str>

-      <str name="rows">10</str>

-      <str name="fl">*,score</str>

-    </lst>

-    <arr name="last-components">

-      <str>clustering</str>

-    </arr>

-  </requestHandler>

-  

-  <!-- Terms Component

-

-       http://wiki.apache.org/solr/TermsComponent

-

-       A component to return terms and document frequency of those

-       terms

-    -->

-  <searchComponent name="terms" class="solr.TermsComponent"/>

-

-  <!-- A request handler for demonstrating the terms component -->

-  <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">

-     <lst name="defaults">

-      <bool name="terms">true</bool>

-      <bool name="distrib">false</bool>

-    </lst>     

-    <arr name="components">

-      <str>terms</str>

-    </arr>

-  </requestHandler>

-

-

-  <!-- Query Elevation Component

-

-       http://wiki.apache.org/solr/QueryElevationComponent

-

-       a search component that enables you to configure the top

-       results for a given query regardless of the normal lucene

-       scoring.

-    -->

-  <searchComponent name="elevator" class="solr.QueryElevationComponent" >

-    <!-- pick a fieldType to analyze queries -->

-    <str name="queryFieldType">string</str>

-    <str name="config-file">elevate.xml</str>

-  </searchComponent>

-

-  <!-- A request handler for demonstrating the elevator component -->

-  <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">

-    <lst name="defaults">

-      <str name="echoParams">explicit</str>

-    </lst>

-    <arr name="last-components">

-      <str>elevator</str>

-    </arr>

-  </requestHandler>

-

-  <!-- Highlighting Component

-

-       http://wiki.apache.org/solr/HighlightingParameters

-    -->

-  <searchComponent class="solr.HighlightComponent" name="highlight">

-    <highlighting>

-      <!-- Configure the standard fragmenter -->

-      <!-- This could most likely be commented out in the "default" case -->

-      <fragmenter name="gap" 

-                  default="true"

-                  class="solr.highlight.GapFragmenter">

-        <lst name="defaults">

-          <int name="hl.fragsize">100</int>

-        </lst>

-      </fragmenter>

-

-      <!-- A regular-expression-based fragmenter 

-           (for sentence extraction) 

-        -->

-      <fragmenter name="regex" 

-                  class="solr.highlight.RegexFragmenter">

-        <lst name="defaults">

-          <!-- slightly smaller fragsizes work better because of slop -->

-          <int name="hl.fragsize">70</int>

-          <!-- allow 50% slop on fragment sizes -->

-          <float name="hl.regex.slop">0.5</float>

-          <!-- a basic sentence pattern -->

-          <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>

-        </lst>

-      </fragmenter>

-

-      <!-- Configure the standard formatter -->

-      <formatter name="html" 

-                 default="true"

-                 class="solr.highlight.HtmlFormatter">

-        <lst name="defaults">

-          <str name="hl.simple.pre"><![CDATA[<em>]]></str>

-          <str name="hl.simple.post"><![CDATA[</em>]]></str>

-        </lst>

-      </formatter>

-

-      <!-- Configure the standard encoder -->

-      <encoder name="html" 

-               class="solr.highlight.HtmlEncoder" />

-

-      <!-- Configure the standard fragListBuilder -->

-      <fragListBuilder name="simple" 

-                       class="solr.highlight.SimpleFragListBuilder"/>

-      

-      <!-- Configure the single fragListBuilder -->

-      <fragListBuilder name="single" 

-                       class="solr.highlight.SingleFragListBuilder"/>

-      

-      <!-- Configure the weighted fragListBuilder -->

-      <fragListBuilder name="weighted" 

-                       default="true"

-                       class="solr.highlight.WeightedFragListBuilder"/>

-      

-      <!-- default tag FragmentsBuilder -->

-      <fragmentsBuilder name="default" 

-                        default="true"

-                        class="solr.highlight.ScoreOrderFragmentsBuilder">

-        <!-- 

-        <lst name="defaults">

-          <str name="hl.multiValuedSeparatorChar">/</str>

-        </lst>

-        -->

-      </fragmentsBuilder>

-

-      <!-- multi-colored tag FragmentsBuilder -->

-      <fragmentsBuilder name="colored" 

-                        class="solr.highlight.ScoreOrderFragmentsBuilder">

-        <lst name="defaults">

-          <str name="hl.tag.pre"><![CDATA[

-               <b style="background:yellow">,<b style="background:lawgreen">,

-               <b style="background:aquamarine">,<b style="background:magenta">,

-               <b style="background:palegreen">,<b style="background:coral">,

-               <b style="background:wheat">,<b style="background:khaki">,

-               <b style="background:lime">,<b style="background:deepskyblue">]]></str>

-          <str name="hl.tag.post"><![CDATA[</b>]]></str>

-        </lst>

-      </fragmentsBuilder>

-      

-      <boundaryScanner name="default" 

-                       default="true"

-                       class="solr.highlight.SimpleBoundaryScanner">

-        <lst name="defaults">

-          <str name="hl.bs.maxScan">10</str>

-          <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>

-        </lst>

-      </boundaryScanner>

-      

-      <boundaryScanner name="breakIterator" 

-                       class="solr.highlight.BreakIteratorBoundaryScanner">

-        <lst name="defaults">

-          <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->

-          <str name="hl.bs.type">WORD</str>

-          <!-- language and country are used when constructing Locale object.  -->

-          <!-- And the Locale object will be used when getting instance of BreakIterator -->

-          <str name="hl.bs.language">en</str>

-          <str name="hl.bs.country">US</str>

-        </lst>

-      </boundaryScanner>

-    </highlighting>

-  </searchComponent>

-

-  <!-- Update Processors

-

-       Chains of Update Processor Factories for dealing with Update

-       Requests can be declared, and then used by name in Update

-       Request Processors

-

-       http://wiki.apache.org/solr/UpdateRequestProcessor

-

-    --> 

-  <!-- Deduplication

-

-       An example dedup update processor that creates the "id" field

-       on the fly based on the hash code of some other fields.  This

-       example has overwriteDupes set to false since we are using the

-       id field as the signatureField and Solr will maintain

-       uniqueness based on that anyway.  

-       

-    -->

-  <!--

-     <updateRequestProcessorChain name="dedupe">

-       <processor class="solr.processor.SignatureUpdateProcessorFactory">

-         <bool name="enabled">true</bool>

-         <str name="signatureField">id</str>

-         <bool name="overwriteDupes">false</bool>

-         <str name="fields">name,features,cat</str>

-         <str name="signatureClass">solr.processor.Lookup3Signature</str>

-       </processor>

-       <processor class="solr.LogUpdateProcessorFactory" />

-       <processor class="solr.RunUpdateProcessorFactory" />

-     </updateRequestProcessorChain>

-    -->

-  

-  <!-- Language identification

-

-       This example update chain identifies the language of the incoming

-       documents using the langid contrib. The detected language is

-       written to field language_s. No field name mapping is done.

-       The fields used for detection are text, title, subject and description,

-       making this example suitable for detecting languages form full-text

-       rich documents injected via ExtractingRequestHandler.

-       See more about langId at http://wiki.apache.org/solr/LanguageDetection

-    -->

-    <!--

-     <updateRequestProcessorChain name="langid">

-       <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">

-         <str name="langid.fl">text,title,subject,description</str>

-         <str name="langid.langField">language_s</str>

-         <str name="langid.fallback">en</str>

-       </processor>

-       <processor class="solr.LogUpdateProcessorFactory" />

-       <processor class="solr.RunUpdateProcessorFactory" />

-     </updateRequestProcessorChain>

-    -->

-

-  <!-- Script update processor

-

-    This example hooks in an update processor implemented using JavaScript.

-

-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor

-  -->

-  <!--

-    <updateRequestProcessorChain name="script">

-      <processor class="solr.StatelessScriptUpdateProcessorFactory">

-        <str name="script">update-script.js</str>

-        <lst name="params">

-          <str name="config_param">example config parameter</str>

-        </lst>

-      </processor>

-      <processor class="solr.RunUpdateProcessorFactory" />

-    </updateRequestProcessorChain>

-  -->

- 

-  <!-- Response Writers

-

-       http://wiki.apache.org/solr/QueryResponseWriter

-

-       Request responses will be written using the writer specified by

-       the 'wt' request parameter matching the name of a registered

-       writer.

-

-       The "default" writer is the default and will be used if 'wt' is

-       not specified in the request.

-    -->

-  <!-- The following response writers are implicitly configured unless

-       overridden...

-    -->

-  <!--

-     <queryResponseWriter name="xml" 

-                          default="true"

-                          class="solr.XMLResponseWriter" />

-     <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>

-     <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>

-     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>

-     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>

-     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>

-     <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>

-     <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>

-    -->

-

-  <queryResponseWriter name="json" class="solr.JSONResponseWriter">

-     <!-- For the purposes of the tutorial, JSON responses are written as

-      plain text so that they are easy to read in *any* browser.

-      If you expect a MIME type of "application/json" just remove this override.

-     -->

-    <str name="content-type">text/plain; charset=UTF-8</str>

-  </queryResponseWriter>

-  

-  <!--

-     Custom response writers can be declared as needed...

-    -->

-    <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy">

-      <str name="template.base.dir">${velocity.template.base.dir:}</str>

-    </queryResponseWriter>

-  

-

-  <!-- XSLT response writer transforms the XML output by any xslt file found

-       in Solr's conf/xslt directory.  Changes to xslt files are checked for

-       every xsltCacheLifetimeSeconds.  

-    -->

-  <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">

-    <int name="xsltCacheLifetimeSeconds">5</int>

-  </queryResponseWriter>

-

-  <!-- Query Parsers

-

-       http://wiki.apache.org/solr/SolrQuerySyntax

-

-       Multiple QParserPlugins can be registered by name, and then

-       used in either the "defType" param for the QueryComponent (used

-       by SearchHandler) or in LocalParams

-    -->

-  <!-- example of registering a query parser -->

-  <!--

-     <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>

-    -->

-

-  <!-- Function Parsers

-

-       http://wiki.apache.org/solr/FunctionQuery

-

-       Multiple ValueSourceParsers can be registered by name, and then

-       used as function names when using the "func" QParser.

-    -->

-  <!-- example of registering a custom function parser  -->

-  <!--

-     <valueSourceParser name="myfunc" 

-                        class="com.mycompany.MyValueSourceParser" />

-    -->

-    

-  

-  <!-- Document Transformers

-       http://wiki.apache.org/solr/DocTransformers

-    -->

-  <!--

-     Could be something like:

-     <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >

-       <int name="connection">jdbc://....</int>

-     </transformer>

-     

-     To add a constant value to all docs, use:

-     <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >

-       <int name="value">5</int>

-     </transformer>

-     

-     If you want the user to still be able to change it with _value:something_ use this:

-     <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >

-       <double name="defaultValue">5</double>

-     </transformer>

-

-      If you are using the QueryElevationComponent, you may wish to mark documents that get boosted.  The

-      EditorialMarkerFactory will do exactly that:

-     <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />

-    -->

-    

-

-  <!-- Legacy config for the admin interface -->

-  <admin>

-    <defaultQuery>*:*</defaultQuery>

-  </admin>

-

-</config>

+<?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.
+-->
+
+<!-- 
+     For more details about configurations options that may appear in
+     this file, see http://wiki.apache.org/solr/SolrConfigXml. 
+-->
+<config>
+  <!-- In all configuration below, a prefix of "solr." for class names
+       is an alias that causes solr to search appropriate packages,
+       including org.apache.solr.(search|update|request|core|analysis)
+
+       You may also specify a fully qualified Java classname if you
+       have your own custom plugins.
+    -->
+
+  <!-- Controls what version of Lucene various components of Solr
+       adhere to.  Generally, you want to use the latest version to
+       get all bug fixes and improvements. It is highly recommended
+       that you fully re-index after changing this setting as it can
+       affect both how text is indexed and queried.
+  -->
+  <luceneMatchVersion>6.2.1</luceneMatchVersion>
+
+  <!-- <lib/> directives can be used to instruct Solr to load any Jars
+       identified and use them to resolve any "plugins" specified in
+       your solrconfig.xml or schema.xml (ie: Analyzers, Request
+       Handlers, etc...).
+
+       All directories and paths are resolved relative to the
+       instanceDir.
+
+       Please note that <lib/> directives are processed in the order
+       that they appear in your solrconfig.xml file, and are "stacked" 
+       on top of each other when building a ClassLoader - so if you have 
+       plugin jars with dependencies on other jars, the "lower level" 
+       dependency jars should be loaded first.
+
+       If a "./lib" directory exists in your instanceDir, all files
+       found in it are included as if you had used the following
+       syntax...
+       
+              <lib dir="./lib" />
+    -->
+
+  <!-- A 'dir' option by itself adds any files found in the directory 
+       to the classpath, this is useful for including all jars in a
+       directory.
+
+       When a 'regex' is specified in addition to a 'dir', only the
+       files in that directory which completely match the regex
+       (anchored on both ends) will be included.
+
+       If a 'dir' option (with or without a regex) is used and nothing
+       is found that matches, a warning will be logged.
+
+       The examples below can be used to load some solr-contribs along 
+       with their external dependencies.
+    -->
+  <!-- 
+  <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
+
+  <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
+
+  <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
+
+  <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
+    -->
+
+  <!-- an exact 'path' can be used instead of a 'dir' to specify a 
+       specific jar file.  This will cause a serious error to be logged 
+       if it can't be loaded.
+    -->
+  <!--
+     <lib path="../a-jar-that-does-not-exist.jar" /> 
+  -->
+  
+  <!-- Data Directory
+
+       Used to specify an alternate directory to hold all index data
+       other than the default ./data under the Solr home.  If
+       replication is in use, this should match the replication
+       configuration.
+    -->
+  <dataDir>${solr.data.dir:runtime/indexes}</dataDir>
+
+
+  <!-- The DirectoryFactory to use for indexes.
+       
+       solr.StandardDirectoryFactory is filesystem
+       based and tries to pick the best implementation for the current
+       JVM and platform.  solr.NRTCachingDirectoryFactory, the default,
+       wraps solr.StandardDirectoryFactory and caches small files in memory
+       for better NRT performance.
+
+       One can force a particular implementation via solr.MMapDirectoryFactory,
+       solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
+
+       solr.RAMDirectoryFactory is memory based, not
+       persistent, and doesn't work with replication.
+    -->
+  <directoryFactory name="DirectoryFactory" 
+                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
+
+  <!-- The CodecFactory for defining the format of the inverted index.
+       The default implementation is SchemaCodecFactory, which is the official Lucene
+       index format, but hooks into the schema to provide per-field customization of
+       the postings lists and per-document values in the fieldType element
+       (postingsFormat/docValuesFormat). Note that most of the alternative implementations
+       are experimental, so if you choose to customize the index format, it's a good
+       idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
+       before upgrading to a newer version to avoid unnecessary reindexing.
+  -->
+  <codecFactory class="solr.SchemaCodecFactory"/>
+
+  <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
+  
+       <schemaFactory class="ManagedIndexSchemaFactory">
+         <bool name="mutable">true</bool>
+         <str name="managedSchemaResourceName">managed-schema</str>
+       </schemaFactory>
+       
+       When ManagedIndexSchemaFactory is specified, Solr will load the schema from
+       the resource named in 'managedSchemaResourceName', rather than from schema.xml.
+       Note that the managed schema resource CANNOT be named schema.xml.  If the managed
+       schema does not exist, Solr will create it after reading schema.xml, then rename
+       'schema.xml' to 'schema.xml.bak'. 
+       
+       Do NOT hand edit the managed schema - external modifications will be ignored and
+       overwritten as a result of schema modification REST API calls.
+
+       When ManagedIndexSchemaFactory is specified with mutable = true, schema
+       modification REST API calls will be allowed; otherwise, error responses will be
+       sent back for these requests. 
+  -->
+  <schemaFactory class="ClassicIndexSchemaFactory"/>
+
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       Index Config - These settings control low-level behavior of indexing
+       Most example settings here show the default value, but are commented
+       out, to more easily see where customizations have been made.
+       
+       Note: This replaces <indexDefaults> and <mainIndex> from older versions
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <indexConfig>
+    <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a 
+         LimitTokenCountFilterFactory in your fieldType definition. E.g. 
+     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
+    -->
+    <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
+    <!-- <writeLockTimeout>1000</writeLockTimeout>  -->
+
+    <!-- Expert: Enabling compound file will use less files for the index, 
+         using fewer file descriptors on the expense of performance decrease. 
+         Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
+    <!-- <useCompoundFile>false</useCompoundFile> -->
+
+    <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
+         indexing for buffering added documents and deletions before they are
+         flushed to the Directory.
+         maxBufferedDocs sets a limit on the number of documents buffered
+         before flushing.
+         If both ramBufferSizeMB and maxBufferedDocs is set, then
+         Lucene will flush based on whichever limit is hit first.
+         The default is 100 MB.  -->
+    <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
+    <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
+
+    <!-- Expert: Merge Policy 
+         The Merge Policy in Lucene controls how merging of segments is done.
+         The default since Solr/Lucene 3.3 is TieredMergePolicy.
+         The default since Lucene 2.3 was the LogByteSizeMergePolicy,
+         Even older versions of Lucene used LogDocMergePolicy.
+      -->
+    <!--
+        <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
+          <int name="maxMergeAtOnce">10</int>
+          <int name="segmentsPerTier">10</int>
+          <double name="noCFSRatio">0.1</double>
+        </mergePolicy>
+      -->
+       
+    <!-- Merge Factor
+         The merge factor controls how many segments will get merged at a time.
+         For TieredMergePolicy, mergeFactor is a convenience parameter which
+         will set both MaxMergeAtOnce and SegmentsPerTier at once.
+         For LogByteSizeMergePolicy, mergeFactor decides how many new segments
+         will be allowed before they are merged into one.
+         Default is 10 for both merge policies.
+      -->
+    <!-- 
+    <mergeFactor>10</mergeFactor>
+      -->
+
+    <!-- Expert: Merge Scheduler
+         The Merge Scheduler in Lucene controls how merges are
+         performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
+         can perform merges in the background using separate threads.
+         The SerialMergeScheduler (Lucene 2.2 default) does not.
+     -->
+    <!-- 
+       <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
+       -->
+
+    <!-- LockFactory 
+
+         This option specifies which Lucene LockFactory implementation
+         to use.
+      
+         single = SingleInstanceLockFactory - suggested for a
+                  read-only index or when there is no possibility of
+                  another process trying to modify the index.
+         native = NativeFSLockFactory - uses OS native file locking.
+                  Do not use when multiple solr webapps in the same
+                  JVM are attempting to share a single index.
+         simple = SimpleFSLockFactory  - uses a plain file for locking
+
+         Defaults: 'native' is default for Solr3.6 and later, otherwise
+                   'simple' is the default
+
+         More details on the nuances of each LockFactory...
+         http://wiki.apache.org/lucene-java/AvailableLockFactories
+    -->
+    <lockType>${solr.lock.type:native}</lockType>
+
+    <!-- Commit Deletion Policy
+         Custom deletion policies can be specified here. The class must
+         implement org.apache.lucene.index.IndexDeletionPolicy.
+
+         The default Solr IndexDeletionPolicy implementation supports
+         deleting index commit points on number of commits, age of
+         commit point and optimized status.
+         
+         The latest commit point should always be preserved regardless
+         of the criteria.
+    -->
+    <!-- 
+    <deletionPolicy class="solr.SolrDeletionPolicy">
+    -->
+      <!-- The number of commit points to be kept -->
+      <!-- <str name="maxCommitsToKeep">1</str> -->
+      <!-- The number of optimized commit points to be kept -->
+      <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
+      <!--
+          Delete all commit points once they have reached the given age.
+          Supports DateMathParser syntax e.g.
+        -->
+      <!--
+         <str name="maxCommitAge">30MINUTES</str>
+         <str name="maxCommitAge">1DAY</str>
+      -->
+    <!-- 
+    </deletionPolicy>
+    -->
+
+    <!-- Lucene Infostream
+       
+         To aid in advanced debugging, Lucene provides an "InfoStream"
+         of detailed information when indexing.
+
+         Setting the value to true will instruct the underlying Lucene
+         IndexWriter to write its info stream to solr's log. By default,
+         this is enabled here, and controlled through log4j.properties.
+      -->
+     <infoStream>true</infoStream>
+  </indexConfig>
+
+
+  <!-- JMX
+       
+       This example enables JMX if and only if an existing MBeanServer
+       is found, use this if you want to configure JMX through JVM
+       parameters. Remove this to disable exposing Solr configuration
+       and statistics to JMX.
+
+       For more details see http://wiki.apache.org/solr/SolrJmx
+    -->
+  <jmx />
+  <!-- If you want to connect to a particular server, specify the
+       agentId 
+    -->
+  <!-- <jmx agentId="myAgent" /> -->
+  <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
+  <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
+    -->
+
+  <!-- The default high-performance update handler -->
+  <updateHandler class="solr.DirectUpdateHandler2">
+
+    <!-- Enables a transaction log, used for real-time get, durability, and
+         and solr cloud replica recovery.  The log can grow as big as
+         uncommitted changes to the index, so use of a hard autoCommit
+         is recommended (see below).
+         "dir" - the target directory for transaction logs, defaults to the
+                solr data directory.
+         "numVersionBuckets" - sets the number of buckets used to keep
+                track of max version values when checking for re-ordered
+                updates; increase this value to reduce the cost of
+                synchronizing access to version buckets during high-volume
+                indexing, this requires 8 bytes (long) * numVersionBuckets
+                of heap space per Solr core.
+    -->
+    <updateLog>
+      <str name="dir">${solr.ulog.dir:}</str>
+      <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
+    </updateLog>
+ 
+    <!-- AutoCommit
+
+         Perform a hard commit automatically under certain conditions.
+         Instead of enabling autoCommit, consider using "commitWithin"
+         when adding documents. 
+
+         http://wiki.apache.org/solr/UpdateXmlMessages
+
+         maxDocs - Maximum number of documents to add since the last
+                   commit before automatically triggering a new commit.
+
+         maxTime - Maximum amount of time in ms that is allowed to pass
+                   since a document was added before automatically
+                   triggering a new commit. 
+         openSearcher - if false, the commit causes recent index changes
+           to be flushed to stable storage, but does not cause a new
+           searcher to be opened to make those changes visible.
+
+         If the updateLog is enabled, then it's highly recommended to
+         have some sort of hard autoCommit to limit the log size.
+      -->
+     <autoCommit> 
+       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime> 
+       <openSearcher>false</openSearcher> 
+     </autoCommit>
+
+    <!-- softAutoCommit is like autoCommit except it causes a
+         'soft' commit which only ensures that changes are visible
+         but does not ensure that data is synced to disk.  This is
+         faster and more near-realtime friendly than a hard commit.
+      -->
+
+     <autoSoftCommit> 
+       <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> 
+     </autoSoftCommit>
+
+    <!-- Update Related Event Listeners
+         
+         Various IndexWriter related events can trigger Listeners to
+         take actions.
+
+         postCommit - fired after every commit or optimize command
+         postOptimize - fired after every optimize command
+      -->
+    <!-- The RunExecutableListener executes an external command from a
+         hook such as postCommit or postOptimize.
+         
+         exe - the name of the executable to run
+         dir - dir to use as the current working directory. (default=".")
+         wait - the calling thread waits until the executable returns. 
+                (default="true")
+         args - the arguments to pass to the program.  (default is none)
+         env - environment variables to set.  (default is none)
+      -->
+    <!-- This example shows how RunExecutableListener could be used
+         with the script based replication...
+         http://wiki.apache.org/solr/CollectionDistribution
+      -->
+    <!--
+       <listener event="postCommit" class="solr.RunExecutableListener">
+         <str name="exe">solr/bin/snapshooter</str>
+         <str name="dir">.</str>
+         <bool name="wait">true</bool>
+         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
+         <arr name="env"> <str>MYVAR=val1</str> </arr>
+       </listener>
+      -->
+
+  </updateHandler>
+  
+  <!-- IndexReaderFactory
+
+       Use the following format to specify a custom IndexReaderFactory,
+       which allows for alternate IndexReader implementations.
+
+       ** Experimental Feature **
+
+       Please note - Using a custom IndexReaderFactory may prevent
+       certain other features from working. The API to
+       IndexReaderFactory may change without warning or may even be
+       removed from future releases if the problems cannot be
+       resolved.
+
+
+       ** Features that may not work with custom IndexReaderFactory **
+
+       The ReplicationHandler assumes a disk-resident index. Using a
+       custom IndexReader implementation may cause incompatibility
+       with ReplicationHandler and may cause replication to not work
+       correctly. See SOLR-1366 for details.
+
+    -->
+  <!--
+  <indexReaderFactory name="IndexReaderFactory" class="package.class">
+    <str name="someArg">Some Value</str>
+  </indexReaderFactory >
+  -->
+
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       Query section - these settings control query time things like caches
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <query>
+    <!-- Max Boolean Clauses
+
+         Maximum number of clauses in each BooleanQuery,  an exception
+         is thrown if exceeded.
+
+         ** WARNING **
+         
+         This option actually modifies a global Lucene property that
+         will affect all SolrCores.  If multiple solrconfig.xml files
+         disagree on this property, the value at any given moment will
+         be based on the last SolrCore to be initialized.
+         
+      -->
+    <maxBooleanClauses>1024</maxBooleanClauses>
+
+ 
+    <!-- Slow Query Threshold (in millis)
+    
+         At high request rates, logging all requests can become a bottleneck 
+         and therefore INFO logging is often turned off. However, it is still
+         useful to be able to set a latency threshold above which a request
+         is considered "slow" and log that request at WARN level so we can
+         easily identify slow queries.
+    --> 
+    <slowQueryThresholdMillis>-1</slowQueryThresholdMillis>
+
+
+    <!-- Solr Internal Query Caches
+
+         There are two implementations of cache available for Solr,
+         LRUCache, based on a synchronized LinkedHashMap, and
+         FastLRUCache, based on a ConcurrentHashMap.  
+
+         FastLRUCache has faster gets and slower puts in single
+         threaded operation and thus is generally faster than LRUCache
+         when the hit ratio of the cache is high (> 75%), and may be
+         faster under other scenarios on multi-cpu systems.
+    -->
+
+    <!-- Filter Cache
+
+         Cache used by SolrIndexSearcher for filters (DocSets),
+         unordered sets of *all* documents that match a query.  When a
+         new searcher is opened, its caches may be prepopulated or
+         "autowarmed" using data from caches in the old searcher.
+         autowarmCount is the number of items to prepopulate.  For
+         LRUCache, the autowarmed items will be the most recently
+         accessed items.
+
+         Parameters:
+           class - the SolrCache implementation LRUCache or
+               (LRUCache or FastLRUCache)
+           size - the maximum number of entries in the cache
+           initialSize - the initial capacity (number of entries) of
+               the cache.  (see java.util.HashMap)
+           autowarmCount - the number of entries to prepopulate from
+               and old cache.  
+      -->
+    <filterCache class="solr.FastLRUCache"
+                 size="512"
+                 initialSize="512"
+                 autowarmCount="0"/>
+
+    <!-- Query Result Cache
+
+        Caches results of searches - ordered lists of document ids
+        (DocList) based on a query, a sort, and the range of documents requested.
+        Additional supported parameter by LRUCache:
+           maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
+                      to occupy
+     -->
+    <queryResultCache class="solr.LRUCache"
+                     size="512"
+                     initialSize="512"
+                     autowarmCount="0"/>
+   
+    <!-- Document Cache
+
+         Caches Lucene Document objects (the stored fields for each
+         document).  Since Lucene internal document ids are transient,
+         this cache will not be autowarmed.  
+      -->
+    <documentCache class="solr.LRUCache"
+                   size="512"
+                   initialSize="512"
+                   autowarmCount="0"/>
+    
+    <!-- custom cache currently used by block join --> 
+    <cache name="perSegFilter"
+      class="solr.search.LRUCache"
+      size="10"
+      initialSize="0"
+      autowarmCount="10"
+      regenerator="solr.NoOpRegenerator" />
+
+    <!-- Field Value Cache
+         
+         Cache used to hold field values that are quickly accessible
+         by document id.  The fieldValueCache is created by default
+         even if not configured here.
+      -->
+    <!--
+       <fieldValueCache class="solr.FastLRUCache"
+                        size="512"
+                        autowarmCount="128"
+                        showItems="32" />
+      -->
+
+    <!-- Custom Cache
+
+         Example of a generic cache.  These caches may be accessed by
+         name through SolrIndexSearcher.getCache(),cacheLookup(), and
+         cacheInsert().  The purpose is to enable easy caching of
+         user/application level data.  The regenerator argument should
+         be specified as an implementation of solr.CacheRegenerator 
+         if autowarming is desired.  
+      -->
+    <!--
+       <cache name="myUserCache"
+              class="solr.LRUCache"
+              size="4096"
+              initialSize="1024"
+              autowarmCount="1024"
+              regenerator="com.mycompany.MyRegenerator"
+              />
+      -->
+
+
+    <!-- Lazy Field Loading
+
+         If true, stored fields that are not requested will be loaded
+         lazily.  This can result in a significant speed improvement
+         if the usual case is to not load all stored fields,
+         especially if the skipped fields are large compressed text
+         fields.
+    -->
+    <enableLazyFieldLoading>true</enableLazyFieldLoading>
+
+   <!-- Use Filter For Sorted Query
+
+        A possible optimization that attempts to use a filter to
+        satisfy a search.  If the requested sort does not include
+        score, then the filterCache will be checked for a filter
+        matching the query. If found, the filter will be used as the
+        source of document ids, and then the sort will be applied to
+        that.
+
+        For most situations, this will not be useful unless you
+        frequently get the same search repeatedly with different sort
+        options, and none of them ever use "score"
+     -->
+   <!--
+      <useFilterForSortedQuery>true</useFilterForSortedQuery>
+     -->
+
+   <!-- Result Window Size
+
+        An optimization for use with the queryResultCache.  When a search
+        is requested, a superset of the requested number of document ids
+        are collected.  For example, if a search for a particular query
+        requests matching documents 10 through 19, and queryWindowSize is 50,
+        then documents 0 through 49 will be collected and cached.  Any further
+        requests in that range can be satisfied via the cache.  
+     -->
+   <queryResultWindowSize>20</queryResultWindowSize>
+
+   <!-- Maximum number of documents to cache for any entry in the
+        queryResultCache. 
+     -->
+   <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
+
+   <!-- Query Related Event Listeners
+
+        Various IndexSearcher related events can trigger Listeners to
+        take actions.
+
+        newSearcher - fired whenever a new searcher is being prepared
+        and there is a current searcher handling requests (aka
+        registered).  It can be used to prime certain caches to
+        prevent long request times for certain requests.
+
+        firstSearcher - fired whenever a new searcher is being
+        prepared but there is no current registered searcher to handle
+        requests or to gain autowarming data from.
+
+        
+     -->
+    <!-- QuerySenderListener takes an array of NamedList and executes a
+         local query request for each NamedList in sequence. 
+      -->
+    <listener event="newSearcher" class="solr.QuerySenderListener">
+      <arr name="queries">
+        <!--
+           <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
+           <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
+          -->
+      </arr>
+    </listener>
+    <listener event="firstSearcher" class="solr.QuerySenderListener">
+      <arr name="queries">
+        <lst>
+          <str name="q">static firstSearcher warming in solrconfig.xml</str>
+        </lst>
+      </arr>
+    </listener>
+
+    <!-- Use Cold Searcher
+
+         If a search request comes in and there is no current
+         registered searcher, then immediately register the still
+         warming searcher and use it.  If "false" then all requests
+         will block until the first searcher is done warming.
+      -->
+    <useColdSearcher>false</useColdSearcher>
+
+    <!-- Max Warming Searchers
+         
+         Maximum number of searchers that may be warming in the
+         background concurrently.  An error is returned if this limit
+         is exceeded.
+
+         Recommend values of 1-2 for read-only slaves, higher for
+         masters w/o cache warming.
+      -->
+    <maxWarmingSearchers>2</maxWarmingSearchers>
+
+  </query>
+
+
+  <!-- Request Dispatcher
+
+       This section contains instructions for how the SolrDispatchFilter
+       should behave when processing requests for this SolrCore.
+
+       handleSelect is a legacy option that affects the behavior of requests
+       such as /select?qt=XXX
+
+       handleSelect="true" will cause the SolrDispatchFilter to process
+       the request and dispatch the query to a handler specified by the 
+       "qt" param, assuming "/select" isn't already registered.
+
+       handleSelect="false" will cause the SolrDispatchFilter to
+       ignore "/select" requests, resulting in a 404 unless a handler
+       is explicitly registered with the name "/select"
+
+       handleSelect="true" is not recommended for new users, but is the default
+       for backwards compatibility
+    -->
+  <requestDispatcher handleSelect="false" >
+    <!-- Request Parsing
+
+         These settings indicate how Solr Requests may be parsed, and
+         what restrictions may be placed on the ContentStreams from
+         those requests
+
+         enableRemoteStreaming - enables use of the stream.file
+         and stream.url parameters for specifying remote streams.
+
+         multipartUploadLimitInKB - specifies the max size (in KiB) of
+         Multipart File Uploads that Solr will allow in a Request.
+         
+         formdataUploadLimitInKB - specifies the max size (in KiB) of
+         form data (application/x-www-form-urlencoded) sent via
+         POST. You can use POST to pass request parameters not
+         fitting into the URL.
+         
+         addHttpRequestToContext - if set to true, it will instruct
+         the requestParsers to include the original HttpServletRequest
+         object in the context map of the SolrQueryRequest under the 
+         key "httpRequest". It will not be used by any of the existing
+         Solr components, but may be useful when developing custom 
+         plugins.
+         
+         *** WARNING ***
+         The settings below authorize Solr to fetch remote files, You
+         should make sure your system has some authentication before
+         using enableRemoteStreaming="true"
+
+      --> 
+    <requestParsers enableRemoteStreaming="true" 
+                    multipartUploadLimitInKB="2048000"
+                    formdataUploadLimitInKB="2048"
+                    addHttpRequestToContext="false"/>
+
+    <!-- HTTP Caching
+
+         Set HTTP caching related parameters (for proxy caches and clients).
+
+         The options below instruct Solr not to output any HTTP Caching
+         related headers
+      -->
+    <httpCaching never304="true" />
+    <!-- If you include a <cacheControl> directive, it will be used to
+         generate a Cache-Control header (as well as an Expires header
+         if the value contains "max-age=")
+         
+         By default, no Cache-Control header is generated.
+         
+         You can use the <cacheControl> option even if you have set
+         never304="true"
+      -->
+    <!--
+       <httpCaching never304="true" >
+         <cacheControl>max-age=30, public</cacheControl> 
+       </httpCaching>
+      -->
+    <!-- To enable Solr to respond with automatically generated HTTP
+         Caching headers, and to response to Cache Validation requests
+         correctly, set the value of never304="false"
+         
+         This will cause Solr to generate Last-Modified and ETag
+         headers based on the properties of the Index.
+
+         The following options can also be specified to affect the
+         values of these headers...
+
+         lastModFrom - the default value is "openTime" which means the
+         Last-Modified value (and validation against If-Modified-Since
+         requests) will all be relative to when the current Searcher
+         was opened.  You can change it to lastModFrom="dirLastMod" if
+         you want the value to exactly correspond to when the physical
+         index was last modified.
+
+         etagSeed="..." is an option you can change to force the ETag
+         header (and validation against If-None-Match requests) to be
+         different even if the index has not changed (ie: when making
+         significant changes to your config file)
+
+         (lastModifiedFrom and etagSeed are both ignored if you use
+         the never304="true" option)
+      -->
+    <!--
+       <httpCaching lastModifiedFrom="openTime"
+                    etagSeed="Solr">
+         <cacheControl>max-age=30, public</cacheControl> 
+       </httpCaching>
+      -->
+  </requestDispatcher>
+
+  <!-- Request Handlers 
+
+       http://wiki.apache.org/solr/SolrRequestHandler
+
+       Incoming queries will be dispatched to a specific handler by name
+       based on the path specified in the request.
+
+       Legacy behavior: If the request path uses "/select" but no Request
+       Handler has that name, and if handleSelect="true" has been specified in
+       the requestDispatcher, then the Request Handler is dispatched based on
+       the qt parameter.  Handlers without a leading '/' are accessed this way
+       like so: http://host/app/[core/]select?qt=name  If no qt is
+       given, then the requestHandler that declares default="true" will be
+       used or the one named "standard".
+
+       If a Request Handler is declared with startup="lazy", then it will
+       not be initialized until the first request that uses it.
+
+    -->
+  <!-- SearchHandler
+
+       http://wiki.apache.org/solr/SearchHandler
+
+       For processing Search Queries, the primary Request Handler
+       provided with Solr is "SearchHandler" It delegates to a sequent
+       of SearchComponents (see below) and supports distributed
+       queries across multiple shards
+    -->
+  <requestHandler name="/select" class="solr.SearchHandler">
+    <!-- default values for query parameters can be specified, these
+         will be overridden by parameters in the request
+      -->
+     <lst name="defaults">
+       <str name="echoParams">explicit</str>
+       <int name="rows">10</int>
+       <!-- Controls the distribution of a query to shards other than itself.
+            Consider making 'preferLocalShards' true when:
+              1) maxShardsPerNode > 1
+              2) Number of shards > 1
+              3) CloudSolrClient or LbHttpSolrServer is used by clients.
+            Without this option, every core broadcasts the distributed query to
+            a replica of each shard where the replicas are chosen randomly.
+            This option directs the cores to prefer cores hosted locally, thus
+            preventing network delays between machines.
+            This behavior also immunizes a bad/slow machine from slowing down all
+            the good machines (if those good machines were querying this bad one).
+
+            Specify this option=false for clients connecting through HttpSolrServer
+       -->
+       <bool name="preferLocalShards">false</bool>
+     </lst>
+    <!-- In addition to defaults, "appends" params can be specified
+         to identify values which should be appended to the list of
+         multi-val params from the query (or the existing "defaults").
+      -->
+    <!-- In this example, the param "fq=instock:true" would be appended to
+         any query time fq params the user may specify, as a mechanism for
+         partitioning the index, independent of any user selected filtering
+         that may also be desired (perhaps as a result of faceted searching).
+
+         NOTE: there is *absolutely* nothing a client can do to prevent these
+         "appends" values from being used, so don't use this mechanism
+         unless you are sure you always want it.
+      -->
+    <!--
+       <lst name="appends">
+         <str name="fq">inStock:true</str>
+       </lst>
+      -->
+    <!-- "invariants" are a way of letting the Solr maintainer lock down
+         the options available to Solr clients.  Any params values
+         specified here are used regardless of what values may be specified
+         in either the query, the "defaults", or the "appends" params.
+
+         In this example, the facet.field and facet.query params would
+         be fixed, limiting the facets clients can use.  Faceting is
+         not turned on by default - but if the client does specify
+         facet=true in the request, these are the only facets they
+         will be able to see counts for; regardless of what other
+         facet.field or facet.query params they may specify.
+
+         NOTE: there is *absolutely* nothing a client can do to prevent these
+         "invariants" values from being used, so don't use this mechanism
+         unless you are sure you always want it.
+      -->
+    <!--
+       <lst name="invariants">
+         <str name="facet.field">cat</str>
+         <str name="facet.field">manu_exact</str>
+         <str name="facet.query">price:[* TO 500]</str>
+         <str name="facet.query">price:[500 TO *]</str>
+       </lst>
+      -->
+    <!-- If the default list of SearchComponents is not desired, that
+         list can either be overridden completely, or components can be
+         prepended or appended to the default list.  (see below)
+      -->
+    <!--
+       <arr name="components">
+         <str>nameOfCustomComponent1</str>
+         <str>nameOfCustomComponent2</str>
+       </arr>
+      -->
+    </requestHandler>
+
+  <!-- A request handler that returns indented JSON by default -->
+  <requestHandler name="/query" class="solr.SearchHandler">
+     <lst name="defaults">
+       <str name="echoParams">explicit</str>
+       <str name="wt">json</str>
+       <str name="indent">true</str>
+       <str name="df">text</str>
+     </lst>
+  </requestHandler>
+
+
+
+  <!--
+    The export request handler is used to export full sorted result sets.
+    Do not change these defaults.
+  -->
+
+  <requestHandler name="/export" class="solr.SearchHandler">
+    <lst name="invariants">
+      <str name="rq">{!xport}</str>
+      <str name="wt">xsort</str>
+      <str name="distrib">false</str>
+    </lst>
+
+    <arr name="components">
+      <str>query</str>
+    </arr>
+  </requestHandler>
+
+
+  <!--
+  Distributed Stream processing.
+  -->
+
+  <requestHandler name="/stream" class="solr.StreamHandler">
+    <lst name="invariants">
+      <str name="wt">json</str>
+      <str name="distrib">false</str>
+    </lst>
+  </requestHandler>
+
+
+
+
+
+
+  <!-- A Robust Example 
+       
+       This example SearchHandler declaration shows off usage of the
+       SearchHandler with many defaults declared
+
+       Note that multiple instances of the same Request Handler
+       (SearchHandler) can be registered multiple times with different
+       names (and different init parameters)
+    -->
+  <requestHandler name="/browse" class="solr.SearchHandler">
+     <lst name="defaults">
+       <str name="echoParams">explicit</str>
+
+       <!-- VelocityResponseWriter settings -->
+       <str name="wt">velocity</str>
+       <str name="v.template">browse</str>
+       <str name="v.layout">layout</str>
+       <str name="title">Solritas</str>
+
+       <!-- Query settings -->
+       <str name="defType">edismax</str>
+       <str name="qf">
+          text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+          title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
+       </str>
+       <str name="mm">100%</str>
+       <str name="q.alt">*:*</str>
+       <str name="rows">10</str>
+       <str name="fl">*,score</str>
+
+       <str name="mlt.qf">
+         text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+         title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
+       </str>
+       <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
+       <int name="mlt.count">3</int>
+
+       <!-- Faceting defaults -->
+       <str name="facet">on</str>
+       <str name="facet.missing">true</str>
+       <str name="facet.field">cat</str>
+       <str name="facet.field">manu_exact</str>
+       <str name="facet.field">content_type</str>
+       <str name="facet.field">author_s</str>
+       <str name="facet.query">ipod</str>
+       <str name="facet.query">GB</str>
+       <str name="facet.mincount">1</str>
+       <str name="facet.pivot">cat,inStock</str>
+       <str name="facet.range.other">after</str>
+       <str name="facet.range">price</str>
+       <int name="f.price.facet.range.start">0</int>
+       <int name="f.price.facet.range.end">600</int>
+       <int name="f.price.facet.range.gap">50</int>
+       <str name="facet.range">popularity</str>
+       <int name="f.popularity.facet.range.start">0</int>
+       <int name="f.popularity.facet.range.end">10</int>
+       <int name="f.popularity.facet.range.gap">3</int>
+       <str name="facet.range">manufacturedate_dt</str>
+       <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
+       <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
+       <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
+       <str name="f.manufacturedate_dt.facet.range.other">before</str>
+       <str name="f.manufacturedate_dt.facet.range.other">after</str>
+
+       <!-- Highlighting defaults -->
+       <str name="hl">on</str>
+       <str name="hl.fl">content features title name</str>
+       <str name="hl.preserveMulti">true</str>
+       <str name="hl.encoder">html</str>
+       <str name="hl.simple.pre">&lt;b&gt;</str>
+       <str name="hl.simple.post">&lt;/b&gt;</str>
+       <str name="f.title.hl.fragsize">0</str>
+       <str name="f.title.hl.alternateField">title</str>
+       <str name="f.name.hl.fragsize">0</str>
+       <str name="f.name.hl.alternateField">name</str>
+       <str name="f.content.hl.snippets">3</str>
+       <str name="f.content.hl.fragsize">200</str>
+       <str name="f.content.hl.alternateField">content</str>
+       <str name="f.content.hl.maxAlternateFieldLength">750</str>
+
+       <!-- Spell checking defaults -->
+       <str name="spellcheck">on</str>
+       <str name="spellcheck.extendedResults">false</str>       
+       <str name="spellcheck.count">5</str>
+       <str name="spellcheck.alternativeTermCount">2</str>
+       <str name="spellcheck.maxResultsForSuggest">5</str>       
+       <str name="spellcheck.collate">true</str>
+       <str name="spellcheck.collateExtendedResults">true</str>  
+       <str name="spellcheck.maxCollationTries">5</str>
+       <str name="spellcheck.maxCollations">3</str>           
+     </lst>
+
+     <!-- append spellchecking to our list of components -->
+     <arr name="last-components">
+       <str>spellcheck</str>
+     </arr>
+  </requestHandler>
+
+
+  <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
+    <lst name="defaults">
+      <str name="df">text</str>
+    </lst>
+  </initParams>
+
+  <initParams path="/update/json/docs">
+    <lst name="defaults">
+      <!--this ensures that the entire json doc will be stored verbatim into one field-->
+      <str name="srcField">_src_</str>
+      <!--This means a the uniqueKeyField will be extracted from the fields and
+       all fields go into the 'df' field. In this config df is already configured to be 'text'
+        -->
+      <str name="mapUniqueKeyOnly">true</str>
+    </lst>
+
+  </initParams>
+
+  <!-- The following are implicitly added
+  <requestHandler name="/update/json" class="solr.UpdateRequestHandler">
+        <lst name="defaults">
+         <str name="stream.contentType">application/json</str>
+       </lst>
+  </requestHandler>
+  <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">
+        <lst name="defaults">
+         <str name="stream.contentType">application/csv</str>
+       </lst>
+  </requestHandler>
+  -->
+
+  <!-- Solr Cell Update Request Handler
+
+       http://wiki.apache.org/solr/ExtractingRequestHandler 
+
+    -->
+  <requestHandler name="/update/extract" 
+                  startup="lazy"
+                  class="solr.extraction.ExtractingRequestHandler" >
+    <lst name="defaults">
+      <str name="lowernames">true</str>
+      <str name="uprefix">ignored_</str>
+
+      <!-- capture link hrefs but ignore div attributes -->
+      <str name="captureAttr">true</str>
+      <str name="fmap.a">links</str>
+      <str name="fmap.div">ignored_</str>
+    </lst>
+  </requestHandler>
+
+
+  <!-- Field Analysis Request Handler
+
+       RequestHandler that provides much the same functionality as
+       analysis.jsp. Provides the ability to specify multiple field
+       types and field names in the same request and outputs
+       index-time and query-time analysis for each of them.
+
+       Request parameters are:
+       analysis.fieldname - field name whose analyzers are to be used
+
+       analysis.fieldtype - field type whose analyzers are to be used
+       analysis.fieldvalue - text for index-time analysis
+       q (or analysis.q) - text for query time analysis
+       analysis.showmatch (true|false) - When set to true and when
+           query analysis is performed, the produced tokens of the
+           field value analysis will be marked as "matched" for every
+           token that is produces by the query analysis
+   -->
+  <requestHandler name="/analysis/field" 
+                  startup="lazy"
+                  class="solr.FieldAnalysisRequestHandler" />
+
+
+  <!-- Document Analysis Handler
+
+       http://wiki.apache.org/solr/AnalysisRequestHandler
+
+       An analysis handler that provides a breakdown of the analysis
+       process of provided documents. This handler expects a (single)
+       content stream with the following format:
+
+       <docs>
+         <doc>
+           <field name="id">1</field>
+           <field name="name">The Name</field>
+           <field name="text">The Text Value</field>
+         </doc>
+         <doc>...</doc>
+         <doc>...</doc>
+         ...
+       </docs>
+
+    Note: Each document must contain a field which serves as the
+    unique key. This key is used in the returned response to associate
+    an analysis breakdown to the analyzed document.
+
+    Like the FieldAnalysisRequestHandler, this handler also supports
+    query analysis by sending either an "analysis.query" or "q"
+    request parameter that holds the query text to be analyzed. It
+    also supports the "analysis.showmatch" parameter which when set to
+    true, all field tokens that match the query tokens will be marked
+    as a "match". 
+  -->
+  <requestHandler name="/analysis/document" 
+                  class="solr.DocumentAnalysisRequestHandler" 
+                  startup="lazy" />
+
+  <!-- Echo the request contents back to the client -->
+  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
+    <lst name="defaults">
+     <str name="echoParams">explicit</str> 
+     <str name="echoHandler">true</str>
+    </lst>
+  </requestHandler>
+  
+  <!-- Search Components
+
+       Search components are registered to SolrCore and used by 
+       instances of SearchHandler (which can access them by name)
+       
+       By default, the following components are available:
+       
+       <searchComponent name="query"     class="solr.QueryComponent" />
+       <searchComponent name="facet"     class="solr.FacetComponent" />
+       <searchComponent name="mlt"       class="solr.MoreLikeThisComponent" />
+       <searchComponent name="highlight" class="solr.HighlightComponent" />
+       <searchComponent name="stats"     class="solr.StatsComponent" />
+       <searchComponent name="debug"     class="solr.DebugComponent" />
+   
+       Default configuration in a requestHandler would look like:
+
+       <arr name="components">
+         <str>query</str>
+         <str>facet</str>
+         <str>mlt</str>
+         <str>highlight</str>
+         <str>stats</str>
+         <str>debug</str>
+       </arr>
+
+       If you register a searchComponent to one of the standard names, 
+       that will be used instead of the default.
+
+       To insert components before or after the 'standard' components, use:
+    
+       <arr name="first-components">
+         <str>myFirstComponentName</str>
+       </arr>
+    
+       <arr name="last-components">
+         <str>myLastComponentName</str>
+       </arr>
+
+       NOTE: The component registered with the name "debug" will
+       always be executed after the "last-components" 
+       
+     -->
+  
+   <!-- Spell Check
+
+        The spell check component can return a list of alternative spelling
+        suggestions.  
+
+        http://wiki.apache.org/solr/SpellCheckComponent
+     -->
+  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
+
+    <str name="queryAnalyzerFieldType">text_general</str>
+
+    <!-- Multiple "Spell Checkers" can be declared and used by this
+         component
+      -->
+
+    <!-- a spellchecker built from a field of the main index -->
+    <lst name="spellchecker">
+      <str name="name">default</str>
+      <str name="field">text</str>
+      <str name="classname">solr.DirectSolrSpellChecker</str>
+      <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
+      <str name="distanceMeasure">internal</str>
+      <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
+      <float name="accuracy">0.5</float>
+      <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
+      <int name="maxEdits">2</int>
+      <!-- the minimum shared prefix when enumerating terms -->
+      <int name="minPrefix">1</int>
+      <!-- maximum number of inspections per result. -->
+      <int name="maxInspections">5</int>
+      <!-- minimum length of a query term to be considered for correction -->
+      <int name="minQueryLength">4</int>
+      <!-- maximum threshold of documents a query term can appear to be considered for correction -->
+      <float name="maxQueryFrequency">0.01</float>
+      <!-- uncomment this to require suggestions to occur in 1% of the documents
+        <float name="thresholdTokenFrequency">.01</float>
+      -->
+    </lst>
+    
+    <!-- a spellchecker that can break or combine words.  See "/spell" handler below for usage -->
+    <lst name="spellchecker">
+      <str name="name">wordbreak</str>
+      <str name="classname">solr.WordBreakSolrSpellChecker</str>      
+      <str name="field">name</str>
+      <str name="combineWords">true</str>
+      <str name="breakWords">true</str>
+      <int name="maxChanges">10</int>
+    </lst>
+
+    <!-- a spellchecker that uses a different distance measure -->
+    <!--
+       <lst name="spellchecker">
+         <str name="name">jarowinkler</str>
+         <str name="field">spell</str>
+         <str name="classname">solr.DirectSolrSpellChecker</str>
+         <str name="distanceMeasure">
+           org.apache.lucene.search.spell.JaroWinklerDistance
+         </str>
+       </lst>
+     -->
+
+    <!-- a spellchecker that use an alternate comparator 
+
+         comparatorClass be one of:
+          1. score (default)
+          2. freq (Frequency first, then score)
+          3. A fully qualified class name
+      -->
+    <!--
+       <lst name="spellchecker">
+         <str name="name">freq</str>
+         <str name="field">lowerfilt</str>
+         <str name="classname">solr.DirectSolrSpellChecker</str>
+         <str name="comparatorClass">freq</str>
+      -->
+
+    <!-- A spellchecker that reads the list of words from a file -->
+    <!--
+       <lst name="spellchecker">
+         <str name="classname">solr.FileBasedSpellChecker</str>
+         <str name="name">file</str>
+         <str name="sourceLocation">spellings.txt</str>
+         <str name="characterEncoding">UTF-8</str>
+         <str name="spellcheckIndexDir">spellcheckerFile</str>
+       </lst>
+      -->
+  </searchComponent>
+  
+  <!-- A request handler for demonstrating the spellcheck component.  
+
+       NOTE: This is purely as an example.  The whole purpose of the
+       SpellCheckComponent is to hook it into the request handler that
+       handles your normal user queries so that a separate request is
+       not needed to get suggestions.
+
+       IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
+       NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
+       
+       See http://wiki.apache.org/solr/SpellCheckComponent for details
+       on the request parameters.
+    -->
+  <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <!-- Solr will use suggestions from both the 'default' spellchecker
+           and from the 'wordbreak' spellchecker and combine them.
+           collations (re-written queries) can include a combination of
+           corrections from both spellcheckers -->
+      <str name="spellcheck.dictionary">default</str>
+      <str name="spellcheck.dictionary">wordbreak</str>
+      <str name="spellcheck">on</str>
+      <str name="spellcheck.extendedResults">true</str>       
+      <str name="spellcheck.count">10</str>
+      <str name="spellcheck.alternativeTermCount">5</str>
+      <str name="spellcheck.maxResultsForSuggest">5</str>       
+      <str name="spellcheck.collate">true</str>
+      <str name="spellcheck.collateExtendedResults">true</str>  
+      <str name="spellcheck.maxCollationTries">10</str>
+      <str name="spellcheck.maxCollations">5</str>         
+    </lst>
+    <arr name="last-components">
+      <str>spellcheck</str>
+    </arr>
+  </requestHandler>
+
+  <!-- The SuggestComponent in Solr provides users with automatic suggestions for query terms. 
+       You can use this to implement a powerful auto-suggest feature in your search application.
+       As with the rest of this solrconfig.xml file, the configuration of this component is purely
+       an example that applies specifically to this configset and example documents. 
+       
+       More information about this component and other configuration options are described in the
+       "Suggester" section of the reference guide available at 
+       http://archive.apache.org/dist/lucene/solr/ref-guide
+    -->
+  <searchComponent name="suggest" class="solr.SuggestComponent">
+    <lst name="suggester">
+      <str name="name">mySuggester</str>
+      <str name="lookupImpl">FuzzyLookupFactory</str>      
+      <str name="dictionaryImpl">DocumentDictionaryFactory</str>
+      <str name="field">cat</str>
+      <str name="weightField">price</str>
+      <str name="suggestAnalyzerFieldType">string</str>
+      <str name="buildOnStartup">false</str>
+    </lst>
+  </searchComponent>
+
+  <requestHandler name="/suggest" class="solr.SearchHandler" 
+                  startup="lazy" >
+    <lst name="defaults">
+      <str name="suggest">true</str>
+      <str name="suggest.count">10</str>
+    </lst>
+    <arr name="components">
+      <str>suggest</str>
+    </arr>
+  </requestHandler>
+
+
+  <!-- Term Vector Component
+
+       http://wiki.apache.org/solr/TermVectorComponent
+    -->
+  <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
+
+  <!-- A request handler for demonstrating the term vector component
+
+       This is purely as an example.
+
+       In reality you will likely want to add the component to your 
+       already specified request handlers. 
+    -->
+  <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <bool name="tv">true</bool>
+    </lst>
+    <arr name="last-components">
+      <str>tvComponent</str>
+    </arr>
+  </requestHandler>
+
+  <!-- Clustering Component
+
+       You'll need to set the solr.clustering.enabled system property
+       when running solr to run with clustering enabled:
+
+            java -Dsolr.clustering.enabled=true -jar start.jar
+
+       http://wiki.apache.org/solr/ClusteringComponent
+       http://carrot2.github.io/solr-integration-strategies/
+    -->
+  <searchComponent name="clustering"
+                   enable="${solr.clustering.enabled:false}"
+                   class="solr.clustering.ClusteringComponent" >
+    <lst name="engine">
+      <str name="name">lingo</str>
+
+      <!-- Class name of a clustering algorithm compatible with the Carrot2 framework.
+
+           Currently available open source algorithms are:
+           * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
+           * org.carrot2.clustering.stc.STCClusteringAlgorithm
+           * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
+
+           See http://project.carrot2.org/algorithms.html for more information.
+
+           A commercial algorithm Lingo3G (needs to be installed separately) is defined as:
+           * com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm
+        -->
+      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
+
+      <!-- Override location of the clustering algorithm's resources 
+           (attribute definitions and lexical resources).
+
+           A directory from which to load algorithm-specific stop words,
+           stop labels and attribute definition XMLs. 
+
+           For an overview of Carrot2 lexical resources, see:
+           http://download.carrot2.org/head/manual/#chapter.lexical-resources
+
+           For an overview of Lingo3G lexical resources, see:
+           http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources
+       -->
+      <str name="carrot.resourcesDir">clustering/carrot2</str>
+    </lst>
+
+    <!-- An example definition for the STC clustering algorithm. -->
+    <lst name="engine">
+      <str name="name">stc</str>
+      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
+    </lst>
+
+    <!-- An example definition for the bisecting kmeans clustering algorithm. -->
+    <lst name="engine">
+      <str name="name">kmeans</str>
+      <str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str>
+    </lst>
+  </searchComponent>
+
+  <!-- A request handler for demonstrating the clustering component
+
+       This is purely as an example.
+
+       In reality you will likely want to add the component to your 
+       already specified request handlers. 
+    -->
+  <requestHandler name="/clustering"
+                  startup="lazy"
+                  enable="${solr.clustering.enabled:false}"
+                  class="solr.SearchHandler">
+    <lst name="defaults">
+      <bool name="clustering">true</bool>
+      <bool name="clustering.results">true</bool>
+      <!-- Field name with the logical "title" of a each document (optional) -->
+      <str name="carrot.title">name</str>
+      <!-- Field name with the logical "URL" of a each document (optional) -->
+      <str name="carrot.url">id</str>
+      <!-- Field name with the logical "content" of a each document (optional) -->
+      <str name="carrot.snippet">features</str>
+      <!-- Apply highlighter to the title/ content and use this for clustering. -->
+      <bool name="carrot.produceSummary">true</bool>
+      <!-- the maximum number of labels per cluster -->
+      <!--<int name="carrot.numDescriptions">5</int>-->
+      <!-- produce sub clusters -->
+      <bool name="carrot.outputSubClusters">false</bool>
+
+      <!-- Configure the remaining request handler parameters. -->
+      <str name="defType">edismax</str>
+      <str name="qf">
+        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+      </str>
+      <str name="q.alt">*:*</str>
+      <str name="rows">10</str>
+      <str name="fl">*,score</str>
+    </lst>
+    <arr name="last-components">
+      <str>clustering</str>
+    </arr>
+  </requestHandler>
+  
+  <!-- Terms Component
+
+       http://wiki.apache.org/solr/TermsComponent
+
+       A component to return terms and document frequency of those
+       terms
+    -->
+  <searchComponent name="terms" class="solr.TermsComponent"/>
+
+  <!-- A request handler for demonstrating the terms component -->
+  <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
+     <lst name="defaults">
+      <bool name="terms">true</bool>
+      <bool name="distrib">false</bool>
+    </lst>     
+    <arr name="components">
+      <str>terms</str>
+    </arr>
+  </requestHandler>
+
+
+  <!-- Query Elevation Component
+
+       http://wiki.apache.org/solr/QueryElevationComponent
+
+       a search component that enables you to configure the top
+       results for a given query regardless of the normal lucene
+       scoring.
+    -->
+  <searchComponent name="elevator" class="solr.QueryElevationComponent" >
+    <!-- pick a fieldType to analyze queries -->
+    <str name="queryFieldType">string</str>
+    <str name="config-file">elevate.xml</str>
+  </searchComponent>
+
+  <!-- A request handler for demonstrating the elevator component -->
+  <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <str name="echoParams">explicit</str>
+    </lst>
+    <arr name="last-components">
+      <str>elevator</str>
+    </arr>
+  </requestHandler>
+
+  <!-- Highlighting Component
+
+       http://wiki.apache.org/solr/HighlightingParameters
+    -->
+  <searchComponent class="solr.HighlightComponent" name="highlight">
+    <highlighting>
+      <!-- Configure the standard fragmenter -->
+      <!-- This could most likely be commented out in the "default" case -->
+      <fragmenter name="gap" 
+                  default="true"
+                  class="solr.highlight.GapFragmenter">
+        <lst name="defaults">
+          <int name="hl.fragsize">100</int>
+        </lst>
+      </fragmenter>
+
+      <!-- A regular-expression-based fragmenter 
+           (for sentence extraction) 
+        -->
+      <fragmenter name="regex" 
+                  class="solr.highlight.RegexFragmenter">
+        <lst name="defaults">
+          <!-- slightly smaller fragsizes work better because of slop -->
+          <int name="hl.fragsize">70</int>
+          <!-- allow 50% slop on fragment sizes -->
+          <float name="hl.regex.slop">0.5</float>
+          <!-- a basic sentence pattern -->
+          <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
+        </lst>
+      </fragmenter>
+
+      <!-- Configure the standard formatter -->
+      <formatter name="html" 
+                 default="true"
+                 class="solr.highlight.HtmlFormatter">
+        <lst name="defaults">
+          <str name="hl.simple.pre"><![CDATA[<em>]]></str>
+          <str name="hl.simple.post"><![CDATA[</em>]]></str>
+        </lst>
+      </formatter>
+
+      <!-- Configure the standard encoder -->
+      <encoder name="html" 
+               class="solr.highlight.HtmlEncoder" />
+
+      <!-- Configure the standard fragListBuilder -->
+      <fragListBuilder name="simple" 
+                       class="solr.highlight.SimpleFragListBuilder"/>
+      
+      <!-- Configure the single fragListBuilder -->
+      <fragListBuilder name="single" 
+                       class="solr.highlight.SingleFragListBuilder"/>
+      
+      <!-- Configure the weighted fragListBuilder -->
+      <fragListBuilder name="weighted" 
+                       default="true"
+                       class="solr.highlight.WeightedFragListBuilder"/>
+      
+      <!-- default tag FragmentsBuilder -->
+      <fragmentsBuilder name="default" 
+                        default="true"
+                        class="solr.highlight.ScoreOrderFragmentsBuilder">
+        <!-- 
+        <lst name="defaults">
+          <str name="hl.multiValuedSeparatorChar">/</str>
+        </lst>
+        -->
+      </fragmentsBuilder>
+
+      <!-- multi-colored tag FragmentsBuilder -->
+      <fragmentsBuilder name="colored" 
+                        class="solr.highlight.ScoreOrderFragmentsBuilder">
+        <lst name="defaults">
+          <str name="hl.tag.pre"><![CDATA[
+               <b style="background:yellow">,<b style="background:lawgreen">,
+               <b style="background:aquamarine">,<b style="background:magenta">,
+               <b style="background:palegreen">,<b style="background:coral">,
+               <b style="background:wheat">,<b style="background:khaki">,
+               <b style="background:lime">,<b style="background:deepskyblue">]]></str>
+          <str name="hl.tag.post"><![CDATA[</b>]]></str>
+        </lst>
+      </fragmentsBuilder>
+      
+      <boundaryScanner name="default" 
+                       default="true"
+                       class="solr.highlight.SimpleBoundaryScanner">
+        <lst name="defaults">
+          <str name="hl.bs.maxScan">10</str>
+          <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
+        </lst>
+      </boundaryScanner>
+      
+      <boundaryScanner name="breakIterator" 
+                       class="solr.highlight.BreakIteratorBoundaryScanner">
+        <lst name="defaults">
+          <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
+          <str name="hl.bs.type">WORD</str>
+          <!-- language and country are used when constructing Locale object.  -->
+          <!-- And the Locale object will be used when getting instance of BreakIterator -->
+          <str name="hl.bs.language">en</str>
+          <str name="hl.bs.country">US</str>
+        </lst>
+      </boundaryScanner>
+    </highlighting>
+  </searchComponent>
+
+  <!-- Update Processors
+
+       Chains of Update Processor Factories for dealing with Update
+       Requests can be declared, and then used by name in Update
+       Request Processors
+
+       http://wiki.apache.org/solr/UpdateRequestProcessor
+
+    --> 
+  <!-- Deduplication
+
+       An example dedup update processor that creates the "id" field
+       on the fly based on the hash code of some other fields.  This
+       example has overwriteDupes set to false since we are using the
+       id field as the signatureField and Solr will maintain
+       uniqueness based on that anyway.  
+       
+    -->
+  <!--
+     <updateRequestProcessorChain name="dedupe">
+       <processor class="solr.processor.SignatureUpdateProcessorFactory">
+         <bool name="enabled">true</bool>
+         <str name="signatureField">id</str>
+         <bool name="overwriteDupes">false</bool>
+         <str name="fields">name,features,cat</str>
+         <str name="signatureClass">solr.processor.Lookup3Signature</str>
+       </processor>
+       <processor class="solr.LogUpdateProcessorFactory" />
+       <processor class="solr.RunUpdateProcessorFactory" />
+     </updateRequestProcessorChain>
+    -->
+  
+  <!-- Language identification
+
+       This example update chain identifies the language of the incoming
+       documents using the langid contrib. The detected language is
+       written to field language_s. No field name mapping is done.
+       The fields used for detection are text, title, subject and description,
+       making this example suitable for detecting languages form full-text
+       rich documents injected via ExtractingRequestHandler.
+       See more about langId at http://wiki.apache.org/solr/LanguageDetection
+    -->
+    <!--
+     <updateRequestProcessorChain name="langid">
+       <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
+         <str name="langid.fl">text,title,subject,description</str>
+         <str name="langid.langField">language_s</str>
+         <str name="langid.fallback">en</str>
+       </processor>
+       <processor class="solr.LogUpdateProcessorFactory" />
+       <processor class="solr.RunUpdateProcessorFactory" />
+     </updateRequestProcessorChain>
+    -->
+
+  <!-- Script update processor
+
+    This example hooks in an update processor implemented using JavaScript.
+
+    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
+  -->
+  <!--
+    <updateRequestProcessorChain name="script">
+      <processor class="solr.StatelessScriptUpdateProcessorFactory">
+        <str name="script">update-script.js</str>
+        <lst name="params">
+          <str name="config_param">example config parameter</str>
+        </lst>
+      </processor>
+      <processor class="solr.RunUpdateProcessorFactory" />
+    </updateRequestProcessorChain>
+  -->
+ 
+  <!-- Response Writers
+
+       http://wiki.apache.org/solr/QueryResponseWriter
+
+       Request responses will be written using the writer specified by
+       the 'wt' request parameter matching the name of a registered
+       writer.
+
+       The "default" writer is the default and will be used if 'wt' is
+       not specified in the request.
+    -->
+  <!-- The following response writers are implicitly configured unless
+       overridden...
+    -->
+  <!--
+     <queryResponseWriter name="xml" 
+                          default="true"
+                          class="solr.XMLResponseWriter" />
+     <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
+     <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
+     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
+     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
+     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
+     <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
+     <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
+    -->
+
+  <queryResponseWriter name="json" class="solr.JSONResponseWriter">
+     <!-- For the purposes of the tutorial, JSON responses are written as
+      plain text so that they are easy to read in *any* browser.
+      If you expect a MIME type of "application/json" just remove this override.
+     -->
+    <str name="content-type">text/plain; charset=UTF-8</str>
+  </queryResponseWriter>
+  
+  <!--
+     Custom response writers can be declared as needed...
+    -->
+    <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy">
+      <str name="template.base.dir">${velocity.template.base.dir:}</str>
+    </queryResponseWriter>
+  
+
+  <!-- XSLT response writer transforms the XML output by any xslt file found
+       in Solr's conf/xslt directory.  Changes to xslt files are checked for
+       every xsltCacheLifetimeSeconds.  
+    -->
+  <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
+    <int name="xsltCacheLifetimeSeconds">5</int>
+  </queryResponseWriter>
+
+  <!-- Query Parsers
+
+       http://wiki.apache.org/solr/SolrQuerySyntax
+
+       Multiple QParserPlugins can be registered by name, and then
+       used in either the "defType" param for the QueryComponent (used
+       by SearchHandler) or in LocalParams
+    -->
+  <!-- example of registering a query parser -->
+  <!--
+     <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
+    -->
+
+  <!-- Function Parsers
+
+       http://wiki.apache.org/solr/FunctionQuery
+
+       Multiple ValueSourceParsers can be registered by name, and then
+       used as function names when using the "func" QParser.
+    -->
+  <!-- example of registering a custom function parser  -->
+  <!--
+     <valueSourceParser name="myfunc" 
+                        class="com.mycompany.MyValueSourceParser" />
+    -->
+    
+  
+  <!-- Document Transformers
+       http://wiki.apache.org/solr/DocTransformers
+    -->
+  <!--
+     Could be something like:
+     <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
+       <int name="connection">jdbc://....</int>
+     </transformer>
+     
+     To add a constant value to all docs, use:
+     <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
+       <int name="value">5</int>
+     </transformer>
+     
+     If you want the user to still be able to change it with _value:something_ use this:
+     <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
+       <double name="defaultValue">5</double>
+     </transformer>
+
+      If you are using the QueryElevationComponent, you may wish to mark documents that get boosted.  The
+      EditorialMarkerFactory will do exactly that:
+     <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
+    -->
+    
+
+  <!-- Legacy config for the admin interface -->
+  <admin>
+    <defaultQuery>*:*</defaultQuery>
+  </admin>
+
+</config>
diff --git a/themes/multiflex/data/MultiflexThemeData.xml b/themes/multiflex/data/MultiflexThemeData.xml
index d85e92d..7d19555 100644
--- a/themes/multiflex/data/MultiflexThemeData.xml
+++ b/themes/multiflex/data/MultiflexThemeData.xml
@@ -1,31 +1,31 @@
-<?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>

-    <VisualTheme visualThemeId="MULTIFLEX" visualThemeSetId="ECOMMERCE" description="Alternative VisualTheme for Ecommerce"/>

-    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/ecommerce/images/blog.css" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/multiflex/style.css" sequenceId="02"/>

-    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/content/images/contentForum.css" sequenceId="04"/>

-    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/images/ofbiz_logo.gif" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://multiflex/template/Header.ftl" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://multiflex/template/Footer.ftl" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/multiflex/screenshot.jpg" sequenceId="01"/>

-</entity-engine-xml>

+<?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>
+    <VisualTheme visualThemeId="MULTIFLEX" visualThemeSetId="ECOMMERCE" description="Alternative VisualTheme for Ecommerce"/>
+    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/ecommerce/images/blog.css" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/multiflex/style.css" sequenceId="02"/>
+    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/content/images/contentForum.css" sequenceId="04"/>
+    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/images/ofbiz_logo.gif" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://multiflex/template/Header.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://multiflex/template/Footer.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="MULTIFLEX" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/multiflex/screenshot.jpg" sequenceId="01"/>
+</entity-engine-xml>
diff --git a/themes/multiflex/ofbiz-component.xml b/themes/multiflex/ofbiz-component.xml
index 5c2ae24..7664b3d 100644
--- a/themes/multiflex/ofbiz-component.xml
+++ b/themes/multiflex/ofbiz-component.xml
@@ -1,38 +1,38 @@
-<?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.

--->

-

-<ofbiz-component name="multiflex"

-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">

-    <!-- define resource loaders; most common is to use the component resource loader -->

-    <resource-loader name="main" type="component"/>

-

-    <!-- entity resources: model(s), eca(s), group, and data definitions -->

-    <entity-resource type="data" reader-name="seed" loader="main" location="data/MultiflexThemeData.xml"/>

-

-    <!-- web applications -->

-    <webapp name="multiflex"

-        title="multiflex"

-        menu-name="secondary"

-        server="default-server"

-        location="webapp/multiflex"

-        mount-point="/multiflex"

-        app-bar-display="false"/>

-</ofbiz-component>

+<?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.
+-->
+
+<ofbiz-component name="multiflex"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
+    <!-- define resource loaders; most common is to use the component resource loader -->
+    <resource-loader name="main" type="component"/>
+
+    <!-- entity resources: model(s), eca(s), group, and data definitions -->
+    <entity-resource type="data" reader-name="seed" loader="main" location="data/MultiflexThemeData.xml"/>
+
+    <!-- web applications -->
+    <webapp name="multiflex"
+        title="multiflex"
+        menu-name="secondary"
+        server="default-server"
+        location="webapp/multiflex"
+        mount-point="/multiflex"
+        app-bar-display="false"/>
+</ofbiz-component>
diff --git a/themes/multiflex/webapp/multiflex/WEB-INF/web.xml b/themes/multiflex/webapp/multiflex/WEB-INF/web.xml
index 674c747..da94a3b 100644
--- a/themes/multiflex/webapp/multiflex/WEB-INF/web.xml
+++ b/themes/multiflex/webapp/multiflex/WEB-INF/web.xml
@@ -1,39 +1,39 @@
-<?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.

--->

-

-<web-app version="3.0">

-  <display-name>Apache OFBiz - multiflex Ecommerce Visual Theme</display-name>

-  <description>multiflex Ecommerce Visual Theme</description>

-

-  <session-config>

-    <session-timeout>1</session-timeout>

-    <cookie-config>

-      <http-only>true</http-only>

-      <secure>true</secure>

-    </cookie-config>

-    <tracking-mode>COOKIE</tracking-mode>

-  </session-config>

-

-  <welcome-file-list>

-    <welcome-file>index.jsp</welcome-file>

-    <welcome-file>main.jsp</welcome-file>

-  </welcome-file-list>

-

-</web-app>

+<?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.
+-->
+
+<web-app version="3.0">
+  <display-name>Apache OFBiz - multiflex Ecommerce Visual Theme</display-name>
+  <description>multiflex Ecommerce Visual Theme</description>
+
+  <session-config>
+    <session-timeout>1</session-timeout>
+    <cookie-config>
+      <http-only>true</http-only>
+      <secure>true</secure>
+    </cookie-config>
+    <tracking-mode>COOKIE</tracking-mode>
+  </session-config>
+
+  <welcome-file-list>
+    <welcome-file>index.jsp</welcome-file>
+    <welcome-file>main.jsp</welcome-file>
+  </welcome-file-list>
+
+</web-app>
diff --git a/themes/tomahawk/data/TomahawkThemeData.xml b/themes/tomahawk/data/TomahawkThemeData.xml
index 8ec4428..2f2812c 100644
--- a/themes/tomahawk/data/TomahawkThemeData.xml
+++ b/themes/tomahawk/data/TomahawkThemeData.xml
@@ -1,67 +1,67 @@
-<?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>

-    <VisualTheme visualThemeId="TOMAHAWK" visualThemeSetId="BACKOFFICE" description="Tomahawk: the evolution of the BlueLight theme"/>

-    

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_NAME" resourceValue="TOMAHAWK" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/images/ofbiz_logo.gif" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/tomahawk/screenshot.jpg" sequenceId="01"/>

-    

-    <!-- css references -->

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/tomahawk/css/style.css" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HELPSTYLESHEET" resourceValue="/tomahawk/css/help.css" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_DOCBOOKSTYLESHEET" resourceValue="/tomahawk/webapp/tomahawk/css/docbook.css" sequenceId="01"/>

-    

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" sequenceId="02"/>

-    

-    <!-- javascript references -->

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/jquery-1.11.0.min.js" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/jquery-migrate-1.2.1.js" sequenceId="02"/>

-    

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/ui/js/jquery-ui-1.10.3.min.js" sequenceId="03"/>

-    

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.js" sequenceId="05"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon.min-1.4.3.js" sequenceId="07"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/fjTimer/jquerytimer-min.js" sequenceId="09"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/jquery.maskedinput-1.3.1.min.js" sequenceId="10"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/jeditable/jquery.jeditable.js" sequenceId="11"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/validate/jquery.validate.min.js" sequenceId="12"/>

-    

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/OpenLayers-2.13.1.js" sequenceId="13"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/OfbizUtil.js" sequenceId="15"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/fieldlookup.js" sequenceId="16"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/date/date.format-1.2.3-min.js" sequenceId="17"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/date/date.timezone-min.js" sequenceId="18"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/miscAjaxFunctions.js" sequenceId="19"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/selectMultipleRelatedValues.js" sequenceId="20"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/util.js" sequenceId="21"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/date/FromThruDateCheck.js" sequenceId="22"/>

-    

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/tomahawk/js/dropdown.js" sequenceId="30"/>

-    

-    <!-- ftl references -->

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://tomahawk/template/Header.ftl" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://tomahawk/template/Footer.ftl" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_NAV_OPEN_TMPLT" resourceValue="component://tomahawk/template/AppBarOpen.ftl" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_NAV_CLOSE_TMPLT" resourceValue="component://tomahawk/template/AppBarClose.ftl" sequenceId="01"/>

-    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_MSG_TMPLT_LOC" resourceValue="component://common/template/includes/Messages.ftl" sequenceId="01"/>

-</entity-engine-xml>

+<?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>
+    <VisualTheme visualThemeId="TOMAHAWK" visualThemeSetId="BACKOFFICE" description="Tomahawk: the evolution of the BlueLight theme"/>
+    
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_NAME" resourceValue="TOMAHAWK" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/images/ofbiz_logo.gif" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/tomahawk/screenshot.jpg" sequenceId="01"/>
+    
+    <!-- css references -->
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/tomahawk/css/style.css" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HELPSTYLESHEET" resourceValue="/tomahawk/css/help.css" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_DOCBOOKSTYLESHEET" resourceValue="/tomahawk/webapp/tomahawk/css/docbook.css" sequenceId="01"/>
+    
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" sequenceId="02"/>
+    
+    <!-- javascript references -->
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/jquery-1.11.0.min.js" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/jquery-migrate-1.2.1.js" sequenceId="02"/>
+    
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/ui/js/jquery-ui-1.10.3.min.js" sequenceId="03"/>
+    
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.js" sequenceId="05"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon.min-1.4.3.js" sequenceId="07"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/fjTimer/jquerytimer-min.js" sequenceId="09"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/jquery.maskedinput-1.3.1.min.js" sequenceId="10"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/jeditable/jquery.jeditable.js" sequenceId="11"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/jquery/plugins/validate/jquery.validate.min.js" sequenceId="12"/>
+    
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/OpenLayers-2.13.1.js" sequenceId="13"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/OfbizUtil.js" sequenceId="15"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/fieldlookup.js" sequenceId="16"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/date/date.format-1.2.3-min.js" sequenceId="17"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/date/date.timezone-min.js" sequenceId="18"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/miscAjaxFunctions.js" sequenceId="19"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/selectMultipleRelatedValues.js" sequenceId="20"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/util.js" sequenceId="21"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/date/FromThruDateCheck.js" sequenceId="22"/>
+    
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/tomahawk/js/dropdown.js" sequenceId="30"/>
+    
+    <!-- ftl references -->
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://tomahawk/template/Header.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://tomahawk/template/Footer.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_NAV_OPEN_TMPLT" resourceValue="component://tomahawk/template/AppBarOpen.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_NAV_CLOSE_TMPLT" resourceValue="component://tomahawk/template/AppBarClose.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="TOMAHAWK" resourceTypeEnumId="VT_MSG_TMPLT_LOC" resourceValue="component://common/template/includes/Messages.ftl" sequenceId="01"/>
+</entity-engine-xml>