public void init(XWikiContext context) throws XWikiException, IOException {
    // first check versions
    XWikiDocument doc = xwiki.getDocument(docFullName, context);
    String xwikiVersion = doc.getVersion();

    String fn = "fullname:" + docFullName;
    String solrRev = useBackEnd ? currikiPlugin.solrGetSingleValue(fn, "revisionNumber") : "";
    if (useBackEnd && xwikiVersion.equals(solrRev)) {
      isBackEndStream = true;
      get = currikiPlugin.solrCreateQueryGetMethod(fn, solrField, 0, 100);
      currikiPlugin.solrCollectResultsFromQuery(
          "fullname:" + docFullName,
          "childRights,childPages",
          0,
          1,
          new CurrikiPlugin.SolrResultCollector() {
            public void status(int statusCode, int qTime, int numFound, int start) {}

            public void newDocument() {}

            public void addValue(String name, String value) {
              if ("childRights".equals(name)) childRightsS = value;
              else if ("childPages".equals(name)) childPagesS = value;
            }
          });
    } else {
      isBackEndStream = false;
      // identify docs to queries
      if (type == Type.USER_COLLECTIONS) {
        propNameForFullname = "collectionPage";
        subAssetNames = currikiPlugin.fetchCollectionsList(docFullName, context);
        objectToOutput = currikiPlugin.fetchCollectionsInfo(docFullName, context);
      } else if (type == Type.GROUP_COLLECTIONS) {
        propNameForFullname = "collectionPage";
        String groupName = docFullName.replace(".WebPreferences", "");
        subAssetNames = currikiPlugin.fetchCollectionsList(groupName, context);
        objectToOutput = currikiPlugin.fetchCollectionsInfo(groupName, context);
      } else if (type == Type.USER_GROUPS) {
        propNameForFullname = "groupSpace";
        subAssetNames = null;
        objectToOutput = currikiPlugin.fetchUserGroups(docFullName, context);
      } else if (type == Type.COLLECTION_CONTENT) {
        propNameForFullname = "assetpage";

        FolderCompositeAsset fca =
            (FolderCompositeAsset)
                currikiPlugin.fetchAssetAs(docFullName, FolderCompositeAsset.class, context);
        if (fca != null) {
          FolderCompositeAsset fAsset = fca.as(FolderCompositeAsset.class);
          objectToOutput = fAsset.getSubassetsInfo();
        } else objectToOutput = new LinkedList();
      } else {
        throw new UnsupportedEncodingException();
      }
    }
  }