[Notification] Template feature added 61/119861/2
authorPiotr Kosko <p.kosko@samsung.com>
Mon, 20 Mar 2017 10:00:10 +0000 (11:00 +0100)
committerPiotr Kosko <p.kosko@samsung.com>
Tue, 21 Mar 2017 07:39:58 +0000 (08:39 +0100)
Change-Id: Ib8138589c0b14811f93674b5c56bc7a59007de8b
Signed-off-by: Piotr Kosko <p.kosko@samsung.com>
org.tizen.guides/html/web/notification/notification_w.htm
org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html
org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html

index 322f756..2611e01 100644 (file)
@@ -31,6 +31,7 @@
                        <li><a href="#create">Creating Simple Notifications</a></li>
                        <li><a href="#progress">Creating Progress Notifications</a></li>
                        <li><a href="#manage">Managing Notifications</a></li>
+            <li><a href="#templates">Managing Notification Templates</a></li>
                </ul>
                <p class="toc-title">Related Info</p>
                <ul class="toc">
@@ -57,6 +58,8 @@
   <p>You can <a href="#progress">create a progress notification</a> that informs the user about the progress of an activity.</p></li>
    <li>Managing notifications
    <p>You can <a href="#manage">retrieve, update, and remove posted notifications</a>.</p></li>
+   <li>Managing Notification templates
+   <p>You can <a href="#templates">save templates and create notification</a> based on existing template.</p></li>
   </ul>
 
   <p>To display a notification, you need to create a <code>Notification</code> object (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#Notification">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#Notification">wearable</a> applications), or its subtype. </p>
@@ -204,6 +207,39 @@ tizen.notification.removeAll();
     </ol></li>
   </ol>
 
+<h2 id="templates" name="templates">Managing Notification templates</h2>
+
+<p>Learning how to manage notification templates allows you to save a notification as a template and use it later to faster creation of new notifications based on the same pattern:</p>
+  <ol>
+   <li><p>To save a template:</p>
+    <ol type="a">
+     <li>Create a <a href="#create">"SIMPLE"</a> or <a href="#progress">"PROGRESS"</a> notification, which would be used as a template. There is no need to post it.
+<pre class="prettyprint">
+// assume that myNotification is a valid tizen.StatusNotification object
+var myNotification;
+</pre></li>
+     <li><p>To save the template, use <code>saveNotificationAsTemplate()</code> method of the <code>NotificationManager</code> interface (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#NotificationManager::saveNotificationAsTemplate">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#NotificationManager::saveNotificationAsTemplate">wearable</a> applications):</p>
+<pre class="prettyprint">
+try {
+&nbsp;&nbsp;&nbsp;var templateName = &quot;importantNoti&quot;;
+&nbsp;&nbsp;&nbsp;tizen.notification.saveNotificationAsTemplate(templateName, myNotification);
+} catch(e) {
+&nbsp;&nbsp;&nbsp;console.log(&quot;Error &quot; + e.message + &quot; occured&quot;);
+}
+</pre></li>
+    </ol></li>
+   <li><p>To use the template for creation of new pre-set notification, use the <code>createNotificationFromTemplate()</code> method of the <code>NotificationManager</code> interface (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#NotificationManager::createNotificationFromTemplate">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#NotificationManager::createNotificationFromTemplate">wearable</a> applications):</p>
+<pre class="prettyprint">
+try {
+&nbsp;&nbsp;&nbsp;var newTemplateNotification = tizen.notification.createNotificationFromTemplate(templateName);
+&nbsp;&nbsp;&nbsp;console.log(&quot;Content of new notification: &quot; + content);
+} catch (e) {
+&nbsp;&nbsp;&nbsp;console.log(&quot;Error &quot; + e.message + &quot; occured&quot;);
+}
+</pre></li>
+    </ol></li>
+  </ol>
+
 <script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
 <script type="text/javascript" src="../../scripts/showhide.js"></script>
 </div></div></div>
@@ -226,4 +262,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
 </script>
 
 </body>
-</html>
\ No newline at end of file
+</html>
index 6144326..5f776c2 100644 (file)
@@ -24,15 +24,20 @@ For more information on the Notification features, see <a href="https://develope
 <h2>Table of Contents</h2>
 <ul class="toc">
 <li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc">
-<li>1.1. <a href="#NotificationId">NotificationId</a>
+<li>
+                    1.1. <a href="#NotificationId">NotificationId</a>
 </li>
-<li>1.2. <a href="#NotificationType">NotificationType</a>
+<li>
+                    1.2. <a href="#NotificationType">NotificationType</a>
 </li>
-<li>1.3. <a href="#StatusNotificationType">StatusNotificationType</a>
+<li>
+                    1.3. <a href="#StatusNotificationType">StatusNotificationType</a>
 </li>
-<li>1.4. <a href="#NotificationProgressType">NotificationProgressType</a>
+<li>
+                    1.4. <a href="#NotificationProgressType">NotificationProgressType</a>
 </li>
-<li>1.5. <a href="#LEDCustomFlags">LEDCustomFlags</a>
+<li>
+                    1.5. <a href="#LEDCustomFlags">LEDCustomFlags</a>
 </li>
 </ul>
 </li>
@@ -70,14 +75,21 @@ For more information on the Notification features, see <a href="https://develope
 </tr>
 <tr>
 <td><a href="#NotificationManager">NotificationManager</a></td>
-<td>void <a href="#NotificationManager::post">post</a> (<a href="#Notification">Notification</a> notification)<br>
-    void <a href="#NotificationManager::update">update</a> (<a href="#Notification">Notification</a> notification)<br>
-    void <a href="#NotificationManager::remove">remove</a> (<a href="#NotificationId">NotificationId</a> id)<br>
-    void <a href="#NotificationManager::removeAll">removeAll</a> ()<br>
-    <a href="#Notification">Notification</a> <a href="#NotificationManager::get">get</a> (<a href="#NotificationId">NotificationId</a> id)<br>
-    <a href="#Notification">Notification</a>[] <a href="#NotificationManager::getAll">getAll</a> ()<br>
-    void <a href="#NotificationManager::playLEDCustomEffect">playLEDCustomEffect</a> (long timeOn, long timeOff, DOMString color, <a href="#LEDCustomFlags">LEDCustomFlags</a>[] flags)<br>
-    void <a href="#NotificationManager::stopLEDCustomEffect">stopLEDCustomEffect</a> ()</td>
+<td>
+<div>void <a href="#NotificationManager::post">post</a> (<a href="#Notification">Notification</a> notification)</div>
+<div>void <a href="#NotificationManager::update">update</a> (<a href="#Notification">Notification</a> notification)</div>
+<div>void <a href="#NotificationManager::remove">remove</a> (<a href="#NotificationId">NotificationId</a> id)</div>
+<div>void <a href="#NotificationManager::removeAll">removeAll</a> ()</div>
+<div>
+<a href="#Notification">Notification</a> <a href="#NotificationManager::get">get</a> (<a href="#NotificationId">NotificationId</a> id)</div>
+<div>
+<a href="#Notification">Notification</a>[] <a href="#NotificationManager::getAll">getAll</a> ()</div>
+<div>void <a href="#NotificationManager::playLEDCustomEffect">playLEDCustomEffect</a> (long timeOn, long timeOff, DOMString color, <a href="#LEDCustomFlags">LEDCustomFlags</a>[] flags)</div>
+<div>void <a href="#NotificationManager::stopLEDCustomEffect">stopLEDCustomEffect</a> ()</div>
+<div>void <a href="#NotificationManager::saveNotificationAsTemplate">saveNotificationAsTemplate</a> (DOMString name, <a href="#Notification">Notification</a> notification)</div>
+<div>
+<a href="#Notification">Notification</a> <a href="#NotificationManager::createNotificationFromTemplate">createNotificationFromTemplate</a> (DOMString name)</div>
+</td>
 </tr>
 <tr>
 <td><a href="#Notification">Notification</a></td>
@@ -246,6 +258,10 @@ Notification API.
         void playLEDCustomEffect(long timeOn, long timeOff, DOMString color, <a href="#LEDCustomFlags">LEDCustomFlags</a>[] flags) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
         void stopLEDCustomEffect() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+        void saveNotificationAsTemplate(DOMString name, <a href="#Notification">Notification</a> notification) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+        <a href="#Notification">Notification</a> createNotificationFromTemplate(DOMString name) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
     };</pre>
 <p><span class="version">
             Since: </span>
@@ -729,6 +745,152 @@ try
 catch (e)
 {
 &nbsp;&nbsp;&nbsp;console.log("Error Exception, error name: " + e.name + ", error message: " + e.message);
+</pre>
+</div>
+</dd>
+<dt class="method" id="NotificationManager::saveNotificationAsTemplate">
+<a class="backward-compatibility-anchor" name="::Notification::NotificationManager::saveNotificationAsTemplate"></a><code><b><span class="methodName">saveNotificationAsTemplate</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Saves a notification template to the notification database.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void saveNotificationAsTemplate(DOMString name, <a href="#Notification">Notification</a> notification);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+An application can save the created notification as a template for later reuse.
+If the template has the same name as a saved one, the saved template will be overwritten.
+            </p>
+            <p>
+A saved template can be loaded only by the application which saved it.
+All templates are removed when the application package is uninstalled.
+            </p>
+           </div>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+ http://tizen.org/privilege/notification
+            </p>
+<p><span class="remark"> Remark : </span>
+ The number of templates is limited to 10. When you try to add more than 10 templates, exception is thrown.
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">name</span>: 
+ The name of template to be saved.
+                </li>
+          <li class="param">
+<span class="name">notification</span>: 
+ A notification to be saved as a template.
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type QuotaExceededError, if the allowed number of templates is exceeded.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the method cannot be completed because of any error.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try {
+&nbsp;&nbsp;&nbsp;&nbsp;var notificationDict = {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content : "This is a simple notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath : "images/image1.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath : "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration : true
+&nbsp;&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("SIMPLE",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Simple notification", notificationDict);
+
+&nbsp;&nbsp;&nbsp;&nbsp;tizen.notification.saveNotificationAsTemplate("SIMPLE_TEMPLATE", notification);
+} catch (err) {
+&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
+</div>
+</dd>
+<dt class="method" id="NotificationManager::createNotificationFromTemplate">
+<a class="backward-compatibility-anchor" name="::Notification::NotificationManager::createNotificationFromTemplate"></a><code><b><span class="methodName">createNotificationFromTemplate</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Creates notification based on previously created template.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint"><a href="#Notification">Notification</a> createNotificationFromTemplate(DOMString name);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+An application can load a saved template and post it.
+An application can load only templates that it has saved.
+            </p>
+           </div>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+ http://tizen.org/privilege/notification
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">name</span>: 
+ The name of template to be used as source of notification.
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type NotFoundError, if the method cannot find a template with given name.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the method cannot be completed because of any error.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* the template with name "SIMPLE_TEMPLATE" should be previously created */
+try {
+&nbsp;&nbsp;&nbsp;&nbsp;var notification = tizen.notification.createNotificationFromTemplate("SIMPLE_TEMPLATE");
+} catch (err) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
 }
 </pre>
 </div>
@@ -1265,6 +1427,10 @@ If an application uses playLEDCustomEffect() or stopLEDCustomEffect(), declare t
         void playLEDCustomEffect(long timeOn, long timeOff, DOMString color, <a href="#LEDCustomFlags">LEDCustomFlags</a>[] flags) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
         void stopLEDCustomEffect() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+        void saveNotificationAsTemplate(DOMString name, <a href="#Notification">Notification</a> notification) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+        <a href="#Notification">Notification</a> createNotificationFromTemplate(DOMString name) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
     };
 
 
index 949317b..5243be1 100644 (file)
@@ -25,13 +25,17 @@ For more information on the Notification features, see <a href="https://develope
 <h2>Table of Contents</h2>
 <ul class="toc">
 <li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc">
-<li>1.1. <a href="#NotificationId">NotificationId</a>
+<li>
+                    1.1. <a href="#NotificationId">NotificationId</a>
 </li>
-<li>1.2. <a href="#NotificationType">NotificationType</a>
+<li>
+                    1.2. <a href="#NotificationType">NotificationType</a>
 </li>
-<li>1.3. <a href="#StatusNotificationType">StatusNotificationType</a>
+<li>
+                    1.3. <a href="#StatusNotificationType">StatusNotificationType</a>
 </li>
-<li>1.4. <a href="#NotificationProgressType">NotificationProgressType</a>
+<li>
+                    1.4. <a href="#NotificationProgressType">NotificationProgressType</a>
 </li>
 </ul>
 </li>
@@ -67,12 +71,19 @@ For more information on the Notification features, see <a href="https://develope
 </tr>
 <tr>
 <td><a href="#NotificationManager">NotificationManager</a></td>
-<td>void <a href="#NotificationManager::post">post</a> (<a href="#Notification">Notification</a> notification)<br>
-    void <a href="#NotificationManager::update">update</a> (<a href="#Notification">Notification</a> notification)<br>
-    void <a href="#NotificationManager::remove">remove</a> (<a href="#NotificationId">NotificationId</a> id)<br>
-    void <a href="#NotificationManager::removeAll">removeAll</a> ()<br>
-    <a href="#Notification">Notification</a> <a href="#NotificationManager::get">get</a> (<a href="#NotificationId">NotificationId</a> id)<br>
-    <a href="#Notification">Notification</a>[] <a href="#NotificationManager::getAll">getAll</a> ()</td>
+<td>
+<div>void <a href="#NotificationManager::post">post</a> (<a href="#Notification">Notification</a> notification)</div>
+<div>void <a href="#NotificationManager::update">update</a> (<a href="#Notification">Notification</a> notification)</div>
+<div>void <a href="#NotificationManager::remove">remove</a> (<a href="#NotificationId">NotificationId</a> id)</div>
+<div>void <a href="#NotificationManager::removeAll">removeAll</a> ()</div>
+<div>
+<a href="#Notification">Notification</a> <a href="#NotificationManager::get">get</a> (<a href="#NotificationId">NotificationId</a> id)</div>
+<div>
+<a href="#Notification">Notification</a>[] <a href="#NotificationManager::getAll">getAll</a> ()</div>
+<div>void <a href="#NotificationManager::saveNotificationAsTemplate">saveNotificationAsTemplate</a> (DOMString name, <a href="#Notification">Notification</a> notification)</div>
+<div>
+<a href="#Notification">Notification</a> <a href="#NotificationManager::createNotificationFromTemplate">createNotificationFromTemplate</a> (DOMString name)</div>
+</td>
 </tr>
 <tr>
 <td><a href="#Notification">Notification</a></td>
@@ -218,6 +229,9 @@ Notification API.
 
     <a href="#Notification">Notification</a>[] getAll() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
+    void saveNotificationAsTemplate(DOMString name, <a href="#Notification">Notification</a> notification) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+    <a href="#Notification">Notification</a> createNotificationFromTemplate(DOMString name) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
     };</pre>
 <p><span class="version">
             Since: </span>
@@ -571,6 +585,151 @@ try
 catch (err)
 {
 &nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+</pre>
+</div>
+<dt class="method" id="NotificationManager::saveNotificationAsTemplate">
+<a class="backward-compatibility-anchor" name="::Notification::NotificationManager::saveNotificationAsTemplate"></a><code><b><span class="methodName">saveNotificationAsTemplate</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Saves a notification template to the notification database.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void saveNotificationAsTemplate(DOMString name, <a href="#Notification">Notification</a> notification);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+An application can save the created notification as a template for later reuse.
+If the template has the same name as a saved one, the saved template will be overwritten.
+            </p>
+            <p>
+A saved template can be loaded only by the application which saved it.
+All templates are removed when the application package is uninstalled.
+            </p>
+           </div>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+ http://tizen.org/privilege/notification
+            </p>
+<p><span class="remark"> Remark : </span>
+ The number of templates is limited to 10. When you try to add more than 10 templates, exception is thrown.
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">name</span>: 
+ The name of template to be saved.
+                </li>
+          <li class="param">
+<span class="name">notification</span>: 
+ A notification to be saved as a template.
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type QuotaExceededError, if the allowed number of templates is exceeded.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the method cannot be completed because of any error.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try {
+&nbsp;&nbsp;&nbsp;&nbsp;var notificationDict = {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content : "This is a simple notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath : "images/image1.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath : "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration : true
+&nbsp;&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("SIMPLE",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Simple notification", notificationDict);
+
+&nbsp;&nbsp;&nbsp;&nbsp;tizen.notification.saveNotificationAsTemplate("SIMPLE_TEMPLATE", notification);
+} catch (err) {
+&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
+</div>
+</dd>
+<dt class="method" id="NotificationManager::createNotificationFromTemplate">
+<a class="backward-compatibility-anchor" name="::Notification::NotificationManager::createNotificationFromTemplate"></a><code><b><span class="methodName">createNotificationFromTemplate</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Creates notification based on previously created template.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint"><a href="#Notification">Notification</a> createNotificationFromTemplate(DOMString name);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+An application can load a saved template and post it.
+An application can load only templates that it has saved.
+            </p>
+           </div>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+ http://tizen.org/privilege/notification
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">name</span>: 
+ The name of template to be used as source of notification.
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type NotFoundError, if the method cannot find a template with given name.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the method cannot be completed because of any error.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* the template with name "SIMPLE_TEMPLATE" should be previously created */
+try {
+&nbsp;&nbsp;&nbsp;&nbsp;var notification = tizen.notification.createNotificationFromTemplate("SIMPLE_TEMPLATE");
+} catch (err) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
 }
 </pre>
 </div>
@@ -1089,6 +1248,9 @@ By default, this attribute is set to <var>null</var>.
 
     <a href="#Notification">Notification</a>[] getAll() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
+    void saveNotificationAsTemplate(DOMString name, <a href="#Notification">Notification</a> notification) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+    <a href="#Notification">Notification</a> createNotificationFromTemplate(DOMString name) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
     };