You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@esme.apache.org by es...@apache.org on 2011/06/27 15:54:25 UTC

svn commit: r1140161 [5/6] - in /esme/site/trunk: ./ content/

Added: esme/site/trunk/content/server-configuration.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/server-configuration.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/server-configuration.cwiki (added)
+++ esme/site/trunk/content/server-configuration.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,45 @@
+{section}
+
+{column:width=70%}
+
+h3. Configuration via Property File
+
+*A note on property files*
+
+T property file is located in the _/server/src/main/resources/props/ folder._ The default property file name is _default.props._  This file must be named after the user under which the process is running. On Tomcat 6.0 under windows, then this file would be "SYSTEM.props". Capitalization counts.
+
+To set an option, please use the following syntax:
+
+{code}
+compass_config_file=/props/compass.filesystem.cfg.xml
+{code}
+
+h4. Changing the values in the properties
+
+To change these options, you have two options
+# You may edit the property file and then rebuild esme (the recommended way)
+# If you access to the file system where esme is deployed, you can edit the property file and then restart the web application server.
+
+h4. Default Properties
+
+|| Name || Description \\ || Default \\ ||
+| jndi.name | This is the name of the database \\ | esme \\ |
+| compass_config_file | This is the name of the compass configuration file. The default is the file-based indexing \\ | compass.cfg.xml |
+| use_prod_psql | Whether the production database is used \\ | false |
+| db_user | The user that is used to access the database \\ | dpp |
+| db_pwd | The password that is used to access the database \\ | |
+| use_local_psql | Whether a local progress based database should be used \\ | false |
+| http.proxyHost | If you have to access the internet (for example for OpenID support) via a proxy, then this should be set to the proxy server \\ | empty |
+| http.proxyPort | If you have to access the internet (for example for OpenID support) via a proxy, then this should be set to the proxy server | empty |
+| twitter.prefix | This is the URL prefix that is set for using the twitter api.  Some clients (such as twhirl) require that this be set to "api",  this conflicts with the current api pefix which is also set to "api". \\ | twitter |
+| actions.scala_interpreter.enable | This enables to use enable the scala action. \\ | false |
+
+{column}
+
+{column:width=30%}
+Contents
+
+{toc}
+{column}
+
+{section}
\ No newline at end of file

Added: esme/site/trunk/content/server-configuration.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/server-configuration.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/server-configuration.mdtext (added)
+++ esme/site/trunk/content/server-configuration.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,68 @@
+Title: Server Configuration
+{section}
+
+{column:width=70%}
+
+<a name="ServerConfiguration-ConfigurationviaPropertyFile"></a>
+### Configuration via Property File
+
+*A note on property files*
+
+T property file is located in the _/server/src/main/resources/props/
+folder._ The default property file name is _default.props._&nbsp; This file
+must be named after the user under which the process is running. On Tomcat
+6.0 under windows, then this file would be "SYSTEM.props". Capitalization
+counts.
+
+To set an option, please use the following syntax:
+
+
+    compass_config_file=/props/compass.filesystem.cfg.xml
+
+
+<a name="ServerConfiguration-Changingthevaluesintheproperties"></a>
+#### Changing the values in the properties
+
+To change these options, you have two options
+1. You may edit the property file and then rebuild esme (the recommended
+way)
+1. If you access to the file system where esme is deployed, you can edit the
+property file and then restart the web application server.
+
+<a name="ServerConfiguration-DefaultProperties"></a>
+#### Default Properties
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+<table>
+<tr><td> http.proxyPort </td><td> If you have to access the internet (for example for
+OpenID support) via a proxy, then this should be set to the proxy server </td><td>
+empty </td></tr>
+  
+  
+  
+  
+</table>
+
+{column}
+
+{column:width=30%}
+Contents
+
+{column}
+
+{section}

Added: esme/site/trunk/content/simple-use-case---ofbiz-sends-message-to-esme.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/simple-use-case---ofbiz-sends-message-to-esme.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/simple-use-case---ofbiz-sends-message-to-esme.cwiki (added)
+++ esme/site/trunk/content/simple-use-case---ofbiz-sends-message-to-esme.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,330 @@
+h3. Simple Description
+
+John Smith, Sales Chief of ACME, changes the credit level of a customer "Big Pipe".&nbsp; Once the change has been made in OFBiz, the ECA associated with this event sends a message to Apache ESME where other sales staff can see that the status for the customer has changed.
+
+
+In this initial use case, there is no ESME client embedded in the OfBiz UI but rather the user UI is that of the Stax environment or other connected clients.
+
+
+h3. Technical Details
+
+
+h4. Overview
+
+*Required Environment*
+* Apache ESME Server ([http://esmecloudserverapache.dickhirsch.staxapps.net/])
+* OFBiz Server ([https://demo.ofbiz.org])
+
+*Required users*
+* OFBiz
+** John Smith - Sales Chief
+* Apache ESME (All members of Apache ESME Pool "BigPipe")
+** Ralph Butler - Sales Staff
+** Amy Davidson - Sales Staff
+** John Smith - Sales Chief
+** OFBiz Back-end
+
+h4. Technical Details: OFBiz
+
+# ECA that responds to changes on customer object
+# One generic service "sendEsmeMessage" that sends ESME messages. This service should be configurable with such things as token (needed to use Apache ESME's APIs) and server URL. Initially, this could probably use existing HTTP Services to make a HTTP Post call to the Apache ESME API method "send_msg" with the extra parameter "token". You could also hard-code the server name and token for an initial test.
+# One specific service that calls the generic service and formats the message.
+
+h4. Iteration Sugestions
+
+# *Iteration 1*: SendESMEMessage is called directly from the ECA. Send Apache ESME service has a hardcoded Stax URL with a hardcoded taken, server URL and message.
+# *Iteration 2*: A dynamic message that contains event details is sent to SendESMEMessage
+# *Iteration 3*: A specific service is created that calls with generic service with a message to send as a parameter
+# *Iteration 4:&nbsp;* The details for the Apache ESME Call (Server URL, Token, etc) are made configurable via a UI.
+
+h2. Implementation Details: Facility
+
+*eecas.xml*
+
+*location*: ofbiz-trunk-current\ofbiz-trunk\applications\product\entitydef\eecas.xml
+
+&nbsp;Added following excerpt&nbsp;&nbsp;&nbsp;&nbsp;
+{code}
+    <eca entity="Facility" operation="create-store" event="return">
+        <action service="sendMessage" mode="sync"/>
+    </eca>
+{code}
+
+*services_facility.xml*
+
+*location*: ofbiz-trunk-current\ofbiz-trunk\applications\product\servicedef\services_facility.xml
+
+Added following excerpt:
+
+{code}
+   <service name="sendMessage" engine="java"
+            location="org.ofbiz.product.test.ESMEServices" invoke="sendMessage">
+            <attribute name="facilityName" type="String" mode="IN" optional="false"/>
+            <attribute name="squareFootage" type="String" mode="IN" optional="false"/>
+            <attribute name="description" type="String" mode="IN" optional="false"/>
+     </service>
+{code}
+This is the java code that is necessary to send the message.
+
+*Location*: ofbiz-trunk-current\ofbiz-trunk\applications\product\src\org\ofbiz\product\test\ ESMEServices.java
+
+To build the new component: ofbiz-trunk-current\ofbiz-trunk\applications\product> *ant*
+
+{code}
+package org.ofbiz.product.test;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.sql.Timestamp;
+import java.text.ParsePosition;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import java.io.*;
+import java.net.*;
+import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
+
+
+import javolution.util.FastList;
+import javolution.util.FastMap;
+import javolution.util.FastSet;
+
+import org.ofbiz.base.util.DateRange;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.TimeDuration;
+import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilGenerics;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityConditionList;
+import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityJoinOperator;
+import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.model.ModelEntity;
+import org.ofbiz.entity.util.EntityListIterator;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.security.Security;
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceUtil;
+import org.ofbiz.service.calendar.TemporalExpression;
+import org.ofbiz.service.calendar.TemporalExpressionWorker;
+
+public class ESMEServices {
+    public static final String module = ESMEServices.class.getName();
+
+    public static Map<String, Object> sendMessage(DispatchContext ctx, Map<String, ? extends Object> context) {
+
+        String twitterUrl="http://localhost:8081/twitter/statuses/update.xml";
+        Map<String, Object> result = FastMap.newInstance();
+        try {
+           Delegator delegator = ctx.getDelegator();
+           GenericValue userLogin = (GenericValue) context.get("userLogin");
+           String userLoginId = (String)userLogin.get("userLoginId");
+           String externalAuthId = (String)userLogin.get("externalAuthId");
+
+           String facilityName = (String)context.get("facilityName");
+           String squareFootage = (String)context.get("squareFootage");
+           String description = (String)context.get("description");
+
+           String user = userLoginId;
+           String password = externalAuthId;
+
+           OutputStreamWriter ostreamwriter;
+           String statusmsg="A new facility '" + facilityName + "' with " + squareFootage + "square feet was created." + description;
+
+           URL url = new URL(twitterUrl);
+           HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+           conn.setDoOutput(true);
+           conn.setRequestProperty("Authorization", "Basic " + Base64.encode((user+":"+password).getBytes()));
+
+           String encStatus = "status="+URLEncoder.encode(statusmsg, "UTF-8");
+           ostreamwriter = new OutputStreamWriter(conn.getOutputStream());
+           ostreamwriter.write(encStatus);   //--> Magic Magic :)
+           ostreamwriter.flush();
+
+           int responseCode = conn.getResponseCode();
+
+        if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_OK) {
+
+            result = ServiceUtil.returnSuccess();
+        } else {
+            result = ServiceUtil.returnFailure();
+        }
+      }
+        catch (Exception e) {
+        	e.printStackTrace();
+
+        	result = ServiceUtil.returnFailure();
+        }
+
+
+
+        return ServiceUtil.returnSuccess();
+    }
+
+}
+{code}
+
+h2. Implementation Details: Example
+
+
+h3. services.xml
+
+Location: _servicedef_ directory
+
+<service name="sendMessage" engine="java"
+location="org.ofbiz.example.ESMEServices" invoke="sendMessage">
+<attribute name="exampleId" type="String" mode="IN" optional="false"/>
+<description>Send Message to ESME</description>
+</service>
+
+h3. eecas.xml
+
+Location: _entitydef_ directory
+
+
+<entity-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-eca.xsd">
+<eca entity="Example" operation="create-store" event="return">
+<action service="sendMessage" mode="sync"/>
+</eca>
+</entity-eca>
+
+h3. ESMEServices.java
+
+Location: _src_ directory
+
+{code}
+package org.ofbiz.example;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.sql.Timestamp;
+import java.text.ParsePosition;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import java.io.*;
+import java.net.*;
+import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
+
+
+import javolution.util.FastList;
+import javolution.util.FastMap;
+import javolution.util.FastSet;
+
+import org.ofbiz.base.util.DateRange;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.TimeDuration;
+import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilGenerics;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityConditionList;
+import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityJoinOperator;
+import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.model.ModelEntity;
+import org.ofbiz.entity.util.EntityListIterator;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.security.Security;
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceUtil;
+import org.ofbiz.service.calendar.TemporalExpression;
+import org.ofbiz.service.calendar.TemporalExpressionWorker;
+
+public class ESMEServices {
+    public static final String module = ESMEServices.class.getName();
+
+    public static Map sendMessage(DispatchContext ctx, Map context) {
+
+        String twitterUrl="http://localhost:8081/twitter/statuses/update.xml";
+        Map result = FastMap.newInstance();
+        try {
+           Delegator delegator = ctx.getDelegator();
+           String exampleId = (String)context.get("exampleId");
+           String user = "test1";
+           String password = "5XCQ2CQRYWFZDHYP3Y23HZ3ZOLFBZYGC";
+
+           OutputStreamWriter ostreamwriter;
+           String statusmsg="Test" + exampleId;
+           int i=2;
+
+           URL url = new URL(twitterUrl);
+           HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+           conn.setDoOutput(true);
+           conn.setRequestProperty("Authorization", "Basic " + Base64.encode((user+":"+password).getBytes()));
+
+           String encStatus = "status="+URLEncoder.encode(statusmsg, "UTF-8");
+           ostreamwriter = new OutputStreamWriter(conn.getOutputStream());
+           ostreamwriter.write(encStatus);   //--> Magic Magic
+           ostreamwriter.flush();
+
+           int responseCode = conn.getResponseCode();
+
+
+
+        if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_OK) {
+
+            result = ServiceUtil.returnSuccess();
+        } else {
+            result = ServiceUtil.returnFailure();
+        }
+      }
+        catch (Exception e) {
+        	result = ServiceUtil.returnFailure();
+        }
+
+
+
+
+        return ServiceUtil.returnSuccess();
+    }
+
+        public static String toString(InputStream inputStream) throws IOException {
+        String string;
+        StringBuilder outputBuilder = new StringBuilder();
+        if (inputStream != null) {
+            BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+            while (null != (string = reader.readLine())) {
+                outputBuilder.append(string).append('\n');
+            }
+        }
+        return outputBuilder.toString();
+    }
+}
+{code}
\ No newline at end of file

Added: esme/site/trunk/content/simple-use-case---ofbiz-sends-message-to-esme.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/simple-use-case---ofbiz-sends-message-to-esme.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/simple-use-case---ofbiz-sends-message-to-esme.mdtext (added)
+++ esme/site/trunk/content/simple-use-case---ofbiz-sends-message-to-esme.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,383 @@
+Title: Simple Use Case - OFBiz sends message to ESME
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-SimpleDescription"></a>
+### Simple Description
+
+John Smith, Sales Chief of ACME, changes the credit level of a customer
+"Big Pipe".&nbsp; Once the change has been made in OFBiz, the ECA
+associated with this event sends a message to Apache ESME where other sales
+staff can see that the status for the customer has changed.
+
+
+In this initial use case, there is no ESME client embedded in the OfBiz UI
+but rather the user UI is that of the Stax environment or other connected
+clients.
+
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-TechnicalDetails"></a>
+### Technical Details
+
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-Overview"></a>
+#### Overview
+
+*Required Environment*
+* Apache ESME Server ([http://esmecloudserverapache.dickhirsch.staxapps.net/](http://esmecloudserverapache.dickhirsch.staxapps.net/)
+)
+* OFBiz Server ([https://demo.ofbiz.org](https://demo.ofbiz.org)
+)
+
+*Required users*
+* OFBiz
+** John Smith - Sales Chief
+* Apache ESME (All members of Apache ESME Pool "BigPipe")
+** Ralph Butler - Sales Staff
+** Amy Davidson - Sales Staff
+** John Smith - Sales Chief
+** OFBiz Back-end
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-TechnicalDetails:OFBiz"></a>
+#### Technical Details: OFBiz
+
+1. ECA that responds to changes on customer object
+1. One generic service "sendEsmeMessage" that sends ESME messages. This
+service should be configurable with such things as token (needed to use
+Apache ESME's APIs) and server URL. Initially, this could probably use
+existing HTTP Services to make a HTTP Post call to the Apache ESME API
+method "send_msg" with the extra parameter "token". You could also
+hard-code the server name and token for an initial test.
+1. One specific service that calls the generic service and formats the
+message.
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-IterationSugestions"></a>
+#### Iteration Sugestions
+
+1. *Iteration 1*: SendESMEMessage is called directly from the ECA. Send
+Apache ESME service has a hardcoded Stax URL with a hardcoded taken, server
+URL and message.
+1. *Iteration 2*: A dynamic message that contains event details is sent to
+SendESMEMessage
+1. *Iteration 3*: A specific service is created that calls with generic
+service with a message to send as a parameter
+1. *Iteration 4:&nbsp;* The details for the Apache ESME Call (Server URL,
+Token, etc) are made configurable via a UI.
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-ImplementationDetails:Facility"></a>
+## Implementation Details: Facility
+
+*eecas.xml*
+
+*location*:
+ofbiz-trunk-current\ofbiz-trunk\applications\product\entitydef\eecas.xml
+
+&nbsp;Added following excerpt&nbsp;&nbsp;&nbsp;&nbsp;
+
+        <eca entity="Facility" operation="create-store" event="return">
+    	<action service="sendMessage" mode="sync"/>
+        </eca>
+
+
+*services_facility.xml*
+
+*location*:
+ofbiz-trunk-current\ofbiz-trunk\applications\product\servicedef\services_facility.xml
+
+Added following excerpt:
+
+
+       <service name="sendMessage" engine="java"
+    	    location="org.ofbiz.product.test.ESMEServices"
+invoke="sendMessage">
+    	    <attribute name="facilityName" type="String" mode="IN"
+optional="false"/>
+    	    <attribute name="squareFootage" type="String" mode="IN"
+optional="false"/>
+    	    <attribute name="description" type="String" mode="IN"
+optional="false"/>
+         </service>
+
+This is the java code that is necessary to send the message.
+
+*Location*:
+ofbiz-trunk-current\ofbiz-trunk\applications\product\src\org\ofbiz\product\test\
+ESMEServices.java
+
+To build the new component:
+ofbiz-trunk-current\ofbiz-trunk\applications\product> *ant*
+
+
+    package org.ofbiz.product.test;
+    
+    import java.io.BufferedReader;
+    import java.io.IOException;
+    import java.io.InputStream;
+    import java.io.InputStreamReader;
+    import java.io.OutputStream;
+    import java.math.BigDecimal;
+    import java.net.HttpURLConnection;
+    import java.net.URL;
+    import java.sql.Timestamp;
+    import java.text.ParsePosition;
+    import java.text.SimpleDateFormat;
+    import java.util.Collection;
+    import java.util.Date;
+    import java.util.Iterator;
+    import java.util.List;
+    import java.util.Locale;
+    import java.util.Map;
+    
+    import java.io.*;
+    import java.net.*;
+    import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
+    
+    
+    import javolution.util.FastList;
+    import javolution.util.FastMap;
+    import javolution.util.FastSet;
+    
+    import org.ofbiz.base.util.DateRange;
+    import org.ofbiz.base.util.Debug;
+    import org.ofbiz.base.util.TimeDuration;
+    import org.ofbiz.base.util.UtilDateTime;
+    import org.ofbiz.base.util.UtilGenerics;
+    import org.ofbiz.base.util.UtilMisc;
+    import org.ofbiz.base.util.UtilProperties;
+    import org.ofbiz.base.util.UtilValidate;
+    import org.ofbiz.entity.Delegator;
+    import org.ofbiz.entity.GenericEntityException;
+    import org.ofbiz.entity.GenericValue;
+    import org.ofbiz.entity.condition.EntityCondition;
+    import org.ofbiz.entity.condition.EntityConditionList;
+    import org.ofbiz.entity.condition.EntityExpr;
+    import org.ofbiz.entity.condition.EntityJoinOperator;
+    import org.ofbiz.entity.condition.EntityOperator;
+    import org.ofbiz.entity.model.ModelEntity;
+    import org.ofbiz.entity.util.EntityListIterator;
+    import org.ofbiz.entity.util.EntityUtil;
+    import org.ofbiz.security.Security;
+    import org.ofbiz.service.DispatchContext;
+    import org.ofbiz.service.LocalDispatcher;
+    import org.ofbiz.service.ServiceUtil;
+    import org.ofbiz.service.calendar.TemporalExpression;
+    import org.ofbiz.service.calendar.TemporalExpressionWorker;
+    
+    public class ESMEServices {
+        public static final String module = ESMEServices.class.getName();
+    
+        public static Map<String, Object> sendMessage(DispatchContext ctx,
+Map<String, ? extends Object> context) {
+    
+    	String
+twitterUrl="http://localhost:8081/twitter/statuses/update.xml";
+    	Map<String, Object> result = FastMap.newInstance();
+    	try {
+    	   Delegator delegator = ctx.getDelegator();
+    	   GenericValue userLogin = (GenericValue)
+context.get("userLogin");
+    	   String userLoginId = (String)userLogin.get("userLoginId");
+    	   String externalAuthId = (String)userLogin.get("externalAuthId");
+    
+    	   String facilityName = (String)context.get("facilityName");
+    	   String squareFootage = (String)context.get("squareFootage");
+    	   String description = (String)context.get("description");
+    
+    	   String user = userLoginId;
+    	   String password = externalAuthId;
+    
+    	   OutputStreamWriter ostreamwriter;
+    	   String statusmsg="A new facility '" + facilityName + "' with " +
+squareFootage + "square feet was created." + description;
+    
+    	   URL url = new URL(twitterUrl);
+    	   HttpURLConnection conn = (HttpURLConnection)
+url.openConnection();
+    	   conn.setDoOutput(true);
+    	   conn.setRequestProperty("Authorization", "Basic " +
+Base64.encode((user+":"+password).getBytes()));
+    
+    	   String encStatus = "status="+URLEncoder.encode(statusmsg,
+"UTF-8");
+    	   ostreamwriter = new OutputStreamWriter(conn.getOutputStream());
+    	   ostreamwriter.write(encStatus);   //--> Magic Magic :)
+    	   ostreamwriter.flush();
+    
+    	   int responseCode = conn.getResponseCode();
+    
+    	if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode
+== HttpURLConnection.HTTP_OK) {
+    
+    	    result = ServiceUtil.returnSuccess();
+    	} else {
+    	    result = ServiceUtil.returnFailure();
+    	}
+          }
+    	catch (Exception e) {
+    		e.printStackTrace();
+    
+    		result = ServiceUtil.returnFailure();
+    	}
+    
+    
+    
+    	return ServiceUtil.returnSuccess();
+        }
+    
+    }
+
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-ImplementationDetails:Example"></a>
+## Implementation Details: Example
+
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-services.xml"></a>
+### services.xml
+
+Location: _servicedef_ directory
+
+<service name="sendMessage" engine="java"
+location="org.ofbiz.example.ESMEServices" invoke="sendMessage">
+<attribute name="exampleId" type="String" mode="IN" optional="false"/>
+<description>Send Message to ESME</description>
+</service>
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-eecas.xml"></a>
+### eecas.xml
+
+Location: _entitydef_ directory
+
+
+<entity-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-eca.xsd">
+<eca entity="Example" operation="create-store" event="return">
+<action service="sendMessage" mode="sync"/>
+</eca>
+</entity-eca>
+
+<a name="SimpleUseCase-OFBizsendsmessagetoESME-ESMEServices.java"></a>
+### ESMEServices.java
+
+Location: _src_ directory
+
+
+    package org.ofbiz.example;
+    
+    import java.io.BufferedReader;
+    import java.io.IOException;
+    import java.io.InputStream;
+    import java.io.InputStreamReader;
+    import java.io.OutputStream;
+    import java.math.BigDecimal;
+    import java.net.HttpURLConnection;
+    import java.net.URL;
+    import java.sql.Timestamp;
+    import java.text.ParsePosition;
+    import java.text.SimpleDateFormat;
+    import java.util.Collection;
+    import java.util.Date;
+    import java.util.Iterator;
+    import java.util.List;
+    import java.util.Locale;
+    import java.util.Map;
+    
+    import java.io.*;
+    import java.net.*;
+    import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
+    
+    
+    import javolution.util.FastList;
+    import javolution.util.FastMap;
+    import javolution.util.FastSet;
+    
+    import org.ofbiz.base.util.DateRange;
+    import org.ofbiz.base.util.Debug;
+    import org.ofbiz.base.util.TimeDuration;
+    import org.ofbiz.base.util.UtilDateTime;
+    import org.ofbiz.base.util.UtilGenerics;
+    import org.ofbiz.base.util.UtilMisc;
+    import org.ofbiz.base.util.UtilProperties;
+    import org.ofbiz.base.util.UtilValidate;
+    import org.ofbiz.entity.Delegator;
+    import org.ofbiz.entity.GenericEntityException;
+    import org.ofbiz.entity.GenericValue;
+    import org.ofbiz.entity.condition.EntityCondition;
+    import org.ofbiz.entity.condition.EntityConditionList;
+    import org.ofbiz.entity.condition.EntityExpr;
+    import org.ofbiz.entity.condition.EntityJoinOperator;
+    import org.ofbiz.entity.condition.EntityOperator;
+    import org.ofbiz.entity.model.ModelEntity;
+    import org.ofbiz.entity.util.EntityListIterator;
+    import org.ofbiz.entity.util.EntityUtil;
+    import org.ofbiz.security.Security;
+    import org.ofbiz.service.DispatchContext;
+    import org.ofbiz.service.LocalDispatcher;
+    import org.ofbiz.service.ServiceUtil;
+    import org.ofbiz.service.calendar.TemporalExpression;
+    import org.ofbiz.service.calendar.TemporalExpressionWorker;
+    
+    public class ESMEServices {
+        public static final String module = ESMEServices.class.getName();
+    
+        public static Map sendMessage(DispatchContext ctx, Map context) {
+    
+    	String
+twitterUrl="http://localhost:8081/twitter/statuses/update.xml";
+    	Map result = FastMap.newInstance();
+    	try {
+    	   Delegator delegator = ctx.getDelegator();
+    	   String exampleId = (String)context.get("exampleId");
+    	   String user = "test1";
+    	   String password = "5XCQ2CQRYWFZDHYP3Y23HZ3ZOLFBZYGC";
+    
+    	   OutputStreamWriter ostreamwriter;
+    	   String statusmsg="Test" + exampleId;
+    	   int i=2;
+    
+    	   URL url = new URL(twitterUrl);
+    	   HttpURLConnection conn = (HttpURLConnection)
+url.openConnection();
+    	   conn.setDoOutput(true);
+    	   conn.setRequestProperty("Authorization", "Basic " +
+Base64.encode((user+":"+password).getBytes()));
+    
+    	   String encStatus = "status="+URLEncoder.encode(statusmsg,
+"UTF-8");
+    	   ostreamwriter = new OutputStreamWriter(conn.getOutputStream());
+    	   ostreamwriter.write(encStatus);   //--> Magic Magic
+    	   ostreamwriter.flush();
+    
+    	   int responseCode = conn.getResponseCode();
+    
+    
+    
+    	if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode
+== HttpURLConnection.HTTP_OK) {
+    
+    	    result = ServiceUtil.returnSuccess();
+    	} else {
+    	    result = ServiceUtil.returnFailure();
+    	}
+          }
+    	catch (Exception e) {
+    		result = ServiceUtil.returnFailure();
+    	}
+    
+    
+    
+    
+    	return ServiceUtil.returnSuccess();
+        }
+    
+    	public static String toString(InputStream inputStream) throws
+IOException {
+    	String string;
+    	StringBuilder outputBuilder = new StringBuilder();
+    	if (inputStream != null) {
+    	    BufferedReader reader = new BufferedReader(new
+InputStreamReader(inputStream));
+    	    while (null != (string = reader.readLine())) {
+    		outputBuilder.append(string).append('\n');
+    	    }
+    	}
+    	return outputBuilder.toString();
+        }
+    }
+

Added: esme/site/trunk/content/statefulness-and-algorithms-for-social-networks-&-graphs.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/statefulness-and-algorithms-for-social-networks-%26-graphs.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/statefulness-and-algorithms-for-social-networks-&-graphs.cwiki (added)
+++ esme/site/trunk/content/statefulness-and-algorithms-for-social-networks-&-graphs.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,53 @@
+*{_}Note{_}{*}*: this was taken from the esme-dev mailing list. It is a long post (Nov. 6) from David Pollack that says a lot about our design philosopy.*
+
+Over the last 6 or so months, we've had a bunch of discussions on the list about statefulness, REST, and ESME's overall design. &nbsp;I want to walk through the design choices I've made for ESME and why "stateless" and other such designs fail and are dead wrong for a social networking system. There is no such thing as stateless. &nbsp;Every web site has state. &nbsp;The state may change frequently or may change infrequently. &nbsp;A web site made up of static files has its state based on those static pages. &nbsp;When those pages are changed, the state changes. &nbsp;State is kept somewhere for all web sites. Some web sites will present a different state depending on who is accessing the site. &nbsp;This can be as simple as serving different pages depending on the IP address or language preference expressed in the HTTP headers. This is sessionful. &nbsp;The content is calculated based on the request. &nbsp;This may be more sophisticated in terms of authenticating the HTTP re
 quest and presenting content based on the authentication. A session for sessionful content may be short-lived (the length of the request) or it may be longer lived (typically this is done with an initial authentication phase resulting in a shared secret \[JSESSIONID\] that is presented as an authentication proxy in subsequent requests.) But no matter the authentication mechanism or the session lifespan, there must exist a mechanism for translating the HTTP request into the content presented for the session. Far and away the most common way of persisting and calculating state is in a relational database (RDBMS).RDBMSs are awesome creatures. &nbsp;They sit on topof some excellent and well understood mathematics: set theory. They havewell known and well understood concurrency mechanisms: transactions. &nbsp;They have been designed, built, tested, and optimized over the last generation.RDBMSs offer a simple set of commands (SELECT, DELETE, INSERT, UPDATE) aswell as a generally h
 uman understandable set of semantics: people understandthat RDBMSs are a sets of things and there are simple ways to ask aboutthese sets. &nbsp;RDBMSs have evolved along with ERP systems and have evolved tomeet the needs of these systems.
+
+However, there are well known things that RDBMSs don't do well that include tree structures (yeah, Oracle and others have extensions for tree walks, but nothing is part of the SQL spec and the performance of these extensions is not always the same as other models: a tree-walk in an RDBMS costs O(log n) for each node where a tree walk in an OO system costs O(1)). Social networks/social graphs are another place where RDBMSs do not excel.
+
+Let's dive down into this.  A naive implementation of a social messaging site runs something like these tables:
+{code}
+  - Users(id, name, password)
+  - Friends(owner, friend)
+  - Messages(id, poster, content, date)
+{code}
+So, if we wanted to calculate the timeline for a given user at a give instant, the query would look like:
+{code}
+SELECT messages.* FROM messages, friends WHERE friends.owner = current_user
+AND messages.poster = friends.friend ORDER BY messages.date DESC LIMIT 20
+{code}
+Assuming we've got indexes on friends.owner, messages.poster and messages.date, the query still results in O(n log n) where n is the aggregate number of messages posted. &nbsp;This is non-trivial and if you follow someone who has posted 20,000 messages , the n log n cost becomes non-trivial.
+
+Basically, each time a client asks for the latest timeline, you've got an O(n log n) operation to determine state. &nbsp;This doesn't scale. The first obvious response to the issue is caching (capturing the state
+beyond the duration of a short-lived session). &nbsp;I'm going to skip cachingfor a moment and do a more sophisticated implementation of timelines so we can get better performance. Let's create a mailbox table. &nbsp;Each time someone publishes a message, a reference to that message will be put in a Mailbox(owner, message, date) table and we'll create an index on the table: (owner, date DESC) This changes the query to:
+{code}
+SELECT messages.* FROM messages, mailbox WHERE mailbox.owner = current_user
+AND messages.id = mailbox.message ORDER BY mailbox.date DESC LIMIT 20
+{code}
+Depending on your RDBMS, you will wind up with an O(log n) operation. &nbsp;You find the newest mailbox entry by user (O(log n)) and do an index walk until you've found 20 entries (I'm putting aside the fact that looking up the 20 messages is an O(n log n) operation because 20 is a small number and the messages will likely be in the database's cache... this operation is going to be fast.)
+
+
+I'm going to sidetrack for a moment. &nbsp;I had the pleasure of talking over a few beers at a baseball game with one of the senior engineers at Facebook. We were talking about Facebook's scaling success. His comment was that it was successful but very expensive. &nbsp;If there were more than 3% cache misses from MySQL queries, the system would back up. &nbsp;If they got more than 2% cache misses from the memcached stuff in front of their MySQL servers the system would back up. &nbsp;So, basically Facebook has 195% of their data in RAM. The net is that O(log n) is only going to work if you've got your entire index in the cache of your RDBMS. &nbsp;Even a dozen disk reads is going to turn a 10ms query into a 250ms query and if you've got 1,000 users asking for a&nbsp; status update, you'll wind up with disk thrashing and ultimately you will not be able to satisfy all of those requests.
+
+Let's make our discussion more concrete. &nbsp;I'm assuming that an ESME instance will support 25,000 users. &nbsp;On average, a user will follow 100 people (100x fan-out of messages). &nbsp;Users will post one message every 30 minutes (48 messages a day). &nbsp;The day lasts 10 hours (this is a reasonable approximation for peakiness... basically, you're compressing 48 message sends in to a 10 hour period). &nbsp;There are 300 days in a year. &nbsp;These numbers are averages and there will be some folks who are above average in terms of fan out (the CEO will have a 25,000x fan out) and some folks are above average in number of messages per day.
+
+So, that means that each year, there will be 36,000M (36B) mailbox entries. If each entry costs us 16 bytes of RAM for index purposes, that means we're at 576B bytes of index. &nbsp;There's no way that amount of index will fit in RAM. &nbsp;So, what happens if the average messages/day drops to 1, you're still looking at 10GB of index. &nbsp;Alternatively, you could purge messages after 3 weeks or limit timelines to a certain number of messages. &nbsp;That's not unreasonable, but it's also adding a constraint to the system to deal with limitations of the RDBMS. &nbsp;There are other alternatives. Let me talk memcached for a minute. &nbsp;In my opinion, memcached means that you have a failed design. &nbsp;Memcached means abandoning all the awesome things
+that you get with an RDBMS: a mathematical model, a concurrency/transactional model, durability guarantees, etc. But, we could move our state from the calculate-on-demand model of the RDBMS to the a calculate once and cache model using memcached. &nbsp;This means that you only take the nasty hits if the cache is not valid. &nbsp;Putting aside the cost of cache invalidation (I haven't covered the costs of updates in this discussion because there's no need to go there... the implementation failures can be demonstrated with just reads), if you have a simple cache invalidation scheme, most of the cache entries will not survive for 15
+minutes (I can go through the math, but I'm going to leave this one to the reader). &nbsp;You risk cache stampedes (more than 1 process rebuilding the cache entry). &nbsp;Basically, the naive memcached implementation buys you a little bit of head room over the naive (non-mailbox) approach. &nbsp;In order to get more than 5x or so improvement (something that will serve a few thousand rather  than a few hundred users), you need to manipulate the cache entries inserting/deleting individual messages.
+
+The above paragraph in fact leads us in the direction of a better answer. But first, let me state that I have proven that an RDBMS cannot be the sole locus of state for a social messaging site that services more than a few hundred users. &nbsp;Period. &nbsp;We must move state somewhere else and manage the cached state manually rather than with queries and indexes. &nbsp;Second, I have
+not discussed short-lived vs. long-lived sessions yet. &nbsp;I will get to that, but first, let's walk through a design that gives us a concurrency model as well as the performance we want.
+
+Imagine a model where you interact with a User with a limited set of (asynchronous) messages:
+
+* &nbsp; add/remove friend
+* &nbsp; add message to timeline
+* &nbsp; post message (the user has created a message and it needs to be processed)
+* &nbsp; get current timeline (with offsets and number of entries)
+
+These are the basic messages needed to implement a social messaging site. If we guaranty that a User will only process 1 message at a time, we have a concurrency model. &nbsp;It's simple and simple is good. &nbsp;We have not defined how/where Users store there state (it could be on a filesystem, in an RDBMS, in a NoSQL store, who knows). &nbsp;But we can say that adding a message is an O(1) operation (prepending to the head of a singly linked list). &nbsp;Each User can have a caching policy (and that caching policy could be dynamic based on the access characteristics for the User). &nbsp;The sender of the message doesn't block on the processing of the message (although the get current timeline message will have an asynchronous response that the sender will likely block on).
+
+We have changed our abstraction from one where all data (tables and indexes) are created equal to one where certain data structures are more prominent (User and Message) than others (mailbox, friends). We have lost something: transactions. &nbsp;In this model, if I add Dick as a friend, I am not guaranteed that I will receive Dick's next update... it may take time for the messages to propagate to Dick's User and his Message may be sent before the "add friend" message gets to him. &nbsp;In the case of a financial transaction, this would be fatal. &nbsp;In the case of social networking, this is a perfectly reasonable trade-off. So far, we have not talked about long-lived sessions and how they are valuable in such a model... an in particular in ESME. If we add one more message to our User, some of the reasons for long-lived sessions should become obvious: &nbsp;updated me on timeline change. &nbsp;If you can register with the User for changes to the timeline it means that we do
 n't have to keep asking "are we there yet?" &nbsp;When state change happens, it's instantly propagated out to the listeners. &nbsp;The alternative is for the listeners to ask "are we there yet?" over and over. &nbsp;The cost of asking "are we there yet?" is non-trivial as anyone who has traveled with 5 year olds can attest to. &nbsp;Additionally, sometimes, when one if having a conversation, it's nice to get an immediate response rather than waiting some polling period. &nbsp;Additionally, with a listener model, the User does not need to store the date of each message (give me new&nbsp; messages since xxx) and that cuts down cache storage costs by 50% (a big number across 25,000 users).
+
+So, having a long-lived session has some performance benefits over a short-lived session and polling, but this only part of the story. One of the ways that RDBMSs get performance (and the way products like
+Oracle distinguish themselves from the likes of MySQL) is the ability to cache optimized query plans, cache the right data, and invalidate the right caches at the right time. &nbsp;The same requirements are going to come up in ESME. When I designed ESME, I changed the model from a Skittr model (1M users on a single box) to a more enterprise-friendly model. &nbsp;The key difference is that I added the "actions" feature where each User got to see each message processed in the system and analyze that message for content/context and perform certain actions based on that analysis. &nbsp;Things like "add all message containing 'catfood' to my timeline" or forward all messages containing "ESME to my followers" or "make an HTTP post of all messages from my boss to a paging service" or "block 50% of the messages from Joe Blabbermouth". &nbsp;Actions are cool, but they are costly. &nbsp;It means that every message must be compared to every action definition in the system. &nbsp;This i
 s expensive. &nbsp;If each user has an average of 10 actions, that means each message sent will have to be compared against 250,000 actions and if we have a peak of 5 messages per hour per person, that's 31B comparisons per hour at peak time or 9M action comparisons per second. &nbsp;That's load. During peak load, we will need to prioritize which Users are processing messages/actions such that the system retains responsiveness and can drain the load. &nbsp;Put another way, knowing which Users have associated long-lived sessions allows us to prioritize the message processing for those Users. &nbsp;We allow more threads to drain the message queues for those Users while providing fewer threads for session-less Users. &nbsp;Yeah, we could prioritize on other heuristics, but long-lived session is dead simple and will cost us 5K bytes per logged in user. &nbsp;Not a huge cost and lots of benefit. So, between the existing long-lived session long polling is more efficient than short
 lived session repeated polling and the upcoming need for message prioritization indicate that long-lived sessions are the right design choice. Also, I hope that the above discussion makes it clear why I am insistent on message-oriented APIs rather than document/REST oriented APIs. &nbsp;ESME's design is not traditional and there are fewer tools helping us get the implementation right. &nbsp;On the other hand, implementing ESME on top of a
+relational/REST model cannot be done. &nbsp;Let's keep our design consistent from the APIs back.
\ No newline at end of file

Added: esme/site/trunk/content/stax.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/stax.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/stax.cwiki (added)
+++ esme/site/trunk/content/stax.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,53 @@
+h2. Preqs.
+
+* Functional build environment for Apache ESME including maven, current source code etc.
+* Account on Stax.net
+* [Stax SDK|http://wiki.stax.net/w/index.php/SDK] must be installed locally
+* An application on the stax cloud must already exist
+
+h2. Steps
+
+
+h5. web.xml
+
+Add the following text to your file
+
+
+{code}
+<resource-ref>
+<res-ref-name>esme</res-ref-name>
+<res-type>javax.sql.DataSource</res-type>
+<res-auth>Container</res-auth>
+</resource-ref>
+{code}
+
+h5. stax-web.xml
+
+Create a file in your webapp\WEB-INF directory. The contents of the file looks like this
+
+{code}
+<stax-web-app>
+ <resource name="esme" auth="Container" type="javax.sql.DataSource">
+  <param name="username" value="[Username for DB]" />
+  <param name="password" value="[Password for DB]" />
+  <param name="url" value="jdbc:stax://[DB name]" />
+ </resource>
+</stax-web-app>
+{code}
+
+
+The information for database is available in the Stax Console for your DB
+
+h5. Build Apache ESME
+
+use _mvn clean install_
+
+h5.
+
+
+h5. Deploy on Stax
+
+# Start the "Stax Console.bat" command (on windows)
+# In this console use the app:deploy command to deploy the application:
+
+&nbsp;*Example:* stax app:deploy \-a&nbsp; esme/esmecloudperf \-m 2010_01_04 \-u \[StaxUser\]-p \[StaxPassword\] D:\\apache\esme\\server\target\esme-server-0.3.0-SNAPSHOT.war
\ No newline at end of file

Added: esme/site/trunk/content/stax.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/stax.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/stax.mdtext (added)
+++ esme/site/trunk/content/stax.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,68 @@
+Title: Stax
+<a name="Stax-Preqs."></a>
+## Preqs.
+
+* Functional build environment for Apache ESME including maven, current
+source code etc.
+* Account on Stax.net
+* [Stax SDK](http://wiki.stax.net/w/index.php/SDK)
+ must be installed locally
+* An application on the stax cloud must already exist
+
+<a name="Stax-Steps"></a>
+## Steps
+
+
+<a name="Stax-web.xml"></a>
+##### web.xml
+
+Add the following text to your file
+
+
+
+    <resource-ref>
+    <res-ref-name>esme</res-ref-name>
+    <res-type>javax.sql.DataSource</res-type>
+    <res-auth>Container</res-auth>
+    </resource-ref>
+
+
+<a name="Stax-stax-web.xml"></a>
+##### stax-web.xml
+
+Create a file in your webapp\WEB-INF directory. The contents of the file
+looks like this
+
+
+    <stax-web-app>
+     <resource name="esme" auth="Container" type="javax.sql.DataSource">
+      <param name="username" value="[Username for DB]
+" />
+      <param name="password" value="[Password for DB]
+" />
+      <param name="url" value="jdbc:stax://[DB name]
+" />
+     </resource>
+    </stax-web-app>
+
+
+
+The information for database is available in the Stax Console for your DB
+
+<a name="Stax-BuildApacheESME"></a>
+##### Build Apache ESME
+
+use _mvn clean install_
+
+<a name="Stax-"></a>
+##### 
+
+
+<a name="Stax-DeployonStax"></a>
+##### Deploy on Stax
+
+1. Start the "Stax Console.bat" command (on windows)
+1. In this console use the app:deploy command to deploy the application:
+
+  
+  

Added: esme/site/trunk/content/streaming-api.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/streaming-api.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/streaming-api.cwiki (added)
+++ esme/site/trunk/content/streaming-api.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,36 @@
+h2. Streams vs. Resources
+
+In the design below, all parts of ESME are modeled as resources, in keeping with a RESTful approach. Our streaming resources (also thought of as delta-queue resources) are collections that are only additive. We have defined a general streaming interface that strives to be RESTful while prioritizing the performance benefits of streams.
+
+For background design information, see this [page|ESME:Overall Design Discussions].
+
+
+
+h2. Resource/Object/Stream Hierarchy
+
+The above is based on a rough object hierarchy as follows:
+
+* ESME API instance (api2/)
+** Session (api2/session)
+** Users (api2/users)
+*** Specific User (api2/users/USERID)
+** Messages posted by logged in user (api2/user/messages) (1)
+** Users followed by logged in user (api2/user/followees)
+** Users following logged in user (api2/user/followers)
+** Trackers belonging to logged in user (api2/user/tracks)
+*** Messages from a track (api2/user/tracks/TRACKID/messages) (1)
+** Actions belonging to logged in user (api2/user/actions)
+** Messages (api2/messages) (1)
+** Tags (api2/tags)
+*** Messages posted to a tag (api2/tags/TAG/messages) (1)
+** Conversations (api2/conversations)
+*** Messages posted to a conversation (api2/conversations/CONVERSATIONID/messages) (1)
+** Pools (api2/pools)
+*** Users associated with a pool (api2/pools/POOLID/users)
+*** Messages posted to a pool (api2/pools/POOLID/messages) (1)
+** Searches&nbsp; (1)
+** Trends
+
+(1) Stream interface
+
+Each of these bullets represents a set of objects. The resource representing an individual object lives at api/objects/OBJECTID. For example, api/conversations/1. As much as is reasonable, one would expect to be able to GET (read), POST (create), PUT (update/amend), or DELETE (delete) any individual member of each of these object sets. Going through each of these objects to ask what it would mean to create, read, update, or delete that object may reveal holes in the existing API, some of which I have filled in above.
\ No newline at end of file

Added: esme/site/trunk/content/streaming-api.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/streaming-api.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/streaming-api.mdtext (added)
+++ esme/site/trunk/content/streaming-api.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,52 @@
+Title: Streaming API
+<a name="StreamingAPI-Streamsvs.Resources"></a>
+## Streams vs. Resources
+
+In the design below, all parts of ESME are modeled as resources, in keeping
+with a RESTful approach. Our streaming resources (also thought of as
+delta-queue resources) are collections that are only additive. We have
+defined a general streaming interface that strives to be RESTful while
+prioritizing the performance benefits of streams.
+
+For background design information, see this [page](esme:overall-design-discussions.html)
+.
+
+
+
+<a name="StreamingAPI-Resource/Object/StreamHierarchy"></a>
+## Resource/Object/Stream Hierarchy
+
+The above is based on a rough object hierarchy as follows:
+
+* ESME API instance (api2/)
+** Session (api2/session)
+** Users (api2/users)
+*** Specific User (api2/users/USERID)
+** Messages posted by logged in user (api2/user/messages) (1)
+** Users followed by logged in user (api2/user/followees)
+** Users following logged in user (api2/user/followers)
+** Trackers belonging to logged in user (api2/user/tracks)
+*** Messages from a track (api2/user/tracks/TRACKID/messages) (1)
+** Actions belonging to logged in user (api2/user/actions)
+** Messages (api2/messages) (1)
+** Tags (api2/tags)
+*** Messages posted to a tag (api2/tags/TAG/messages) (1)
+** Conversations (api2/conversations)
+*** Messages posted to a conversation
+(api2/conversations/CONVERSATIONID/messages) (1)
+** Pools (api2/pools)
+*** Users associated with a pool (api2/pools/POOLID/users)
+*** Messages posted to a pool (api2/pools/POOLID/messages) (1)
+** Searches&nbsp; (1)
+** Trends
+
+(1) Stream interface
+
+Each of these bullets represents a set of objects. The resource
+representing an individual object lives at api/objects/OBJECTID. For
+example, api/conversations/1. As much as is reasonable, one would expect to
+be able to GET (read), POST (create), PUT (update/amend), or DELETE
+(delete) any individual member of each of these object sets. Going through
+each of these objects to ask what it would mean to create, read, update, or
+delete that object may reveal holes in the existing API, some of which I
+have filled in above.

Added: esme/site/trunk/content/technical-architecture.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/technical-architecture.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/technical-architecture.cwiki (added)
+++ esme/site/trunk/content/technical-architecture.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,35 @@
+h4. Overview
+
+The Apache ESME server is written in Scala and uses the Lift web framework to produce a browser-based user interface and also to expose a [REST API.|http://cwiki.apache.org/confluence/display/ESME/API+2.0+-+Design] The Apache ESME architecture has been devised to meet the business requirements associated with reliability and scalability. The use of the Scala programming language and the Lift web framework on the server provides rapid development capability as well as browser push functionality ("Comet") as standard. The open server side architecture allows other messaging environments - internal (Alerts, Enterprise Services, etc.) as well as public (Twitter, external web-services, etc.) - to be consumed as messaging sources. An event-driven actions framework within Apache ESME allows users to filter their information flow as well as to forward Apache ESME messages to other systems via HTTP or email.
+
+
+
+!Overview.jpg|border=1!
+
+
+
+h4. Technical architecture
+
+Apache ESME is based on Scala and Lift and runs in most J2EE containers.
+
+
+!clientdiagramjpeg.png|border=1!
+
+
+h4. Scala
+
+Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. It is also fully interoperable with Java.
+
+[Learn more about Scala|http://www.scala-lang.org/node/25]
+
+h4. Lift
+
+[Lift |http://liftweb.net/]is an expressive and elegant framework for writing web applications. Lift stresses the importance of security, maintainability, scalability and performance, while allowing for high levels of developer productivity. Lift open source software licensed under an [Apache 2.0 license.|http://www.apache.org/licenses/LICENSE-2.0.html]
+
+
+h4. More Information
+* [Apache Hudson |Apache Hudson]
+* [Architecture Patterns |Architecture Patterns]
+* [Database Scheme |Database Scheme]
+* [Human- vs. Machine-based Integration |Human- vs. Machine-based Integration]
+* [Intital Comments by Bill Fernandez |Initial Comments by Bill Fernandez]

Added: esme/site/trunk/content/technical-architecture.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/technical-architecture.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/technical-architecture.mdtext (added)
+++ esme/site/trunk/content/technical-architecture.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,59 @@
+Title: Technical Architecture
+<a name="TechnicalArchitecture-Overview"></a>
+#### Overview
+
+The Apache ESME server is written in Scala and uses the Lift web framework
+to produce a browser-based user interface and also to expose a [REST API.](http://cwiki.apache.org/confluence/display/ESME/API+2.0+-+Design)
+ The Apache ESME architecture has been devised to meet the business
+requirements associated with reliability and scalability. The use of the
+Scala programming language and the Lift web framework on the server
+provides rapid development capability as well as browser push functionality
+("Comet") as standard. The open server side architecture allows other
+messaging environments - internal (Alerts, Enterprise Services, etc.) as
+well as public (Twitter, external web-services, etc.) - to be consumed as
+messaging sources. An event-driven actions framework within Apache ESME
+allows users to filter their information flow as well as to forward Apache
+ESME messages to other systems via HTTP or email.
+
+
+
+!Overview.jpg|border=1!
+
+
+
+<a name="TechnicalArchitecture-Technicalarchitecture"></a>
+#### Technical architecture
+
+Apache ESME is based on Scala and Lift and runs in most J2EE containers.
+
+
+!clientdiagramjpeg.png|border=1!
+
+
+<a name="TechnicalArchitecture-Scala"></a>
+#### Scala
+
+Scala is a general purpose programming language designed to express common
+programming patterns in a concise, elegant, and type-safe way. It smoothly
+integrates features of object-oriented and functional languages. It is also
+fully interoperable with Java.
+
+[Learn more about Scala](http://www.scala-lang.org/node/25)
+
+<a name="TechnicalArchitecture-Lift"></a>
+#### Lift
+
+[Lift ](http://liftweb.net/)
+is an expressive and elegant framework for writing web applications. Lift
+stresses the importance of security, maintainability, scalability and
+performance, while allowing for high levels of developer productivity. Lift
+open source software licensed under an [Apache 2.0 license.|http://www.apache.org/licenses/LICENSE-2.0.html]
+
+
+<a name="TechnicalArchitecture-MoreInformation"></a>
+#### More Information
+* [Apache Hudson ](apache-hudson.html)
+* [Architecture Patterns ](architecture-patterns.html)
+* [Database Scheme ](database-scheme.html)
+* [Human- vs. Machine-based Integration ](human--vs.-machine-based-integration.html)
+* [Intital Comments by Bill Fernandez ](initial-comments-by-bill-fernandez.html)

Added: esme/site/trunk/content/twitter-api.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/twitter-api.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/twitter-api.cwiki (added)
+++ esme/site/trunk/content/twitter-api.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,180 @@
+h3. Supported Twitter methods
+
+All methods are available in both XML and JSON formats. All methods use a GET request, unless explicitly specified below.
+
+
+
+h4. Get Public Timeline
+
+Gets the public timeline
+
+h5. GET /twitter/statuses/public_timeline
+
+----
+
+
+h4. Get messages from conversations
+
+Returns all messages from conversations the user was engaged in.
+
+h5. GET /twitter/statuses/replies
+
+----
+
+
+h4. Get friends timeline
+
+Gets a friends timeline
+
+h5. GET /twitter/statuses/friends_timeline
+
+----
+
+
+h4. Get a users timeline
+
+Gets a users timeline
+
+h5. GET /twitter/statuses/user_timeline
+
+This method also accepts a user name or id: {{statuses/user_timeline/name.json{}}}{{{}statuses/user_timeline/id.xml}}
+
+----
+
+
+h4. Get a user
+
+Gets a users
+
+h5. GET /twitter/statuses/show
+
+This method only accepts a user name or id: {{statuses/show/name.json{}}}{{{}statuses/show/id.xml}}
+
+----
+
+
+h4. Update
+
+Posts a message
+
+h5. POST /twitter/statuses/update
+
+Parameters:
+* status: text of the message
+* source: application name or _twitterapi_ by default
+
+----
+
+
+h4. Get friends
+
+Returns friends
+
+h5. GET /twitter/statuses/friends
+
+This method also accepts a user name or id: {{statuses/friends/name.json{}}}{{{}statuses/friends/id.xml}}
+
+----
+
+
+h4. Get followers
+
+Returns followers
+
+h5. GET /twitter/statuses/followers
+
+This method also accepts a user name or id: {{statuses/followers/name.json{}}}{{{}statuses/followers/id.xml}}
+
+----
+
+
+h4. Get Direct Messages
+
+Get direct messages
+
+Dummy method, returns empty collection. Included for compatibility with Twitter clients who request this method upon startup and fail if it returns an error.
+
+----
+
+
+
+h4. Show Users
+
+Returns users
+
+h5. GET /twitter/users/show
+
+This method only accepts a user name or id: {{users/show/name.json{}}}{{{}users/show/id.xml}}
+
+----
+
+
+h4. Create Friendship
+
+Returns users
+
+h5. POST /twitter/friendships/create
+
+This method only accepts a user name or id: {{friendships/create/name.json{}}}{{{}friendships/create/id.xml}}
+
+----
+
+
+h4. Delete Friendships
+
+Deletes friendships
+
+h5. POST /twitter/friendships/destroy
+
+This method only accepts a user name or id: {{friendships/destroy/name.json{}}}{{{}friendships/destroy/id.xml}}
+
+----
+
+
+
+h4. Show existing friendships
+
+Shows existing friendships
+
+h5. GET /twitter/friendships/exists
+
+This method only accepts a user name or id: {{friendships/exists/name.json{}}}{{{}friendships/exists/id.xml}}
+
+Parameters:
+
+* user_a
+* user_b
+
+----
+
+
+h4. Verify Credentials
+
+Verifies the credentials
+
+h5. GET /twitter/verify/credentials
+
+Returns basic user information if the credentials are correct.
+
+----
+
+
+h4. End Session
+
+Ends the current session
+
+h5. POST /twitter/account/end_session
+
+Returns basic user information if the credentials are correct.
+
+----
+
+
+You can find more about Twitter's own API at [http://apiwiki.twitter.com/w/page/22554679/Twitter-API-Documentation].
+
+h4. Twitter API URL
+
+You can configure the prefix for the Twitter-compatible API via the _twitter.prefix_ property. The default value is _twitter_, if you want no prefix, use an empty string like this:
+
+bq. twitter.prefix=
+For more information about configuring properties in Lift, check [here|http://wiki.liftweb.net/index.php/Cheat_Sheet#Property_files].
\ No newline at end of file

Added: esme/site/trunk/content/twitter-api.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/twitter-api.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/twitter-api.mdtext (added)
+++ esme/site/trunk/content/twitter-api.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,227 @@
+Title: Twitter API
+<a name="TwitterAPI-SupportedTwittermethods"></a>
+### Supported Twitter methods
+
+All methods are available in both XML and JSON formats. All methods use a
+GET request, unless explicitly specified below.
+
+
+
+<a name="TwitterAPI-GetPublicTimeline"></a>
+#### Get Public Timeline
+
+Gets the public timeline
+
+<a name="TwitterAPI-GET/twitter/statuses/public_timeline"></a>
+##### GET /twitter/statuses/public_timeline
+
+----
+
+
+<a name="TwitterAPI-Getmessagesfromconversations"></a>
+#### Get messages from conversations
+
+Returns all messages from conversations the user was engaged in.
+
+<a name="TwitterAPI-GET/twitter/statuses/replies"></a>
+##### GET /twitter/statuses/replies
+
+----
+
+
+<a name="TwitterAPI-Getfriendstimeline"></a>
+#### Get friends timeline
+
+Gets a friends timeline
+
+<a name="TwitterAPI-GET/twitter/statuses/friends_timeline"></a>
+##### GET /twitter/statuses/friends_timeline
+
+----
+
+
+<a name="TwitterAPI-Getauserstimeline"></a>
+#### Get a users timeline
+
+Gets a users timeline
+
+<a name="TwitterAPI-GET/twitter/statuses/user_timeline"></a>
+##### GET /twitter/statuses/user_timeline
+
+This method also accepts a user name or id:
+*statuses/user_timeline/name.json{*}*{}statuses/user_timeline/id.xml*
+
+----
+
+
+<a name="TwitterAPI-Getauser"></a>
+#### Get a user
+
+Gets a users
+
+<a name="TwitterAPI-GET/twitter/statuses/show"></a>
+##### GET /twitter/statuses/show
+
+This method only accepts a user name or id:
+*statuses/show/name.json{*}*{}statuses/show/id.xml*
+
+----
+
+
+<a name="TwitterAPI-Update"></a>
+#### Update
+
+Posts a message
+
+<a name="TwitterAPI-POST/twitter/statuses/update"></a>
+##### POST /twitter/statuses/update
+
+Parameters:
+* status: text of the message
+* source: application name or _twitterapi_ by default
+
+----
+
+
+<a name="TwitterAPI-Getfriends"></a>
+#### Get friends
+
+Returns friends
+
+<a name="TwitterAPI-GET/twitter/statuses/friends"></a>
+##### GET /twitter/statuses/friends
+
+This method also accepts a user name or id:
+*statuses/friends/name.json{*}*{}statuses/friends/id.xml*
+
+----
+
+
+<a name="TwitterAPI-Getfollowers"></a>
+#### Get followers
+
+Returns followers
+
+<a name="TwitterAPI-GET/twitter/statuses/followers"></a>
+##### GET /twitter/statuses/followers
+
+This method also accepts a user name or id:
+*statuses/followers/name.json{*}*{}statuses/followers/id.xml*
+
+----
+
+
+<a name="TwitterAPI-GetDirectMessages"></a>
+#### Get Direct Messages
+
+Get direct messages
+
+Dummy method, returns empty collection. Included for compatibility with
+Twitter clients who request this method upon startup and fail if it returns
+an error.
+
+----
+
+
+
+<a name="TwitterAPI-ShowUsers"></a>
+#### Show Users
+
+Returns users
+
+<a name="TwitterAPI-GET/twitter/users/show"></a>
+##### GET /twitter/users/show
+
+This method only accepts a user name or id:
+*users/show/name.json{*}*{}users/show/id.xml*
+
+----
+
+
+<a name="TwitterAPI-CreateFriendship"></a>
+#### Create Friendship
+
+Returns users
+
+<a name="TwitterAPI-POST/twitter/friendships/create"></a>
+##### POST /twitter/friendships/create
+
+This method only accepts a user name or id:
+*friendships/create/name.json{*}*{}friendships/create/id.xml*
+
+----
+
+
+<a name="TwitterAPI-DeleteFriendships"></a>
+#### Delete Friendships
+
+Deletes friendships
+
+<a name="TwitterAPI-POST/twitter/friendships/destroy"></a>
+##### POST /twitter/friendships/destroy
+
+This method only accepts a user name or id:
+*friendships/destroy/name.json{*}*{}friendships/destroy/id.xml*
+
+----
+
+
+
+<a name="TwitterAPI-Showexistingfriendships"></a>
+#### Show existing friendships
+
+Shows existing friendships
+
+<a name="TwitterAPI-GET/twitter/friendships/exists"></a>
+##### GET /twitter/friendships/exists
+
+This method only accepts a user name or id:
+*friendships/exists/name.json{*}*{}friendships/exists/id.xml*
+
+Parameters:
+
+* user_a
+* user_b
+
+----
+
+
+<a name="TwitterAPI-VerifyCredentials"></a>
+#### Verify Credentials
+
+Verifies the credentials
+
+<a name="TwitterAPI-GET/twitter/verify/credentials"></a>
+##### GET /twitter/verify/credentials
+
+Returns basic user information if the credentials are correct.
+
+----
+
+
+<a name="TwitterAPI-EndSession"></a>
+#### End Session
+
+Ends the current session
+
+<a name="TwitterAPI-POST/twitter/account/end_session"></a>
+##### POST /twitter/account/end_session
+
+Returns basic user information if the credentials are correct.
+
+----
+
+
+You can find more about Twitter's own API at [http://apiwiki.twitter.com/w/page/22554679/Twitter-API-Documentation](http://apiwiki.twitter.com/w/page/22554679/Twitter-API-Documentation)
+.
+
+<a name="TwitterAPI-TwitterAPIURL"></a>
+#### Twitter API URL
+
+You can configure the prefix for the Twitter-compatible API via the
+_twitter.prefix_ property. The default value is _twitter_, if you want no
+prefix, use an empty string like this:
+
+bq. twitter.prefix=
+For more information about configuring properties in Lift, check [here](http://wiki.liftweb.net/index.php/Cheat_Sheet#Property_files)
+.

Added: esme/site/trunk/content/use-case---posting-from-sap-back-end.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/use-case---posting-from-sap-back-end.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/use-case---posting-from-sap-back-end.cwiki (added)
+++ esme/site/trunk/content/use-case---posting-from-sap-back-end.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,17 @@
+h3. Environments
+
+|| Environment \\ || Comment \\ ||
+| Stax \\ | This is the cloud-based Apache ESME installation \\ |
+| University \\ | This is the firewall protected area that contains the Apache ESME bot and the SAP back-end \\ |
+
+h3. ESME Users
+
+|| Users \\ || Comment \\ ||
+| sapbackend \\ | This is the user in Apache ESME that represents the SAP back-end. This user must be followed when users wish to receive information from the SAP back-end. If users wish to communicate with the back-end then they must send mesages addressed to this user. \\
+ *Additional Configuration*: This user can also use [tracks|http://cwiki.apache.org/confluence/display/ESME/Web+UI+Help]to automatically receive messages with a certain word. You may also use [actions|http://cwiki.apache.org/confluence/display/ESME/Actions]which provide more complicated ways to filter information. For example, the user may use an action that searches for messages that are tagged with the word "sap" \\ |
+
+h3. Bot Details
+
+The bot uses the Apache ESME [API|http://cwiki.apache.org/confluence/display/ESME/API+2.0+-+Design]to receive messages that are addressed to it.&nbsp; The bot then provide some basic filtering to determine what is required. For example, messages that are tagged with the word "PO" would get information about purchase orders. Messages tagged with "mat" would ask about materials.
+
+There are various options for the bot to communicate with the back-end. These options are primarily based on what programming langauge is being used, the platform, etc. 
\ No newline at end of file

Added: esme/site/trunk/content/use-case---posting-from-sap-back-end.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/use-case---posting-from-sap-back-end.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/use-case---posting-from-sap-back-end.mdtext (added)
+++ esme/site/trunk/content/use-case---posting-from-sap-back-end.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,33 @@
+Title: Use Case - Posting from SAP back-end
+<a name="UseCase-PostingfromSAPback-end-Environments"></a>
+### Environments
+
+  
+  
+  
+  
+  
+  
+
+<a name="UseCase-PostingfromSAPback-end-ESMEUsers"></a>
+### ESME Users
+
+  
+  
+  
+  
+  
+  
+
+<a name="UseCase-PostingfromSAPback-end-BotDetails"></a>
+### Bot Details
+
+The bot uses the Apache ESME [API](http://cwiki.apache.org/confluence/display/ESME/API+2.0+-+Design)
+to receive messages that are addressed to it.&nbsp; The bot then provide
+some basic filtering to determine what is required. For example, messages
+that are tagged with the word "PO" would get information about purchase
+orders. Messages tagged with "mat" would ask about materials.
+
+There are various options for the bot to communicate with the back-end.
+These options are primarily based on what programming langauge is being
+used, the platform, etc. 

Added: esme/site/trunk/content/vba.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/vba.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/vba.cwiki (added)
+++ esme/site/trunk/content/vba.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,41 @@
+Many people spend most of the day either working on SAP-related systems or on Microsoft Office products.&nbsp;&nbsp; We have created a VBA macro that creates messages on EMSE for those individuals who work with Excel and Word. This macro is based on ESME's [REST API|https://cwiki.apache.org/confluence/display/ESME/RESTAPI].
+
+The macro pops up in your Office tool of choice which allows you to enter a quick message for ESME.
+
+To authenticate themselves, ESME users must replace “_insert_your_token_“&nbsp;with their own authorization token. Tags are currently hard-coded as well.
+
+
+Sub ESME_sendMessage()
+
+‘HTTP variable
+Dim myHTTP As MSXML2.XMLHTTP
+
+‘HTTP object
+Set myHTTP = CreateObject(”msxml2.xmlhttp”)
+
+‘open the connection
+myHTTP.Open “post”, _
+“[http://api.esme.us/esme/api/login?token=[insert_your_token]|http://api.esme.us/esme/api/login?token=[insert_your_token]]“, False
+
+’send
+myHTTP.Send
+
+‘ Send Message
+
+Dim message
+
+message = InputBox(”Enter Message”)
+
+myHTTP.Open “post”, _
+“[http://api.esme.us/esme/api/send_msg?message|http://api.esme.us/esme/api/send_msg?message]=” + message + “&tags=Test,excel&via=excel”, False
+
+’send
+myHTTP.Send
+
+‘Logout
+myHTTP.Open “get”, _
+“[http://api.esme.us/esme/api/logout|http://api.esme.us/esme/api/logout]“, False
+
+’send
+myHTTP.Send
+End Sub
\ No newline at end of file

Added: esme/site/trunk/content/vba.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/vba.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/vba.mdtext (added)
+++ esme/site/trunk/content/vba.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,52 @@
+Title: VBA
+Many people spend most of the day either working on SAP-related systems or
+on Microsoft Office products.&nbsp;&nbsp; We have created a VBA macro that
+creates messages on EMSE for those individuals who work with Excel and
+Word. This macro is based on ESME's [REST API](https://cwiki.apache.org/confluence/display/ESME/RESTAPI)
+.
+
+The macro pops up in your Office tool of choice which allows you to enter a
+quick message for ESME.
+
+To authenticate themselves, ESME users must replace
+“_insert_your_token_“&nbsp;with their own authorization token. Tags are
+currently hard-coded as well.
+
+
+Sub ESME_sendMessage()
+
+‘HTTP variable
+Dim myHTTP As MSXML2.XMLHTTP
+
+‘HTTP object
+Set myHTTP = CreateObject(”msxml2.xmlhttp”)
+
+‘open the connection
+myHTTP.Open “post”, _
+“[http://api.esme.us/esme/api/login?token=[insert_your_token](http://api.esme.us/esme/api/login?token=[insert_your_token)
+|http://api.esme.us/esme/api/login?token=[insert_your_token]]“, False
+
+’send
+myHTTP.Send
+
+‘ Send Message
+
+Dim message
+
+message = InputBox(”Enter Message”)
+
+myHTTP.Open “post”, _
+“[http://api.esme.us/esme/api/send_msg?message](http://api.esme.us/esme/api/send_msg?message)
+=” + message + “&tags=Test,excel&via=excel”, False
+
+’send
+myHTTP.Send
+
+‘Logout
+myHTTP.Open “get”, _
+“[http://api.esme.us/esme/api/logout](http://api.esme.us/esme/api/logout)
+“, False
+
+’send
+myHTTP.Send
+End Sub

Added: esme/site/trunk/content/web-client.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/web-client.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/web-client.cwiki (added)
+++ esme/site/trunk/content/web-client.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,31 @@
+&nbsp;
+*Name*: Web
+
+*Description*: This client is a pure browser-based client
+
+*Status*: There are currently two versions - an old one&nbsp;(original)&nbsp;and &nbsp;the latest one based on the Apache code-base
+
+h2. Screenshots
+
+&nbsp;
+*Old Web UI*
+
+&nbsp; !old_esme.jpg|thumbnail!
+
+*New UI:*&nbsp;
+
+_Coming soon_&nbsp;
+
+h2. Code
+
+See [SVN|ESME:Downloading Source]
+
+h2. Help
+
+&nbsp;Detailed help is located [here|ESME:Web UI Help]
+
+h2. Details
+
+This was our first client&nbsp;
+
+h2. Supporting materials
\ No newline at end of file

Added: esme/site/trunk/content/web-client.mdtext
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/web-client.mdtext?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/web-client.mdtext (added)
+++ esme/site/trunk/content/web-client.mdtext Mon Jun 27 13:54:21 2011
@@ -0,0 +1,39 @@
+Title: Web Client
+&nbsp;
+*Name*: Web
+
+*Description*: This client is a pure browser-based client
+
+*Status*: There are currently two versions - an old
+one&nbsp;(original)&nbsp;and &nbsp;the latest one based on the Apache
+code-base
+
+<a name="WebClient-Screenshots"></a>
+## Screenshots
+
+&nbsp;
+*Old Web UI*
+
+&nbsp; !old_esme.jpg|thumbnail!
+
+*New UI:*&nbsp;
+
+_Coming soon_&nbsp;
+
+<a name="WebClient-Code"></a>
+## Code
+
+See [SVN](esme:downloading-source.html)
+
+<a name="WebClient-Help"></a>
+## Help
+
+&nbsp;Detailed help is located [here](esme:web-ui-help.html)
+
+<a name="WebClient-Details"></a>
+## Details
+
+This was our first client&nbsp;
+
+<a name="WebClient-Supportingmaterials"></a>
+## Supporting materials

Added: esme/site/trunk/content/web-ui-help.cwiki
URL: http://svn.apache.org/viewvc/esme/site/trunk/content/web-ui-help.cwiki?rev=1140161&view=auto
==============================================================================
--- esme/site/trunk/content/web-ui-help.cwiki (added)
+++ esme/site/trunk/content/web-ui-help.cwiki Mon Jun 27 13:54:21 2011
@@ -0,0 +1,129 @@
+h4. Login
+
+In the current version, you need an OpenID to login into ESME. You get your OpenID either via external OpenID providers or internal OpenID providers.
+
+h4. Main UI: Message Box
+
+Here you can enter the message that you wish to send. If you use "@" then the mesage will be automaically sent to the that person's personal timeline (as long as they are following you). You can also enter URLs in this message and the URLs will be shortened automatically.
+
+_BUG: Currently, the current version of the Web UI doesn't shorten the URLs. Since there is no limit to the message length, shortening of URLs isn't critical"_
+
+h14. Main UI: Tags
+
+Here you can enter tags for your messages. Please separate your tags with commas. Tags are not required.
+
+This is optional but assists during searches for information.
+
+h4. Main UI: Tag Cloud
+
+The tag cloud shows which tags are currently the most heavily used. The larger the tag, the more often it has been used.
+
+If you click on a tag, you are taken to a page where recent posts using this tag are displayed
+
+h4. Main UI: Word Cloud
+
+The tag cloud shows which words are currently the most heavily used. The larger the word, the more often it has been used.
+
+If you click on a word, you are taken to a page where recent posts using this worsdare displayed
+
+h4. Main UI: Search
+
+Search allows you to search for words in messages. A new screen is displayed with all messages with words that meet the search term.
+
+*Note: Words not tags are searched*
+
+h4. Main UI: Tabs
+
+
+h5. Messages
+
+This a list of messages that you have created and from those people who are following. If you click on the user name in this message area, you will be sent to that user's page where you can all the most recent messages that they have created. If a message has tags assocaited with it, then these tags are on the left hand side of the message. The date under the message is associated with when the message was created.
+
+By clicking on the tags, you can see recent messages which have been tagged with this particular tag.
+
+If you click on "reply", then you can create a message in response and join in the conversation.
+
+If you click on "conversation", you will see a page with all messages that were part of this conversation.
+
+_BUG: In the current UI, if you click on "reply" the user identifier "@User" is not auotmatically added to message. You must do this manually._
+
+_BUG: In the current UI, it is not possible to look at older messages. If you wish to look at older messages, then you must use the search functionality._
+
+_BUG: In the current UI, the window width is displayed incorrectly, when longer URLs are displayed._
+
+h5. Timeline
+
+This is the public timeline with all messages that have been sent on ESME. There are also messages from people whom you don't follow.
+
+If you see messages from individuals whose messages are of interest, you can click on the name and are sent to a page displaying the user' messages
+
+The functionality is the same as that of the _Messages_ Tab.
+
+h5. Contacts
+
+This tab shows two lists. Those individuals who are following you and those individuals who you are following. By clicking on user, you can go to that's page and see his/her most recent messages.
+
+h4. Main UI: Contacts Page
+
+Here you can see the messages from a particular user. Click on the "Messages" tab to see recent messages from this user.
+
+You can click on "follow" to receive messages from this user in your personal timeline.
+
+If you are already following a user, you can click on "unfollow" to no longer receive messages from this user in your personal timeline.
+
+h4. Main UI: Upper Right Hand Menus
+
+
+h5. Profile
+
+This screen allows you to change the details regarding your user. Currently, the following attributes are editable:
+* Nickname: This is the name that appears on your your messages
+* First Name: First Name
+* Last Name: Last Name
+* imageurl : This is the URL to the image that will appear next to your messages. _Make sure you use a valid URL for your image URL_
+* timezone : select the timezone ich which are you located
+* Locale: In what langauge to which to see the UI. _Note: This currently has no effect._
+
+Select "Edit" or "Messages" to return to the messages
+
+h5. About
+
+This screen provides you with background details about ESME.
+
+h5. Manage Tokens
+
+One of the advantges with ESME is that you can use various clients to integrate with the application. In order for you to access ESME via the REST API, you need to create a token. This screen allows you to create and revoke tokens for these applications.
+
+Select a name for your token and then create your token with "Add". You may also revoke tokens that you have already created by clicking the "Revoke" button.
+
+Via _Cut and Paste_, you are able to paste the created tokens into your client applications (for example, the ESMEDesktop)
+
+You may create as many tokens as you wish.
+
+h5. Logout
+
+This link logs you out of the application. The next time you start the application you must login again.
+
+h4. Main UI: Lower Left Hand Menus
+
+
+h4. List users
+
+This screen depicts all users that are currently stored in the system. You can click on a user to see his/her messages
+
+h4. Item Tracking
+
+When using ESME, you see messages that are currently being created. With "Tracks", you have the ability to search for older messages.
+
+h4. Action Management
+
+Actions allow individual users to influence message handling in ESME. Usually, users just receive messages. What if they wish to view only certain types of messages or must receive emails when certain messages have particular tags. ESME actions allow for this functionality.
+
+Actions are to be distinguished from tracks in that tracks are based on the primitive searches of message contents (including tags). Tracks just provide another perspective on existing timelines. This is obvious in the ESME Desktop client where each search creates a new track and a new window to display the contents in a new panel.
+
+Regarding actions, there are certain steps that must be taken.
+# Name your action. This step enables a user to create a unique name that allows you to ascertain what the action does.
+# Set for your filter: This step determines which messages will be selected for the action.
+# Set your action: This determines what should happen with those messages meeting the filter criterion.
+
+It is also possible to enable, disable and delete actions. Thus, you may have action that you've created but currently do not what to use. You can disable the action and use this later.
\ No newline at end of file