日期:2014-05-17 浏览次数:20792 次
/**
* added by Defonds
* @param filesInfo
* File Name1
------解决方案--------------------
File Flag Public1
------解决方案--------------------
File Document Language1
------解决方案--------------------
File Description1
------解决方案--------------------
File Operating System1
------解决方案--------------------
File Store1
------解决方案--------------------
File Title1
------解决方案--------------------
File Flag Exp1
*/
public void addFileInfomation(String filesInfo,String directoryInfo,String formatInfo){
System.out.println("the file info str gived to applet is:" + filesInfo);
String fileName = "",fileFlagPublic = "",fileDocomentLanguage = "",fileDescription = "",
fileOperatingSystem = "",fileStore = "",fileTitle = "",fileFlagExp = "";
String[] filesInfoArr = filesInfo.split("
------解决方案--------------------
");
if(filesInfoArr.length > 0){
fileName = filesInfoArr[0];
fileFlagPublic = filesInfoArr[1];
fileDocomentLanguage = filesInfoArr[2];
fileDescription = filesInfoArr[3];
fileOperatingSystem = filesInfoArr[4];
fileStore = filesInfoArr[5];
fileTitle = filesInfoArr[6];
fileFlagExp = filesInfoArr[7];
}
java.io.File checkinFile = new java.io.File(directoryInfo);
FileInfo file = new FileInfo(checkinFile);
file.setFileStore(fileStore);
file.setFormat(formatInfo);
file.setFileFlagPublic(fileFlagPublic);
file.setFileFlagEXP(fileFlagExp);
file.setFileDocumentLanguage(fileDocomentLanguage);
System.out.println("applet-filename=" + file.getFileName());
addFile(file);
System.out.println("a file added successfully!");
}
/**
* @added by Defonds
* @param directoryStr
* D:/tmp/tmp/AppDevGuide1071.pdf@@@D:/tmp/tmp/AppDevGuide1072.pdf@@@...
* @return
* D:/tmp/tmp/AppDevGuide1071.pdf@@@D:/tmp/tmp/AppDevGuide1072.pdf...
* @note
* only return the directories which are valid
*/
public synchronized String directoryValid(String directoryStr){
System.out.println("the file directory info give to applet is:" + directoryStr);
_fileValidStr = directoryStr;
FileValidRunner runner = new FileValidRunner();
AccessController.doPrivileged(runner);
System.out.println("