You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2005/12/31 06:11:08 UTC

svn commit: r360242 - /incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java

Author: snoopdave
Date: Fri Dec 30 21:11:05 2005
New Revision: 360242

URL: http://svn.apache.org/viewcvs?rev=360242&view=rev
Log:
Sandbox: bug fixes in APP put entry and in edit link creation

Modified:
    incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java

Modified: incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java?rev=360242&r1=360241&r2=360242&view=diff
==============================================================================
--- incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java (original)
+++ incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java Fri Dec 30 21:11:05 2005
@@ -331,13 +331,13 @@
             WeblogEntryData rollerEntry =
                     mRoller.getWeblogManager().retrieveWeblogEntry(pathInfo[2]);
             if (canEdit(rollerEntry)) {
-                String id = rollerEntry.getId();
-                UserData creator = rollerEntry.getCreator();
-                WeblogEntryData updated = 
-                    createRollerEntry(rollerEntry.getWebsite(), entry);
-                rollerEntry.setData(updated);
-                rollerEntry.setId(id);
-                rollerEntry.setCreator(creator);
+                WeblogEntryData rawUpdate = createRollerEntry(rollerEntry.getWebsite(), entry);
+                rollerEntry.setPubTime(rawUpdate.getPubTime());
+                rollerEntry.setUpdateTime(rawUpdate.getUpdateTime());
+                rollerEntry.setText(rawUpdate.getText());
+                rollerEntry.setStatus(rawUpdate.getStatus());
+                rollerEntry.setCategory(rawUpdate.getCategory());
+                rollerEntry.setTitle(rawUpdate.getTitle());
                 rollerEntry.save();
                 mRoller.commit();
                 
@@ -691,7 +691,7 @@
         
         Link altlink = new Link();
         altlink.setRel("alternate");
-        altlink.setHref(entry.getPermaLink());
+        altlink.setHref(absUrl + entry.getPermaLink());
         List altlinks = new ArrayList();
         altlinks.add(altlink);
         atomEntry.setAlternateLinks(altlinks);
@@ -699,7 +699,7 @@
         Link editlink = new Link();
         editlink.setRel("edit");
         editlink.setHref(absUrl + "/app/"
-                + entry.getWebsite().getHandle() + "/entry/" + entry.getId());
+            + entry.getWebsite().getHandle() + "/entry/" + entry.getId());
         List otherlinks = new ArrayList();
         otherlinks.add(editlink);
         atomEntry.setOtherLinks(otherlinks);