Package com.ibm.sbt.playground.assets

Examples of com.ibm.sbt.playground.assets.AssetBrowser


   * @param nodeFactory The NodeFactory corresponding to the snippet type.
   * @return RootNode of snippets, which allows search and manipulation of snippets.
   * @throws IOException
   */
  private static RootNode readAssets(ServletContext context, VFSFile file, NodeFactory nodeFactory, HttpServletRequest request) throws IOException{
      AssetBrowser imp = new AssetBrowser(file, nodeFactory, getRuntimes(request), getJsLibId(request));
     
    return (RootNode)imp.readAssets(new RootNode(), null);
  }
View Full Code Here


   * @param nodeFactory The NodeFactory corresponding to the snippet type.
   * @return RootNode of snippets, which allows search and manipulation of snippets.
   * @throws IOException
   */
  private static RootNode readAssets(ServletContext context, VFSFile file, NodeFactory nodeFactory, HttpServletRequest request) throws IOException{
      AssetBrowser imp = new AssetBrowser(file, nodeFactory, getRuntimes(request), getJsLibId(request));
     
    return (RootNode)imp.readAssets(new RootNode(), null);
  }
View Full Code Here

   * @param nodeFactory The NodeFactory corresponding to the snippet type.
   * @return RootNode of snippets, which allows search and manipulation of snippets.
   * @throws IOException
   */
  private static RootNode readAssets(VFSFile file, NodeFactory nodeFactory) throws IOException{
      AssetBrowser imp = new AssetBrowser(file, nodeFactory);
     
    return (RootNode)imp.readAssets(new RootNode(), null);
  }
View Full Code Here

  }
  protected int importAssets(ImportSource source, final AsyncAction action) throws Exception {
    VFS vfs=createImportVFS(source);
    VFSFile rootDir=vfs.getRoot();

    AssetBrowser a=new AssetBrowser(rootDir, getNodeFactory()) {
      // Import all the nodes to the DB, regardless of the constraints (endpoints, jslibs...)
      protected boolean includeNode(Properties properties){
        return true;
      }
    };

    AssetBrowser.Callback cb=null;
    if(action!=null) {
      cb=new AssetBrowser.Callback() {
        public void update(String statusString) {
          action.updateTask(statusString);
        }

        public boolean isCancelled() {
          return action.isCancelled();
        }
      };
    }
    RootNode root=a.readAssets(cb);
    if(action!=null&&action.isCancelled()) {
      return 0;
    }
    return importAssets(source, rootDir, root, action);
  }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.playground.assets.AssetBrowser

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.