You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2005/09/21 11:00:17 UTC
svn commit: r290661 - in /lenya/docu/src/documentation/content/xdocs:
1_4/reference/notification.xml site.xml
Author: andreas
Date: Wed Sep 21 02:00:11 2005
New Revision: 290661
URL: http://svn.apache.org/viewcvs?rev=290661&view=rev
Log:
Added docs about notification
Added:
lenya/docu/src/documentation/content/xdocs/1_4/reference/notification.xml
Modified:
lenya/docu/src/documentation/content/xdocs/site.xml
Added: lenya/docu/src/documentation/content/xdocs/1_4/reference/notification.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_4/reference/notification.xml?rev=290661&view=auto
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_4/reference/notification.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/1_4/reference/notification.xml Wed Sep 21 02:00:11 2005
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>Notification</title>
+ </header>
+ <body>
+
+<section>
+ <title>How to Send Notification Messages</title>
+
+ <p>To send notification messages, use the <code>Notifier</code> component which is provided by the
+ <code>notification</code> module. A shortcut to the <code>Notifier</code> functionality
+ is offered by the <code>NotificationUtil</code> utility class. Here's an example how to use it:</p>
+
+<source xml:space="preserve"><![CDATA[
+protected void notify(User sender, User recipient, document) {
+
+ Identifiable[] recipients = { recipient };
+
+ // compose message, using parameters for i18n
+
+ String[] params = { document.getId() };
+ Message message = new Message("document-was-published", params);
+
+ // send message
+
+ NotificationUtil.notify(this.manager, recipients, sender, message);
+}
+]]></source>
+
+ <p>
+ The message is sent to each particular recipient, translated using the recipient's locale.
+ </p>
+
+ <p>
+ The current implementation, <code>DefaultNotifier</code>, sends an email to each recipient.
+ Future implementations could include a message list which is managed by the CMS and is
+ presented to a user after she logs in.
+ </p>
+
+</section>
+
+ </body>
+</document>
Modified: lenya/docu/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/site.xml?rev=290661&r1=290660&r2=290661&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/site.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/site.xml Wed Sep 21 02:00:11 2005
@@ -71,6 +71,7 @@
<lenya href="lenya.html" label="lenya:"/>
<lenyadoc href="lenyadoc.html" label="lenyadoc:"/>
</protocols>
+ <notification href="notification.html" label="Notification"/>
</reference>
<javadoc1.4 href="../../../../apidocs/1.4/index.html" label="1.4 API (Javadoc)"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org