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 2006/01/03 06:27:19 UTC
svn commit: r365544 -
/incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java
Author: snoopdave
Date: Mon Jan 2 21:27:15 2006
New Revision: 365544
URL: http://svn.apache.org/viewcvs?rev=365544&view=rev
Log:
Couple of small bugs in APP draft 7 implementation, client tests are working (again)
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=365544&r1=365543&r2=365544&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 Jan 2 21:27:15 2006
@@ -148,20 +148,12 @@
entryCol.setTitle("Collection: Weblog Entries for " + handle);
entryCol.setMemberType("entry");
entryCol.setHref(absUrl + "/app/"+handle+"/entries");
- entryCol.setListTemplate(absUrl + "/app/"+handle+"/entries/{index}");
workspace.addCollection(entryCol);
-
- /*AtomService.Collection catCol = new AtomService.Collection();
- catCol.setTitle("Collection: Categories for " + handle);
- catCol.setMemberType("entry");
- catCol.setHref(absUrl + "/app/"+handle+"/categories");
- workspace.addCollection(catCol);*/
-
+
AtomService.Collection uploadCol = new AtomService.Collection();
uploadCol.setTitle("Collection: Resources for " + handle);
uploadCol.setMemberType("media");
uploadCol.setHref(absUrl + "/app/"+handle+"/resources");
- uploadCol.setListTemplate(absUrl + "/app/"+handle+"/resources/{index}");
workspace.addCollection(uploadCol);
}
}
@@ -223,10 +215,9 @@
Feed feed = new Feed();
List atomEntries = new ArrayList();
int count = 0;
- for (Iterator iter = entries.iterator(); iter.hasNext();) {
+ for (Iterator iter = entries.iterator(); iter.hasNext() && count < mMaxEntries; count++) {
WeblogEntryData rollerEntry = (WeblogEntryData)iter.next();
atomEntries.add(createAtomEntry(rollerEntry));
- count++;
}
if (count > start - end) { // add next link
int nextOffset = start + mMaxEntries;
@@ -276,7 +267,7 @@
count++;
}
}
- if (start + count > files.length) { // add next link
+ if (start + count < files.length) { // add next link
int nextOffset = start + mMaxEntries;
String url = absUrl + "/app/" + website.getHandle() + "/resources/" + nextOffset;
Link nextLink = new Link();