KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > ibundle > IBundlePluginModelBase


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.internal.core.ibundle;
12 import org.eclipse.pde.core.IEditable;
13 import org.eclipse.pde.core.plugin.IPluginImport;
14 import org.eclipse.pde.core.plugin.IPluginLibrary;
15 import org.eclipse.pde.core.plugin.IPluginModelBase;
16 import org.eclipse.pde.core.plugin.ISharedExtensionsModel;
17 /**
18  * An adapter of the pre-3.0 plug-in model base interface that is capable of
19  * maintaining the predictable facade when dealing with plug-in with OSGi
20  * manifest files. The goal is to use the same adapter interface with the
21  * manifest coming and going and transparently switch between
22  * META-INF/MANIFEST.MF and plugin.xml/fragment.xml.
23  *
24  * @since 3.0
25  */

26 public interface IBundlePluginModelBase extends IPluginModelBase, IEditable {
27     /**
28      * Returns the underlying OSGi bundle model object if bundle manifest is
29      * present.
30      *
31      * @return OSGi bundle model or <code>null</code> if bundle manifest is
32      * not present.
33      */

34     IBundleModel getBundleModel();
35     /**
36      * Returns the model that is responsible for tracking extensions and
37      * extension points. Typically this content is stored in plugin.xml file.
38      *
39      * @return extensions model or <code>null</code> if not present.
40      */

41     ISharedExtensionsModel getExtensionsModel();
42     /**
43      * Sets the bundle manifest model for this adapter. All calls related to
44      * data that is normally stored in this model (e.g. plug-in ID, plug-in
45      * name, provider name etc.) will be delegated to it if not
46      * <code>null</code>.
47      *
48      * @param bundleModel
49      * the bundle model to use in this adapter or <code>null</code>
50      * if there is no bundle model.
51      */

52     void setBundleModel(IBundleModel bundleModel);
53     /**
54      * Sets the extensions model for this adapter. All the calls related to
55      * extensions and extension points will be delegated to this model if not
56      * <code>null</code>.
57      *
58      * @param extensionsModel
59      * the model that stores extensions and extension points
60      */

61     void setExtensionsModel(ISharedExtensionsModel extensionsModel);
62     /**
63      * Factory method for creating a new import object. This is important for
64      * maintaining the adapter because <code>IPluginBase</code> returns an
65      * array of <code>IPluginImport</code> objects for dependency information.
66      *
67      * @return a newly created import object
68      */

69     IPluginImport createImport();
70     /**
71      * Factory method for creating a new runtime object. This is important for
72      * maintaining the adapter because <code>IPluginBase</code> returns an
73      * array of <code>IPluginLibrary</code> objects for runtime information.
74      *
75      * @return a newly created plug-in library object
76      */

77     IPluginLibrary createLibrary();
78     /**
79      * Saves the adapter by delegating the operation to the underlying models
80      * that need saving.
81      */

82     void save();
83     
84     /**
85      * Returns the bundle localization
86      * @return the bundle localization
87      */

88     String JavaDoc getBundleLocalization();
89 }
90
Popular Tags