Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/WEB-INF/web.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/WEB-INF/web.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/WEB-INF/web.xml Wed Aug 3 16:12:58 2011 @@ -25,11 +25,6 @@ under the License. <description>Accounting Manager Module of the Open For Business Project</description> <context-param> - <param-name>webSiteId</param-name> - <param-value>ACCOUNTING</param-value> - <description>A unique ID used to look up the WebSite entity</description> - </context-param> - <context-param> <param-name>entityDelegatorName</param-name> <param-value>default</param-value> <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description> Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/WEB-INF/controller.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/WEB-INF/controller.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/WEB-INF/controller.xml Wed Aug 3 16:12:58 2011 @@ -48,11 +48,6 @@ under the License. <response name="success" type="request" value="PaymentGroupOverview"/> <response name="error" type="view" value="FindPurchaseInvoices"/> </request-map> - <request-map uri="processCommissionRun"> - <security https="true" auth="true"/> - <event type="service" invoke="createCommissionInvoices"/> - <response name="success" type="view" value="CommissionRun"/> - </request-map> <request-map uri="findInvoices"> <security https="true" auth="true"/> <response name="success" type="view" value="FindApInvoices"/> Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/WEB-INF/web.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/WEB-INF/web.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/WEB-INF/web.xml Wed Aug 3 16:12:58 2011 @@ -21,11 +21,6 @@ under the License. <description>Accounting Payable Module of the Open For Business Project</description> <context-param> - <param-name>webSiteId</param-name> - <param-value>ACCOUNTING_P</param-value> - <description>A unique ID used to look up the WebSite entity</description> - </context-param> - <context-param> <param-name>entityDelegatorName</param-name> <param-value>default</param-value> <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description> Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl (original) +++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl Wed Aug 3 16:12:58 2011 @@ -65,10 +65,11 @@ function enableSubmitButton() { } else { jQuery('#checkAllInvoices').attr('checked', false); } - if (!isSingle && jQuery('#serviceName').val() != "") - jQuery('#submitButton').attr('disabled', ''); - else + if (!isSingle && jQuery('#serviceName').val() != "") { + jQuery('#submitButton').removeAttr("disabled"); + } else { jQuery('#submitButton').attr('disabled', 'disabled'); + } } --> Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/WEB-INF/web.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/WEB-INF/web.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/WEB-INF/web.xml Wed Aug 3 16:12:58 2011 @@ -25,11 +25,6 @@ under the License. <description>Accounting Receivable Module of the Open For Business Project</description> <context-param> - <param-name>webSiteId</param-name> - <param-value>ACCOUNTING_R</param-value> - <description>A unique ID used to look up the WebSite entity</description> - </context-param> - <context-param> <param-name>entityDelegatorName</param-name> <param-value>default</param-value> <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description> Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/widget/InvoiceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/widget/InvoiceForms.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/accounting/widget/InvoiceForms.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/accounting/widget/InvoiceForms.xml Wed Aug 3 16:12:58 2011 @@ -139,8 +139,7 @@ under the License. <field name="currencyUomId"><hidden/></field> </form> - <form name="invoiceItems" list-name="invoiceItems" target="" title="" type="list" separate-columns="true" paginate-target="invoiceOverview" - odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> +<form name="invoiceItems" list-name="invoiceItems" target="" title="" type="list" separate-columns="true" paginate-target="invoiceOverview" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <row-actions> <set field="total" value="${bsh: import java.math.BigDecimal; @@ -347,7 +346,7 @@ under the License. </field> </form> - <form name="EditInvoiceItems" type="list" list-name="invoiceItems" default-entity-name="InvoiceItem" target="updateInvoiceItem" title="Edit Invoice Items" paginate-target="listInvoiceItems" + <form name="EditInvoiceItems" type="multi" list-name="invoiceItems" default-entity-name="InvoiceItem" target="updateInvoiceItem?invoiceId=${invoiceId}&viewSize=${viewSize}&viewIndex=${viewIndex}" title="Edit Invoice Items" paginate-target="listInvoiceItems" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <row-actions> <set field="total" value="${bsh: Modified: ofbiz/branches/jackrabbit20100709/applications/commonext/webapp/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/commonext/webapp/WEB-INF/controller.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/commonext/webapp/WEB-INF/controller.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/commonext/webapp/WEB-INF/controller.xml Wed Aug 3 16:12:58 2011 @@ -35,4 +35,10 @@ under the License. <response name="success" type="view-last"/> </request-map> + <request-map uri="stream"> + <event type="java" path="org.ofbiz.content.data.DataEvents" invoke="serveObjectData"/> + <response name="success" type="none"/> + <response name="error" type="view" value="error"/> + </request-map> + </site-conf> Modified: ofbiz/branches/jackrabbit20100709/applications/content/config/ContentErrorUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/config/ContentErrorUiLabels.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/config/ContentErrorUiLabels.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/config/ContentErrorUiLabels.xml Wed Aug 3 16:12:58 2011 @@ -19,6 +19,27 @@ under the License. --> <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <property key="contentevents.error_getting_content_list"> + <value xml:lang="en">Error getting the content list to index: ${gee}.</value> + </property> + <property key="contentevents.keyword_creation_complete_for_contents"> + <value xml:lang="en">Keyword creation complete for ${numConts} contents.</value> + </property> + <property key="contentevents.keyword_creation_complete_for_contents_with_errors"> + <value xml:lang="en">Keyword creation complete for ${numConts} contents, with errors in ${errConts} contents (see the log for more details).</value> + </property> + <property key="contentevents.not_sufficient_permissions"> + <value xml:lang="de">Sie haben nicht genügend Berechtigungen um ${updateMode} CONTENTMGR (CONTENTMGR_${updateMode} oder CONTENTMGR_ADMIN benötigt).</value> + <value xml:lang="en">You do not have sufficient permissions to ${updateMode} CONTENTMGR (CONTENTMGR_${updateMode} or CONTENTMGR_ADMIN needed).</value> + <value xml:lang="es">No tiene suficientes permisos para ${updateMode} se necesitan permisos de CONTENTMGR (CONTENTMGR_${updateMode} o CONTENTMGR_ADMIN).</value> + <value xml:lang="fr">Vous n'avez pas les autorisations suffisantes pour ${updatemode} le CONTENTMGR (CONTENTMGR_${updateMode} ou CONTENTMGR_ADMIN requis).</value> + <value xml:lang="it">Non hai permessi sufficienti per ${updateMode} CONTENTMGR (permesso CONTENTMGR_${updateMode} o CONTENTMGR_ADMIN necessario).</value> + <value xml:lang="ro">Nu aidestule permise pentru ${updateMode} CONTENTMGR (este necesar permisul CONTENTMGR_${updateMode} sau CONTENTMGR_ADMIN).</value> + <value xml:lang="ru">У Ð²Ð°Ñ Ð½ÐµÑ Ð´Ð¾ÑÑаÑоÑнÑÑ Ð¿Ñав Ð´Ð»Ñ ${updateMode} CONTENTMGR (Ð½ÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ñ Ð¿Ñава CONTENTMGR_${updateMode} или CONTENTMGR_ADMIN).</value> + <value xml:lang="th">à¸à¸¸à¸à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¸à¸à¸¸à¸à¸²à¸à¹à¸à¸µà¸¢à¸à¸à¸à¸à¸¶à¸ ${updateMode} CONTENTMGR (CONTENTMGR_${updateMode} หรืภCONTENTMGR_ADMIN à¸à¹à¸à¸à¸à¸²à¸£).</value> + <value xml:lang="zh">ä½ æ²¡æ足å¤çæé ${updateMode} ç®å½ (éè¦CONTENTMGR_${updateMode} æ CONTENTMGR_ADMIN)ã</value> + <value xml:lang="zh_TW">ä½ æ²æè¶³å¤ çæ¬é ${updateMode} ç®é (éè¦CONTENTMGR_${updateMode} æ CONTENTMGR_ADMIN)ã</value> + </property> <property key="dataEvents.error_call_create_service"> <value xml:lang="da">Fejl ved kald af service createDataResource</value> <value xml:lang="de">Fehler beim Aufruf createDataResource Service</value> Modified: ofbiz/branches/jackrabbit20100709/applications/content/config/ContentUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/config/ContentUiLabels.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/config/ContentUiLabels.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/config/ContentUiLabels.xml Wed Aug 3 16:12:58 2011 @@ -27,6 +27,10 @@ <value xml:lang="zh">ç»å¯¹å°åæ件</value> <value xml:lang="zh_TW">çµå°ä½åæ件</value> </property> + <property key="ContentAutoCreateKeywords"> + <value xml:lang="en">Auto Create Keywords</value> + <value xml:lang="fr">Création automatique des mots clés</value> + </property> <property key="ContentAnswer"> <value xml:lang="ar">اÙجÙاب</value> <value xml:lang="da">Svar</value> @@ -57,6 +61,7 @@ </property> <property key="ContentAnyAssocType"> <value xml:lang="en">Any Assoc Type</value> + <value xml:lang="FR">Tous types d'asso</value> </property> <property key="ContentAssoc"> <value xml:lang="ar">ارتباط اÙÙ ØتÙÙ</value> @@ -74,18 +79,22 @@ </property> <property key="ContentAssocDeactivatingError"> <value xml:lang="en">Error in deactivating ContentAssoc. Entity is null.</value> + <value xml:lang="fr">Erreur dans la désactivation de l'association. Entité inexistante.</value> <value xml:lang="it">Errore nella disattivazione dell'entità ContentAssoc che è nulla.</value> </property> <property key="ContentAssocNotFound"> <value xml:lang="en">No association found for contentId ${activeContentId} and contentIdTo ${contentIdTo} and contentAssocTypeId ${contentAssocTypeId} and fromDate ${fromDate}</value> + <value xml:lang="fr">Pas d'association trouvée pour le document référencé ${activeContentId} et le document associé référencé ${contentIdTo} sous le type d'association ${contentAssocTypeId} et pour la date ${fromDate}</value> <value xml:lang="it">Nessuna associazione trovata per il contenuto ${activeContentId} e il contenuto a ${contentIdTo} e il tipo associazione contenuto ${contentAssocTypeId} e dalla data ${fromDate}</value> </property> <property key="ContentAssocRetrievingError"> <value xml:lang="en">Error in retrieving Content: ${errorString}</value> + <value xml:lang="fr">Erreur dans la recherche de document : ${errorString}</value> <value xml:lang="it">Errore nel ricavare ContentAsssoc entity: ${errorString}</value> </property> <property key="ContentAssocUpdateError"> <value xml:lang="en">Error in updating ContentAssoc. Entity is null.</value> + <value xml:lang="en">Erreur dans la mise à jour de l'association. Entité inexistante.</value> <value xml:lang="it">Errore nell'aggiornamento dell'entità ContentAssoc che è nulla.</value> </property> <property key="ContentAssociation"> @@ -104,10 +113,12 @@ </property> <property key="ContentArticleName"> <value xml:lang="en">Article Name</value> + <value xml:lang="fr">Nom de l'article</value> <value xml:lang="th">à¸à¸·à¹à¸à¸à¸à¸à¸§à¸²à¸¡</value> </property> <property key="ContentArticleNameIsMissing"> <value xml:lang="en">Article Name is missing.</value> + <value xml:lang="fr">Le nom de l'article est manquant.</value> <value xml:lang="it">Nome articolo è mancante.</value> </property> <property key="ContentAttribute"> @@ -147,7 +158,7 @@ <value xml:lang="en">Article</value> <value xml:lang="fr">Article</value> <value xml:lang="it">Articolo</value> - <value xml:lang="nl">Artikel</value> + <value xml:lang="nl">Artikel</value> <value xml:lang="pt_BR">Artigo</value> <value xml:lang="zh">æç« </value> <value xml:lang="zh_TW">æç« </value> @@ -175,7 +186,7 @@ <value xml:lang="en">Blog entry Id</value> <value xml:lang="fr">Réf. de note de blog</value> <value xml:lang="it">Voce blog</value> - <value xml:lang="nl">Blog ingave ID</value> + <value xml:lang="nl">Blog ingave ID</value> <value xml:lang="pt_BR">ID de entrada de blog</value> <value xml:lang="zh">å客记å½æ è¯</value> <value xml:lang="zh_TW">é¨è½æ ¼æç« ID</value> @@ -245,10 +256,12 @@ </property> <property key="ContentCannotFindContextFileWithEmptyContextRoot"> <value xml:lang="en">Cannot find CONTEXT_FILE with an empty context root!</value> + <value xml:lang="fr">Impossible de trouver CONTEXT_FILE avec un contexte racine vide !</value> <value xml:lang="it">Non è possibile trovare il CONTEXT_FILE con un contesto principale vuoto!</value> </property> <property key="ContentCannotProcessBothCharacterAndBinaryFile"> <value xml:lang="en">Cannot process both character and binary data in the same file</value> + <value xml:lang="fr">Impossible de procéder avec la présence de données binaires et textuelles dans le même fichier</value> <value xml:lang="it">Non è possibile processare i dati di entrambi i file binari e carattere</value> </property> <property key="ContentCMS"> @@ -333,6 +346,7 @@ </property> <property key="ContentClearAssociatedRenderCacheError"> <value xml:lang="en">Unable to clear associated render cache with dataResourceId ${dataResourceId}</value> + <value xml:lang="fr">Impossible de nettoyer la mémoire cache pour la ressource référencée ${dataResourceId}</value> <value xml:lang="it">Non è possibile pulire la cache associata alla risorsa dati ${dataResourceId}</value> </property> <property key="ContentClip"> @@ -484,6 +498,7 @@ </property> <property key="ContentCompDocInstanceAlreadyExists"> <value xml:lang="en">Instance compdoc Content for ${parameters.rootInstanceContentId} already exists</value> + <value xml:lang="fr">L'instance de composition de document pour ${parameters.rootInstanceContentId} existe déjà </value> <value xml:lang="it">Istanza composizione documenti contenuto per ${parameters.rootInstanceContentId} esiste già </value> </property> <property key="ContentCompDocParentContentId"> @@ -635,14 +650,17 @@ </property> <property key="ContentContentCreatingError"> <value xml:lang="en">Error creating content in ${serviceName}</value> + <value xml:lang="fr">Erreur de création du document dans le service ${serviceName}</value> <value xml:lang="it">Errore durante la creazione del contenuto in ${serviceName}</value> </property> <property key="ContentContentNoAccessToUploadImage"> <value xml:lang="en">no access to upload image</value> + <value xml:lang="fr">Pas d'accès pour charger l'image</value> <value xml:lang="it">nessun accesso per caricare l'immagine</value> </property> <property key="ContentContentUpdatingError"> <value xml:lang="en">Error updating content in ${serviceName}</value> + <value xml:lang="fr">Erreur lors de la mise à jour du document ${serviceName}</value> <value xml:lang="it">Errore durante l'aggiornamento del contenuto in ${serviceName}</value> </property> <property key="ContentContentManager"> @@ -689,10 +707,12 @@ </property> <property key="ContentContentToOrFromIsNull"> <value xml:lang="en">contentTo ${contentTo}/From ${contentFrom} is null.</value> + <value xml:lang="fr">Document vers ${contentTo}/Depuis ${contentFrom} est inexistant.</value> <value xml:lang="it">Contenuto a ${contentTo}/da ${contentFrom} è nullo.</value> </property> <property key="ContentContentToOrFromErrorRetriving"> <value xml:lang="en">Error in retrieving content To or From.</value> + <value xml:lang="en">Erreur dans la récupération du document de destination ou d'origine.</value> <value xml:lang="it">Errore nel ricavare il contenuto a o da.</value> </property> <property key="ContentContentsAssociatedToDataResource"> @@ -707,22 +727,27 @@ </property> <property key="ContentContentIdOrUploadFileIsMissing"> <value xml:lang="en">Content Id or Upload file is missing.</value> + <value xml:lang="fr">La référence du document ou le fichier à charger est manquant.</value> <value xml:lang="it">Id contenuto o file da caricare è mancante.</value> </property> <property key="ContentConvertingDocumentError"> <value xml:lang="en">Error converting document: ${errorString}</value> + <value xml:lang="fr">Erreur dans la conversion du document : ${errorString}</value> <value xml:lang="it">Errore durante la conversione del documento: ${errorString}</value> </property> <property key="ContentConvertingDocumentByteBuffer"> <value xml:lang="en">Error converting document byte buffer: </value> + <value xml:lang="fr">Erreur dans la conversion de document sur les tampons de donnée : </value> <value xml:lang="it">Errore durante la conversione del documento in byte buffer: </value> </property> <property key="ContentCreateContentAssocMethodError"> <value xml:lang="en">Not 2 out of ContentId/To/From</value> + <value xml:lang="fr">Not 2 out of ContentId/To/From</value> <value xml:lang="it">Necessari 2 dei tre parametri ContentId/To/From necessari</value> </property> <property key="ContentCreateDateInvalidFormat"> <value xml:lang="en">Created Date is not a valid Timestamp input format.</value> + <value xml:lang="fr">La date de création n'est pas dans un format valide.</value> <value xml:lang="it">Data creazione non è nel formato valido.</value> </property> <property key="ContentCreateFile"> @@ -836,10 +861,12 @@ </property> <property key="ContentDataResourceIsNull"> <value xml:lang="en">dataResourceId is null.</value> + <value xml:lang="fr">La référence de ressource est non présente.</value> <value xml:lang="it">dataResourceId è nullo.</value> </property> <property key="ContentDataResourceNotFound"> <value xml:lang="en">No data resource found for ID: ${parameters.dataResourceId}</value> + <value xml:lang="fr">Pas de donnée trouvée pour la ressource sous la référence : ${parameters.dataResourceId}</value> <value xml:lang="it">Nessuna risorsa dati trovata con ID: ${parameters.dataResourceId}</value> </property> <property key="ContentDataResourceProductFeatures"> @@ -918,6 +945,7 @@ </property> <property key="ContentDataTypeNotYetSupported"> <value xml:lang="en">Data type ${dataResourceTypeId} is not yet supported!</value> + <value xml:lang="fr">Le type de donnée ${dataResourceTypeId} n'est pas supporté !</value> <value xml:lang="it">Tipo dati ${dataResourceTypeId} non è ancora supportato!</value> </property> <property key="ContentDecorator"> @@ -977,14 +1005,17 @@ </property> <property key="ContentElectronicTextNotFound"> <value xml:lang="en">Electronic Text not found.</value> + <value xml:lang="fr">Le texte n'a pas été trouvé.</value> <value xml:lang="it">Electronic Text non trovato.</value> </property> <property key="ContenCommEventContentAssocNotFoundForUpdate"> <value xml:lang="en">CommEventContentAssoc entity not found for update, communicationEventId: ${parameters.communicationEventId} and contentId: ${parameters.contentId}</value> + <value xml:lang="fr">L'association avec la communication ${parameters.communicationEventId} et le document ${parameters.contentId} pour la mise à jour n'a pas été trouvée</value> <value xml:lang="it">Entità CommEventContentAssoc non trovata da aggiornare, communicationEventId: ${parameters.communicationEventId} e contentId: ${parameters.contentId}</value> </property> <property key="ContenCommEventContentAssocNotFoundForDelete"> - <value xml:lang="en">CommEventContentAssoc entity not found for update, communicationEventId: ${parameters.communicationEventId} and contentId: ${parameters.contentId}</value> + <value xml:lang="en">CommEventContentAssoc entity not found for delete, communicationEventId: ${parameters.communicationEventId} and contentId: ${parameters.contentId}</value> + <value xml:lang="fr">L'association avec la communication ${parameters.communicationEventId} et le document ${parameters.contentId} pour la suppression n'a pas été trouvée</value> <value xml:lang="it">Entità CommEventContentAssoc non trovata da cancellare, communicationEventId: ${parameters.communicationEventId} e contentId: ${parameters.contentId}</value> </property> <property key="ContentFile"> @@ -1151,7 +1182,7 @@ <value xml:lang="en">Messages</value> <value xml:lang="fr">Messages</value> <value xml:lang="it">Messaggi</value> - <value xml:lang="nl">Berichten</value> + <value xml:lang="nl">Berichten</value> <value xml:lang="th">à¸à¹à¸à¸à¸§à¸²à¸¡</value> <value xml:lang="zh">æ¶æ¯</value> <value xml:lang="zh_TW">æ¶æ¯</value> @@ -1176,10 +1207,12 @@ </property> <property key="ContentFromDateInvalidFormat"> <value xml:lang="en">fromDate not a valid date format</value> + <value xml:lang="fr">La date de début n'est pas dans un format valide</value> <value xml:lang="it">Data dal non è nel formato valido.</value> </property> <property key="ContentCannotGenerateBlogRssFeed"> <value xml:lang="en">Not able to generate RSS feed for content: ${contentId}</value> + <value xml:lang="fr">Impossible de générer le flux RSS pour le document : ${contentId}</value> <value xml:lang="it">Non è possibile generare il feed RSS per il contenuto: ${contentId}</value> </property> <property key="ContentGIF"> @@ -1258,6 +1291,7 @@ </property> <property key="ContentIncludeAllSubContents"> <value xml:lang="en">Include all Sub-Contents</value> + <value xml:lang="fr">Inclure tous les sous doucments</value> </property> <property key="ContentIndex"> <value xml:lang="ar">اÙدÙÙÙ</value> @@ -1299,6 +1333,7 @@ </property> <property key="ContentIndexingTreeError"> <value xml:lang="en">Error indexing tree: ${errorString}</value> + <value xml:lang="fr">Erreur dans l'indexation de l'arbre : ${errorString}</value> <value xml:lang="it">Errore di indicizzazione albero: ${errorString}</value> </property> <property key="ContentJPEG"> @@ -1374,10 +1409,12 @@ </property> <property key="ContentLastModifiedDateInvalidFormat"> <value xml:lang="en">Last Modified Date is not a valid Timestamp input format.</value> + <value xml:lang="fr">La date de dernière modification n'est pas dans un format valide.</value> <value xml:lang="it">Data modifica non è nel formato valido.</value> </property> <property key="ContentLastUpdatedDateFilter"> <value xml:lang="en">Last Updated Date Filter</value> + <value xml:lang="fr">Dernière mise à jour du filtre de donnée</value> </property> <property key="ContentLatest"> <value xml:lang="da">Senest</value> @@ -1410,6 +1447,7 @@ </property> <property key="ContentLocalFileDoesNotPointToAbsoluteLocation"> <value xml:lang="en">DataResource LOCAL_FILE does not point to an absolute location</value> + <value xml:lang="fr">La ressource LOCAL_FILE ne doit pas indiquer un emplacement absolu</value> <value xml:lang="it">La risorda dati LOCAL_FILE non punta ad una posizione assoluta</value> </property> <property key="ContentMSWord"> @@ -1510,6 +1548,7 @@ </property> <property key="ContentNeitherContentSupplied"> <value xml:lang="en">Neither content nor contentId supplied.</value> + <value xml:lang="fr">Ni le document ni sa référence ne sont fournis.</value> <value xml:lang="it">Nessuno contenuto specificato.</value> </property> <property key="ContentNewContentInFolder"> @@ -1651,18 +1690,22 @@ </property> <property key="ContentPermissionNotGranted"> <value xml:lang="en">Permission not granted.</value> + <value xml:lang="fr">Permission non accordée.</value> <value xml:lang="it">Permesso non abilitato.</value> </property> <property key="ContentPrinterNotAvailable"> <value xml:lang="en">No printer available</value> + <value xml:lang="fr">Pas d'imprimante disponible</value> <value xml:lang="it">Nessuna stampante disponibile</value> </property> <property key="ContentPrinterNotFound"> <value xml:lang="en">No printer found with name: ${printerName}</value> + <value xml:lang="fr">Pas d'imprimante disponible sous le nom ${printerName}</value> <value xml:lang="it">Nessuna stampante trovate con il nome: ${printerName}</value> </property> <property key="ContentPrinterNotSupportDocFlavorFormat"> <value xml:lang="en">DocFlavor ${psInFormat} not supported by printer: ${printerName}</value> + <value xml:lang="fr">DocFlavor ${psInFormat} n'est pas supporté par l'imprimante ${printerName}</value> <value xml:lang="it">Il formato Doc Flavor ${psInFormat} non è supportato dalla stampante: ${printerName}</value> </property> <property key="ContentPlainText"> @@ -1695,6 +1738,7 @@ </property> <property key="ContentQuestionTypeRequiredField"> <value xml:lang="en">Question type ${questionType} requires ${requiredField} to be set</value> + <value xml:lang="fr">Le type de question ${questionType} requiert le champ ${requiredField} pour être défini</value> <value xml:lang="it">Tipo domanda ${questionType} richiede ${requiredField} di essere impostato</value> </property> <property key="ContentQuickSubContent"> @@ -1727,10 +1771,12 @@ </property> <property key="ContentRenderingError"> <value xml:lang="en">Error rendering ${contentType}: ${errorString}</value> + <value xml:lang="fr">Erreur lors du rendu pour ${contentType} : ${errorString}</value> <value xml:lang="it">Errore di rendering ${contentType}: ${errorString}</value> </property> <property key="ContentRequiredField"> <value xml:lang="en">Required field ${requiredField} is missing in simple method call ${resourceDescription}</value> + <value xml:lang="fr">Le champ requis ${requiredField} est manquant dans l'appel d'une méthode simple : ${resourceDescription}</value> <value xml:lang="it">Campo ${requiredField} è richiesto ed è mancante nella chiamata a ${resourceDescription}</value> </property> <property key="ContentResourceAudio"> @@ -1813,6 +1859,7 @@ </property> <property key="ContentSearchContents"> <value xml:lang="en">Search Contents</value> + <value xml:lang="fr">Recherche de documents</value> </property> <property key="ContentSecurityCreatePermission"> <value xml:lang="en">Security Error: to run ${resourceDescription} you must have the CONTENTMGR_CREATE or CONTENTMGR_ADMIN permission</value> @@ -1834,8 +1881,12 @@ <value xml:lang="zh">æåå°æç»</value> <value xml:lang="zh_TW">æåå°æçµ</value> </property> + <property key="ContentSEO"> + <value xml:lang="en">SEO</value> + </property> <property key="ContentStatusUpdateError"> <value xml:lang="en">Problem updating content Status: ${errorString}</value> + <value xml:lang="en">Problème lors de la mise à jour du statut du document : ${errorString}</value> <value xml:lang="it">Problema durante l'aggiornamento dello stato del contenuto: ${errorString}</value> </property> <property key="ContentSubContent"> @@ -1880,14 +1931,17 @@ </property> <property key="ContentSurveyAlreadyResponded"> <value xml:lang="en">You have already responded to this survey; multiple responses are not allowed</value> + <value xml:lang="fr">Vous avez déjà répondu au questionnaire. De multiples réponses ne sont pas autorisées</value> <value xml:lang="it">Tu hai già risposto a questo sondaggio; risposte multiple non sono consentite</value> </property> <property key="ContentSurveyAnonymousResponse"> <value xml:lang="en">Anonymous response to this survey is not allowed (you must be logged in)</value> + <value xml:lang="fr">Les réponses anonymes ne sont pas autorisées pour ce questionnaire (Vous devez être connecté)</value> <value xml:lang="it">Risposta anonima per questo sondaggio non è consentita (ti devi autenticare)</value> </property> <property key="ContentSurveyAnswersNotFound"> <value xml:lang="en">No answers were found</value> + <value xml:lang="fr">Pas de réponses trouvées</value> <value xml:lang="it">Nessuna risposta è stata trovata</value> </property> <property key="ContentSurveryCategory"> @@ -2184,38 +2238,47 @@ </property> <property key="ContentSurveyQuestionRequiresAResponse"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a response.</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite une réponse.</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede una risposta.</value> </property> <property key="ContentSurveyQuestionRequiresAValidCreditCardNumber"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a valid credit-card number.</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite un numéro de carte de crédit valide.</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede una carta di credito valida.</value> </property> <property key="ContentSurveyQuestionRequiresAValidCurrencyAmount"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a valid currency amount.</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite un montant valide.</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede un'importo in valuta valido.</value> </property> <property key="ContentSurveyQuestionRequiresAValidDate"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a valid date string (mm/dd/yyyy).</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite une date valide (mm/jj/aaaa).</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede una data valida (mm/gg/aaaa).</value> </property> <property key="ContentSurveyQuestionRequiresAValidDecimalNumber"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a valid decimal number.</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite un nombre décimal.</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede un numero con decimali valido.</value> </property> <property key="ContentSurveyQuestionRequiresAValidEmailAddress"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a valid email address.</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite une adresse courriel valide.</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede un'indirizzo e-mail valido.</value> </property> <property key="ContentSurveyQuestionRequiresAValidGiftCardNumber"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a valid gift-card number.</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite un numéro de carte cadeau.</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede una carta regalo valida.</value> </property> <property key="ContentSurveyQuestionRequiresAValidURL"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a valid URL.</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite une URL valide.</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede un URL valido.</value> </property> <property key="ContentSurveyQuestionRequiresAValidWholeNumber"> <value xml:lang="en">The question ${surveyQuestionAndAppl.question} requires a valid whole number.</value> + <value xml:lang="fr">La question ${surveyQuestionAndAppl.question} nécessite un nombre entier.</value> <value xml:lang="it">La domanda ${surveyQuestionAndAppl.question} richiede un numero intero valido.</value> </property> <property key="ContentSurveyResponse"> @@ -2232,10 +2295,12 @@ </property> <property key="ContentSurveyErrorBuildingPDF"> <value xml:lang="en">Error building PDF from SurveyResponse: </value> + <value xml:lang="fr">Erreur dans la construction du PDF des réponses du sondage : </value> <value xml:lang="it">Errore durante la creazione del PDF dalla risposta del sondaggio: </value> </property> <property key="ContentSurveyErrorSettingAcroFields"> <value xml:lang="en">Error setting AcroFields from SurveyResponse: </value> + <value xml:lang="fr">Erreur dans l'enregistrement des AcroFields des réponses du sondage: </value> <value xml:lang="it">Errore durante l'impostazioni di AcroFields dalla risposta del sondaggio: </value> </property> <property key="ContentSurveyResponseSummary"> @@ -2424,6 +2489,7 @@ </property> <property key="ContentThruDateInvalidFormat"> <value xml:lang="en">thruDate not a valid date format</value> + <value xml:lang="fr">le champ thruDate n'est pas au bon format</value> <value xml:lang="it">Data al non è nel formato valido.</value> </property> <property key="ContentType"> @@ -2451,18 +2517,22 @@ </property> <property key="ContentUnableObtainReferenceToFile"> <value xml:lang="en">Unable to obtain a reference to file ${objectInfo}</value> + <value xml:lang="en">Impossible d'obtenir la référence du fichier ${objectInfo}</value> <value xml:lang="it">Non è possibile ottenere un riferimento al file ${objectInfo}</value> </property> <property key="ContentUnableToOpenFileForWriting"> <value xml:lang="en">Unable to open file for writing: ${fileName}</value> + <value xml:lang="fr">Impossible d'ouvrir le fichier ${fileName} en écriture</value> <value xml:lang="it">Non è possibile aprire il file in scrittura: ${fileName}</value> </property> <property key="ContentUnableWriteBinaryDataToFile"> <value xml:lang="en">Unable to write binary data to: ${fileName}</value> + <value xml:lang="fr">Impossible d'écrire les données binaires dans le fichier ${fileName}</value> <value xml:lang="it">Non è possibile scrivere i dati binari in: ${fileName}</value> </property> <property key="ContentUnableWriteCharacterDataToFile"> <value xml:lang="en">Unable to write character data to: ${fileName}</value> + <value xml:lang="fr">Impossible d'écrire les données dans le fichier ${fileName}</value> <value xml:lang="it">Non è possibile scrivere i dati carattere in: ${fileName}</value> </property> <property key="ContentUpdatePermissionError"> @@ -2478,6 +2548,7 @@ </property> <property key="ContentUploadFileTypeNotMatch"> <value xml:lang="en">Upload file type not match your selected.</value> + <value xml:lang="fr">Le type de fichier chargé ne correspond pas avec votre selection.</value> <value xml:lang="it">Tipo file da caricare non corrisponde alla tua selezione.</value> </property> <property key="ContentUploadedFile"> @@ -2514,6 +2585,7 @@ </property> <property key="ContentVisitedSet"> <value xml:lang="en">visitedSet already contains: </value> + <value xml:lang="fr">visitedSet contient déjà : </value> <value xml:lang="it">visitedSet contiene già : </value> </property> <property key="ContentWebSite"> @@ -2590,6 +2662,9 @@ <value xml:lang="zh">ç½ç«å 容</value> <value xml:lang="zh_TW">網ç«å §å®¹</value> </property> + <property key="ContentWebSiteGenerateMissingSeoUrl"> + <value xml:lang="en">Generate missing seo url's</value> + </property> <property key="ContentWebSiteMenus"> <value xml:lang="da">Webside menuer</value> <value xml:lang="de">Webseite Menüs</value> @@ -3330,6 +3405,7 @@ <property key="FormFieldTitle_existContentId"> <value xml:lang="da">Eksisterende indholds id</value> <value xml:lang="en">Existing Content Id</value> + <value xml:lang="fr">Document existant</value> <value xml:lang="it">Codice contenuto esitente</value> </property> <property key="FormFieldTitle_fileExtensionId"> @@ -3881,6 +3957,7 @@ <property key="FormFieldTitle_pathAlias"> <value xml:lang="da">Sti alias</value> <value xml:lang="en">Path Alias</value> + <value xml:lang="fr">Raccourci</value> <value xml:lang="it">Path alias</value> <value xml:lang="zh">è·¯å¾å«å</value> <value xml:lang="zh_TW">è·¯å¾å¥å</value> @@ -3888,6 +3965,7 @@ <property key="FormFieldTitle_pathAliasTo"> <value xml:lang="da">Sti alias til</value> <value xml:lang="en">Path Alias To</value> + <value xml:lang="fr">Raccourci vers</value> <value xml:lang="it">Path alias a</value> <value xml:lang="zh">è·¯å¾å«åå°</value> <value xml:lang="zh_TW">è·¯å¾å¥åå°</value> @@ -3933,6 +4011,7 @@ <property key="FormFieldTitle_queryLine"> <value xml:lang="da">Forespørgsel linie</value> <value xml:lang="en">Query Line</value> + <value xml:lang="fr">Ligne de requête</value> <value xml:lang="it">Riga query</value> <value xml:lang="zh">æ¥è¯¢è¡</value> <value xml:lang="zh_TW">æ¥è©¢è¡</value> @@ -4033,6 +4112,7 @@ <property key="FormFieldTitle_section"> <value xml:lang="da">Sektion</value> <value xml:lang="en">section</value> + <value xml:lang="fr">section</value> <value xml:lang="it">sezione</value> <value xml:lang="nl">sectie</value> <value xml:lang="zh">è</value> @@ -4274,6 +4354,7 @@ <property key="FormFieldTitle_templateTree"> <value xml:lang="da">Skabelon træ</value> <value xml:lang="en">Template Tree</value> + <value xml:lang="fr">Modèle d'arbre</value> <value xml:lang="it">Albero template</value> <value xml:lang="zh">模æ¿æ </value> <value xml:lang="zh_TW">ç¯æ¬æ¨¹</value> @@ -4315,6 +4396,7 @@ <property key="FormFieldTitle_updateSurveyResponse"> <value xml:lang="da">Opdater rundspørge svar</value> <value xml:lang="en">Update Survey Response</value> + <value xml:lang="fr">Mà j de la réponse du sondage</value> <value xml:lang="it">Aggiorna risposta sondaggio</value> <value xml:lang="zh">æ´æ°è°æ¥åç</value> <value xml:lang="zh_TW">æ´æ°èª¿æ¥åç</value> @@ -4445,6 +4527,7 @@ </property> <property key="PageTitleAddContentKeyword"> <value xml:lang="en">Add Content Keyword</value> + <value xml:lang="fr">Ajout de mot clé document</value> </property> <property key="PageTitleAddDataResource"> <value xml:lang="ar">إضاÙØ© Ù Ùرد ٠عÙÙ٠ات</value> @@ -4771,6 +4854,7 @@ </property> <property key="PageTitleEditContentKeywords"> <value xml:lang="en">Edit Content Keywords</value> + <value xml:lang="fr">Ãdition des mots-clés document"</value> </property> <property key="PageTitleEditContentMetadata"> <value xml:lang="ar">تعرÙر Ù Ùتا ٠عÙÙ٠ات Ù ØتÙÙ</value> @@ -5589,6 +5673,7 @@ <property key="PageTitlePleaseSelectData"> <value xml:lang="da">Vælg data</value> <value xml:lang="en">Please select data</value> + <value xml:lang="fr">Merci de sélectionner une donnée</value> <value xml:lang="it">Perfacore seleziona i dati</value> </property> <property key="PageTitleSearchContent"> @@ -5698,12 +5783,17 @@ <value xml:lang="zh">ç½ç«å 容</value> <value xml:lang="zh_TW">網ç«å §å®¹</value> </property> + <property key="PageTitleWebSiteSEO"> + <value xml:lang="en">Generate Missing SEO URL's</value> + </property> <property key="ErrorLoadingContent"> <value xml:lang="de">Ein Fehler beim Laden des Inhaltes ist aufgetrete!</value> <value xml:lang="en">An error occured loading content!</value> + <value xml:lang="fr">Erreur dans le chargement du document !</value> </property> <property key="CannotFindCmsform"> <value xml:lang="de">Die CMS Form kann nicht gefunden werden!</value> <value xml:lang="en">Cannot find the cmsform!</value> + <value xml:lang="fr">Le formulaire CMS n'a pas été trouvé</value> </property> </resource> Modified: ofbiz/branches/jackrabbit20100709/applications/content/config/freemarkerTransforms.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/config/freemarkerTransforms.properties?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/config/freemarkerTransforms.properties (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/config/freemarkerTransforms.properties Wed Aug 3 16:12:58 2011 @@ -36,3 +36,4 @@ renderSubContentAsText=org.ofbiz.content renderContentAsText=org.ofbiz.content.webapp.ftl.RenderContentAsText renderContent=org.ofbiz.content.webapp.ftl.RenderContentTransform renderContentAndSubContent=org.ofbiz.content.webapp.ftl.RenderContentAndSubContent +OfbizContentAltUrl=org.ofbiz.content.webapp.ftl.OfbizContentAltUrlTransforms Modified: ofbiz/branches/jackrabbit20100709/applications/content/data/ContentTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/data/ContentTypeData.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/data/ContentTypeData.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/data/ContentTypeData.xml Wed Aug 3 16:12:58 2011 @@ -51,6 +51,7 @@ under the License. <ContentAssocType contentAssocTypeId="COMPDOC_PART" description="Composite Document Part"/> <ContentAssocType contentAssocTypeId="INSTANCE" description="Instance Of"/> + <ContentAssocType contentAssocTypeId="ALTERNATIVE_URL" description="Alternative URL"/> <ContentAssocPredicate contentAssocPredicateId="member-of" description="The object is a member of the subject."/> <ContentAssocPredicate contentAssocPredicateId="defines" description="The object defines the subject."/> Modified: ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/content/ContentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/content/ContentServices.xml Wed Aug 3 16:12:58 2011 @@ -1277,4 +1277,225 @@ </call-class-method> </simple-method> + <simple-method method-name="createContentAlternativeUrl" short-description="Create Content Alternative URLs."> + <set field="defaultLocaleString" from-field="parameters.locale" default-value="en"/> + <set field="contents" type="List"/> + <if> + <condition> + <or> + <if-empty field="parameters.contentId"/> + <if-compare operator="equals" value="null" field="parameters.contentId"></if-compare> + </or> + </condition> + <then> + <entity-condition list="contents" entity-name="Content"> + <condition-list combine="and"> + <condition-expr field-name="contentName" operator="not-equals" from-field="nullField"/> + <condition-list combine="or"> + <condition-expr field-name="contentTypeId" operator="equals" value="DOCUMENT"/> + <condition-expr field-name="contentTypeId" operator="equals" value="WEB_SITE_PUB_PT"/> + </condition-list> + </condition-list> + <select-field field-name="contentId"/> + <select-field field-name="contentName"/> + <select-field field-name="localeString"/> + </entity-condition> + </then> + <else> + <entity-condition list="contents" entity-name="Content"> + <condition-list combine="and"> + <condition-expr field-name="contentName" operator="not-equals" from-field="nullField"/> + <condition-expr field-name="contentId" operator="equals" from-field="parameters.contentId"/> + <condition-list combine="or"> + <condition-expr field-name="contentTypeId" operator="equals" value="DOCUMENT"/> + <condition-expr field-name="contentTypeId" operator="equals" value="WEB_SITE_PUB_PT"/> + </condition-list> + </condition-list> + <select-field field-name="contentId"/> + <select-field field-name="contentName"/> + <select-field field-name="localeString"/> + </entity-condition> + </else> + </if> + <iterate entry="content" list="contents"> + <set field="localeString" from-field="content.localeString" default-value="${defaultLocaleString}"/> + <entity-condition list="contentAssocDataResources" entity-name="ContentAssocDataResourceViewTo"> + <condition-list combine="and"> + <condition-expr field-name="caContentAssocTypeId" operator="equals" value="ALTERNATIVE_URL"/> + <condition-expr field-name="contentIdStart" operator="equals" from-field="content.contentId"/> + <condition-expr field-name="localeString" operator="equals" from-field="localeString"/> + </condition-list> + <select-field field-name="contentIdStart"/> + <select-field field-name="dataResourceId"/> + <select-field field-name="localeString"/> + <select-field field-name="drObjectInfo"/> + <select-field field-name="caFromDate"/> + <select-field field-name="caThruDate"/> + </entity-condition> + <filter-list-by-date list="contentAssocDataResources" from-field-name="caFromDate" thru-field-name="caThruDate"/> + <if-empty field="contentAssocDataResources"> + <if-not-empty field="content.contentName"> + <call-class-method method-name="invalidCharacter" class-name="org.ofbiz.common.UrlServletHelper" ret-field="uri"> + <field field="content.contentName"/> + </call-class-method> + <if-not-empty field="uri"> + <sequenced-id sequence-name="DataResource" field="dataResourceCtx.dataResourceId"/> + <set field="dataResourceCtx.dataResourceTypeId" value="URL_RESOURCE"/> + <set field="dataResourceCtx.localeString" from-field="localeString"/> + <set field="dataResourceCtx.objectInfo" value="/${uri}-${content.contentId}-content"/> + <set field="dataResourceCtx.statusId" value="CTNT_IN_PROGRESS"/> + <call-service service-name="createDataResource" in-map-name="dataResourceCtx" break-on-error="false" include-user-login="true"> + <result-to-field result-name="dataResourceId" field="dataResourceId"/> + </call-service> + <if-not-empty field="dataResourceId"> + <set field="contentCtx.dataResourceId" from-field="dataResourceId"/> + <set field="contentCtx.statusId" value="CTNT_IN_PROGRESS"/> + <set field="contentCtx.localeString" from-field="localeString"/> + <call-service service-name="createContent" in-map-name="contentCtx" break-on-error="false" include-user-login="true"> + <result-to-field result-name="contentId" field="contentIdTo"/> + </call-service> + <if-not-empty field="contentIdTo"> + <set field="createContentAssocCtx.contentId" from-field="content.contentId"/> + <set field="createContentAssocCtx.contentIdTo" from-field="contentIdTo"/> + <set field="createContentAssocCtx.contentAssocTypeId" value="ALTERNATIVE_URL"/> + <call-service service-name="createContentAssoc" in-map-name="createContentAssocCtx" include-user-login="true" break-on-error="false"/> + </if-not-empty> + </if-not-empty> + <set field="contentCreated" value="Y"/> + <field-to-result field="contentCreated" result-name="contentCreated"/> + </if-not-empty> + </if-not-empty> + <else> + <if-empty field="contentAssocDataResources[0].drObjectInfo"> + <if-not-empty field="content.contentName"> + <call-class-method method-name="invalidCharacter" class-name="org.ofbiz.common.UrlServletHelper" ret-field="uri"> + <field field="content.contentName"/> + </call-class-method> + <if-not-empty field="uri"> + <set field="dataResourceCtx.dataResourceId" from-field="contentAssocDataResources[0].dataResourceId"/> + <set field="dataResourceCtx.objectInfo" value="/${uri}-${content.contentId}-content"/> + <call-service service-name="updateDataResource" in-map-name="dataResourceCtx" break-on-error="false" include-user-login="true"/> + <set field="contentCreated" value="Y"/> + <field-to-result field="contentCreated" result-name="contentCreated"/> + </if-not-empty> + </if-not-empty> + <else> + <set field="contentCreated" value="N"/> + <field-to-result field="contentCreated" result-name="contentCreated"/> + </else> + </if-empty> + </else> + </if-empty> + </iterate> + </simple-method> + + <simple-method method-name="createMissingContentAltUrls" short-description="create missing content alternative urls."> + <now-timestamp field="now"/> + <set field="contentsNotUpdated" value="0" type="Integer"/> + <set field="contentsUpdated" value="0" type="Integer"/> + <entity-and list="prodCatalogCategoryList" entity-name="ProdCatalogCategory" filter-by-date="false"> + <field-map field-name="prodCatalogId" from-field="parameters.prodCatalogId"/> + </entity-and> + + <!-- Get all categories --> + <call-class-method method-name="newInstance" class-name="javolution.util.FastList" ret-field="parameters.productCategories"/> + <iterate entry="prodCatalogCategory" list="prodCatalogCategoryList"> + <set field="rootProductCategoryId" from-field="prodCatalogCategory.productCategoryId"/> + <entity-and list="productCategoryRollupList" entity-name="ProductCategoryRollup" filter-by-date="true"> + <field-map field-name="parentProductCategoryId" from-field="rootProductCategoryId"/> + </entity-and> + <set field="parameters.parentProductCategoryId" from-field="rootProductCategoryId"/> + <call-simple-method method-name="createMissingCategoryContentAltUrlInline"/> + </iterate> + + <iterate entry="productCategoryList" list="parameters.productCategories"> + <!-- Create Content Alternative URLs for Product Category --> + <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"/> + <condition-expr field-name="prodCatContentTypeId" operator="not-equals" value="ALTERNATIVE_URL"/> + </condition-list> + <order-by field-name="-fromDate"/> + </entity-condition> + <iterate entry="productCategoryContentAndInfo" list="productCategoryContentAndInfoList"> + <set field="createMissingCategoryContentAltUrlsMap.contentId" from-field="productCategoryContentAndInfo.contentId"/> + <call-service service-name="createContentAlternativeUrl" in-map-name="createMissingCategoryContentAltUrlsMap"> + <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> + + <!-- Create Content Alternative URLs for Product --> + <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"/> + </condition-list> + <order-by field-name="-fromDate"/> + </entity-condition> + <iterate entry="productCategoryMember" list="productCategoryMemberList"> + <set field="product.productId" from-field="productCategoryMember.productId"/> + <entity-condition list="productContentAndInfoList" entity-name="ProductContentAndInfo" filter-by-date="true" use-cache="true"> + <condition-list combine="and"> + <condition-expr field-name="productId" from-field="product.productId"/> + <condition-expr field-name="productContentTypeId" operator="not-equals" value="ALTERNATIVE_URL"/> + </condition-list> + <order-by field-name="-fromDate"/> + </entity-condition> + <iterate entry="productContentAndInfo" list="productContentAndInfoList"> + <set field="createMissingProductContentAltUrlsMap.contentId" from-field="productContentAndInfo.contentId"/> + <call-service service-name="createContentAlternativeUrl" in-map-name="createMissingProductContentAltUrlsMap"> + <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> + </iterate> + <field-to-result field="contentsNotUpdated" result-name="contentsNotUpdated"/> + <field-to-result field="contentsUpdated" result-name="contentsUpdated"/> + </simple-method> + + <simple-method method-name="createMissingCategoryContentAltUrlInline" short-description="create missing category alternative inline"> + <entity-and list="productCategoryRollups" entity-name="ProductCategoryRollup" filter-by-date="true"> + <field-map field-name="parentProductCategoryId" from-field="parameters.parentProductCategoryId"/> + </entity-and> + <iterate entry="productCategoryRollup" list="productCategoryRollups"> + <!-- append product category to list --> + <entity-one value-field="productCategory" entity-name="ProductCategory"> + <field-map field-name="productCategoryId" from-field="productCategoryRollup.productCategoryId"/> + </entity-one> + <field-to-list list="parameters.productCategories" field="productCategory"/> + + <!-- find rollup product categories --> + <set field="parameters.parentProductCategoryId" from-field="productCategoryRollup.productCategoryId"/> + <call-simple-method method-name="createMissingCategoryContentAltUrlInline"/> + <check-errors/> + </iterate> + </simple-method> </simple-methods> + Modified: ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/data/DataServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/data/DataServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/data/DataServices.xml Wed Aug 3 16:12:58 2011 @@ -51,7 +51,7 @@ under the License. </if-empty> <if-empty field="newEntity.mimeTypeId"> - <if-not-empty field="parameters.objectInfo"> + <if-not-empty field="parameters.uploadedFile"> <call-class-method class-name="org.ofbiz.content.data.DataResourceWorker" method-name="getMimeTypeWithByteBuffer" ret-field="newEntity.mimeTypeId"> <field field="parameters.uploadedFile" type="java.nio.ByteBuffer"/> </call-class-method> Modified: ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml Wed Aug 3 16:12:58 2011 @@ -192,4 +192,154 @@ under the License. </else> </if-instance-of> </simple-method> + + <!-- Generate Missing Seo URL's Services --> + <simple-method method-name="generateMissingSeoUrlForWebsite" short-description="Generate Missing Seo URL's for Website"> + <set field="totalCategoriesNotUpdated" value="0" type="Integer"/> + <set field="totalCategoriesUpdated" value="0" type="Integer"/> + <set field="totalProductsNotUpdated" value="0" type="Integer"/> + <set field="totalProductsUpdated" value="0" type="Integer"/> + <set field="totalContentsNotUpdated" value="0" type="Integer"/> + <set field="totalContentsUpdated" value="0" type="Integer"/> + <entity-one entity-name="WebSite" value-field="webSite"> + <field-map field-name="webSiteId" from-field="parameters.webSiteId"/> + </entity-one> + <!-- Create Missing Category and Product Alternative URL's --> + <if-compare operator="equals" value="all" field="parameters.prodCatalogId"> + <entity-and list="productStoreCatalogs" entity-name="ProductStoreCatalog" filter-by-date="true"> + <field-map field-name="productStoreId" from-field="webSite.productStoreId"/> + </entity-and> + <iterate entry="productStoreCatalog" list="productStoreCatalogs"> + <iterate entry="typeGenerate" list="parameters.typeGenerate"> + <if-compare operator="equals" value="category" field="typeGenerate"> + <set field="createMissingCategoryAltUrlsMap.prodCatalogId" from-field="productStoreCatalog.prodCatalogId"/> + <set field="createMissingCategoryAltUrlsMap.category" value="category"/> + <call-service service-name="createMissingCategoryAndProductAltUrls" in-map-name="createMissingCategoryAltUrlsMap"> + <result-to-field result-name="categoriesNotUpdated" field="categoriesNotUpdated"/> + <result-to-field result-name="categoriesUpdated" field="categoriesUpdated"/> + </call-service> + <calculate field="totalCategoriesNotUpdated" type="Integer"> + <calcop operator="add" field="totalCategoriesNotUpdated"> + <calcop operator="get" field="categoriesNotUpdated"/> + </calcop> + </calculate> + <calculate field="totalCategoriesUpdated" type="Integer"> + <calcop operator="add" field="totalCategoriesUpdated"> + <calcop operator="get" field="categoriesUpdated"/> + </calcop> + </calculate> + </if-compare> + <if-compare operator="equals" value="product" field="typeGenerate"> + <set field="createMissingProductAltUrlsMap.prodCatalogId" from-field="productStoreCatalog.prodCatalogId"/> + <set field="createMissingProductAltUrlsMap.product" value="product"/> + <call-service service-name="createMissingCategoryAndProductAltUrls" in-map-name="createMissingProductAltUrlsMap"> + <result-to-field result-name="productsNotUpdated" field="productsNotUpdated"/> + <result-to-field result-name="productsUpdated" field="productsUpdated"/> + </call-service> + <calculate field="totalProductsNotUpdated" type="Integer"> + <calcop operator="add" field="totalProductsNotUpdated"> + <calcop operator="get" field="productsNotUpdated"/> + </calcop> + </calculate> + <calculate field="totalProductsUpdated" type="Integer"> + <calcop operator="add" field="totalProductsUpdated"> + <calcop operator="get" field="productsUpdated"/> + </calcop> + </calculate> + </if-compare> + <if-compare operator="equals" value="content" field="typeGenerate"> + <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"/> + <result-to-field result-name="contentsUpdated" field="contentsUpdated"/> + </call-service> + <calculate field="totalContentsNotUpdated" type="Integer"> + <calcop operator="add" field="contentsNotUpdated"> + <calcop operator="get" field="productsNotUpdated"/> + </calcop> + </calculate> + <calculate field="totalContentsUpdated" type="Integer"> + <calcop operator="add" field="totalContentsUpdated"> + <calcop operator="get" field="contentsUpdated"/> + </calcop> + </calculate> + </if-compare> + </iterate> + </iterate> + <else> + <iterate entry="typeGenerate" list="parameters.typeGenerate"> + <if-compare operator="equals" value="category" field="typeGenerate"> + <set field="createMissingCategoryAltUrlsMap.prodCatalogId" from-field="parameters.prodCatalogId"/> + <set field="createMissingCategoryAltUrlsMap.category" value="category"/> + <call-service service-name="createMissingCategoryAndProductAltUrls" in-map-name="createMissingCategoryAltUrlsMap"> + <result-to-field result-name="categoriesNotUpdated" field="categoriesNotUpdated"/> + <result-to-field result-name="categoriesUpdated" field="categoriesUpdated"/> + </call-service> + <calculate field="totalCategoriesNotUpdated" type="Integer"> + <calcop operator="add" field="totalCategoriesNotUpdated"> + <calcop operator="get" field="categoriesNotUpdated"/> + </calcop> + </calculate> + <calculate field="totalCategoriesUpdated" type="Integer"> + <calcop operator="add" field="totalCategoriesUpdated"> + <calcop operator="get" field="categoriesUpdated"/> + </calcop> + </calculate> + </if-compare> + <if-compare operator="equals" value="product" field="typeGenerate"> + <set field="createMissingProductAltUrlsMap.prodCatalogId" from-field="parameters.prodCatalogId"/> + <set field="createMissingProductAltUrlsMap.product" value="product"/> + <call-service service-name="createMissingCategoryAndProductAltUrls" in-map-name="createMissingProductAltUrlsMap"> + <result-to-field result-name="productsNotUpdated" field="productsNotUpdated"/> + <result-to-field result-name="productsUpdated" field="productsUpdated"/> + </call-service> + <calculate field="totalProductsNotUpdated" type="Integer"> + <calcop operator="add" field="totalProductsNotUpdated"> + <calcop operator="get" field="productsNotUpdated"/> + </calcop> + </calculate> + <calculate field="totalProductsUpdated" type="Integer"> + <calcop operator="add" field="totalProductsUpdated"> + <calcop operator="get" field="productsUpdated"/> + </calcop> + </calculate> + </if-compare> + <if-compare operator="equals" value="content" field="typeGenerate"> + <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"/> + <result-to-field result-name="contentsUpdated" field="contentsUpdated"/> + </call-service> + <calculate field="totalContentsNotUpdated" type="Integer"> + <calcop operator="add" field="totalContentsNotUpdated"> + <calcop operator="get" field="contentsNotUpdated"/> + </calcop> + </calculate> + <calculate field="totalContentsUpdated" type="Integer"> + <calcop operator="add" field="totalContentsUpdated"> + <calcop operator="get" field="contentsUpdated"/> + </calcop> + </calculate> + </if-compare> + </iterate> + </else> + </if-compare> + + <set field="generateMissingSeoUrlMessage" value="Generate missing seo url's successfully"/> + <field-to-list list="successMessageList" field="generateMissingSeoUrlMessage"/> + <iterate entry="typeGenerate" list="parameters.typeGenerate"> + <if-compare operator="equals" value="category" field="typeGenerate"> + <set field="categoriesMessage" value="Categories already having seo url's: ${totalCategoriesNotUpdated}, Categories with url added: ${totalCategoriesUpdated}"/> + <field-to-list list="successMessageList" field="categoriesMessage"/> + </if-compare> + <if-compare operator="equals" value="product" field="typeGenerate"> + <set field="productMessage" value="Products already having seo url's: ${totalProductsNotUpdated}, Products with url added: ${totalProductsUpdated}"/> + <field-to-list list="successMessageList" field="productMessage"/> + </if-compare> + <if-compare operator="equals" value="content" field="typeGenerate"> + <set field="contentMessage" value="Contents already having seo url's: ${totalContentsNotUpdated}, Contents with url added: ${totalContentsUpdated}"/> + <field-to-list list="successMessageList" field="contentMessage"/> + </if-compare> + </iterate> + </simple-method> </simple-methods> Modified: ofbiz/branches/jackrabbit20100709/applications/content/servicedef/secas.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/servicedef/secas.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/servicedef/secas.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/servicedef/secas.xml Wed Aug 3 16:12:58 2011 @@ -178,5 +178,9 @@ under the License. <eca service="updateContentAssoc" event="in-validate"> <action service="checkContentAssocIds" mode="sync"/> </eca> - + + <eca service="createContent" event="commit"> + <condition field-name="contentId" operator="is-not-empty"/> + <action service="createContentAlternativeUrl" mode="sync" run-as-user="system"/> + </eca> </service-eca> Modified: ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services.xml Wed Aug 3 16:12:58 2011 @@ -1197,4 +1197,11 @@ <permission-service service-name="genericContentPermission" main-action="CREATE"/> <attribute name="contentId" type="String" mode="IN" optional="false"/> </service> + + <service name="createContentAlternativeUrl" engine="simple" + location="component://content/script/org/ofbiz/content/content/ContentServices.xml" invoke="createContentAlternativeUrl" auth="true" transaction-timeout="7200"> + <description>Create Content Alternative URL</description> + <attribute name="contentId" mode="IN" type="String" optional="true"></attribute> + <attribute name="contentCreated" mode="OUT" type="String" optional="true"></attribute> + </service> </services> Modified: ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services_content.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services_content.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services_content.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services_content.xml Wed Aug 3 16:12:58 2011 @@ -324,4 +324,13 @@ <permission-service service-name="genericContentPermission" main-action="UPDATE"/> <auto-attributes entity-name="ContentRole" include="pk" mode="IN" optional="false"/> </service> + + <!-- Alternative URLs services --> + <service name="createMissingContentAltUrls" engine="simple" + 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="contentsNotUpdated" mode="OUT" type="Integer" optional="true"/> + <attribute name="contentsUpdated" mode="OUT" type="Integer" optional="true"/> + </service> </services> Modified: ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services_website.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services_website.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services_website.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/servicedef/services_website.xml Wed Aug 3 16:12:58 2011 @@ -154,4 +154,12 @@ <attribute name="webSiteId" type="String" mode="IN" optional="false"/> <attribute name="webSiteContentTypeId" type="List" mode="IN" optional="false"/> </service> + + <service name="generateMissingSeoUrlForWebsite" engine="simple" auth="true" + location="component://content/script/org/ofbiz/content/website/WebSiteServices.xml" invoke="generateMissingSeoUrlForWebsite" transaction-timeout="36000000"> + <description>Generate Missing Seo URL's for Website</description> + <attribute name="webSiteId" type="String" mode="IN" optional="false"/> + <attribute name="prodCatalogId" type="String" mode="IN" optional="false"/> + <attribute name="typeGenerate" type="List" mode="IN" optional="false"/> + </service> </services> Modified: ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentEvents.java?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentEvents.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentEvents.java Wed Aug 3 16:12:58 2011 @@ -18,6 +18,23 @@ *******************************************************************************/ package org.ofbiz.content.content; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.UtilHttp; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.UtilProperties; +import org.ofbiz.entity.Delegator; +import org.ofbiz.entity.GenericEntityException; +import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.transaction.TransactionUtil; +import org.ofbiz.entity.util.EntityListIterator; +import org.ofbiz.content.content.ContentKeywordIndex; +import org.ofbiz.security.Security; + /** * ContentEvents Class @@ -25,6 +42,113 @@ package org.ofbiz.content.content; public class ContentEvents { public static final String module = ContentEvents.class.getName(); + public static final String resource = "ContentErrorUiLabels"; + + /** + * Updates/adds keywords for all contents + * + * @param request HTTPRequest object for the current request + * @param response HTTPResponse object for the current request + * @return String specifying the exit status of this event + */ + public static String updateAllContentKeywords(HttpServletRequest request, HttpServletResponse response) { + //String errMsg = ""; + Delegator delegator = (Delegator) request.getAttribute("delegator"); + Security security = (Security) request.getAttribute("security"); + + String updateMode = "CREATE"; + String errMsg=null; + + String doAll = request.getParameter("doAll"); + + // check permissions before moving on... + if (!security.hasEntityPermission("CONTENTMGR", "_" + updateMode, request.getSession())) { + Map<String, String> messageMap = UtilMisc.toMap("updateMode", updateMode); + errMsg = UtilProperties.getMessage(resource,"contentevents.not_sufficient_permissions", messageMap, UtilHttp.getLocale(request)); + request.setAttribute("_ERROR_MESSAGE_", errMsg); + return "error"; + } + + EntityListIterator entityListIterator = null; + int numConts = 0; + int errConts = 0; + + boolean beganTx = false; + try { + // begin the transaction + beganTx = TransactionUtil.begin(7200); + try { + if (Debug.infoOn()) { + long count = delegator.findCountByCondition("Content", null, null, null); + Debug.logInfo("========== Found " + count + " contents to index ==========", module); + } + entityListIterator = delegator.find("Content", null, null, null, null, null); + } catch (GenericEntityException gee) { + Debug.logWarning(gee, gee.getMessage(), module); + Map<String, String> messageMap = UtilMisc.toMap("gee", gee.toString()); + errMsg = UtilProperties.getMessage(resource,"contentevents.error_getting_content_list", messageMap, UtilHttp.getLocale(request)); + request.setAttribute("_ERROR_MESSAGE_", errMsg); + throw gee; + } + + GenericValue content; + while ((content = entityListIterator.next()) != null) { + try { + ContentKeywordIndex.indexKeywords(content, "Y".equals(doAll)); + } catch (GenericEntityException e) { + //request.setAttribute("_ERROR_MESSAGE_", errMsg); + Debug.logWarning("[ContentEvents.updateAllContentKeywords] Could not create content-keyword (write error); message: " + e.getMessage(), module); + errConts++; + } + numConts++; + if (numConts % 500 == 0) { + Debug.logInfo("Keywords indexed for " + numConts + " so far", module); + } + } + } catch (GenericEntityException e) { + try { + TransactionUtil.rollback(beganTx, e.getMessage(), e); + } catch (Exception e1) { + Debug.logError(e1, module); + } + return "error"; + } catch (Throwable t) { + Debug.logError(t, module); + request.setAttribute("_ERROR_MESSAGE_", t.getMessage()); + try { + TransactionUtil.rollback(beganTx, t.getMessage(), t); + } catch (Exception e2) { + Debug.logError(e2, module); + } + return "error"; + } finally { + if (entityListIterator != null) { + try { + entityListIterator.close(); + } catch (GenericEntityException gee) { + Debug.logError(gee, "Error closing EntityListIterator when indexing content keywords.", module); + } + } + // commit the transaction + try { + TransactionUtil.commit(beganTx); + } catch (Exception e) { + Debug.logError(e, module); + } + } + if (errConts == 0) { + Map<String, String> messageMap = UtilMisc.toMap("numConts", Integer.toString(numConts)); + errMsg = UtilProperties.getMessage(resource,"contentevents.keyword_creation_complete_for_contents", messageMap, UtilHttp.getLocale(request)); + request.setAttribute("_EVENT_MESSAGE_", errMsg); + return "success"; + } else { + Map<String, String> messageMap = UtilMisc.toMap("numConts", Integer.toString(numConts)); + messageMap.put("errConts", Integer.toString(errConts)); + errMsg = UtilProperties.getMessage(resource,"contentevents.keyword_creation_complete_for_contents_with_errors", messageMap, UtilHttp.getLocale(request)); + request.setAttribute("_ERROR_MESSAGE_", errMsg); + return "error"; + } + } } |
Free forum by Nabble | Edit this page |