01: /*******************************************************************************
02: * Copyright (c) 2000, 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.core.plugin;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.pde.core.IIdentifiable;
14:
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 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 P_VERSION = "version"; //$NON-NLS-1$
31:
32: /**
33: * Returns the required match for the imported plug-in. The
34: * choices are defined in IMatchRules interface.
35: * @see IMatchRules
36: * @return the desired type of the import plug-in match
37: */
38: int getMatch();
39:
40: /**
41: * Returns the required version of the plug-in.
42: *
43: * @return required version or <samp>null</samp> if not set
44: */
45: String getVersion();
46:
47: /**
48: * Sets the match type for the require plug-in.
49: * This method will throw a CoreException if the model
50: * is not editable.
51: * @see IMatchRules
52: * @param match the desired match type
53: */
54: void setMatch(int match) throws CoreException;
55:
56: /**
57: * Sets the desired version of the required plug-in.
58: * This method will throw a CoreException if
59: * the model is not editable.
60: *
61: * @param version the required import plug-in version
62: */
63: void setVersion(String version) throws CoreException;
64: }
|