}
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);
}