Package com.ibm.sbt.playground.assets.jssnippets

Examples of com.ibm.sbt.playground.assets.jssnippets.JSSnippetAssetNode


    StringBuilder sb = new StringBuilder();
    sb.append("{\"collections\": [\n");
    for (int i = 0; i < children.size(); i++) {
      Node node = children.get(i);
      if (node.isAsset()) {
        JSSnippetAssetNode snippetNode = (JSSnippetAssetNode) node;
        String unid = snippetNode.getUnid();
        String gadgetUrl = UrlUtil.getBaseUrl(request) + "/gadget/sampleRunner.jsp?snippet="
            + URLEncoder.encode(unid);
        sb.append("{\n");
        sb.append("\"name\": \"").append(snippetNode.getName()).append("\",\n");
        sb.append("\"Description\": \"").append(snippetNode.getName()).append(" from ")
            .append(snippetNode.getCategory()).append("\",\n");
        sb.append("\"apps\" : [\n");
        sb.append("{\"name\": \"").append(snippetNode.getName()).append("\", \"url\": \"")
            .append(gadgetUrl).append("\"}\n");
        sb.append("]\n");
        sb.append((i + 1 < children.size()) ? "},\n" : "}\n");
      }
    }
View Full Code Here


    // Ok, we want it!
    return true;
  }
 
  protected AssetNode createAssetNode(String notesUnid, CategoryNode parent, String name, String category, String assetId) {
    return new JSSnippetAssetNode(parent,name,category,notesUnid,assetId);
  }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.playground.assets.jssnippets.JSSnippetAssetNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.