KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > core > client > NotifiedHandler


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.internal.ccvs.core.client;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.core.runtime.Path;
15 import org.eclipse.team.internal.ccvs.core.CVSException;
16 import org.eclipse.team.internal.ccvs.core.ICVSFile;
17 import org.eclipse.team.internal.ccvs.core.ICVSFolder;
18
19 /**
20  * @author Administrator
21  *
22  * To change this generated comment edit the template variable "typecomment":
23  * Window>Preferences>Java>Templates.
24  * To enable and disable the creation of type comments go to
25  * Window>Preferences>Java>Code Generation.
26  */

27 public class NotifiedHandler extends ResponseHandler {
28
29     /**
30      * @see org.eclipse.team.internal.ccvs.core.client.ResponseHandler#getResponseID()
31      */

32     public String JavaDoc getResponseID() {
33         return "Notified"; //$NON-NLS-1$
34
}
35
36     /**
37      * @see org.eclipse.team.internal.ccvs.core.client.ResponseHandler#handle(Session, String, IProgressMonitor)
38      */

39     public void handle(
40         Session session,
41         String JavaDoc localDir,
42         IProgressMonitor monitor)
43         throws CVSException {
44             
45         // read additional data for the response
46
// (which is the full repository path of the file)
47
String JavaDoc repositoryFilePath = session.readLine();
48
49         // clear the notify info for the file
50
ICVSFolder folder = session.getLocalRoot().getFolder(localDir);
51         ICVSFile file = folder.getFile(new Path(null, repositoryFilePath).lastSegment());
52         file.notificationCompleted();
53     }
54
55 }
56
Popular Tags