KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > core > history > IFileHistory


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
12 package org.eclipse.team.core.history;
13
14 import org.eclipse.team.core.history.provider.FileHistory;
15
16
17 /**
18  *
19  * Provides a complete set of IFileRevisions that make up this IFileHistory.
20  *
21  * <p>
22  * This interface is not intended to be implemented by clients. Clients can
23  * instead subclass {@link FileHistory}.
24  * @since 3.2
25  *
26  */

27 public interface IFileHistory {
28
29     /**
30      * Returns the complete set of file revisions for this file (this includes all predecessors
31      * and all descendents)
32      * @return an array containing all of the file revisions for this particular file or
33      * an empty array if this file has no revisions
34      */

35     public abstract IFileRevision[] getFileRevisions();
36     
37     /**
38      * Returns the file revision that corresponds to the passed in content identifier.
39      * @param id the content identifier that uniquely identifies a file revision.
40      * @return the file revision corresponding to the passed in content id or null if no file revisions
41      * match the given id
42      */

43     public abstract IFileRevision getFileRevision(String JavaDoc id);
44     
45     /**
46      * Returns the direct predecessors of the given revision.
47      * If the file revision was the result of a single modification,
48      * then only a single predecessor will be returned. However,
49      * if the revision was the result of a merge of multiple
50      * revisions, then all revisions that were merge may be returned
51      * depending on whether the history provider tracks merges.
52      * @param revision a file revision revision
53      * @return the direct predecessors of the given file revision or
54      * an empty array if there are no predecessors
55      */

56     public abstract IFileRevision[] getContributors(IFileRevision revision);
57     
58     /**
59      * Returns all of the direct descendents of the given in file revision.
60      * Multiple revisions may be returned if the given revision is a branch
61      * point or was merged into another revision. Some history providers may not
62      * track branches or merges, in which case a singel descendant may be returned.
63      *
64      * @param revision the file revision that acts as the root
65      * @return an array containing all of the the descendents or an empty array if the revision has
66      * no direct descendents
67      */

68     public abstract IFileRevision[] getTargets(IFileRevision revision);
69 }
70
Popular Tags