private ArrayList<String> setCollection(String sTable) { serverConn = Activator.getServerConn(); ArrayList<String> oCollection = new ArrayList<String>(); if (serverConn.isConnected()) { try { serverConn.execute(sTable); while (!serverConn.eot()) { String sDir = serverConn.fetchRow(); if (sDir.charAt(0) == 'd' || sDir.charAt(0) == 'v') { oCollection.add(sDir.substring(30, sDir.length()).trim()); } } } catch (Exception e) { } ArrayList<String> fed_list = Activator.getFederationCollection(); ArrayList<String> fedList = new ArrayList<String>(); try { fedList = command.Command_SQLResult("fed_list_mounts"); for (int i = 0; i < fedList.size(); i++) { fed_list.add(fedList.get(i)); i++; } } catch (Exception ex) { ex.printStackTrace(); } } return oCollection; }
public ArrayList<String> getTreeList() { ExportActionWizard tes = (ExportActionWizard) getWizard(); serverConn = Activator.getServerConn(); ArrayList<String> oCollectionList = new ArrayList<String>(); String sTemp = tes.str; if (Activator.getVersion() == true) { sTemp = "ls -s " + sTemp; if (serverConn.isConnected()) { oCollectionList = setCollection1(sTemp); } } else { sTemp = "ls -l " + sTemp; if (serverConn.isConnected()) { oCollectionList = setCollection(sTemp); } } return oCollectionList; }
public TreeObject createDummyModel() { ExportActionWizard tes = (ExportActionWizard) getWizard(); TreeParent Root = new TreeParent(""); TreeParent subroot = new TreeParent("" + tes.str); if (!tes.str.equals(" /")) { TreeParent subroot1 = new TreeParent("/..."); Root.addChild(subroot1); subroot1.children.clear(); } RootParent = new ArrayList<TreeParent>(); serverConn = Activator.getServerConn(); if (serverConn.isConnected()) { oList = getTreeList(); for (int i = 0; i < oList.size(); i++) { RootParent.add(new TreeParent(oList.get(i))); } } Root.addChild(subroot); return Root; }