1 /******************************************************************************* 2 * Copyright (c) 2000, 2007 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.team.ui.synchronize; 15 16 import org.eclipse.team.core.TeamException; 17 18 /** 19 * A reference is a light weight handle used by the {@link ISynchronizeManager} 20 * to manage registered participants. It is used to reference information 21 * about a particular participant instance without requiring the participant 22 * to be instantiated. Calling the {@link #getParticipant()} method will 23 * cause the participant to be instantiated. 24 * <p> 25 * Clients are not intended to implement this interface. 26 * </p> 27 * @see ISynchronizeManager 28 * @since 3.0 29 */ 30 public interface ISynchronizeParticipantReference { 31 /** 32 * Returns the id of the participant type referenced by this handle. 33 * 34 * @return the id of the participant type references by this handle. 35 */ getId()36 public String getId(); 37 38 /** 39 * Returns the secondary id (e.g. instance id) of the participant type referenced 40 * by this handle or <code>null</code> if the participant doesn't support 41 * multiple instances. 42 * 43 * @return the secondary id of the participant type referenced 44 * by this handle or <code>null</code> if the participant doesn't support 45 * multiple instances. 46 */ getSecondaryId()47 public String getSecondaryId(); 48 49 /** 50 * Returns the fully qualified name of this participant reference. This includes the 51 * secondaryId if available. This can be displayed in the user interface to allow 52 * the user to distinguish between multiple instances of a participant. 53 * 54 * @return the fully qualified name of this participant reference 55 */ getDisplayName()56 public String getDisplayName(); 57 58 /** 59 * Returns the participant referenced by this handle. This may trigger loading of the 60 * participant and and a result may be long running. The method may return <code>null</code> 61 * if the participant cannot be de-referenced. 62 * 63 * @return the participant referenced by this handle. 64 * @throws TeamException if an error occurs 65 */ getParticipant()66 public ISynchronizeParticipant getParticipant() throws TeamException; 67 68 /** 69 * Returns the descriptor for this participant type. 70 * 71 * @return the descriptor for this participant type. 72 */ getDescriptor()73 public ISynchronizeParticipantDescriptor getDescriptor(); 74 } 75