1 22 package org.netbeans.lib.cvsclient.response; 23 24 import java.io.*; 25 26 import org.netbeans.lib.cvsclient.event.FileRemovedEvent; 27 import org.netbeans.lib.cvsclient.event.FileToRemoveEvent; 28 import org.netbeans.lib.cvsclient.util.*; 29 30 34 class RemovedResponse implements Response { 35 36 43 public void process(LoggedDataInputStream dis, ResponseServices services) 44 throws ResponseException { 45 try { 46 String localPath = dis.readLine(); 47 String repositoryPath = dis.readLine(); 48 49 String filePath = 50 services.convertPathname(localPath, repositoryPath); 51 filePath = new File(filePath).getAbsolutePath(); 52 if (services.getGlobalOptions().isExcluded(new File(filePath))) { 53 return; 54 } 55 56 FileToRemoveEvent e1 = new FileToRemoveEvent(this, filePath); 57 FileRemovedEvent e2 = new FileRemovedEvent(this, filePath); 58 59 services.getEventManager().fireCVSEvent(e1); 63 services.removeLocalFile(localPath, repositoryPath); 64 services.getEventManager().fireCVSEvent(e2); 65 } 66 catch (EOFException ex) { 67 throw new ResponseException(ex, 68 ResponseException.getLocalMessage( 69 "CommandException.EndOfFile", null)); 71 } 72 catch (IOException ex) { 73 throw new ResponseException(ex); 74 } 75 } 76 77 82 public boolean isTerminalResponse() { 83 return false; 84 } 85 } 86 | Popular Tags |