KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > ui > synchronize > ISynchronizeParticipantReference


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.ui.synchronize;
12
13 import org.eclipse.team.core.TeamException;
14
15 /**
16  * A reference is a light weight handle used by the {@link ISynchronizeManager}
17  * to manage registered participants. It is used to reference information
18  * about a particular participant instance without requiring the participant
19  * to be instantiated. Calling the {@link #getParticipant()} method will
20  * cause the participant to be instantiated.
21  * <p>
22  * Clients are not intended to implement this interface.
23  * </p>
24  * @see ISynchronizeManager
25  * @since 3.0
26  */

27 public interface ISynchronizeParticipantReference {
28     /**
29      * Returns the id of the participant type referenced by this handle.
30      *
31      * @return the id of the participant type references by this handle.
32      */

33     public String JavaDoc getId();
34     
35     /**
36      * Returns the secondary id (e.g. instance id) of the participant type referenced
37      * by this handle or <code>null</code> if the participant doesn't support
38      * multiple instances.
39      *
40      * @return the secondary id of the participant type referenced
41      * by this handle or <code>null</code> if the participant doesn't support
42      * multiple instances.
43      */

44     public String JavaDoc getSecondaryId();
45     
46     /**
47      * Returns the fully qualified name of this participant reference. This includes the
48      * secondaryId if available. This can be displayed in the user interface to allow
49      * the user to distinguish between multiple instances of a participant.
50      *
51      * @return the fully qualified name of this participant reference
52      */

53     public String JavaDoc getDisplayName();
54     
55     /**
56      * Returns the participant referenced by this handle. This may trigger loading of the
57      * participant and and a result may be long running. The method may return <code>null</code>
58      * if the participant cannot be de-referenced.
59      *
60      * @return the participant referenced by this handle.
61      * @throws TeamException if an error occurs
62      */

63     public ISynchronizeParticipant getParticipant() throws TeamException;
64     
65     /**
66      * Returns the descriptor for this participant type.
67      *
68      * @return the descriptor for this participant type.
69      */

70     public ISynchronizeParticipantDescriptor getDescriptor();
71 }
72
Popular Tags