Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tiny attempt for speed-up-CTV

  • Loading branch information...
commit 17f9eede005f6257e9bb95dbca8c5a08b47fbbe3 1 parent 579ed02
@polx polx authored
View
5 plugins/servlet/src/main/java/org/curriki/xwiki/servlet/restlet/resource/users/UserCollectionsResource.java
@@ -1,5 +1,6 @@
package org.curriki.xwiki.servlet.restlet.resource.users;
+import org.curriki.xwiki.plugin.asset.composite.CompositeAsset;
import org.restlet.resource.Representation;
import org.restlet.resource.Variant;
import org.restlet.resource.ResourceException;
@@ -43,10 +44,12 @@ public UserCollectionsResource(Context context, Request request, Response respon
for(String collFullName: resultList) {
JSONObject collInfo = new JSONObject();
collInfo.put("collectionPage", collFullName);
- Asset asset = plugin.fetchAsset(collFullName);
+ CompositeAsset asset =
+ plugin.fetchAsset(collFullName).as(CompositeAsset.class);
collInfo.put("revision", asset.getVersion());
collInfo.put("collectionType", "collection") ; // ???
collInfo.put("displayTitle", asset.getTitle());
+ collInfo.put("children", asset.getSubassetList());
json.add(collInfo);
}
//results = plugin.fetchUserCollectionsInfo(forUser);
Please sign in to comment.
Something went wrong with that request. Please try again.