1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package nl.toolforge.karma.core.vc.cvsimpl;
20
21 import nl.toolforge.karma.core.KarmaRuntimeException;
22 import nl.toolforge.karma.core.location.Location;
23 import org.apache.commons.logging.Log;
24 import org.apache.commons.logging.LogFactory;
25
26 /***
27 * Class representing a connection to a CVS repository. The current implementation can only deliver
28 * <code>org.netbeans.lib.cvsclient.connection.PServerConnection</code>s.
29 *
30 * @author D.A. Smedes
31 * @version $Id: CVSConnection.java,v 1.1 2004/09/27 19:11:24 hippe Exp $
32 */
33 public final class CVSConnection {
34
35 private static Log logger = LogFactory.getLog(CVSConnection.class);
36 private CVSRepository location = null;
37
38 /***
39 * Constructor for a CVSConnection. This class is initialized using a <code>CVSRepository</code>, which knows all
40 * intricacies of connection to a CVS repository.
41 *
42 * @param location The location descriptor (<code>CVSRepository</code> instance).
43 */
44 public CVSConnection(Location location) {
45
46 try {
47 this.location = (CVSRepository) location;
48 } catch (ClassCastException c) {
49 throw new KarmaRuntimeException("Wrong implementation of Location interface. Must be a CVSRepository instance.", c);
50 }
51 }
52 }