<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>SPECS.txt</filename>
    </added>
    <added>
      <filename>server/services/Model.py</filename>
    </added>
    <added>
      <filename>server/services/ProjectParticipantsService.py</filename>
    </added>
    <added>
      <filename>server/services/ProjectsService.py</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,7 @@ Features:
 * Make a better use of objects on the Flex side.
 * Use RemoteObject - http://pyamf.org/wiki/RemoteObjectConfig
 * Optimistic concurrency control.
-* Integrate user authentication on the Flex client and the GAE server - http://pyamf.org/browser/examples/trunk/authentication/Readme.txt
+* Integrate user authentication (credentials) on the Flex client and the GAE server - http://pyamf.org/browser/examples/trunk/authentication/Readme.txt
 * Use the RESTful convention.
 
 Study:
@@ -10,8 +10,6 @@ Study:
 * Bloog (RESTful design) - http://bloog.billkatz.com/
 * GAE SWF Project - http://gaeswf.appspot.com/
 * http://aralbalkan.com/1307
-* PHP RIA SDK by Adobe - http://code.google.com/p/adobe-php-sdk/
 * Ruby on Rails RIA SDK by Adobe - http://groups.google.com/group/adobe-rubyonrails-ria-sdk
 * RubyAMF - http://code.google.com/p/rubyamf/
-* php_ria_sdk_by_adobe_070108\php_ria_sdk_by_adobe\samples\flex\amfphp
 * RubyOnRailsRIASDKbyAdobe\RubyOnRailsRIASDKbyAdobe\samples\flex\flex_ror_sdk_issuetracker\Flex Source\flex_issuetracker</diff>
      <filename>TODO.txt</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>flex-client/bin-debug/FlexClient.swf</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@ package flexclient.model
         public function ProjectProxy()
         {
             super(NAME, new ArrayCollection);
-            Gateway().call(&quot;ProjectService.get_all&quot;, new Responder(onGetAllResult));
+            Gateway().call(&quot;ProjectsService.get_all&quot;, new Responder(onGetAllResult));
         }
         
         // Returns data property cast to proper type.
@@ -43,7 +43,7 @@ package flexclient.model
         // Adds an item to the data.
         public function addItem(item:Object):void
         {
-        	Gateway().call(&quot;ProjectService.save&quot;, new Responder(onAddItemResult), item);
+        	Gateway().call(&quot;ProjectsService.save&quot;, new Responder(onAddItemResult), item);
         }
         
         private function onAddItemResult(result:Object):void
@@ -54,7 +54,7 @@ package flexclient.model
         // Updates an item in the data.
         public function updateItem(item:Object):void
         {
-        	Gateway().call(&quot;ProjectService.save&quot;, new Responder(onUpdateItemResult), item);
+        	Gateway().call(&quot;ProjectsService.save&quot;, new Responder(onUpdateItemResult), item);
         }
         
         private function onUpdateItemResult(result:Object):void
@@ -73,7 +73,7 @@ package flexclient.model
         public function deleteItem(item:Object):void
         {
             var project:ProjectVO = item as ProjectVO;
-        	Gateway().call(&quot;ProjectService.delete&quot;, null, project);
+        	Gateway().call(&quot;ProjectsService.delete&quot;, null, project);
             for (var i:int = 0; i &lt; projects.length; i++)
             {
                 if (projects[i]._key == project._key) {</diff>
      <filename>flex-client/src/flexclient/model/ProjectProxy.as</filename>
    </modified>
    <modified>
      <diff>@@ -13,9 +13,11 @@ client.py update 1 &quot;New project name&quot;
 client.py delete 1 3 7
     Deletes the projects with codes = 1, 3 and 7.
 client.py initialize
-    Deletes all current data and inserts sample objects.
+    Deletes all current data and inserts sample projects and participants.
 client.py all
     Lists all projects.
+client.py participants
+    Lists all project participants.
 &quot;&quot;&quot;
 
 from pprint import pprint
@@ -26,67 +28,96 @@ def usage():
     print __doc__
 
 def test():
-    gw = RemotingService('http://localhost:8080/')
-    service = gw.getService('EchoService')
-    print service.echo('test')
-    print service.echo_upper('test')
-    print service.echo_upper(1)
+    gateway = RemotingService('http://localhost:8080/')
+    project_service = gateway.getService('EchoService')
+    print project_service.echo('test')
+    print project_service.echo_upper('test')
+    print project_service.echo_upper(1)
 
 def insert(code, name):
-    gw = RemotingService('http://localhost:8080/')
-    service = gw.getService('ProjectService')
+    gateway = RemotingService('http://localhost:8080/')
+    project_service = gateway.getService('ProjectsService')
     new_project = {
         &quot;code&quot;: int(code),
         &quot;name&quot;: name,
         &quot;department&quot;: 0,
     }
-    project = service.save(new_project)
+    project = project_service.save(new_project)
     print_project(project)
 
 def update(code, name):
-    gw = RemotingService('http://localhost:8080/')
-    service = gw.getService('ProjectService')
-    project = service.get(int(code))
+    gateway = RemotingService('http://localhost:8080/')
+    project_service = gateway.getService('ProjectsService')
+    project = project_service.get(int(code))
     project.name = name
-    project = service.save(project)
+    project = project_service.save(project)
     print_project(project)
 
 def get(code):
-    gw = RemotingService('http://localhost:8080/')
-    service = gw.getService('ProjectService')
-    project = service.get(int(code))
+    gateway = RemotingService('http://localhost:8080/')
+    project_service = gateway.getService('ProjectsService')
+    project = project_service.get(int(code))
     if project == None:
         print &quot;Project %s not found.&quot; % (code)
     else:
         print_project(project)
 
 def delete(codes):
-    gw = RemotingService('http://localhost:8080/')
-    service = gw.getService('ProjectService')
+    gateway = RemotingService('http://localhost:8080/')
+    project_service = gateway.getService('ProjectsService')
     for code in codes:
-        project = service.get(int(code))
+        project = project_service.get(int(code))
         if project != None:
-            service.delete(project)
+            project_service.delete(project)
 
 def initialize():
-    gw = RemotingService('http://localhost:8080/')
-    service = gw.getService('ProjectService')
-    projects = service.get_all()
+    # prepare service objects
+    gateway = RemotingService('http://localhost:8080/')
+    project_service = gateway.getService('ProjectsService')
+    project_participants_service = gateway.getService('ProjectParticipantsService')
+
+    # delete all participants
+    participants = project_participants_service.get_all()
+    for participant in participants:
+        project_participants_service.delete(participant)
+
+    # delete all projects
+    projects = project_service.get_all()
     for project in projects:
-        service.delete(project)
+        project_service.delete(project)
+
+    # insert projects
     sample_projects = [ {&quot;code&quot;: 104, &quot;name&quot;: &quot;Foobar 2008&quot;, &quot;department&quot;: 1,},
                         {&quot;code&quot;: 201, &quot;name&quot;: &quot;Server consolidation&quot;, &quot;department&quot;: 3,},
                         {&quot;code&quot;: 207, &quot;name&quot;: &quot;Flex training&quot;, &quot;department&quot;: 2,},
                         {&quot;code&quot;: 321, &quot;name&quot;: &quot;Desktop purchase&quot;, &quot;department&quot;: 5,} ]
     for project in sample_projects:
-        service.save(project)
+        project_service.save(project)
+
+    # insert participants
+    project_201_key = project_service.get(201)._key
+    project_321_key = project_service.get(321)._key
+    sample_participants = [ {&quot;project_key&quot;: project_201_key, &quot;name&quot;: &quot;First Participant&quot;,},
+                            {&quot;project_key&quot;: project_201_key, &quot;name&quot;: &quot;Second Participant&quot;,},
+                            {&quot;project_key&quot;: project_201_key, &quot;name&quot;: &quot;Third Participant&quot;,},
+                            {&quot;project_key&quot;: project_321_key, &quot;name&quot;: &quot;Fourth Participant&quot;,},
+                            {&quot;project_key&quot;: project_321_key, &quot;name&quot;: &quot;Fifth Participant&quot;,} ]
+    for participant in sample_participants:
+        project_participants_service.save(participant)
 
 def all():
-    gw = RemotingService('http://localhost:8080/')
-    service = gw.getService('ProjectService')
-    projects = service.get_all()
+    gateway = RemotingService('http://localhost:8080/')
+    project_service = gateway.getService('ProjectsService')
+    projects = project_service.get_all()
     for project in projects:
         print_project(project)
+
+def participants():        
+    gateway = RemotingService('http://localhost:8080/')
+    project_participants_service = gateway.getService('ProjectParticipantsService')
+    participants = project_participants_service.get_all()
+    for participant in participants:
+        pprint(participant)
         
 def print_project(project):
     pprint(project)
@@ -110,6 +141,8 @@ def main(args):
         initialize()
     elif command == 'all' and len(args) == 1:
         all()
+    elif command == 'participants' and len(args) == 1:
+        participants()
     else:
         usage()
         return 1</diff>
      <filename>python-client/client.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,11 @@
 import wsgiref.handlers
 from pyamf.remoting.gateway.wsgi import WSGIGateway
-from services import EchoService, ProjectService
+from services import EchoService, ProjectsService, ProjectParticipantsService
 
 services = {
     'EchoService': EchoService.EchoService,
-    'ProjectService': ProjectService.ProjectService,
+    'ProjectsService': ProjectsService.ProjectsService,
+    'ProjectParticipantsService': ProjectParticipantsService.ProjectParticipantsService,
 }
 
 def main():</diff>
      <filename>server/main.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 class EchoService:
     def echo(self, data):
-        return data;
+        return data
 
     def echo_upper(self, data):
-        return str(data).upper();
+        return str(data).upper()</diff>
      <filename>server/services/EchoService.py</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>server/services/ProjectService.py</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>1d5ab9ee2c173e3ce91843413d6039e405887af1</id>
    </parent>
  </parents>
  <author>
    <name>Fernando Correia</name>
    <email>fernandoacorreia@gmail.com</email>
  </author>
  <url>http://github.com/fernandoacorreia/flex-and-python-test/commit/71b598a5b5a673b6b3e381a08737430cf918bcbd</url>
  <id>71b598a5b5a673b6b3e381a08737430cf918bcbd</id>
  <committed-date>2008-08-02T08:12:54-07:00</committed-date>
  <authored-date>2008-08-02T08:12:54-07:00</authored-date>
  <message>added the participants model object</message>
  <tree>3a6cb23e4235da8b95c229ed2d37210e1d0ef12e</tree>
  <committer>
    <name>Fernando Correia</name>
    <email>fernandoacorreia@gmail.com</email>
  </committer>
</commit>
