KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > core > ICVSRepositoryLocation


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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;
12
13  
14 import org.eclipse.core.runtime.IAdaptable;
15 import org.eclipse.core.runtime.IProgressMonitor;
16
17 /**
18  * This interface provides access to the specific portions of
19  * the repository location string for use by connection methods
20  * and the user authenticator.
21  *
22  * It is not intended to implemented by clients.
23  *
24  * @see IUserAuthenticator
25  * @see IConnectionMethod
26  */

27 public interface ICVSRepositoryLocation extends IAdaptable {
28
29     /**
30      * port value which indicates to a connection method to use the default port
31      */

32     public static int USE_DEFAULT_PORT = 0;
33     
34     /**
35      * Return the connection method for making the connection
36      */

37     public IConnectionMethod getMethod();
38     
39     /**
40      * Returns the host where the repository is located
41      */

42     public String JavaDoc getHost();
43     
44     /**
45      * Returns the port to connect to or USE_DEFAULT_PORT if
46      * the connection method is to use its default port.
47      */

48     public int getPort();
49     
50     /**
51      * Returns the root directory of the repository.
52      */

53     public String JavaDoc getRootDirectory();
54     
55     /**
56      * Returns the string representing the receiver. This string
57      * should contain enough information to recreate the receiver.
58      */

59     public String JavaDoc getLocation(boolean forDisplay);
60
61     /**
62      * Returns the immediate children of this location. If tag is <code>null</code> the
63      * HEAD branch is assumed.
64      *
65      * If modules is true, then the module definitions from the CVSROOT/modules file are returned.
66      * Otherwise, the root level projects are returned.
67      *
68      * @param tag the context in which to return the members (e.g. branch or version).
69      */

70     public ICVSRemoteResource[] members(CVSTag tag, boolean modules, IProgressMonitor progress) throws CVSException;
71     
72     /**
73      * Returns a handle to a remote file at this repository location using the given tag as the
74      * context. The corresponding remote file may not exist or may be a folder.
75      */

76     public ICVSRemoteFile getRemoteFile(String JavaDoc remotePath, CVSTag tag);
77     
78     /**
79      * Returns a handle to a remote folder at this repository location using the given tag as the
80      * context. The corresponding remote folder may not exist or may be a file.
81      */

82     public ICVSRemoteFolder getRemoteFolder(String JavaDoc remotePath, CVSTag tag);
83     
84     /**
85      * encoding for commit comments.
86      */

87     public String JavaDoc getEncoding();
88         
89     /**
90      * Return the connection timeout value in seconds.
91      * A value of 0 means there is no timeout value.
92      */

93     public int getTimeout();
94     
95     /**
96      * Return the username
97      */

98     public String JavaDoc getUsername();
99     
100     /**
101      * Returns the user information for the location.
102      */

103     public IUserInfo getUserInfo(boolean allowModificationOfUsername);
104     
105     /**
106      * Flush any cahced user information related to the repository location
107      */

108     public void flushUserInfo();
109     
110     /**
111      * Validate that the receiver can be used to connect to a repository.
112      * An exception is thrown if connection fails
113      *
114      * @param monitor the progress monitor used while validating
115      */

116     public void validateConnection(IProgressMonitor monitor) throws CVSException;
117     
118     /**
119      * Set the option to allow the user settings to be cached between sessions.
120      * @since 3.0
121      */

122     public void setAllowCaching(boolean allowCaching);
123
124     /**
125      * Returns if the user info for this location is cached
126      */

127     public boolean getUserInfoCached();
128     
129     /**
130      * Sets the user information used for this location
131      */

132     public void setUsername(String JavaDoc username);
133     
134     /**
135      * Sets the user information used for this location
136      */

137     public void setPassword(String JavaDoc password);
138     
139     /**
140      * Returns the plugged-in authenticator for this location.
141      * @since 3.0
142      */

143     public IUserAuthenticator getUserAuthenticator();
144     
145     /**
146      * Sets the plugged-in authenticator for this location. This is a hook
147      * for testing.
148      * @since 3.0
149      */

150     public void setUserAuthenticator(IUserAuthenticator authenticator);
151
152     /**
153      * Sets encoding for commit messages.
154      * @since 3.0
155      */

156     public void setEncoding(String JavaDoc encoding);
157
158 }
159
Popular Tags