Author: mrisaliti
Date: Tue Dec 21 18:45:49 2010
New Revision: 1051607
URL: http://svn.apache.org/viewvc?rev=1051607&view=rev
Log:
Replace some fail-message to fail-property tag in content component (OFBIZ-1874)
Modified:
ofbiz/trunk/applications/content/config/ContentUiLabels.xml
ofbiz/trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml
ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml
ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml
ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentUiLabels.xml?rev=1051607&r1=1051606&r2=1051607&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/config/ContentUiLabels.xml (original)
+++ ofbiz/trunk/applications/content/config/ContentUiLabels.xml Tue Dec 21
18:45:49 2010
@@ -224,6 +224,10 @@
<value xml:lang="zh">æµè§</value>
<value xml:lang="zh_TW">ç覽</value>
</property>
+ <property key="ContentCannotChangeStatus">
+ <value xml:lang="en">Cannot change from ${content.statusId} to
${parameters.statusId}</value>
+ <value xml:lang="it">Non è possibile cambiare lo stato da
${content.statusId} a ${parameters.statusId}</value>
+ </property>
<property key="ContentCMS">
<value xml:lang="ar">CMS</value>
<value xml:lang="da">CMS</value>
@@ -771,6 +775,10 @@
<value xml:lang="zh">å¾å</value>
<value xml:lang="zh_TW">åå</value>
</property>
+ <property key="ContentDataResourceNotFound">
+ <value xml:lang="en">No data resource found for ID:
${parameters.dataResourceId}</value>
+ <value xml:lang="it">Nessuna risorsa dati trovata con ID:
${parameters.dataResourceId}</value>
+ </property>
<property key="ContentDataResourceProductFeatures">
<value xml:lang="ar">سÙ
ات اÙÙ
ÙØªÙج</value>
<value xml:lang="da">Produktegenskaber</value>
@@ -845,6 +853,10 @@
<value xml:lang="zh">æ°æ®ç±»å</value>
<value xml:lang="zh_TW">è³æé¡å</value>
</property>
+ <property key="ContentDataTypeNotYetSupported">
+ <value xml:lang="en">Data type ${dataResourceTypeId} is not yet
supported!</value>
+ <value xml:lang="it">Tipo dati ${dataResourceTypeId} non è ancora
supportato!</value>
+ </property>
<property key="ContentDecorator">
<value xml:lang="da">Dekoration</value>
<value xml:lang="en">Decorator</value>
@@ -900,6 +912,18 @@
<value xml:lang="zh">ç¼è¾ææ°ä¿®è®¢</value>
<value xml:lang="zh_TW">ç·¨è¼¯ææ°ä¿®è¨</value>
</property>
+ <property key="ContentElectronicTextNotFound">
+ <value xml:lang="en">Electronic Text not found.</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="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="it">Entità CommEventContentAssoc non trovata da
cancellare, communicationEventId: ${parameters.communicationEventId} e
contentId: ${parameters.contentId}</value>
+ </property>
<property key="ContentFile">
<value xml:lang="ar">Ù
ÙÙ</value>
<value xml:lang="da">Fil</value>
@@ -1338,6 +1362,10 @@
<value xml:lang="zh">导èª</value>
<value xml:lang="zh_TW">å°èª</value>
</property>
+ <property key="ContentNeitherContentSupplied">
+ <value xml:lang="en">Neither content nor contentId supplied.</value>
+ <value xml:lang="it">Nessuno contenuto specificato.</value>
+ </property>
<property key="ContentNewContentInFolder">
<value xml:lang="da">Nyt indhold i folder</value>
<value xml:lang="de">New Content in Folder</value>
@@ -1358,6 +1386,22 @@
<value xml:lang="zh">æ°å»ºæä»¶å¤¹</value>
<value xml:lang="zh_TW">æ°å»ºæä»¶å¤¾</value>
</property>
+ <property key="ContentNoContentFound">
+ <value xml:lang="en">Content record not found for ID
${contentId}</value>
+ <value xml:lang="it">Contenuto non trovato per ID ${contentId}</value>
+ </property>
+ <property key="ContentNoQuestionsSurveyFound">
+ <value xml:lang="en">No questions found for survey ID:
${survey.surveyId}</value>
+ <value xml:lang="it">Nessuna domanda sondaggio trovata con ID:
${surveyLookup.surveyId}</value>
+ </property>
+ <property key="ContentNoSurveyFound">
+ <value xml:lang="en">No survey found for survey ID:
${surveyLookup.surveyId}</value>
+ <value xml:lang="it">Nessun sondaggio trovato con ID:
${surveyLookup.surveyId}</value>
+ </property>
+ <property key="ContentNoUploadedContentFound">
+ <value xml:lang="en">No uploaded content found in context</value>
+ <value xml:lang="it">Nessun contenuto caricato trovato</value>
+ </property>
<property key="ContentOtherLayout">
<value xml:lang="ar">اÙÙØ¶Ø¹Ùات Ø§ÙØ£Ø®Ø±Ù اÙÙ
ستعÙ
ÙØ©
ÙÙØ°Ø§ اÙÙ
ØØªÙÙ Ø§ÙØªØØªÙ</value>
<value xml:lang="da">Andre layouts der anvender dette
subindhold</value>
@@ -1483,6 +1527,10 @@
<value xml:lang="zh">è¾å
¥æ¥è¯¢åæ°</value>
<value xml:lang="zh_TW">輸å
¥æ¥è©¢åæ¸</value>
</property>
+ <property key="ContentQuestionTypeRequiredField">
+ <value xml:lang="en">Question type ${questionType} requires
${requiredField} to be set</value>
+ <value xml:lang="it">Tipo domanda ${questionType} richiede
${requiredField} di essere impostato</value>
+ </property>
<property key="ContentQuickSubContent">
<value xml:lang="da">Hurtig sub indhold</value>
<value xml:lang="de">Rasch untergeordneter Inhalt</value>
@@ -1511,6 +1559,10 @@
<value xml:lang="zh">éå½åæä»¶å¤¹</value>
<value xml:lang="zh_TW">éå½åæä»¶å¤¾</value>
</property>
+ <property key="ContentRequiredField">
+ <value xml:lang="en">Required field ${requiredField} is missing in
simple method call ${resourceDescription}</value>
+ <value xml:lang="it">Campo ${requiredField} è richiesto ed è
mancante nella chiamata a ${resourceDescription}</value>
+ </property>
<property key="ContentResourceAudio">
<value xml:lang="da">Audio</value>
<value xml:lang="de">Audio</value>
@@ -1593,7 +1645,7 @@
<value xml:lang="en">Security Error: to run ${resourceDescription} you
must have the CONTENTMGR_CREATE or CONTENTMGR_ADMIN permission</value>
<value xml:lang="it">Errore di sicurezza: per eseguire
${resourceDescription} devi avere il permesso CONTENTMGR_CREATE o
CONTENTMGR_ADMIN</value>
</property>
- <property key="ContentSecurityDeletPermission">
+ <property key="ContentSecurityDeletePermission">
<value xml:lang="en">Security Error: to run ${resourceDescription} you
must have the CONTENTMGR_DELETE or CONTENTMGR_ADMIN permission</value>
<value xml:lang="it">Errore di sicurezza: per eseguire
${resourceDescription} devi avere il permesso CONTENTMGR_DELETE o
CONTENTMGR_ADMIN</value>
</property>
@@ -1649,6 +1701,18 @@
<value xml:lang="th">สรุà¸</value>
<value xml:lang="zh">æè¦</value>
</property>
+ <property key="ContentSurveyAlreadyResponded">
+ <value xml:lang="en">You have already responded to this survey;
multiple responses are not allowed</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="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="it">Nessuna risposta è stata trovata</value>
+ </property>
<property key="ContentSurveryCategory">
<value xml:lang="ar">ÙØ¦Ø©</value>
<value xml:lang="da">Kategori</value>
@@ -1941,6 +2005,42 @@
<value xml:lang="zh">é®é¢</value>
<value xml:lang="zh_TW">åé¡</value>
</property>
+ <property key="ContentSurveyQuestionRequiresAResponse">
+ <value xml:lang="en">The question ${surveyQuestionAndAppl.question}
requires a response.</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="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="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="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="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="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="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="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="it">La domanda ${surveyQuestionAndAppl.question}
richiede un numero intero valido.</value>
+ </property>
<property key="ContentSurveyResponse">
<value xml:lang="ar">Ø¬ÙØ§Ø¨</value>
<value xml:lang="da">Svar</value>
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml?rev=1051607&r1=1051606&r2=1051607&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml
(original)
+++
ofbiz/trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml
Tue Dec 21 18:45:49 2010
@@ -340,7 +340,7 @@ under the License.
</simple-method>
<simple-method method-name="removeContentRevision"
short-description="Remove ContentRevision">
<check-permission action="_DELETE" permission="CONTENTMGR">
- <fail-property resource="ContentUiLabels"
property="ContentSecurityDeletPermission"/>
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityDeletePermission"/>
</check-permission>
<check-errors/>
<make-value entity-name="ContentRevision"
value-field="lookupKeyValue"/>
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=1051607&r1=1051606&r2=1051607&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
Tue Dec 21 18:45:49 2010
@@ -124,7 +124,9 @@
</entity-one>
<if-empty field="statusChange">
- <add-error><fail-message message="Cannot change from
${content.statusId} to ${parameters.statusId}"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentCannotChangeStatus"/>
+ </add-error>
<log level="error" message="Cannot change from
${content.statusId} to ${parameters.statusId}"/>
<check-errors/>
<else>
@@ -734,7 +736,9 @@
<field-map field-name="dataResourceId"
from-field="parameters.dataResourceId"/>
</entity-one>
<if-empty field="dataResource">
- <add-error><fail-message message="No data resource found for ID:
[${parameters.dataResourceId}]"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
</if-empty>
<check-errors/>
@@ -861,7 +865,7 @@
<find-by-primary-key value-field="commEventContentAssoc"
map="pkCommEventContentAssoc" entity-name="CommEventContentAssoc"/>
<if-empty field="commEventContentAssoc">
<add-error>
- <fail-message message="CommEventContentAssoc entity not found
for update, communicationEventId: ${parameters.communicationEventId} and
contentId: ${parameters.contentId}"/>
+ <fail-property resource="ContentUiLabels"
property="ContenCommEventContentAssocNotFoundForUpdate"/>
</add-error>
</if-empty>
<set-nonpk-fields value-field="commEventContentAssoc"
map="parameters"/>
@@ -874,7 +878,7 @@
<find-by-primary-key value-field="commEventContentAssoc"
map="pkCommEventContentAssoc" entity-name="CommEventContentAssoc"/>
<if-empty field="commEventContentAssoc">
<add-error>
- <fail-message message="CommEventContentAssoc entity not found
for removal, communicationEventId: ${parameters.communicationEventId} and
contentId: ${parameters.contentId}"/>
+ <fail-property resource="ContentUiLabels"
property="ContenCommEventContentAssocNotFoundForDelete"/>
</add-error>
</if-empty>
<remove-value value-field="commEventContentAssoc"/>
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=1051607&r1=1051606&r2=1051607&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
(original)
+++
ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
Tue Dec 21 18:45:49 2010
@@ -78,7 +78,12 @@ under the License.
<simple-method method-name="createDataResourceAndAssocToContent"
short-description="Create a Data Resource and return the data resource type">
<entity-one value-field="content" entity-name="Content"/>
- <if-empty field="content"><add-error><fail-message
message="${layoutEvents.content_empty}"/></add-error><check-errors/></if-empty>
+ <if-empty field="content">
+ <add-error>
+ <fail-property resource="ContentErrorUiLabels"
property="layoutEvents.content_empty"/>
+ </add-error>
+ <check-errors/>
+ </if-empty>
<set-service-fields service-name="createDataResource"
to-map="dataResourceCtx" map="parameters"/>
<call-service service-name="createDataResource"
in-map-name="dataResourceCtx">
@@ -123,7 +128,9 @@ under the License.
<!-- Methods for DataResourceMetaData -->
<simple-method method-name="createDataResourceMetaData"
short-description="Create Data Resource Meta Data">
- <check-permission permission="CONTENTMGR"
action="_CREATE"><fail-message message="Security Error: to run
createDataResourceMetaData you must have the CONTENTMGR_CREATE or
CONTENTMGR_ADMIN permission"/></check-permission>
+ <check-permission permission="CONTENTMGR" action="_CREATE">
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityCreatePermission"/>
+ </check-permission>
<check-errors/>
<make-value entity-name="DataResourceMetaData"
value-field="newEntity"/>
@@ -132,7 +139,9 @@ under the License.
<create-value value-field="newEntity"/>
</simple-method>
<simple-method method-name="updateDataResourceMetaData"
short-description="Update Data Resource Meta Data">
- <check-permission permission="CONTENTMGR"
action="_UPDATE"><fail-message message="Security Error: to run
updateDataResourceMetaData you must have the CONTENTMGR_UPDATE or
CONTENTMGR_ADMIN permission"/></check-permission>
+ <check-permission permission="CONTENTMGR" action="_UPDATE">
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityUpdatePermission"/>
+ </check-permission>
<check-errors/>
<make-value entity-name="DataResourceMetaData"
value-field="lookupKeyValue"/>
@@ -142,7 +151,9 @@ under the License.
<store-value value-field="lookedUpValue"/>
</simple-method>
<simple-method method-name="removeDataResourceMetaData"
short-description="Remove Data Resource Meta Data">
- <check-permission permission="CONTENTMGR"
action="_DELETE"><fail-message message="Security Error: to run
removeDataResourceMetaData you must have the CONTENTMGR_DELETE or
CONTENTMGR_ADMIN permission"/></check-permission>
+ <check-permission permission="CONTENTMGR" action="_DELETE">
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityDeletePermission"/>
+ </check-permission>
<check-errors/>
<make-value entity-name="DataResourceMetaData"
value-field="lookupKeyValue"/>
@@ -153,7 +164,9 @@ under the License.
<!-- Methods for DataResourcePurpose -->
<simple-method method-name="createDataResourcePurpose"
short-description="Create Data Resource Purpose">
- <check-permission permission="CONTENTMGR"
action="_CREATE"><fail-message message="Security Error: to run
createDataResourcePurpose you must have the CONTENTMGR_CREATE or
CONTENTMGR_ADMIN permission"/></check-permission>
+ <check-permission permission="CONTENTMGR" action="_CREATE">
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityCreatePermission"/>
+ </check-permission>
<check-errors/>
<make-value entity-name="DataResourcePurpose" value-field="newEntity"/>
@@ -162,7 +175,8 @@ under the License.
<create-value value-field="newEntity"/>
</simple-method>
<simple-method method-name="updateDataResourcePurpose"
short-description="Update Data Resource Purpose">
- <check-permission permission="CONTENTMGR"
action="_UPDATE"><fail-message message="Security Error: to run
updateDataResourcePurpose you must have the CONTENTMGR_UPDATE or
CONTENTMGR_ADMIN permission"/></check-permission>
+ <check-permission permission="CONTENTMGR" action="_UPDATE">
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityUpdatePermission"/>
<check-errors/>
<make-value entity-name="DataResourcePurpose"
value-field="lookupKeyValue"/>
@@ -172,7 +186,9 @@ under the License.
<store-value value-field="lookedUpValue"/>
</simple-method>
<simple-method method-name="removeDataResourcePurpose"
short-description="Remove Data Resource Purpose">
- <check-permission permission="CONTENTMGR"
action="_DELETE"><fail-message message="Security Error: to run
removeDataResourcePurpose you must have the CONTENTMGR_DELETE or
CONTENTMGR_ADMIN permission"/></check-permission>
+ <check-permission permission="CONTENTMGR" action="_DELETE">
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityDeletePermission"/>
+ </check-permission>
<check-errors/>
<make-value entity-name="DataResourcePurpose"
value-field="lookupKeyValue"/>
@@ -533,15 +549,15 @@ under the License.
</if-not-empty>
<if-empty field="currentContent">
<add-error>
- <fail-message message="Neither content nor contentId
supplied."/>
+ <fail-property resource="ContentUiLabels"
property="ContentNeitherContentSupplied"/>
</add-error>
</if-empty>
</if-empty>
<check-errors/>
<if-empty field="currentContent.dataResourceId">
- <add-error>
- <fail-message message="No dataResourceId found"/>
- </add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
</if-empty>
<check-errors/>
<field-to-result field="currentContent.dataResourceId"
result-name="dataResourceId"/>
@@ -549,9 +565,9 @@ under the License.
<field-map field-name="dataResourceId"
from-field="currentContent.dataResourceId"/>
</entity-one>
<if-empty field="eText">
- <add-error>
- <fail-message message="Electronic Text not found."/>
- </add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentElectronicTextNotFound"/>
+ </add-error>
</if-empty>
<check-errors/>
@@ -660,7 +676,9 @@ under the License.
<return/>
</if-compare>
- <add-error><fail-message message="Data type [${dataResourceTypeId} is
not yet supported!"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataTypeNotYetSupported"/>
+ </add-error>
<check-errors/>
</simple-method>
@@ -668,7 +686,9 @@ under the License.
<simple-method method-name="saveLocalFileDataResource"
short-description="Attach an uploaded file to a data resource as LOCAL_FILE">
<entity-one entity-name="DataResource" value-field="dataResource"/>
<if-empty field="dataResource">
- <add-error><fail-message message="No data resource found for ID:
[${parameters.dataResourceId}]"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
<else>
<if-not-empty field="dataResource.objectInfo">
<set field="isUpdate" value="Y"/>
@@ -688,7 +708,9 @@ under the License.
</or>
</condition>
<then>
- <add-error><fail-message message="No uploaded content
found in context"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentNoUploadedContentFound"/>
+ </add-error>
</then>
<else>
<!-- if not upload is found on an update; its okay,
don't do anything just return -->
@@ -733,7 +755,9 @@ under the License.
<field-map field-name="dataResourceId"
from-field="parameters.dataResourceId"/>
</entity-one>
<if-empty field="dataResource">
- <add-error><fail-message message="No data resource found for ID:
[${parameters.dataResourceId}]"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
</if-empty>
<if>
<condition>
@@ -748,7 +772,9 @@ under the License.
</or>
</condition>
<then>
- <add-error><fail-message message="No uploaded content
found in context"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentNoUploadedContentFound"/>
+ </add-error>
</then>
<else>
<!-- if not upload is found on an update; its okay,
don't do anything just return -->
@@ -789,7 +815,9 @@ under the License.
<field-map field-name="dataResourceId"
from-field="parameters.dataResourceId"/>
</entity-one>
<if-empty field="dataResource">
- <add-error><fail-message message="No data resource found for ID:
[${parameters.dataResourceId}]"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
</if-empty>
<if>
<condition>
@@ -804,7 +832,9 @@ under the License.
</or>
</condition>
<then>
- <add-error><fail-message message="No uploaded content
found in context"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentNoUploadedContentFound"/>
+ </add-error>
</then>
<else>
<!-- if not upload is found on an update; its okay,
don't do anything just return -->
@@ -845,7 +875,9 @@ under the License.
<field-map field-name="dataResourceId"
from-field="parameters.dataResourceId"/>
</entity-one>
<if-empty field="dataResource">
- <add-error><fail-message message="No data resource found for ID:
[${parameters.dataResourceId}]"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
</if-empty>
<if>
<condition>
@@ -860,7 +892,9 @@ under the License.
</or>
</condition>
<then>
- <add-error><fail-message message="No uploaded content
found in context"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentNoUploadedContentFound"/>
+ </add-error>
</then>
<else>
<!-- if not upload is found on an update; its okay,
don't do anything just return -->
@@ -901,7 +935,9 @@ under the License.
<field-map field-name="dataResourceId"
from-field="parameters.dataResourceId"/>
</entity-one>
<if-empty field="dataResource">
- <add-error><fail-message message="No data resource found for ID:
[${parameters.dataResourceId}]"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
</if-empty>
<if>
<condition>
@@ -916,7 +952,9 @@ under the License.
</or>
</condition>
<then>
- <add-error><fail-message message="No uploaded content
found in context"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentNoUploadedContentFound"/>
+ </add-error>
</then>
<else>
<!-- if not upload is found on an update; its okay,
don't do anything just return -->
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml?rev=1051607&r1=1051606&r2=1051607&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml
(original)
+++
ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml
Tue Dec 21 18:45:49 2010
@@ -136,7 +136,9 @@
<set field="contentId" from-field="parameters.contentId"/>
</if-empty>
<if-empty field="contentId">
- <add-error><fail-message message="Content Permission
Service VIEW requires a contentId!"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentViewPermissionError"/>
+ </add-error>
</if-empty>
<check-errors/>
@@ -290,7 +292,9 @@
<set field="contentId" from-field="parameters.contentId"/>
</if-empty>
<if-empty field="contentId">
- <add-error><fail-message message="Content Permission Service
UPDATE requires a contentId!"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityUpdatePermission"/>
+ </add-error>
</if-empty>
<check-errors/>
@@ -322,7 +326,9 @@
<field-map field-name="contentId"/>
</entity-one>
<if-empty field="thisContent">
- <add-error><fail-message message="Content record not found
for ID [${contentId}]"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentNoContentFound"/>
+ </add-error>
<check-errors/>
</if-empty>
@@ -424,7 +430,10 @@
<set field="hasPermission" type="Boolean" value="false"/>
<if-empty field="contentOperationId">
- <add-error><fail-message message="Required field
'contentOperationId' is missing in simple method call
[checkContentOperationSecurity]"/></add-error>
+ <add-error>
+ <set field="requiredField" value="contentOperationId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentRequiredField"/>
+ </add-error>
</if-empty>
<if-empty field="contentPurposeTypeId">
@@ -625,7 +634,10 @@
<set field="hasPermission" type="Boolean" value="false"/>
<if-empty field="checkId">
- <add-error><fail-message message="Required field 'checkId' is
missing in simple method call [checkOwnership]"/></add-error>
+ <add-error>
+ <set field="requiredField" value="checkId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentRequiredField"/>
+ </add-error>
</if-empty>
<if-empty field="partyId">
<set field="partyId" from-field="userLogin.partyId"/>
@@ -666,19 +678,31 @@
<!-- roleEntity is required to determine which content role table to
look: ContentRole, DataResourceRole, etc -->
<if-empty field="roleEntity">
- <add-error><fail-message message="Required field 'roleEntity' is
missing in simple method call [checkRoleSecurity]"/></add-error>
+ <add-error>
+ <set field="requiredField" value="roleEntity"/>
+ <fail-property resource="ContentUiLabels"
property="ContentRequiredField"/>
+ </add-error>
</if-empty>
<!-- roleEntityField is required to determine the pk field to check;
contentId, dataResourceId, etc -->
<if-empty field="roleEntityField">
- <add-error><fail-message message="Required field 'roleEntityField'
is missing in simple method call [checkRoleSecurity]"/></add-error>
+ <add-error>
+ <set field="requiredField" value="roleEntityField"/>
+ <fail-property resource="ContentUiLabels"
property="ContentRequiredField"/>
+ </add-error>
</if-empty>
<!-- setting the env field contentId is required for this simple
method -->
<if-empty field="checkId">
- <add-error><fail-message message="Required field 'checkId' is
missing in simple method call [checkRoleSecurity]"/></add-error>
+ <add-error>
+ <set field="requiredField" value="checkId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentRequiredField"/>
+ </add-error>
</if-empty>
<!-- the party ID to check is required for this check -->
<if-empty field="checkPartyId">
- <add-error><fail-message message="Required field 'checkPartyId' is
missing in simple method call [checkRoleSecurity]"/></add-error>
+ <add-error>
+ <set field="requiredField" value="checkPartyId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentRequiredField"/>
+ </add-error>
</if-empty>
<check-errors/>
@@ -757,7 +781,10 @@
<!-- method to get the content purposes -->
<simple-method method-name="findAllContentPurposes"
short-description="Find all content purposes for the specified content">
<if-empty field="checkId">
- <add-error><fail-message message="Required field 'checkId'
(contentId) is missing in simple method call
[findAllContentPurposes]"/></add-error>
+ <add-error>
+ <set field="requiredField" value="checkId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentRequiredField"/>
+ </add-error>
</if-empty>
<check-errors/>
@@ -779,7 +806,10 @@
<!-- method to get content associations -->
<simple-method method-name="findAllParentContent" short-description="Finds
all associated parent content">
<if-empty field="contentId">
- <add-error><fail-message message="Required field 'contentId' is
missing in simple method call [findAllParentContent]"/></add-error>
+ <add-error>
+ <set field="requiredField" value="contentId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentRequiredField"/>
+ </add-error>
</if-empty>
<check-errors/>
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml?rev=1051607&r1=1051606&r2=1051607&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml
(original)
+++
ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml
Tue Dec 21 18:45:49 2010
@@ -123,7 +123,9 @@
<set field="dataResourceId"
from-field="parameters.dataResourceId"/>
</if-empty>
<if-empty field="dataResourceId">
- <add-error><fail-message message="DataResource Permission Service
UPDATE requires a dataResourceId!"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSecurityUpdatePermission"/>
+ </add-error>
</if-empty>
<check-errors/>
@@ -145,7 +147,9 @@
<field-map field-name="dataResourceId"/>
</entity-one>
<if-empty field="thisDataResource">
- <add-error><fail-message message="DataResource record not
found for ID [${dataResourceId}]"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
<check-errors/>
</if-empty>
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml?rev=1051607&r1=1051606&r2=1051607&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
(original)
+++
ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
Tue Dec 21 18:45:49 2010
@@ -185,7 +185,11 @@
</and>
</condition>
<then>
- <add-error><fail-message message="Question type ENUMERATION
requires enumTypeId to be set"/></add-error>
+ <add-error>
+ <set field="questionType" value="ENUMERATION"/>
+ <set field="requiredField" value="enumTypeId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentQuestionTypeRequiredField"/>
+ </add-error>
</then>
</if>
<if>
@@ -196,7 +200,11 @@
</and>
</condition>
<then>
- <add-error><fail-message message="Question type GEO requires
geoId to be set"/></add-error>
+ <add-error>
+ <set field="questionType" value="GEO"/>
+ <set field="requiredField" value="geoId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentQuestionTypeRequiredField"/>
+ </add-error>
</then>
</if>
<check-errors/>
@@ -219,7 +227,11 @@
</and>
</condition>
<then>
- <add-error><fail-message message="Question type ENUMERATION
requires enumTypeId to be set"/></add-error>
+ <add-error>
+ <set field="questionType" value="ENUMERATION"/>
+ <set field="requiredField" value="enumTypeId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentQuestionTypeRequiredField"/>
+ </add-error>
</then>
</if>
<if>
@@ -230,7 +242,11 @@
</and>
</condition>
<then>
- <add-error><fail-message message="Question type GEO requires
geoId to be set"/></add-error>
+ <add-error>
+ <set field="questionType" value="GEO"/>
+ <set field="requiredField" value="geoId"/>
+ <fail-property resource="ContentUiLabels"
property="ContentQuestionTypeRequiredField"/>
+ </add-error>
</then>
</if>
<check-errors/>
@@ -405,7 +421,7 @@
<entity-one entity-name="Survey" value-field="survey"
use-cache="true"/>
<if-empty field="survey">
<add-error>
- <fail-message message="No survey found for survey ID:
${surveyLookup.surveyId}"/>
+ <fail-property resource="ContentUiLabels"
property="ContentNoSurveyFound"/>
</add-error>
<check-errors/>
</if-empty>
@@ -415,14 +431,18 @@
<field-map field-name="surveyId" from-field="survey.surveyId"/>
</entity-and>
<if-empty field="surveyQuestionAndApplList">
- <add-error><fail-message message="No questions found for survey
ID: ${survey.surveyId}"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentNoQuestionsSurveyFound"/>
+ </add-error>
<check-errors/>
</if-empty>
<!-- check if anonymous is allowed and if not that we have a partyId
-->
<if-compare field="survey.isAnonymous" operator="not-equals" value="Y">
<if-empty field="parameters.partyId">
- <add-error><fail-message message="Anonymous response to this
survey is not allowed (you must be logged in)"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyAnonymousResponse"/>
+ </add-error>
<check-errors/>
</if-empty>
</if-compare>
@@ -436,7 +456,9 @@
</entity-and>
<if-not-empty field="existingResponses">
<if-compare field="survey.allowUpdate"
operator="not-equals" value="Y">
- <add-error><fail-message message="You have already
responded to this survey; multiple responses are not allowed"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyAlreadyResponded"/>
+ </add-error>
<check-errors/>
</if-compare>
</if-not-empty>
@@ -444,7 +466,9 @@
</if-compare>
<!-- make sure we have answers to check -->
<if-empty field="parameters.answers">
- <add-error><fail-message message="No answers were
found"/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyAnswersNotFound"/>
+ </add-error>
<check-errors/>
</if-empty>
<set field="answers" from-field="parameters.answers"/>
@@ -565,7 +589,9 @@
<!-- see if response is required -->
<if-compare field="surveyQuestionAndAppl.requiredField"
operator="equals" value="Y">
<if-empty field="${answerFieldName}">
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a response."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAResponse"/>
+ </add-error>
</if-empty>
</if-compare>
@@ -573,7 +599,9 @@
<if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId"
operator="equals" value="CREDIT_CARD">
<if-validate-method field="${answerFieldName}"
method="isCreditCard">
<else>
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a valid credit-card
number."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAValidCreditCardNumber"/>
+ </add-error>
</else>
</if-validate-method>
</if-compare>
@@ -590,7 +618,9 @@
<if-compare field="codeOk" value="true" operator="not-equals">
<if-validate-method field="${answerFieldName}"
method="isGiftCard">
<else>
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a valid gift-card
number."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAValidGiftCardNumber"/>
+ </add-error>
</else>
</if-validate-method>
</if-compare>
@@ -598,42 +628,54 @@
<if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId"
operator="equals" value="DATE">
<if-validate-method field="${answerFieldName}" method="isDate">
<else>
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a valid date string
(mm/dd/yyyy)."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAValidDate"/>
+ </add-error>
</else>
</if-validate-method>
</if-compare>
<if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId"
operator="equals" value="EMAIL">
<if-validate-method field="${answerFieldName}" method="isEmail">
<else>
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a valid email
address."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAValidEmailAddress"/>
+ </add-error>
</else>
</if-validate-method>
</if-compare>
<if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId"
operator="equals" value="NUMBER_CURRENCY">
<if-validate-method field="${answerFieldName}"
method="isSignedDouble">
<else>
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a valid currency
amount."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAValidCurrencyAmount"/>
+ </add-error>
</else>
</if-validate-method>
</if-compare>
<if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId"
operator="equals" value="NUMBER_FLOAT">
<if-validate-method field="${answerFieldName}"
method="isSignedDouble">
<else>
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a valid decimal
number."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAValidDecimalNumber"/>
+ </add-error>
</else>
</if-validate-method>
</if-compare>
<if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId"
operator="equals" value="NUMBER_LONG">
<if-validate-method field="${answerFieldName}"
method="isSignedLong">
<else>
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a valid whole
number."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAValidWholeNumber"/>
+ </add-error>
</else>
</if-validate-method>
</if-compare>
<if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId"
operator="equals" value="URL">
<if-validate-method field="${answerFieldName}" method="isUrl">
<else>
- <add-error><fail-message message="The question
[${surveyQuestionAndAppl.question}] requires a valid URL."/></add-error>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentSurveyQuestionRequiresAValidURL"/>
+ </add-error>
</else>
</if-validate-method>
</if-compare>