svn commit: r667054 - in /lenya/trunk/src: modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/ modules-core/workflow/resources/i18n/ modules/notification/java/src/org/apache/lenya/notification/ webapp/lenya/resources/i18n/

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Thu Jun 12 04:55:02 2008
New Revision: 667054

URL: http://svn.apache.org/viewvc?rev=667054&view=rev
Log:
Allow to translate params of notification messages, add event to subject for workflow notifications (fixes bug 42415).

Added:
    lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_es.xml
    lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_fr.xml
    lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Text.java
Modified:
    lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Publish.java
    lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Reject.java
    lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Submit.java
    lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui.xml
    lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_de.xml
    lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/AbstractNotifier.java
    lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Message.java
    lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml
    lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml
    lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_es.xml
    lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_fr.xml

Modified: lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Publish.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Publish.java?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Publish.java (original)
+++ lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Publish.java Thu Jun 12 04:55:02 2008
@@ -62,6 +62,7 @@
 import org.apache.lenya.notification.Message;
 import org.apache.lenya.notification.NotificationEventDescriptor;
 import org.apache.lenya.notification.NotificationException;
+import org.apache.lenya.notification.Text;
 import org.apache.lenya.workflow.Version;
 import org.apache.lenya.workflow.Workflowable;
 
@@ -370,9 +371,12 @@
 
         url = getWebUrl(liveVersion);
         User sender = getSession().getIdentity().getUser();
-        String[] params = { url };
-        Message message = new Message(MESSAGE_SUBJECT, new String[0],
-                MESSAGE_DOCUMENT_PUBLISHED, params, sender, recipients);
+        
+        Text[] subjectParams = { new Text(getEvent(), true) };
+        Text[] params = { new Text(url, false) };
+        Text subject = new Text(MESSAGE_SUBJECT, subjectParams);
+        Text body = new Text(MESSAGE_DOCUMENT_PUBLISHED, params);
+        Message message = new Message(subject, body, sender, recipients);
 
         NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message);
         RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, getSession(),

Modified: lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Reject.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Reject.java?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Reject.java (original)
+++ lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Reject.java Thu Jun 12 04:55:02 2008
@@ -34,6 +34,7 @@
 import org.apache.lenya.notification.Message;
 import org.apache.lenya.notification.NotificationException;
 import org.apache.lenya.notification.NotificationEventDescriptor;
+import org.apache.lenya.notification.Text;
 import org.apache.lenya.workflow.Version;
 import org.apache.lenya.workflow.Workflowable;
 
@@ -97,9 +98,12 @@
                 final String webappUrl = authoringVersion.getCanonicalWebappURL();
                 url = serverUrl + request.getContextPath() + webappUrl;
             }
-            String[] params = { reason, url };
-            Message message = new Message(MESSAGE_SUBJECT, new String[0],
-                    MESSAGE_DOCUMENT_REJECTED, params, sender, recipients);
+            
+            Text[] subjectParams = { new Text(getEvent(), true) };
+            Text[] params = { new Text(reason, false), new Text(url, false) };
+            Text subject = new Text(MESSAGE_SUBJECT, subjectParams);
+            Text body = new Text(MESSAGE_DOCUMENT_REJECTED, params);
+            Message message = new Message(subject, body, sender, recipients);
 
             NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message);
             RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, getSession(),

Modified: lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Submit.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Submit.java?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Submit.java (original)
+++ lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Submit.java Thu Jun 12 04:55:02 2008
@@ -32,6 +32,7 @@
 import org.apache.lenya.cms.workflow.usecases.InvokeWorkflow;
 import org.apache.lenya.notification.Message;
 import org.apache.lenya.notification.NotificationEventDescriptor;
+import org.apache.lenya.notification.Text;
 
 /**
  * Submit usecase handler.
@@ -82,10 +83,13 @@
             url = serverUrl + request.getContextPath() + webappUrl;
         }
 
-        String[] params = { url };
+        Text[] subjectParams = { new Text(getEvent(), true) };
+        Text[] params = { new Text(url, false) };
+        Text subject = new Text(MESSAGE_SUBJECT, subjectParams);
+        Text body = new Text(MESSAGE_DOCUMENT_SUBMITTED, params);
+        Message message = new Message(subject, body, sender, recipients);
+
 
-        Message message = new Message(MESSAGE_SUBJECT, new String[0], MESSAGE_DOCUMENT_SUBMITTED,
-                params, sender, recipients);
         NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message);
         RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, getSession(),
                 getLogger(), descriptor);

Modified: lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui.xml?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui.xml (original)
+++ lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui.xml Thu Jun 12 04:55:02 2008
@@ -73,4 +73,10 @@
   <message key="workflow.multiWorkflow">Workflow Overview</message>
   <message key="is_live">Live</message>
   
+  <!-- Notification -->
+  <message key="notification-message">Lenya Notification: {0}</message>
+  <message key="document-published">A document you submitted was published: {0}</message>
+  <message key="document-submitted">A document has been submitted for you to review: {0}</message>
+  <message key="document-rejected">A document you submitted was rejected for the following reason: {0}, {1}</message>
+  
 </catalogue>

Modified: lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_de.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_de.xml?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_de.xml (original)
+++ lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_de.xml Thu Jun 12 04:55:02 2008
@@ -73,5 +73,12 @@
   <message key="state-as-columns">Zustand als Spalten</message>
   <message key="is_live">Live</message>
   
+  <!-- Notification -->
+  <message key="notification-message">Lenya-Benachrichtigung: {0}</message>
+  <message key="notify-submitter">Benachrichtigung an den einreichenden Nutzer senden</message>
+  <message key="document-published">Ein von Ihnen eingereichtes Dokument wurde publiziert: {0}</message>
+  <message key="document-submitted">Ein Dokument wurde zur Durchsicht eingereicht: {0}</message>
+  <message key="document-rejected">Ein von Ihnen eingereichtes Dokument wurde aus folgendem Grund zurückgewiesen: {0}, {1}</message>
+  
 </catalogue>
 

Added: lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_es.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_es.xml?rev=667054&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_es.xml (added)
+++ lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_es.xml Thu Jun 12 04:55:02 2008
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id: cmsui.xml 446564 2006-09-15 10:13:16Z andreas $ -->
+
+<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns="http://apache.org/cocoon/i18n/2.1">
+
+  <!-- Notification -->
+  <message key="notification-message">Notificación: {0}</message>
+  <message key="notify-submitter">notificar al remitente</message>
+  <message key="document-published">Se ha publicado un documento remitido por usted: {0}</message>
+  
+</catalogue>

Added: lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_fr.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_fr.xml?rev=667054&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_fr.xml (added)
+++ lenya/trunk/src/modules-core/workflow/resources/i18n/cmsui_fr.xml Thu Jun 12 04:55:02 2008
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id: cmsui.xml 446564 2006-09-15 10:13:16Z andreas $ -->
+
+<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns="http://apache.org/cocoon/i18n/2.1">
+  
+  <!-- Notification -->
+  <message key="notification-message">Notification de Lenya: {0}</message>
+  <message key="notify-submitter">Notifier le soumetteur</message>
+  <message key="document-published">Un document que vous avez soumis pour approbation a été publié: {0}</message>
+  
+</catalogue>

Modified: lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/AbstractNotifier.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/AbstractNotifier.java?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/AbstractNotifier.java (original)
+++ lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/AbstractNotifier.java Thu Jun 12 04:55:02 2008
@@ -78,6 +78,29 @@
     protected abstract void notify(User user, Message translatedMessage)
             throws NotificationException;
 
+    protected Element createTranslateElement(NamespaceHelper helper, Text text) {
+        Element translateElement = helper.createElement("translate");
+        Element textElement = helper.createElement("text", text.getText());
+        translateElement.appendChild(textElement);
+
+        Text[] params = text.getParameters();
+        for (int i = 0; i < params.length; i++) {
+            Element paramElement;
+            if (params[i].translate()) {
+                if (params[i].getParameters().length > 0) {
+                    getLogger().warn("Parameters can't have parameters (not supported by Cocoon i18n): " + text);
+                }
+                paramElement = helper.createElement("param");
+                Element paramTextElement = helper.createElement("text", params[i].getText());
+                paramElement.appendChild(paramTextElement);
+            } else {
+                paramElement = helper.createElement("param", params[i].getText());
+            }
+            translateElement.appendChild(paramElement);
+        }
+        return translateElement;
+    }
+
     protected Message translateMessage(String locale, Message message) throws NotificationException {
 
         SourceResolver resolver = null;
@@ -93,29 +116,15 @@
 
             Element subjectElement = helper.createElement("subject");
             docElement.appendChild(subjectElement);
-            Element i18nTranslateSubjectElement = i18nHelper.createElement("translate");
+            Element i18nTranslateSubjectElement = createTranslateElement(i18nHelper, message
+                    .getSubjectText());
             subjectElement.appendChild(i18nTranslateSubjectElement);
-            Element subjectI18nElement = i18nHelper.createElement("text", message.getSubject());
-            i18nTranslateSubjectElement.appendChild(subjectI18nElement);
-
-            String[] subjectParams = message.getSubjectParameters();
-            for (int i = 0; i < subjectParams.length; i++) {
-                Element paramElement = i18nHelper.createElement("param", subjectParams[i]);
-                i18nTranslateSubjectElement.appendChild(paramElement);
-            }
 
             Element bodyElement = helper.createElement("body");
             docElement.appendChild(bodyElement);
-            Element i18nTranslateElement = i18nHelper.createElement("translate");
-            bodyElement.appendChild(i18nTranslateElement);
-            Element bodyI18nElement = i18nHelper.createElement("text", message.getBody());
-            i18nTranslateElement.appendChild(bodyI18nElement);
-
-            String[] msgParams = message.getBodyParameters();
-            for (int i = 0; i < msgParams.length; i++) {
-                Element paramElement = i18nHelper.createElement("param", msgParams[i]);
-                i18nTranslateElement.appendChild(paramElement);
-            }
+            Element i18nTranslateBodyElement = createTranslateElement(i18nHelper, message
+                    .getBodyText());
+            bodyElement.appendChild(i18nTranslateBodyElement);
 
             Session session = this.request.getSession();
             session.setAttribute("notification.dom", doc);
@@ -134,8 +143,8 @@
                 bodyElement = helper.getFirstChild(doc.getDocumentElement(), "body");
                 String body = DocumentHelper.getSimpleElementText(bodyElement);
 
-                return new Message(subject, new String[0], body, new String[0],
-                        message.getSender(), message.getRecipients());
+                return new Message(new Text(subject, false), new Text(body, false), message
+                        .getSender(), message.getRecipients());
             } else {
                 // this happens in the test
                 getLogger().info("cocoon protocol not available, not translating message");

Modified: lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Message.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Message.java?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Message.java (original)
+++ lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Message.java Thu Jun 12 04:55:02 2008
@@ -21,86 +21,114 @@
 import java.util.Date;
 
 import org.apache.lenya.ac.Identifiable;
+import org.apache.lenya.util.Assert;
 
 /**
  * A notification message.
  */
 public class Message {
+    
+    private Text subject;
+    private Text body;
 
-    private String subject;
-    private String[] subjectParams;
-    private String body;
-    private String[] bodyParams;
     private Identifiable sender;
     private Identifiable[] recipients;
     private Date time;
-
+    
     /**
-     * Ctor.
      * @param subject The subject.
-     * @param subjectParams The subject parameters.
      * @param body The body.
-     * @param bodyParams The body parameters.
      * @param sender The sender.
      * @param recipients The recipients.
      */
-    public Message(String subject, String[] subjectParams, String body, String[] bodyParams,
-            Identifiable sender, Identifiable[] recipients) {
+    public Message(Text subject, Text body, Identifiable sender, Identifiable[] recipients) {
+        Assert.notNull("subject", subject);
+        Assert.notNull("body", body);
+        Assert.notNull("sender", sender);
+        Assert.notNull("recipients", recipients);
         this.subject = subject;
-        this.subjectParams = subjectParams;
         this.body = body;
-        this.bodyParams = bodyParams;
         this.sender = sender;
         this.recipients = recipients;
         this.time = new Date();
     }
 
     /**
+     * Constructor.
+     * @param subject The subject.
+     * @param subjectParams The subject parameters.
+     * @param body The body.
+     * @param bodyParams The body parameters.
+     * @param sender The sender.
+     * @param recipients The recipients.
+     * @deprecated Use {@link #Message(Text, Text, Identifiable, Identifiable[])}Êinstead.
+     */
+    public Message(String subject, String[] subjectParams, String body, String[] bodyParams,
+            Identifiable sender, Identifiable[] recipients) {
+        this(new Text(subject, subjectParams), new Text(body, bodyParams), sender, recipients);
+    }
+
+    /**
      * Determine if this message has parameters
      * @return true if the message has parameters
      */
     public boolean hasBodyParameters() {
-        return bodyParams != null && bodyParams.length > 0;
+        Text[] params = this.body.getParameters();
+        return params != null && params.length > 0;
     }
 
     /**
      * Retrieve the message content
      * @return the message
+     * @deprecated Use {@link #getBodyText()} instead.
      */
     public String getBody() {
-        return body;
+        return this.body.getText();
     }
 
     /**
      * Retrieve the parameters for this message
      * @return the parameters
+     * @deprecated Use {@link #getBodyText()} instead.
      */
     public String[] getBodyParameters() {
-        return bodyParams;
+        return convert(this.body.getParameters());
+    }
+
+    protected String[] convert(Text[] textParams) {
+        String[] params = new String[textParams.length];
+        for (int i = 0; i < params.length; i++) {
+            params[i] = textParams[i].getText();
+        }
+        return params;
     }
 
     /**
      * Determine if this message has parameters
      * @return true if the message has parameters
+     * @deprecated Use {@link #getSubjectText()} instead.
      */
     public boolean hasSubjectParameters() {
-        return subjectParams != null && subjectParams.length > 0;
+        Text[] params = this.subject.getParameters();
+        return params != null && params.length > 0;
     }
 
     /**
      * Retrieve the message subject
      * @return the subject
+     * @deprecated Use {@link #getSubjectText()} instead.
      */
     public String getSubject() {
-        return subject;
+        return this.subject.getText();
     }
 
     /**
      * Retrieve the parameters for this message
      * @return the parameters
+     * @deprecated Use {@link #getSubjectText()} instead.
      */
     public String[] getSubjectParameters() {
-        return subjectParams;
+        return convert(this.subject.getParameters());
     }
     
     /**
@@ -125,5 +153,19 @@
     public Date getTime() {
         return (Date)this.time.clone();
     }
+    
+    /**
+     * @return The message subject.
+     */
+    public Text getSubjectText() {
+        return this.subject;
+    }
+    
+    /**
+     * @return The message body.
+     */
+    public Text getBodyText() {
+        return this.body;
+    }
 
 }

Added: lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Text.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Text.java?rev=667054&view=auto
==============================================================================
--- lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Text.java (added)
+++ lenya/trunk/src/modules/notification/java/src/org/apache/lenya/notification/Text.java Thu Jun 12 04:55:02 2008
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.lenya.notification;
+
+import java.util.Arrays;
+
+import org.apache.lenya.util.Assert;
+
+/**
+ * A translatable text with optional i18n parameters.
+ */
+public class Text {
+
+    private String text;
+    private Text[] parameters;
+    private boolean translate;
+
+    /**
+     * @param text The text.
+     * @param translate if the text should be translated.
+     */
+    public Text(String text, boolean translate) {
+        Assert.notNull("text", text);
+        this.text = text;
+        this.translate = translate;
+    }
+
+    /**
+     * Text objects built using this constructor are always translated.
+     * @param text The text.
+     * @param params The parameters.
+     */
+    public Text(String text, Text[] params) {
+        this(text, true);
+        this.parameters = params;
+    }
+
+    /**
+     * Convenience constructor which allows to pass a string array instead of a
+     * text array as parameters.
+     * @param text The text.
+     * @param params The parameters.
+     */
+    public Text(String text, String[] params) {
+        this(text, convert(params));
+    }
+
+    protected static Text[] convert(String[] params) {
+        Text[] textParams = new Text[params.length];
+        for (int i = 0; i < params.length; i++) {
+            textParams[i] = new Text(params[i], false);
+        }
+        return textParams;
+    }
+
+    /**
+     * @return The text.
+     */
+    public String getText() {
+        return this.text;
+    }
+
+    /**
+     * @return if the text should be translated.
+     */
+    public boolean translate() {
+        return this.translate;
+    }
+
+    /**
+     * @return The parameters.
+     */
+    public Text[] getParameters() {
+        return this.parameters == null ? new Text[0] : cloneArray(this.parameters);
+    }
+
+    protected static Text[] cloneArray(Text[] params) {
+        return (Text[]) Arrays.asList(params).toArray(new Text[params.length]);
+    }
+    
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        buf.append(this.text).append(" ").append(this.parameters);
+        return buf.toString();
+    }
+
+}

Modified: lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml Thu Jun 12 04:55:02 2008
@@ -315,12 +315,6 @@
   <message key="restore">restore</message>
   <message key="error-workflow-document">The event {0} is not executable on document "{1}"</message>
   
-  <!-- Notification -->
-  <message key="notification-message">Lenya Notification</message>
-  <message key="document-published">A document you submitted was published: {0}</message>
-  <message key="document-submitted">A document has been submitted for you to review: {0}</message>
-  <message key="document-rejected">A document you submitted was rejected for the following reason: {0}, {1}</message>
-  
   <!-- areas -->
   <message key="authoring-area">Authoring</message>
   <message key="live-area">Live</message>

Modified: lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml Thu Jun 12 04:55:02 2008
@@ -321,11 +321,6 @@
   <message key="restore">wiederherstellen</message>
   <message key="error-workflow-document">Das Ereignis {0} kann nicht auf das Dokument "{1}" angewandt werden.</message>
     
-  <!-- Notification -->
-  <message key="notification-message">Lenya-Benachrichtigung</message>
-  <message key="notify-submitter">Benachrichtigung an den einreichenden Nutzer senden</message>
-  <message key="document-published">Ein von Ihnen eingereichtes Dokument wurde publiziert: {0}</message>
-  
   <!-- areas -->
   <message key="authoring-area">Bearbeitung</message>
   <message key="live-area">Live</message>

Modified: lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_es.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_es.xml?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_es.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_es.xml Thu Jun 12 04:55:02 2008
@@ -322,11 +322,6 @@
   <message key="publish">publicar</message>
   <message key="error-workflow-document">El evento  {0} no es ejecutable en el documento "{1}"</message>
 
-  <!-- Notification -->
-  <message key="notification-message">Notificación</message>
-  <message key="notify-submitter">notificar al remitente</message>
-  <message key="document-published">Se ha publicado un documento remitido por usted: {0}</message>
-
   <!-- Info asset  -->
   <message key="New Asset">Nuevo activo</message>
 

Modified: lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_fr.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_fr.xml?rev=667054&r1=667053&r2=667054&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_fr.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_fr.xml Thu Jun 12 04:55:02 2008
@@ -298,11 +298,6 @@
   <message key="publish">publier</message>
   <message key="error-workflow-document">L'événement {0} n'est pas exécutable pour le document "{1}"</message>
 
- <!-- Notification -->
-  <message key="notification-message">Notification de Lenya</message>
-  <message key="notify-submitter">Notifier le soumetteur</message>
-  <message key="document-published">Un document que vous avez soumis pour approbation a été publié: {0}</message>
-
   <!-- Info asset  -->
   <message key="New Asset">Nouvel Actif</message>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.