KickJava   Java API By Example, From Geeks To Geeks.

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


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;
12
13  
14 import org.eclipse.core.runtime.*;
15 import org.eclipse.team.core.TeamException;
16 import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
17
18 /**
19  * The interface represents a resource that exists in a CVS repository.
20  * It purpose is to provide information about the remote resource from
21  * the repository.
22  *
23  * Clients are not expected to implement this interface.
24  */

25 public interface ICVSRemoteResource extends ICVSResource, IAdaptable {
26     
27     /**
28      * Answers if the remote element may have children.
29      *
30      * @return <code>true</code> if the remote element may have children and
31      * <code>false</code> otherwise.
32      */

33     public boolean isContainer();
34     
35     /**
36      * Return the repository
37      */

38     public ICVSRepositoryLocation getRepository();
39     
40     /**
41      * Returns the parent of this remote resource or <code>null</code> if the
42      * remote resource does not have a parent.
43      */

44     public ICVSRemoteResource getRemoteParent();
45     
46     /**
47      * Does the remote resource represented by this handle exist on the server. This
48      * method may contact the server and be long running.
49      */

50     public boolean exists(IProgressMonitor monitor) throws TeamException;
51     
52     /**
53      * Answers the repository relative path of this remote folder.
54      */

55     public String JavaDoc getRepositoryRelativePath();
56     
57     /**
58      * Compares two objects for equality; for cvs remote resources, equality is defined in
59      * terms of their handles: same cvs resource type, equal relative paths, and
60      * for files, identical revision numbers. Remote resources are not equal to objects other
61      * than cvs remote resources.
62      *
63      * @param other the other object
64      * @return an indication of whether the objects are equals
65      */

66     public boolean equals(Object JavaDoc other);
67
68     /**
69      * Allows a client to change the context of a remote resource handle. For
70      * example, if a remote resource was created with the HEAD context (e.g. can
71      * be used to browse the main branch) use this method to change the
72      * context to another branch tag or to a version tag.
73      */

74     public ICVSRemoteResource forTag(CVSTag tagName);
75             
76     /**
77      * Tag the remote resources referenced by the receiver (using rtag)
78      */

79     public IStatus tag(CVSTag tag, LocalOption[] localOptions, IProgressMonitor monitor) throws CVSException;
80     
81     /**
82      * TODO: Temporary
83      * @param progress
84      * @return
85      */

86     public ICVSRemoteResource[] members(IProgressMonitor progress) throws TeamException;
87
88 }
89
Popular Tags