You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@unomi.apache.org by sh...@apache.org on 2017/10/02 08:12:00 UTC

svn commit: r1810306 [22/22] - in /incubator/unomi/website: ./ rest-api-doc/input/ samples/ samples/login-integration-sample/ samples/tweet-button-plugin/ unomi-api/ unomi-api/apidocs/ unomi-api/apidocs/org/apache/unomi/api/ unomi-api/apidocs/org/apach...

Added: incubator/unomi/website/versions/1.2/twitter-sample.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/1.2/twitter-sample.html?rev=1810306&view=auto
==============================================================================
--- incubator/unomi/website/versions/1.2/twitter-sample.html (added)
+++ incubator/unomi/website/versions/1.2/twitter-sample.html Mon Oct  2 08:11:40 2017
@@ -0,0 +1,704 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2017-10-02
+ Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Twitter sample | Apache Unomi</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+ 
+		<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet" />
+		<link href="../..//css/docs.css" rel="stylesheet" />
+		<link href="../..//css/reflow-skin.css" rel="stylesheet" />
+
+		<link href="http://yandex.st/highlightjs/7.5/styles/github.min.css" rel="stylesheet" />
+
+		<link href="../..//css/lightbox.css" rel="stylesheet" />
+
+		<link href="../..//css/site.css" rel="stylesheet" />
+		<link href="../..//css/print.css" rel="stylesheet" media="print" />
+
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+
+
+
+		<!-- Google Analytics -->
+		<script type="text/javascript">
+
+			var _gaq = _gaq || [];
+			_gaq.push(['_setAccount', 'UA-70313240-1']);
+			_gaq.push(['_trackPageview']);
+
+			(function() {
+				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+			})();
+
+		</script>
+		</head>
+
+	<body class="page-versions-12-twitter-sample project-unomi-root" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target="#top-nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="../.."><img src="http://unomi.incubator.apache.org/images/unomi-86x20.png" /></a>
+					<div class="nav-collapse collapse" id="top-nav-collapse">
+						<ul class="nav pull-right">
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Download <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../download.html" title="Packages">Packages</a></li>
+									<li ><a href="../../license.html" title="License">License</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../" title="Site Home">Site Home</a></li>
+									<li ><a href="../../main.html" title="Main documentation">Main documentation</a></li>
+									<li ><a href="../../usecases.html" title="More use cases">More use cases</a></li>
+									<li ><a href="../../rest-api-doc/index.html" title="REST API documentation">REST API documentation</a></li>
+									<li ><a href="../../unomi-api/apidocs/index.html" title="API Javadoc">API Javadoc</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Standard <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="https://www.oasis-open.org/committees/cxs/" title="OASIS Context Server Technical Committee" class="externalLink">OASIS Context Server Technical Committee</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Privacy <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../privacy-policy.html" title="Site policy">Site policy</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contribute <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a></li>
+									<li ><a href="../../source-repository.html" title="Source">Source</a></li>
+									<li ><a href="../../issue-tracking.html" title="Issues">Issues</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Community <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a></li>
+									<li ><a href="../../team-list.html" title="Team">Team</a></li>
+									<li ><a href="../../maturity-model-report.html" title="Maturity model report card">Maturity model report card</a></li>
+									<li ><a href="http://www.apache.org" title="The Apache Software Foundation" class="externalLink">The Apache Software Foundation</a></li>
+									<li ><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship" class="externalLink">Sponsorship</a></li>
+									<li ><a href="http://www.apache.org/foundation/thanks.html" title="Thanks" class="externalLink">Thanks</a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+
+	<div class="container">
+
+	<!-- Masthead
+	================================================== -->
+
+	<header>
+		<div>
+			<ul class="breadcrumb">
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span8">
+			<div class="body-content">
+<!-- ~ 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. --> 
+<div class="page-header">
+ <h1 id="twitter_sample">Twitter sample</h1>
+</div> 
+<div class="section"> 
+ <h2 id="Overview">Overview</h2> 
+ <p>We will examine how a simple HTML page can interact with Unomi to enrich a user’s profile. The use case we will follow is a rather simple one: we use a Twitter button to record the number of times the visitor tweeted (as a <tt>tweetNb</tt> profile integer property) as well as the URLs they tweeted from (as a <tt>tweetedFrom</tt> multi-valued string profile property). A javascript script will use the Twitter API to react to clicks on this button and update the user profile using a <tt>ContextServlet</tt> request triggering a custom event. This event will, in turn, trigger a Unomi action on the server implemented using a Unomi plugin, a standard extension point for the server.</p> 
+ <div class="section"> 
+  <h3 id="Building_the_tweet_button_sample">Building the tweet button sample</h3> 
+  <p>In your local copy of the Unomi repository and run:</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>cd samples/tweet-button-plugin
+mvn clean install
+</pre> 
+   </div> 
+  </div> 
+  <p>This will compile and create the OSGi bundle that can be deployed on Unomi to extend it.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Deploying_the_tweet_button_sample">Deploying the tweet button sample</h3> 
+  <p>In standard Karaf fashion, you will need to copy the sample bundle to your Karaf <tt>deploy</tt> directory.</p> 
+  <p>If you are using the packaged version of Unomi (as opposed to deploying it to your own Karaf version), you can simply run, assuming your current directory is <tt>samples/tweet-button-plugin</tt> and that you uncompressed the archive in the directory it was created:</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>cp target/tweet-button-plugin-1.0.0-incubating-SNAPSHOT.jar ../../package/target/unomi-1.0.0-incubating-SNAPSHOT/deploy
+</pre> 
+   </div> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Testing_the_sample">Testing the sample</h3> 
+  <p>You can now go to <a class="externalLink" href="http://localhost:8181/index.html">http://localhost:8181/index.html</a> to test the sample code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p> 
+  <p>We will now explain in greater details some concepts and see how the example works.</p> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="Interacting_with_the_context_server">Interacting with the context server</h2> 
+ <p>There are essentially two modalities to interact with the context server, reflecting different types of Unomi users: context server clients and context server integrators.</p> 
+ <p><b>Context server clients</b> are usually web applications or content management systems. They interact with Unomi by providing raw, uninterpreted contextual data in the form of events and associated metadata. That contextual data is then processed by the context server to be fed to clients once actionable. In that sense context server clients are both consumers and producers of contextual data. Context server clients will mostly interact with Unomi using a single entry point called the <tt>ContextServlet</tt>, requesting context for the current user and providing any triggered events along the way.</p> 
+ <p>On the other hand, <b>context server integrators</b> provide ways to feed more structured data to the context server either to integrate with third party services or to provide analysis of the uninterpreted data provided by context server clients. Such integration will mostly be done using Unomi’s API either directly using Unomi plugins or via the provided REST APIs. However, access to REST APIs is restricted due for security reasons, requiring privileged access to the Unomi server, making things a little more complex to set up.</p> 
+ <p>For simplicity’s sake, this document will focus solely on the first use case and will interact only with the context servlet.</p> 
+</div> 
+<div class="section"> 
+ <h2 id="Retrieving_context_information_from_Unomi_using_the_context_servlet">Retrieving context information from Unomi using the context servlet</h2> 
+ <p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <tt>&lt;context server base URL&gt;/context.json</tt> or <tt>&lt;context server base URL&gt;/context.js</tt> URLs, respectively.</p> 
+ <p>Below is an example of asynchronously loading the initial context using the javascript version, assuming a default Unomi install running on <tt>http://localhost:8181</tt>:</p> 
+ <div class="source"> 
+  <div class="source"> 
+   <pre>// Load context from Unomi asynchronously
+(function (document, elementToCreate, id) {
+    var js, fjs = document.getElementsByTagName(elementToCreate)[0];
+    if (document.getElementById(id)) return;
+    js = document.createElement(elementToCreate);
+    js.id = id;
+    js.src = 'http://localhost:8181/context.js';
+    fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'context'));
+
+</pre> 
+  </div> 
+ </div> 
+ <p>This initial context results in a javascript file providing some functions to interact with the context server from javascript along with two objects: a <tt>cxs</tt> object containing information about the context for the current user and a <tt>digitalData</tt> object that is injected into the browser’s <tt>window</tt> object (leveraging the <a class="externalLink" href="http://www.w3.org/2013/12/ceddl-201312.pdf">Customer Experience Digital Data Layer</a> standard). Note that this last object is not under control of the context server and clients are free to use it or not. Our example will not make use of it.</p> 
+ <p>On the other hand, the <tt>cxs</tt> top level object contains interesting contextual information about the current user:</p> 
+ <div class="source"> 
+  <div class="source"> 
+   <pre>{
+  &quot;profileId&quot;:&lt;identifier of the profile associated with the current user&gt;,
+  &quot;sessionId&quot;:&lt;identifier of the current user session&gt;,
+  &quot;profileProperties&quot;:&lt;requested profile properties, if any&gt;,
+  &quot;sessionProperties&quot;:&lt;requested session properties, if any&gt;,
+  &quot;profileSegments&quot;:&lt;segments the profile is part of if requested&gt;,
+  &quot;filteringResults&quot;:&lt;result of the evaluation of personalization filters&gt;,
+  &quot;trackedConditions&quot;:&lt;tracked conditions in the source page, if any&gt;
+}
+</pre> 
+  </div> 
+ </div> 
+ <p>We will look at the details of the context request and response later.</p> 
+ <h1 id="example">Example</h1> 
+</div> 
+<div class="section"> 
+ <h2 id="HTML_page">HTML page</h2> 
+ <p>The code for the HTML page with our Tweet button can be found at <a class="externalLink" href="https://github.com/apache/incubator-unomi/blob/master/wab/src/main/webapp/index.html">https://github.com/apache/incubator-unomi/blob/master/wab/src/main/webapp/index.html</a>.</p> 
+ <p>This HTML page is fairly straightforward: we create a tweet button using the Twitter API while a Javascript script performs the actual logic.</p> 
+</div> 
+<div class="section"> 
+ <h2 id="Javascript">Javascript</h2> 
+ <p>Globally, the script loads both the twitter widget and the initial context asynchronously (as shown previously). This is accomplished using fairly standard javascript code and we won’t look at it here. Using the Twitter API, we react to the <tt>tweet</tt> event and call the Unomi server to update the user’s profile with the required information, triggering a custom <tt>tweetEvent</tt> event. This is accomplished using a <tt>contextRequest</tt> function which is an extended version of a classic <tt>AJAX</tt> request:</p> 
+ <div class="source"> 
+  <div class="source"> 
+   <pre>function contextRequest(successCallback, errorCallback, payload) {
+    var data = JSON.stringify(payload);
+    // if we don't already have a session id, generate one
+    var sessionId = cxs.sessionId || generateUUID();
+    var url = 'http://localhost:8181/context.json?sessionId=' + sessionId;
+    var xhr = new XMLHttpRequest();
+    var isGet = data.length &lt; 100;
+    if (isGet) {
+        xhr.withCredentials = true;
+        xhr.open(&quot;GET&quot;, url + &quot;&amp;payload=&quot; + encodeURIComponent(data), true);
+    } else if (&quot;withCredentials&quot; in xhr) {
+        xhr.open(&quot;POST&quot;, url, true);
+        xhr.withCredentials = true;
+    } else if (typeof XDomainRequest != &quot;undefined&quot;) {
+        xhr = new XDomainRequest();
+        xhr.open(&quot;POST&quot;, url);
+    }
+    xhr.onreadystatechange = function () {
+        if (xhr.readyState != 4) {
+            return;
+        }
+        if (xhr.status == 200) {
+            var response = xhr.responseText ? JSON.parse(xhr.responseText) : undefined;
+            if (response) {
+                cxs.sessionId = response.sessionId;
+                successCallback(response);
+            }
+        } else {
+            console.log(&quot;contextserver: &quot; + xhr.status + &quot; ERROR: &quot; + xhr.statusText);
+            if (errorCallback) {
+                errorCallback(xhr);
+            }
+        }
+    };
+    xhr.setRequestHeader(&quot;Content-Type&quot;, &quot;text/plain;charset=UTF-8&quot;); // Use text/plain to avoid CORS preflight
+    if (isGet) {
+        xhr.send();
+    } else {
+        xhr.send(data);
+    }
+}
+</pre> 
+  </div> 
+ </div> 
+ <p>There are a couple of things to note here:</p> 
+ <ul> 
+  <li>If we specify a payload, it is expected to use the JSON format so we <tt>stringify</tt> it and encode it if passed as a URL parameter in a <tt>GET</tt> request.</li> 
+  <li>We need to make a <a class="externalLink" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS"><tt>CORS</tt></a> request since the Unomi server is most likely not running on the same host than the one from which the request originates. The specific details are fairly standard and we will not explain them here.</li> 
+  <li>We need to either retrieve (from the initial context we retrieved previously using <tt>cxs.sessionId</tt>) or generate a session identifier for our request since Unomi currently requires one.</li> 
+  <li>We’re calling the <tt>ContextServlet</tt> using the default install URI, specifying the session identifier: <tt>http://localhost:8181/context.json?sessionId=' + sessionId</tt>. This URI requests context from Unomi, resulting in an updated <tt>cxs</tt> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <tt>context.json</tt>. However, if the client requests <tt>context.js</tt> then useful functions to interact with Unomi are added to the <tt>cxs</tt> object in addition to the context information as depicted above.</li> 
+  <li>We don’t need to provide any authentication at all to interact with this part of Unomi since we only have access to read-only data (as well as providing events as we shall see later on). If we had been using the REST API, we would have needed to provide authentication information as well.</li> 
+ </ul> 
+ <div class="section"> 
+  <h3 id="Context_request_and_response_structure">Context request and response structure</h3> 
+  <p>The interesting part, though, is the payload. This is where we provide Unomi with contextual information as well as ask for data in return. This allows clients to specify which type of information they are interested in getting from the context server as well as specify incoming events or content filtering or property/segment overrides for personalization or impersonation. This conditions what the context server will return with its response.</p> 
+  <p>Let’s look at the context request structure:</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>{
+    source: &lt;Item source of the context request&gt;,
+    events: &lt;optional array of triggered events&gt;,
+    requiredProfileProperties: &lt;optional array of property identifiers&gt;,
+    requiredSessionProperties: &lt;optional array of property identifiers&gt;,
+    filters: &lt;optional array of filters to evaluate&gt;,
+    profileOverrides: &lt;optional profile containing segments,scores or profile properties to override&gt;,
+            - segments: &lt;optional array of segment identifiers&gt;,
+            - profileProperties: &lt;optional map of property name / value pairs&gt;,
+            - scores: &lt;optional map of score id / value pairs&gt;
+    sessionPropertiesOverrides: &lt;optional map of property name / value pairs&gt;,
+    requiresSegments: &lt;boolean, whether to return the associated segments&gt;
+}
+</pre> 
+   </div> 
+  </div> 
+  <p>We will now look at each part in greater details.</p> 
+  <div class="section"> 
+   <h4 id="Source">Source</h4> 
+   <p>A context request payload needs to at least specify some information about the source of the request in the form of an <tt>Item</tt> (meaning identifier, type and scope plus any additional properties we might have to provide), via the <tt>source</tt> property of the payload. Of course the more information can be provided about the source, the better.</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Filters">Filters</h4> 
+   <p>A client wishing to perform content personalization might also specify filtering conditions to be evaluated by the context server so that it can tell the client whether the content associated with the filter should be activated for this profile/session. This is accomplished by providing a list of filter definitions to be evaluated by the context server via the <tt>filters</tt> field of the payload. If provided, the evaluation results will be provided in the <tt>filteringResults</tt> field of the resulting <tt>cxs</tt> object the context server will send.</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Overrides">Overrides</h4> 
+   <p>It is also possible for clients wishing to perform user impersonation to specify properties or segments to override the proper ones so as to emulate a specific profile, in which case the overridden value will temporarily replace the proper values so that all rules will be evaluated with these values instead of the proper ones. The <tt>segments</tt> (array of segment identifiers), <tt>profileProperties</tt> (maps of property name and associated object value) and <tt>scores</tt> (maps of score id and value) all wrapped in a profileOverrides object and the <tt>sessionPropertiesOverrides</tt> (maps of property name and associated object value) fields allow to provide such information. Providing such overrides will, of course, impact content filtering results and segments matching for this specific request.</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Controlling_the_content_of_the_response">Controlling the content of the response</h4> 
+   <p>The clients can also specify which information to include in the response by setting the <tt>requiresSegments</tt> property to true if segments the current profile matches should be returned or provide an array of property identifiers for <tt>requiredProfileProperties</tt> or <tt>requiredSessionProperties</tt> fields to ask the context server to return the values for the specified profile or session properties, respectively. This information is provided by the <tt>profileProperties</tt>, <tt>sessionProperties</tt> and <tt>profileSegments</tt> fields of the context server response.</p> 
+   <p>Additionally, the context server will also returns any tracked conditions associated with the source of the context request. Upon evaluating the incoming request, the context server will determine if there are any rules marked with the <tt>trackedCondition</tt> tag and which source condition matches the source of the incoming request and return these tracked conditions to the client. The client can use these tracked conditions to learn that the context server can react to events matching the tracked condition and coming from that source. This is, in particular, used to implement form mapping (a solution that allows clients to update user profiles based on values provided when a form is submitted).</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Events">Events</h4> 
+   <p>Finally, the client can specify any events triggered by the user actions, so that the context server can process them, via the <tt>events</tt> field of the context request.</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Default_response">Default response</h4> 
+   <p>If no payload is specified, the context server will simply return the minimal information deemed necessary for client applications to properly function: profile identifier, session identifier and any tracked conditions that might exist for the source of the request.</p> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Context_request_for_our_example">Context request for our example</h3> 
+  <p>Now that we’ve seen the structure of the request and what we can expect from the context response, let’s examine the request our component is doing.</p> 
+  <p>In our case, our <tt>source</tt> item looks as follows: we specify a scope for our application (<tt>unomi-tweet-button-sample</tt>), specify that the item type (i.e. the kind of element that is the source of our event) is a <tt>page</tt> (which corresponds, as would be expected, to a web page), provide an identifier (in our case, a Base-64 encoded version of the page’s URL) and finally, specify extra properties (here, simply a <tt>url</tt> property corresponding to the page’s URL that will be used when we process our event in our Unomi extension).</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>var scope = 'unomi-tweet-button-sample';
+var itemId = btoa(window.location.href);
+var source = {
+    itemType: 'page',
+    scope: scope,
+    itemId: itemId,
+    properties: {
+        url: window.location.href
+    }
+};
+</pre> 
+   </div> 
+  </div> 
+  <p>We also specify that we want the context server to return the values of the <tt>tweetNb</tt> and <tt>tweetedFrom</tt> profile properties in its response. Finally, we provide a custom event of type <tt>tweetEvent</tt> with associated scope and source information, which matches the source of our context request in this case.</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>var contextPayload = {
+    source: source,
+    events: [
+        {
+            eventType: 'tweetEvent',
+            scope: scope,
+            source: source
+        }
+    ],
+    requiredProfileProperties: [
+        'tweetNb',
+        'tweetedFrom'
+    ]
+};
+</pre> 
+   </div> 
+  </div> 
+  <p>The <tt>tweetEvent</tt> event type is not defined by default in Unomi. This is where our Unomi plugin comes into play since we need to tell Unomi how to react when it encounters such events.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Unomi_plugin_overview">Unomi plugin overview</h3> 
+  <p>In order to react to <tt>tweetEvent</tt> events, we will define a new Unomi rule since this is exactly what Unomi rules are supposed to do. Rules are guarded by conditions and if these conditions match, the associated set of actions will be executed. In our case, we want our new <a class="externalLink" href="https://github.com/apache/incubator-unomi/blob/master/samples/tweet-button-plugin/src/main/resources/META-INF/cxs/rules/incrementTweetNumber.json"><tt>incrementTweetNumber</tt></a> rule to only react to <tt>tweetEvent</tt> events and we want it to perform the profile update accordingly: create the property types for our custom properties if they don’t exist and update them. To do so, we will create a custom <a class="externalLink" href="https://github.com/apache/incubator-unomi/blob/master/samples/tweet-button-plugin/src/main/resources/META-INF/cxs/actions/incrementTweetNumberAction.json"><tt>incrementTweetNumberAction</tt></a> action that will be triggered any time ou
 r rule matches. An action is some custom code that is deployed in the context server and can access the Unomi API to perform what it is that it needs to do.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Rule_definition">Rule definition</h3> 
+  <p>Let’s look at how our custom <a class="externalLink" href="https://github.com/apache/incubator-unomi/blob/master/samples/tweet-button-plugin/src/main/resources/META-INF/cxs/rules/incrementTweetNumber.json"><tt>incrementTweetNumber</tt></a> rule is defined:</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>{
+  &quot;metadata&quot;: {
+    &quot;id&quot;: &quot;smp:incrementTweetNumber&quot;,
+    &quot;name&quot;: &quot;Increment tweet number&quot;,
+    &quot;description&quot;: &quot;Increments the number of times a user has tweeted after they click on a tweet button&quot;
+  },
+  &quot;raiseEventOnlyOnceForSession&quot;: false,
+  &quot;condition&quot;: {
+    &quot;type&quot;: &quot;eventTypeCondition&quot;,
+    &quot;parameterValues&quot;: {
+      &quot;eventTypeId&quot;: &quot;tweetEvent&quot;
+    }
+  },
+  &quot;actions&quot;: [
+    {
+      &quot;type&quot;: &quot;incrementTweetNumberAction&quot;,
+      &quot;parameterValues&quot;: {}
+    }
+  ]
+}
+</pre> 
+   </div> 
+  </div> 
+  <p>Rules define a metadata section where we specify the rule name, identifier and description.</p> 
+  <p>When rules trigger, a specific event is raised so that other parts of Unomi can react to it accordingly. We can control how that event should be raised. Here we specify that the event should be raised each time the rule triggers and not only once per session by setting <tt>raiseEventOnlyOnceForSession</tt> to <tt>false</tt>, which is not strictly required since that is the default. A similar setting (<tt>raiseEventOnlyOnceForProfile</tt>) can be used to specify that the event should only be raised once per profile if needed.</p> 
+  <p>We could also specify a priority for our rule in case it needs to be executed before other ones when similar conditions match. This is accomplished using the <tt>priority</tt> property. We’re using the default priority here since we don’t have other rules triggering on <tt>tweetEvent</tt>s and don’t need any special ordering.</p> 
+  <p>We then tell Unomi which condition should trigger the rule via the <tt>condition</tt> property. Here, we specify that we want our rule to trigger on an <tt>eventTypeCondition</tt> condition. Unomi can be extended by adding new condition types that can enrich how matching or querying is performed. The condition type definition file specifies which parameters are expected for our condition to be complete. In our case, we use the built-in event type condition that will match if Unomi receives an event of the type specified in the condition’s <tt>eventTypeId</tt> parameter value: <tt>tweetEvent</tt> here.</p> 
+  <p>Finally, we specify a list of actions that should be performed as consequences of the rule matching. We only need one action of type <tt>incrementTweetNumberAction</tt> that doesn’t require any parameters.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Action_definition">Action definition</h3> 
+  <p>Let’s now look at our custom <a class="externalLink" href="https://github.com/apache/incubator-unomi/blob/master/samples/tweet-button-plugin/src/main/resources/META-INF/cxs/actions/incrementTweetNumberAction.json"><tt>incrementTweetNumberAction</tt></a> action type definition:</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>{
+  &quot;id&quot;: &quot;incrementTweetNumberAction&quot;,
+  &quot;actionExecutor&quot;: &quot;incrementTweetNumber&quot;,
+  &quot;tags&quot;: [
+    &quot;event&quot;
+  ],
+  &quot;parameters&quot;: []
+}
+</pre> 
+   </div> 
+  </div> 
+  <p>We specify the identifier for the action type, a list of tags if needed: here we say that our action is a consequence of events using the <tt>event</tt> tag. Our actions does not require any parameters so we don’t define any.</p> 
+  <p>Finally, we provide a mysterious <tt>actionExecutor</tt> identifier: <tt>incrementTweetNumber</tt>.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Action_executor_definition">Action executor definition</h3> 
+  <p>The action executor references the actual implementation of the action as defined in our <a class="externalLink" href="https://github.com/apache/incubator-unomi/blob/master/samples/tweet-button-plugin/src/main/resources/OSGI-INF/blueprint/blueprint.xml">blueprint definition</a>:</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>&lt;blueprint xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+           xmlns=&quot;http://www.osgi.org/xmlns/blueprint/v1.0.0&quot;
+           xsi:schemaLocation=&quot;http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd&quot;&gt;
+
+    &lt;reference id=&quot;profileService&quot; interface=&quot;org.apache.unomi.api.services.ProfileService&quot;/&gt;
+
+    &lt;!-- Action executor --&gt;
+    &lt;service id=&quot;incrementTweetNumberAction&quot; auto-export=&quot;interfaces&quot;&gt;
+        &lt;service-properties&gt;
+            &lt;entry key=&quot;actionExecutorId&quot; value=&quot;incrementTweetNumber&quot;/&gt;
+        &lt;/service-properties&gt;
+        &lt;bean class=&quot;org.apache.unomi.examples.unomi_tweet_button_plugin.actions.IncrementTweetNumberAction&quot;&gt;
+            &lt;property name=&quot;profileService&quot; ref=&quot;profileService&quot;/&gt;
+        &lt;/bean&gt;
+    &lt;/service&gt;
+&lt;/blueprint&gt;
+</pre> 
+   </div> 
+  </div> 
+  <p>In standard Blueprint fashion, we specify that we will need the <tt>profileService</tt> defined by Unomi and then define a service of our own to be exported for Unomi to use. Our service specifies one property: <tt>actionExecutorId</tt> which matches the identifier we specified in our action definition. We then inject the profile service in our executor and we’re done for the configuration side of things!</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Action_executor_implementation">Action executor implementation</h3> 
+  <p>Our action executor definition specifies that the bean providing the service is implemented in the <a class="externalLink" href="https://github.com/apache/incubator-unomi/blob/master/samples/tweet-button-plugin/src/main/java/org/apache/unomi/samples/tweet_button_plugin/actions/IncrementTweetNumberAction.java"><tt>org.apache.unomi.samples.tweet_button_plugin.actions .IncrementTweetNumberAction</tt></a> class. This class implements the Unomi <tt>ActionExecutor</tt> interface which provides a single <tt>int execute(Action action, Event event)</tt> method: the executor gets the action instance to execute along with the event that triggered it, performs its work and returns an integer status corresponding to what happened as defined by public constants of the <tt>EventService</tt> interface of Unomi: <tt>NO_CHANGE</tt>, <tt>SESSION_UPDATED</tt> or <tt>PROFILE_UPDATED</tt>.</p> 
+  <p>Let’s now look at the implementation of the method:</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>final Profile profile = event.getProfile();
+Integer tweetNb = (Integer) profile.getProperty(TWEET_NB_PROPERTY);
+List&lt;String&gt; tweetedFrom = (List&lt;String&gt;) profile.getProperty(TWEETED_FROM_PROPERTY);
+
+if (tweetNb == null || tweetedFrom == null) {
+    // create tweet number property type
+    PropertyType propertyType = new PropertyType(new Metadata(event.getScope(), TWEET_NB_PROPERTY, TWEET_NB_PROPERTY, &quot;Number of times a user tweeted&quot;));
+    propertyType.setValueTypeId(&quot;integer&quot;);
+    service.createPropertyType(propertyType);
+
+    // create tweeted from property type
+    propertyType = new PropertyType(new Metadata(event.getScope(), TWEETED_FROM_PROPERTY, TWEETED_FROM_PROPERTY, &quot;The list of pages a user tweeted from&quot;));
+    propertyType.setValueTypeId(&quot;string&quot;);
+    propertyType.setMultivalued(true);
+    service.createPropertyType(propertyType);
+
+    tweetNb = 0;
+    tweetedFrom = new ArrayList&lt;&gt;();
+}
+
+profile.setProperty(TWEET_NB_PROPERTY, tweetNb + 1);
+final String sourceURL = extractSourceURL(event);
+if (sourceURL != null) {
+    tweetedFrom.add(sourceURL);
+}
+profile.setProperty(TWEETED_FROM_PROPERTY, tweetedFrom);
+
+return EventService.PROFILE_UPDATED;
+</pre> 
+   </div> 
+  </div> 
+  <p>It is fairly straightforward: we retrieve the profile associated with the event that triggered the rule and check whether it already has the properties we are interested in. If not, we create the associated property types and initialize the property values.</p> 
+  <blockquote> 
+   <p>Note that it is not an issue to attempt to create the same property type multiple times as Unomi will not add a new property type if an identical type already exists.</p> 
+  </blockquote> 
+  <p>Once this is done, we update our profile with the new property values based on the previous values and the metadata extracted from the event using the <tt>extractSourceURL</tt> method which uses our <tt>url</tt> property that we’ve specified for our event source. We then return that the profile was updated as a result of our action and Unomi will properly save it for us when appropriate. That’s it!</p> 
+  <p>For reference, here’s the <tt>extractSourceURL</tt> method implementation:</p> 
+  <div class="source"> 
+   <div class="source"> 
+    <pre>private String extractSourceURL(Event event) {
+    final Item sourceAsItem = event.getSource();
+    if (sourceAsItem instanceof CustomItem) {
+        CustomItem source = (CustomItem) sourceAsItem;
+        final String url = (String) source.getProperties().get(&quot;url&quot;);
+        if (url != null) {
+            return url;
+        }
+    }
+
+    return null;
+}
+</pre> 
+   </div> 
+  </div> 
+  <h1 id="conclusion">Conclusion</h1> 
+  <p>We have seen a simple example how to interact with Unomi using a combination of client-side code and Unomi plugin. Hopefully, this provided an introduction to the power of what Unomi can do and how it can be extended to suit your needs.</p> 
+  <h1 id="annex">Annex</h1> 
+  <p>Here is an overview of how Unomi processes incoming requests to the <tt>ContextServlet</tt>. <img src="../../images/unomi-request.png" alt="Unomi request overview" /></p> 
+ </div> 
+</div>
+			</div>
+		</div>
+		<div class="span4">
+			<div id="toc-sidebar">
+				<div class="well">
+					<ul class="nav nav-list">
+						<li class="nav-header">Table of Contents</li>
+		<li class="dropdown"><a href="#twitter_sample" title="Twitter sample">Twitter sample <b class="caret"></b></a>
+			<ul class="nav nav-list">
+		<li class="dropdown"><a href="#Overview" title="Overview">Overview <b class="caret"></b></a>
+			<ul class="nav nav-list">
+		<li><a href="#Building_the_tweet_button_sample" title="Building the tweet button sample">Building the tweet button sample</a>
+		<li><a href="#Deploying_the_tweet_button_sample" title="Deploying the tweet button sample">Deploying the tweet button sample</a>
+		<li><a href="#Testing_the_sample" title="Testing the sample">Testing the sample</a>
+				<li class="divider"></li>
+			</ul>
+		</li>
+		<li><a href="#Interacting_with_the_context_server" title="Interacting with the context server">Interacting with the context server</a>
+		<li><a href="#Retrieving_context_information_from_Unomi_using_the_context_servlet" title="Retrieving context information from Unomi using the context servlet">Retrieving context information from Unomi using the context servlet</a>
+				<li class="divider"></li>
+			</ul>
+		</li>
+		<li class="dropdown"><a href="#example" title="Example">Example <b class="caret"></b></a>
+			<ul class="nav nav-list">
+		<li><a href="#HTML_page" title="HTML page">HTML page</a>
+		<li class="dropdown"><a href="#Javascript" title="Javascript">Javascript <b class="caret"></b></a>
+			<ul class="nav nav-list">
+		<li class="dropdown"><a href="#Context_request_and_response_structure" title="Context request and response structure">Context request and response structure <b class="caret"></b></a>
+			<ul class="nav nav-list">
+		<li><a href="#Source" title="Source">Source</a>
+		<li><a href="#Filters" title="Filters">Filters</a>
+		<li><a href="#Overrides" title="Overrides">Overrides</a>
+		<li><a href="#Controlling_the_content_of_the_response" title="Controlling the content of the response">Controlling the content of the response</a>
+		<li><a href="#Events" title="Events">Events</a>
+		<li><a href="#Default_response" title="Default response">Default response</a>
+				<li class="divider"></li>
+			</ul>
+		</li>
+		<li><a href="#Context_request_for_our_example" title="Context request for our example">Context request for our example</a>
+		<li><a href="#Unomi_plugin_overview" title="Unomi plugin overview">Unomi plugin overview</a>
+		<li><a href="#Rule_definition" title="Rule definition">Rule definition</a>
+		<li><a href="#Action_definition" title="Action definition">Action definition</a>
+		<li><a href="#Action_executor_definition" title="Action executor definition">Action executor definition</a>
+		<li><a href="#Action_executor_implementation" title="Action executor implementation">Action executor implementation</a>
+				<li class="divider"></li>
+			</ul>
+		</li>
+			</ul>
+		</li>
+		<li><a href="#conclusion" title="Conclusion">Conclusion</a>
+		<li><a href="#annex" title="Annex">Annex</a>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Download</li>
+						<li >
+							<a href="../../download.html" title="Packages">Packages</a>
+						</li>
+						<li >
+							<a href="../../license.html" title="License">License</a>
+						</li>
+						<li class="nav-header">Contribute</li>
+						<li >
+							<a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a>
+						</li>
+						<li >
+							<a href="../../source-repository.html" title="Source">Source</a>
+						</li>
+						<li >
+							<a href="../../issue-tracking.html" title="Issues">Issues</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Documentation</li>
+						<li >
+							<a href="../../" title="Site Home">Site Home</a>
+						</li>
+						<li >
+							<a href="../../main.html" title="Main documentation">Main documentation</a>
+						</li>
+						<li >
+							<a href="../../usecases.html" title="More use cases">More use cases</a>
+						</li>
+						<li >
+							<a href="../../rest-api-doc/index.html" title="REST API documentation">REST API documentation</a>
+						</li>
+						<li >
+							<a href="../../unomi-api/apidocs/index.html" title="API Javadoc">API Javadoc</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Standard</li>
+						<li >
+							<a href="https://www.oasis-open.org/committees/cxs/" title="OASIS Context Server Technical Committee" class="externalLink">OASIS Context Server Technical Committee</a>
+						</li>
+						<li class="nav-header">Privacy</li>
+						<li >
+							<a href="../../privacy-policy.html" title="Site policy">Site policy</a>
+						</li>
+						<li class="nav-header">Community</li>
+						<li >
+							<a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a>
+						</li>
+						<li >
+							<a href="../../team-list.html" title="Team">Team</a>
+						</li>
+						<li >
+							<a href="../../maturity-model-report.html" title="Maturity model report card">Maturity model report card</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org" title="The Apache Software Foundation" class="externalLink">The Apache Software Foundation</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship" class="externalLink">Sponsorship</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org/foundation/thanks.html" title="Thanks" class="externalLink">Thanks</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Project Documentation</li>
+						<li >
+							<a href="../../project-info.html" title="Project Information">Project Information <i class="icon-chevron-right"></i></a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-description">
+					<blockquote>Powered by Apache Karaf</blockquote>
+				</div>
+			</div>
+		</div>
+	</footer>
+
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2014-2017 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+
+	<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
+	<script src="../..//js/lightbox.min.js"></script>
+	<script src="../..//js/reflow-scroll.js"></script>
+	<script src="http://yandex.st/highlightjs/7.5/highlight.min.js"></script>
+
+	<script src="../..//js/reflow-skin.js"></script>
+
+	</body>
+</html>
\ No newline at end of file

Added: incubator/unomi/website/versions/1.2/weather-update-sample.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/1.2/weather-update-sample.html?rev=1810306&view=auto
==============================================================================
--- incubator/unomi/website/versions/1.2/weather-update-sample.html (added)
+++ incubator/unomi/website/versions/1.2/weather-update-sample.html Mon Oct  2 08:11:40 2017
@@ -0,0 +1,283 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2017-10-02
+ Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Weather update sample | Apache Unomi</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+ 
+		<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet" />
+		<link href="../..//css/docs.css" rel="stylesheet" />
+		<link href="../..//css/reflow-skin.css" rel="stylesheet" />
+
+		<link href="http://yandex.st/highlightjs/7.5/styles/github.min.css" rel="stylesheet" />
+
+		<link href="../..//css/lightbox.css" rel="stylesheet" />
+
+		<link href="../..//css/site.css" rel="stylesheet" />
+		<link href="../..//css/print.css" rel="stylesheet" media="print" />
+
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+
+
+
+		<!-- Google Analytics -->
+		<script type="text/javascript">
+
+			var _gaq = _gaq || [];
+			_gaq.push(['_setAccount', 'UA-70313240-1']);
+			_gaq.push(['_trackPageview']);
+
+			(function() {
+				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+			})();
+
+		</script>
+		</head>
+
+	<body class="page-versions-12-weather-update-sample project-unomi-root" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target="#top-nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="../.."><img src="http://unomi.incubator.apache.org/images/unomi-86x20.png" /></a>
+					<div class="nav-collapse collapse" id="top-nav-collapse">
+						<ul class="nav pull-right">
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Download <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../download.html" title="Packages">Packages</a></li>
+									<li ><a href="../../license.html" title="License">License</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../" title="Site Home">Site Home</a></li>
+									<li ><a href="../../main.html" title="Main documentation">Main documentation</a></li>
+									<li ><a href="../../usecases.html" title="More use cases">More use cases</a></li>
+									<li ><a href="../../rest-api-doc/index.html" title="REST API documentation">REST API documentation</a></li>
+									<li ><a href="../../unomi-api/apidocs/index.html" title="API Javadoc">API Javadoc</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Standard <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="https://www.oasis-open.org/committees/cxs/" title="OASIS Context Server Technical Committee" class="externalLink">OASIS Context Server Technical Committee</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Privacy <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../privacy-policy.html" title="Site policy">Site policy</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contribute <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a></li>
+									<li ><a href="../../source-repository.html" title="Source">Source</a></li>
+									<li ><a href="../../issue-tracking.html" title="Issues">Issues</a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Community <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li ><a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a></li>
+									<li ><a href="../../team-list.html" title="Team">Team</a></li>
+									<li ><a href="../../maturity-model-report.html" title="Maturity model report card">Maturity model report card</a></li>
+									<li ><a href="http://www.apache.org" title="The Apache Software Foundation" class="externalLink">The Apache Software Foundation</a></li>
+									<li ><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship" class="externalLink">Sponsorship</a></li>
+									<li ><a href="http://www.apache.org/foundation/thanks.html" title="Thanks" class="externalLink">Thanks</a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+
+	<div class="container">
+
+	<!-- Masthead
+	================================================== -->
+
+	<header>
+		<div>
+			<ul class="breadcrumb">
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span8">
+			<div class="body-content">
+<!-- ~ 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. --> 
+<div class="page-header">
+ <h1 id="weather_update_sample">Weather update sample</h1>
+</div>
+			</div>
+		</div>
+		<div class="span4">
+			<div id="toc-sidebar">
+				<div class="well">
+					<ul class="nav nav-list">
+						<li class="nav-header">Table of Contents</li>
+		<li><a href="#weather_update_sample" title="Weather update sample">Weather update sample</a>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Download</li>
+						<li >
+							<a href="../../download.html" title="Packages">Packages</a>
+						</li>
+						<li >
+							<a href="../../license.html" title="License">License</a>
+						</li>
+						<li class="nav-header">Contribute</li>
+						<li >
+							<a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a>
+						</li>
+						<li >
+							<a href="../../source-repository.html" title="Source">Source</a>
+						</li>
+						<li >
+							<a href="../../issue-tracking.html" title="Issues">Issues</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Documentation</li>
+						<li >
+							<a href="../../" title="Site Home">Site Home</a>
+						</li>
+						<li >
+							<a href="../../main.html" title="Main documentation">Main documentation</a>
+						</li>
+						<li >
+							<a href="../../usecases.html" title="More use cases">More use cases</a>
+						</li>
+						<li >
+							<a href="../../rest-api-doc/index.html" title="REST API documentation">REST API documentation</a>
+						</li>
+						<li >
+							<a href="../../unomi-api/apidocs/index.html" title="API Javadoc">API Javadoc</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span2 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Standard</li>
+						<li >
+							<a href="https://www.oasis-open.org/committees/cxs/" title="OASIS Context Server Technical Committee" class="externalLink">OASIS Context Server Technical Committee</a>
+						</li>
+						<li class="nav-header">Privacy</li>
+						<li >
+							<a href="../../privacy-policy.html" title="Site policy">Site policy</a>
+						</li>
+						<li class="nav-header">Community</li>
+						<li >
+							<a href="../../mail-lists.html" title="Mailing lists">Mailing lists</a>
+						</li>
+						<li >
+							<a href="../../team-list.html" title="Team">Team</a>
+						</li>
+						<li >
+							<a href="../../maturity-model-report.html" title="Maturity model report card">Maturity model report card</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org" title="The Apache Software Foundation" class="externalLink">The Apache Software Foundation</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship" class="externalLink">Sponsorship</a>
+						</li>
+						<li >
+							<a href="http://www.apache.org/foundation/thanks.html" title="Thanks" class="externalLink">Thanks</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Project Documentation</li>
+						<li >
+							<a href="../../project-info.html" title="Project Information">Project Information <i class="icon-chevron-right"></i></a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-description">
+					<blockquote>Powered by Apache Karaf</blockquote>
+				</div>
+			</div>
+		</div>
+	</footer>
+
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2014-2017 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+
+	<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
+	<script src="../..//js/lightbox.min.js"></script>
+	<script src="../..//js/reflow-scroll.js"></script>
+	<script src="http://yandex.st/highlightjs/7.5/highlight.min.js"></script>
+
+	<script src="../..//js/reflow-skin.js"></script>
+
+	</body>
+</html>
\ No newline at end of file

Modified: incubator/unomi/website/versions/master/building-and-deploying.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/building-and-deploying.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/building-and-deploying.html (original)
+++ incubator/unomi/website/versions/master/building-and-deploying.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/clustering.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/clustering.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/clustering.html (original)
+++ incubator/unomi/website/versions/master/clustering.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/concepts.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/concepts.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/concepts.html (original)
+++ incubator/unomi/website/versions/master/concepts.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/configuration.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/configuration.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/configuration.html (original)
+++ incubator/unomi/website/versions/master/configuration.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>
@@ -151,13 +151,11 @@
 <div class="section"> 
  <h2 id="Changing_the_default_configuration">Changing the default configuration</h2> 
  <p>If you want to change the default configuration, you can perform any modification you want in the $MY_KARAF_HOME/etc directory.</p> 
- <p>The context server configuration is kept in the $MY_KARAF_HOME/etc/org.apache.unomi.cluster.cfg . It defines the addresses and port where it can be found :</p> 
+ <p>The context server configuration is kept in the $MY_KARAF_HOME/etc/org.apache.unomi.cluster.cfg . It defines the addresses where it can be found :</p> 
  <div class="source"> 
   <div class="source"> 
-   <pre>contextserver.address=localhost
-contextserver.port=8181
-contextserver.secureAddress=localhost
-contextserver.securePort=9443
+   <pre>contextserver.publicAddress=https://localhost:9443
+contextserver.internalAddress=http://127.0.0.1:8181
 </pre> 
   </div> 
  </div> 
@@ -304,7 +302,7 @@ thirdparty.provider1.allowedEvents=login
  <h2 id="Integrating_with_an_Apache_HTTP_web_server">Integrating with an Apache HTTP web server</h2> 
  <p>If you want to setup an Apache HTTP web server in from of Apache Unomi, here is an example configuration using mod_proxy.</p> 
  <p>In your Unomi package directory, in /etc/org.apache.unomi.cluster.cfg for unomi.apache.org</p> 
- <p>contextserver.address=unomi.apache.org contextserver.port=80 contextserver.secureAddress=unomi.apache.org contextserver.securePort=443</p> 
+ <p>contextserver.publicAddress=https://unomi.apache.org/ contextserver.internalAddress=http://192.168.1.1:8181</p> 
  <p>and you will also need to change the contextserver.domain in the /etc/org.apache.unomi.web.cfg file</p> 
  <p>contextserver.domain=apache.org</p> 
  <p>Main virtual host config:</p> 

Modified: incubator/unomi/website/versions/master/connectors.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/connectors.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/connectors.html (original)
+++ incubator/unomi/website/versions/master/connectors.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/custom-extensions.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/custom-extensions.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/custom-extensions.html (original)
+++ incubator/unomi/website/versions/master/custom-extensions.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/getting-started.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/getting-started.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/getting-started.html (original)
+++ incubator/unomi/website/versions/master/getting-started.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/login-sample.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/login-sample.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/login-sample.html (original)
+++ incubator/unomi/website/versions/master/login-sample.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/salesforce-connector.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/salesforce-connector.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/salesforce-connector.html (original)
+++ incubator/unomi/website/versions/master/salesforce-connector.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/samples.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/samples.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/samples.html (original)
+++ incubator/unomi/website/versions/master/samples.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/twitter-sample.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/twitter-sample.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/twitter-sample.html (original)
+++ incubator/unomi/website/versions/master/twitter-sample.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>

Modified: incubator/unomi/website/versions/master/weather-update-sample.html
URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/master/weather-update-sample.html?rev=1810306&r1=1810305&r2=1810306&view=diff
==============================================================================
--- incubator/unomi/website/versions/master/weather-update-sample.html (original)
+++ incubator/unomi/website/versions/master/weather-update-sample.html Mon Oct  2 08:11:40 2017
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2017-09-19
+ Generated by Apache Maven Doxia at 2017-10-02
  Rendered using Reflow Maven Skin 1.1.1 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -122,7 +122,7 @@
 	<header>
 		<div>
 			<ul class="breadcrumb">
-				<li class="publishDate version-date">Last Published: 2017-09-19</li>
+				<li class="publishDate version-date">Last Published: 2017-10-02</li>
 			</ul>
 		</div>
 	</header>