KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > core > plugin > IPluginReference


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.pde.core.plugin;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.pde.core.IIdentifiable;
15 /**
16  * Objects that implement this interface represent references of
17  * plug-ins. Plug-ins are referenced using their identifiers,
18  * and optionally versions and match rules.
19  */

20 public interface IPluginReference extends IIdentifiable, IMatchRules {
21     /**
22      * A name of the property that will be used to notify
23      * about changes in the "match" field.
24      */

25     String JavaDoc P_MATCH = "match"; //$NON-NLS-1$
26
/**
27      * A name of the property that will be used to notify
28      * about changes in the "version" field.
29      */

30     String JavaDoc P_VERSION = "version"; //$NON-NLS-1$
31
/**
32      * Returns the required match for the imported plug-in. The
33      * choices are defined in IMatchRules interface.
34      * @see IMatchRules
35      * @return the desired type of the import plug-in match
36      */

37     int getMatch();
38     /**
39      * Returns the required version of the plug-in.
40      *
41      * @return required version or <samp>null</samp> if not set
42      */

43     String JavaDoc getVersion();
44     /**
45      * Sets the match type for the require plug-in.
46      * This method will throw a CoreException if the model
47      * is not editable.
48      * @see IMatchRules
49      * @param match the desired match type
50      */

51     void setMatch(int match) throws CoreException;
52     /**
53      * Sets the desired version of the required plug-in.
54      * This method will throw a CoreException if
55      * the model is not editable.
56      *
57      * @param version the required import plug-in version
58      */

59     void setVersion(String JavaDoc version) throws CoreException;
60 }
61
Popular Tags