private void downloadDocs() throws Exception {
   String id1 = (String) list_read.get(1);
   if (DataProcessor.downloadFile(id1)) {
     ArrayList list_result = new ArrayList();
     list_result.add("true");
     toClient.writeObject(list_result);
   } else {
     ArrayList list_result = new ArrayList();
     list_result.add("false");
     toClient.writeObject(list_result);
   }
   reInput();
 }
 private void deleteDocs() throws Exception {
   String oldId = (String) list_read.get(1);
   if (DataProcessor.deleteDoc(oldId)) {
     ArrayList list_result = new ArrayList();
     list_result.add("true");
     toClient.writeObject(list_result);
   } else {
     ArrayList list_result = new ArrayList();
     list_result.add("false");
     toClient.writeObject(list_result);
   }
   reInput();
 }
 private void changeUserInfo() throws Exception {
   String name1 = (String) list_read.get(1);
   String pass = (String) list_read.get(2);
   if (Administrator.changeUseInfo(name1, pass)) {
     ArrayList list_result = new ArrayList();
     list_result.add("true");
     toClient.writeObject(list_result);
   } else {
     ArrayList list_result = new ArrayList();
     list_result.add("false");
     toClient.writeObject(list_result);
   }
   reInput();
 }
 private void addUser() throws Exception {
   String newName = (String) list_read.get(1);
   String newPass = (String) list_read.get(2);
   String newRole = (String) list_read.get(3);
   if (DataProcessor.insert(newName, newPass, newRole)) {
     ArrayList list_result = new ArrayList();
     list_result.add("true");
     toClient.writeObject(list_result);
   } else {
     ArrayList list_result = new ArrayList();
     list_result.add("false");
     toClient.writeObject(list_result);
   }
   reInput();
 }
 private void login() throws Exception {
   String username = (String) list_read.get(1);
   String password = (String) list_read.get(2);
   User user;
   user = DataProcessor.logIn(username, password);
   toClient.writeObject(user);
   reInput();
 }
 private void init() throws Exception {
   SQLProcessor.initSQL();
   ArrayList list = new ArrayList();
   list.add("init success");
   toClient.writeObject(list);
   list_read = (ArrayList) fromClient.readObject();
   name_read = (String) list_read.get(0);
 }
  private void uploadDocs() throws Exception {
    String id2 = (String) list_read.get(1);
    String creator = (String) list_read.get(2);
    String description = (String) list_read.get(3);
    String filename = (String) list_read.get(4);
    if (DataProcessor.uploadFile(id2, creator, description, filename)) {
      ArrayList list_result = new ArrayList();
      list_result.add("true");
      toClient.writeObject(list_result);

    } else {
      ArrayList list_result = new ArrayList();
      list_result.add("false");
      toClient.writeObject(list_result);
    }
    reInput();
  }
 private void listAllDocs() throws Exception {
   Vector<Vector<String>> data1 = new Vector<Vector<String>>();
   data1 = DataProcessor.listAllDocs();
   toClient.writeObject(data1);
   reInput();
 }