KickJava   Java API By Example, From Geeks To Geeks.

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


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 package org.eclipse.pde.core.plugin;
12
13 import org.eclipse.core.runtime.CoreException;
14 /**
15  * A model object that represents the content of the fragment.xml
16  * file.
17  */

18 public interface IFragment extends IPluginBase {
19     /**
20      * A property that will be used to notify
21      * that a plugin id has changed.
22      */

23     String JavaDoc P_PLUGIN_ID = "plugin-id"; //$NON-NLS-1$
24
/**
25      * A property that will be used to notify
26      * that a plugin version has changed.
27      */

28     String JavaDoc P_PLUGIN_VERSION = "plugin-version"; //$NON-NLS-1$
29
/**
30      * A property that will be used to notify
31      * that a plugin version match rule has changed.
32      */

33     String JavaDoc P_RULE = "match"; //$NON-NLS-1$
34
/**
35      * Returns the id of the fragment host.
36      *
37      * @return the host id
38      */

39     String JavaDoc getPluginId();
40     /**
41      * Returns the version of the fragment host.
42      *
43      * @return the host version
44      */

45     String JavaDoc getPluginVersion();
46     /**
47      * Returns an optional version match rule as defined in
48      * IMatchRule interface.
49      *
50      * @return the match rule
51      */

52     int getRule();
53     /**
54      * Sets the id of the plug-in that will be the target of this fragment.
55      * @param id the id of the referenced plug-in.
56      * @exception org.eclipse.core.runtime.CoreException attempts to modify a read-only fragment will result in an exception
57      */

58     void setPluginId(String JavaDoc id) throws CoreException;
59     /**
60      * Sets the version of the plug-in that will be the target of this fragment.'
61      * @param version the version of the referenced version.
62      * @exception org.eclipse.core.runtime.CoreException attempts to modify a read-only fragment will result in an exception
63      */

64     void setPluginVersion(String JavaDoc version) throws CoreException;
65     /**
66      * Sets the optional version match rule as defined in IMatchRules. This
67      * rule will be used when attempting to match the referenced plug-in
68      * version.
69      * @param rule the match rule to be used when locating the referenced the plug-in.
70      * @exception org.eclipse.core.runtime.CoreException attempts to modify a read-only fragment will result in an exception
71      */

72     void setRule(int rule) throws CoreException;
73 }
74
Popular Tags