| %line | %branch | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| nl.toolforge.karma.core.vc.cvsimpl.CVSConnection |
|
|
| 1 | /* |
|
| 2 | Karma core - Core of the Karma application |
|
| 3 | Copyright (C) 2004 Toolforge <www.toolforge.nl> |
|
| 4 | ||
| 5 | This library is free software; you can redistribute it and/or |
|
| 6 | modify it under the terms of the GNU Lesser General Public |
|
| 7 | License as published by the Free Software Foundation; either |
|
| 8 | version 2.1 of the License, or (at your option) any later version. |
|
| 9 | ||
| 10 | This library is distributed in the hope that it will be useful, |
|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 13 | Lesser General Public License for more details. |
|
| 14 | ||
| 15 | You should have received a copy of the GNU Lesser General Public |
|
| 16 | License along with this library; if not, write to the Free Software |
|
| 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 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 | 0 | private static Log logger = LogFactory.getLog(CVSConnection.class); |
| 36 | 0 | 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 | 0 | public CVSConnection(Location location) { |
| 45 | ||
| 46 | try { |
|
| 47 | 0 | this.location = (CVSRepository) location; |
| 48 | 0 | } catch (ClassCastException c) { |
| 49 | 0 | throw new KarmaRuntimeException("Wrong implementation of Location interface. Must be a CVSRepository instance.", c); |
| 50 | 0 | } |
| 51 | 0 | } |
| 52 | } |
| This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |