- Timestamp:
- 2005-10-14T15:19:36+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/DeleteCollectionPrompt.java
r9863 r10726 50 50 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 51 51 import org.greenstone.gatherer.file.WorkspaceTree; // !!! Don't like this here 52 import org.greenstone.gatherer.remote.RemoteGreenstoneServer; 52 53 import org.greenstone.gatherer.util.ArrayTools; 53 54 import org.greenstone.gatherer.util.StaticStrings; … … 293 294 public void actionPerformed(ActionEvent event) { 294 295 // Delete the selected collection. 296 // !! This should all go into CollectionManager !! 295 297 296 298 // First we must release it from the local library … … 300 302 301 303 if (Gatherer.isGsdlRemote) { 302 303 String launch_cgi = Gatherer.cgiBase + "launch?cmd=deldir"; 304 305 String col_name = collection.getShortName(); 306 String dir = "."; 307 308 try { 309 310 String col_name_encoded = URLEncoder.encode(col_name,"UTF-8"); 311 String dir_encoded = URLEncoder.encode(dir,"UTF-8"); 312 313 launch_cgi += "&c=" + col_name_encoded; 314 launch_cgi += "&dir=" + dir_encoded; 315 316 URL launch_url = new URL(launch_cgi); 317 URLConnection launch_connection = launch_url.openConnection(); 318 InputStream stdis = launch_connection.getInputStream(); 319 InputStreamReader stdisr = new InputStreamReader(stdis, "UTF-8" ); 320 321 BufferedReader stdbr = new BufferedReader(stdisr); 322 323 while(true) { 324 String line = stdbr.readLine(); 325 // ignore output of running lauch command 326 327 if (line == null) { break; } 328 } 329 330 stdbr.close(); 331 } 332 // Exception 333 catch (Exception exception) { 334 DebugStream.println("Exception in GShell.runRemove() - unexpected"); 335 DebugStream.printStackTrace(exception); 336 } 304 RemoteGreenstoneServer.deleteCollection(collection.getShortName()); 337 305 } 338 306
Note:
See TracChangeset
for help on using the changeset viewer.