protected void setData(String strChecksum) { String strValue = (String) m_cmbPath.getSelectedItem(); if (strValue == null || strValue.equals("")) return; m_cmbChecksum.removeAllItems(); String strPath = strValue.substring(strValue.lastIndexOf("/") + 1); strPath = UtilB.unixPathToWindows(FileUtil.SYS_VNMR + "/p11/checksums/" + strPath); strPath = FileUtil.openPath(strPath); if (strPath != null) { File file = new File(strPath); String[] files = file.list(); int nSize = files.length; for (int i = 0; i < nSize; i++) { String strfile = files[i]; m_cmbChecksum.addItem(strfile); } int nIndex = strChecksum.lastIndexOf("/"); if (nIndex < 0) nIndex = strChecksum.lastIndexOf(File.separator); if (nIndex + 1 < strChecksum.length()) strChecksum = strChecksum.substring(nIndex + 1); m_cmbChecksum.setSelectedItem(strChecksum); } }
protected void checksumValidation() { String strValue = (String) m_cmbPath.getSelectedItem(); int nIndex = strValue.lastIndexOf("/"); if (nIndex < 0) nIndex = strValue.lastIndexOf(File.separator); String strPath = strValue.substring(nIndex + 1); strPath = new StringBuffer() .append(FileUtil.SYS_VNMR) .append("/p11/checksums/") .append(strPath) .append("/") .append(m_cmbChecksum.getSelectedItem()) .toString(); strPath = UtilB.unixPathToWindows(strPath); strPath = FileUtil.openPath(strPath); if (strPath == null) return; String[] cmd = { WGlobal.SHTOOLCMD, WGlobal.SHTOOLOPTION, WGlobal.SUDO + WGlobal.SBIN + "chchsums " + strPath }; runScript(cmd, m_txaChecksum); }