public ArrayList<String> setCollection1(String sTable) { ArrayList<String> oCollection = new ArrayList<String>(); try { ArrayList<String> list = new ArrayList<String>(); list = command.Command_Constraints(sTable); ArrayList<String> aclList = new ArrayList<String>(); for (int i = 0; i < list.size(); i++) { aclList = command.Command_ACL("stat " + list.get(i)); if (aclList != null) { if (aclList.size() > 2) { String str = aclList.get(1); if (str.indexOf("ollection") > 0) { oCollection.add(list.get(i)); } else if (str.equals("view")) { oCollection.add(list.get(i)); } } } } } catch (Exception e) { } return oCollection; }
@Override public IWizardPage getNextPage() { ExportPage2 page2 = (ExportPage2) getWizard().getPage("ExportPage2"); ExportPage1_1 page1_1 = (ExportPage1_1) getWizard().getPage("ExportPage1_1"); if (btnall.getSelection() == true) { page2.combo.select(0); page2.combo_string.setEnabled(false); page2.lbllsheet.setText("# Excel sheet : "); page2.lbltip.setText( "\u203BTips :\r\n1. One file consists of max 7 sheats including 50,000 entries (Total : 350,000 entries)\r\n\r\r\n2. In case of a large scale of metadata, we recommend you to choose text format."); page2.combo.setEnabled(true); try { list = command.Command_Excel("SELECT COUNT(*) FROM " + str); double strr = Integer.parseInt(list.get(1)); double strs = Math.ceil(strr / 50000); page2.setSheetcount((int) strs); double strf = Math.ceil(strr / 50000 / 2); page2.lblfile.setText("" + (int) strf); page2.lblsheet.setText("" + (int) strs); page2.lblrow.setText("" + (int) strr); } catch (Exception e1) { page2.lblrow.setText("0"); page2.lblsheet.setText("0"); page2.lblfile.setText("0"); } return page2; } else { try { Boolean switchonplain = false; Boolean switchonacls = false; ArrayList<String> attrList = new ArrayList<String>(); attrList = command.Command_ACL("stat " + str); if (attrList != null) { if (attrList.size() > 2) { String str = attrList.get(1); if (str.indexOf("plain") > 0) { switchonplain = true; } if (str.indexOf("acls") > 0) { switchonacls = true; } } } ArrayList<String> oList = command.Command_listAttr(str); String stemp = "selectattr "; String[] atemp; if (switchonplain == false) { stemp += " " + str + ":" + "FILE"; } for (int i = 0; i < oList.size(); i++) { atemp = oList.get(i).split(":"); stemp += " " + str + ":" + atemp[0]; } if (switchonacls == true) { stemp += " " + str + ":" + "ACL"; } stemp += " ' ' "; page1_1.text_editor.setText("" + stemp); } catch (Exception e) { // TODO: handle exception } page2.lblrow.setText("-"); page2.combo_string.setEnabled(true); page2.lblfile.setText("" + 1); page2.lbllsheet.setText(""); page2.lblsheet.setText(""); page2.lbltip.setText(""); page2.combo.select(1); page2.combo.setEnabled(false); return page1_1; } }