abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r474591 - /incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
Date Tue, 14 Nov 2006 00:01:35 GMT
Author: jmsnell
Date: Mon Nov 13 16:01:34 2006
New Revision: 474591

URL: http://svn.apache.org/viewvc?view=rev&rev=474591
Log:
Use factory.newUuidUri() instead of using FOMHelper

Modified:
    incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java?view=diff&rev=474591&r1=474590&r2=474591
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
(original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
Mon Nov 13 16:01:34 2006
@@ -134,6 +134,7 @@
   public ResponseContext createEntry(
     RequestContext request) {
       Abdera abdera = request.getServiceContext().getAbdera();
+      Factory factory = abdera.getFactory();
       Parser parser = abdera.getParser();
       try {
         MimeType contentType = request.getContentType();
@@ -148,7 +149,7 @@
           if (!isValidEntry(entry))
             return new EmptyResponseContext(400);
           entry.setUpdated(new Date());
-          entry.getIdElement().setValue(FOMHelper.generateUuid());
+          entry.getIdElement().setValue(factory.newUuidUri());
           entry.addLink("feed/" + entry.getId().toString(), "edit");
           Feed feed = get_feed_doc(abdera).getRoot();
           feed.insertEntry(entry);
@@ -208,6 +209,7 @@
     RequestContext request) {
       Abdera abdera = request.getServiceContext().getAbdera();
       Parser parser = abdera.getParser();
+      Factory factory = abdera.getFactory();
       Entry orig_entry = getEntry(request);
       if (orig_entry != null) {
         try {
@@ -224,7 +226,7 @@
             if (!isValidEntry(entry))
               return new EmptyResponseContext(400);
             entry.setUpdated(new Date());
-            entry.getIdElement().setValue(FOMHelper.generateUuid());
+            entry.getIdElement().setValue(factory.newUuidUri());
             entry.addLink("atom/feed/" + entry.getId().toString(), "edit");
             orig_entry.discard();
             Feed feed = get_feed_doc(abdera).getRoot();



Mime
View raw message