You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2011/11/07 04:27:58 UTC

svn commit: r1198611 - in /ofbiz/trunk/applications/content: script/org/ofbiz/content/content/ContentServices.xml script/org/ofbiz/content/website/WebSiteServices.xml servicedef/services_content.xml

Author: hansbak
Date: Mon Nov  7 03:27:58 2011
New Revision: 1198611

URL: http://svn.apache.org/viewvc?rev=1198611&view=rev
Log:
allow html=safe in comments and descriptions

Modified:
    ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
    ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml
    ofbiz/trunk/applications/content/servicedef/services_content.xml

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=1198611&r1=1198610&r2=1198611&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Mon Nov  7 03:27:58 2011
@@ -1430,7 +1430,7 @@
         </iterate>
         
         <iterate entry="productCategoryList" list="parameters.productCategories">
-            <!-- Create Content Alternative URLs for Product Category -->
+            <!-- Create Content Alternative URLs for Product Category Content -->
             <entity-condition list="productCategoryContentAndInfoList" entity-name="ProductCategoryContentAndInfo" filter-by-date="true" use-cache="true">
                 <condition-list combine="and">
                     <condition-expr field-name="productCategoryId" from-field="productCategoryList.productCategoryId"/>
@@ -1459,7 +1459,7 @@
                 </if-compare>
             </iterate>
             
-            <!-- Create Content Alternative URLs for Product -->
+            <!-- Create Content Alternative URLs for Product Content -->
             <entity-condition list="productCategoryMemberList" entity-name="ProductCategoryMember" filter-by-date="true" use-cache="true">
                 <condition-list combine="and">
                     <condition-expr field-name="productCategoryId" from-field="productCategoryList.productCategoryId"/>
@@ -1497,6 +1497,45 @@
                 </iterate>
             </iterate>
         </iterate>
+        
+        <!-- Create Content Alternative URLs for Website Content (webSiteContentTypeId=BLOG_ROOT) -->
+        <entity-and list="webSiteContents" entity-name="WebSiteContent" filter-by-date="true">
+            <field-map field-name="webSiteId" from-field="parameters.webSiteId"/>
+            <field-map field-name="webSiteContentTypeId" value="BLOG_ROOT"/>
+        </entity-and>
+        <first-from-list entry="webSiteContent" list="webSiteContents"/>
+        <if-not-empty field="webSiteContent">
+            <entity-and list="blogContents" entity-name="ContentAssoc" filter-by-date="true">
+                <field-map field-name="contentId" from-field="webSiteContent.contentId"/>
+                <field-map field-name="contentAssocTypeId" value="SUB_CONTENT"/>
+            </entity-and>
+            <iterate entry="blogContent" list="blogContents">
+                <entity-and list="contentAssocs" entity-name="ContentAssoc" filter-by-date="true">
+                    <field-map field-name="contentId" from-field="blogContent.contentIdTo"/>
+                    <field-map field-name="contentAssocTypeId" value="PUBLISH_LINK"/>
+                </entity-and>
+                <iterate entry="contentAssoc" list="contentAssocs">
+                    <set field="createMissingContentAltUrlsMap.contentId" from-field="contentAssoc.contentIdTo"/>
+                    <call-service service-name="createContentAlternativeUrl" in-map-name="createMissingContentAltUrlsMap">
+                        <result-to-field result-name="contentCreated" field="contentCreated"/>
+                    </call-service>
+                    <if-compare operator="equals" value="Y" field="contentCreated">
+                        <calculate field="contentsUpdated" type="Integer">
+                            <calcop operator="add" field="contentsUpdated">
+                                <number value="1"/>
+                            </calcop>
+                        </calculate>
+                    </if-compare>
+                    <if-compare operator="equals" value="N" field="contentCreated">
+                        <calculate field="contentsNotUpdated" type="Integer">
+                            <calcop operator="add" field="contentsNotUpdated">
+                                <number value="1"/>
+                            </calcop>
+                        </calculate>
+                    </if-compare>
+                </iterate>
+            </iterate>
+        </if-not-empty>
         <field-to-result field="contentsNotUpdated" result-name="contentsNotUpdated"/>
         <field-to-result field="contentsUpdated" result-name="contentsUpdated"/>
     </simple-method>

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml?rev=1198611&r1=1198610&r2=1198611&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml Mon Nov  7 03:27:58 2011
@@ -248,6 +248,7 @@ under the License.
                         </calculate>
                     </if-compare>
                     <if-compare operator="equals" value="content" field="typeGenerate">
+                        <set field="createMissingContentAltUrlsMap.webSiteId" from-field="parameters.webSiteId"/>
                         <set field="createMissingContentAltUrlsMap.prodCatalogId" from-field="productStoreCatalog.prodCatalogId"/>
                         <call-service service-name="createMissingContentAltUrls" in-map-name="createMissingContentAltUrlsMap">
                             <result-to-field result-name="contentsNotUpdated" field="contentsNotUpdated"/>
@@ -305,6 +306,7 @@ under the License.
                     </calculate>
                 </if-compare>
                 <if-compare operator="equals" value="content" field="typeGenerate">
+                    <set field="createMissingContentAltUrlsMap.webSiteId" from-field="parameters.webSiteId"/>
                     <set field="createMissingContentAltUrlsMap.prodCatalogId" from-field="parameters.prodCatalogId"/>
                     <call-service service-name="createMissingContentAltUrls" in-map-name="createMissingContentAltUrlsMap">
                         <result-to-field result-name="contentsNotUpdated" field="contentsNotUpdated"/>

Modified: ofbiz/trunk/applications/content/servicedef/services_content.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_content.xml?rev=1198611&r1=1198610&r2=1198611&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_content.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_content.xml Mon Nov  7 03:27:58 2011
@@ -341,6 +341,7 @@
                 location="component://content/script/org/ofbiz/content/content/ContentServices.xml" invoke="createMissingContentAltUrls" auth="true" use-transaction="false">
         <description>Create missing Content Alternative URLs</description>
         <attribute name="prodCatalogId" mode="IN" type="String" optional="false"/>
+        <attribute name="webSiteId" mode="IN" type="String" optional="true"/>
         <attribute name="contentsNotUpdated" mode="OUT" type="Integer" optional="true"/>
         <attribute name="contentsUpdated" mode="OUT" type="Integer" optional="true"/>
     </service>