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/19 19:53:28 UTC

svn commit: r357754 - in /incubator/roller/trunk/sandbox/atomprotocol: lib/rome-0.8.jar lib/rome-fetcher-0.8.jar src/org/roller/presentation/atomapi/RollerAtomHandler.java src/org/roller/presentation/atomapi04/RollerAtomHandler.java

Author: snoopdave
Date: Mon Dec 19 10:53:23 2005
New Revision: 357754

URL: http://svn.apache.org/viewcvs?rev=357754&view=rev
Log:
Couple of Atom protocol chnages

Modified:
    incubator/roller/trunk/sandbox/atomprotocol/lib/rome-0.8.jar
    incubator/roller/trunk/sandbox/atomprotocol/lib/rome-fetcher-0.8.jar
    incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java
    incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi04/RollerAtomHandler.java

Modified: incubator/roller/trunk/sandbox/atomprotocol/lib/rome-0.8.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomprotocol/lib/rome-0.8.jar?rev=357754&r1=357753&r2=357754&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/roller/trunk/sandbox/atomprotocol/lib/rome-fetcher-0.8.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomprotocol/lib/rome-fetcher-0.8.jar?rev=357754&r1=357753&r2=357754&view=diff
==============================================================================
Binary files - no diff available.

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=357754&r1=357753&r2=357754&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 Mon Dec 19 10:53:23 2005
@@ -37,7 +37,6 @@
 import org.roller.pojos.WeblogCategoryData;
 import org.roller.pojos.WeblogEntryData;
 import org.roller.pojos.WebsiteData;
-import org.roller.presentation.servlets.LoginServlet;
 import org.roller.presentation.RollerContext;
 import org.roller.util.RollerMessages;
 import org.roller.util.Utilities;
@@ -58,15 +57,14 @@
  * <pre>
  * Here are the URIs suppored:
  *
- *    URI type             URI form                          Handled by
- *    --------             --------                          ----------
- *    Introspection URI    /                                 getIntrosection()
- *    Collection URI       /blog-name/<collection-name>      getCollection()
- *    Collection-next URI  /blog-name/<collection-name>/id   getCollection()
- *    Member URI           /blog-name/<object-name>          post<object-name>()
- *    Member URI           /blog-name/<object-name>/id       get<object-name>()
- *    Member URI           /blog-name/<object-name>/id       put<object-name>()
- *    Member URI           /blog-name/<object-name>/id       delete<object-name>()
+ *    URI type             URI form                        Handled by
+ *    --------             --------                        ----------
+ *    Introspection URI    /                               getIntrosection()
+ *    Collection URI       /blog-name/<collection-name>    getCollection()
+ *    Member URI           /blog-name/<object-name>        post<object-name>()
+ *    Member URI           /blog-name/<object-name>/id     get<object-name>()
+ *    Member URI           /blog-name/<object-name>/id     put<object-name>()
+ *    Member URI           /blog-name/<object-name>/id     delete<object-name>()
  *
  *    Until group blogging is supported weblogHandle == blogname.
  *
@@ -74,10 +72,6 @@
  *    ----------------   ------------
  *       entries           entry
  *       resources         resource
- *       categories        categories (not yet)
- * soon:
- *       users             user
- *       templates         template
  * </pre>
  *
  * @author David M Johnson
@@ -240,7 +234,7 @@
                     null,   // catName
                     null,   // status
                     start, // offset (for range paging)
-                    end);  // maxEntries
+                    end - start + 1);  // maxEntries
             Feed feed = new Feed();
             List atomEntries = new ArrayList();
             for (Iterator iter = entries.iterator(); iter.hasNext();) {
@@ -737,8 +731,7 @@
                         if (p != -1) {
                             userID = userPass.substring(0, p);
                             UserData user = mRoller.getUserManager().getUser(userID);
-                            String realpassword = LoginServlet.getEncryptedPassword(
-                                    request, user.getUserName(), user.getPassword());
+                            String realpassword = user.getPassword();
                             password = userPass.substring(p+1);
                             if (    (userID.trim().equals(user.getUserName()))
                             && (password.trim().equals(realpassword))) {
@@ -770,7 +763,9 @@
         List contents = new ArrayList();
         contents.add(content);
         
-        atomEntry.setId(        entry.getId());
+        String absUrl = mRollerContext.getAbsoluteContextUrl(mRequest);
+        
+        atomEntry.setId(        absUrl + entry.getPermaLink());
         atomEntry.setTitle(     entry.getTitle());
         atomEntry.setContents(  contents);
         atomEntry.setPublished( entry.getPubTime());
@@ -789,7 +784,6 @@
         altlinks.add(altlink);
         atomEntry.setAlternateLinks(altlinks);
         
-        String absUrl = mRollerContext.getAbsoluteContextUrl(mRequest);
         Link editlink = new Link();
         editlink.setRel("edit");
         editlink.setHref(absUrl + "/app/"

Modified: incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi04/RollerAtomHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi04/RollerAtomHandler.java?rev=357754&r1=357753&r2=357754&view=diff
==============================================================================
--- incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi04/RollerAtomHandler.java (original)
+++ incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi04/RollerAtomHandler.java Mon Dec 19 10:53:23 2005
@@ -39,7 +39,6 @@
 import org.roller.pojos.WeblogCategoryData;
 import org.roller.pojos.WeblogEntryData;
 import org.roller.pojos.WebsiteData;
-import org.roller.presentation.servlets.LoginServlet;
 import org.roller.presentation.RollerContext;
 import org.roller.util.RollerMessages;
 import org.roller.util.Utilities;