KickJava   Java API By Example, From Geeks To Geeks.

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


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  * The class that implements this interface represents a
16  * reference to the library that is defined in the plug-in
17  * manifest.
18  */

19 public interface IPluginLibrary extends IPluginObject {
20     /**
21      * A name of the property that will be used to
22      * notify about changes of the "exported" field.
23      */

24     String JavaDoc P_EXPORTED = "export"; //$NON-NLS-1$
25
/**
26      * A name of the property that will be used to
27      * notify about changes in the content filters.
28      */

29     String JavaDoc P_PACKAGES = "packages"; //$NON-NLS-1$
30

31     /**
32      * A name of the property that will be used to
33      * notify about changes in the content filters.
34      */

35     String JavaDoc P_CONTENT_FILTERS = "contentFilters"; //$NON-NLS-1$
36
/**
37      * A name of the property that will be used to
38      * notify about of the 'type' field.
39      */

40     String JavaDoc P_TYPE = "type"; //$NON-NLS-1$
41
/**
42      * A library type indicating the library contains code.
43      */

44     String JavaDoc CODE = "code"; //$NON-NLS-1$
45
/**
46      * A library type indicating the library contains resource files.
47      */

48     String JavaDoc RESOURCE = "resource"; //$NON-NLS-1$
49
/**
50      * Returns optional context filters that
51      * should be applied to calculate what classes
52      * to export from this library.
53      *
54      * @return an array of content filter strings
55      */

56     String JavaDoc[] getContentFilters();
57     
58     /**
59      * Returns optional package prefixes that can be used
60      * to make library lookup faster..
61      *
62      * @return an array of package prefixes
63      */

64     String JavaDoc[] getPackages();
65     /**
66      * Returns true if this library contains types
67      * that will be visible to other plug-ins.
68      *
69      * @return true if there are exported types in the library
70      */

71     boolean isExported();
72     /**
73      * Returns true if all the types in this library
74      * will be visible to other plug-ins.
75      *
76      * @return true if all the types are exported
77      * in the library
78      */

79     boolean isFullyExported();
80
81     /**
82      * Returns a type of this library (CODE or RESOURCE)
83      */

84     String JavaDoc getType();
85     /**
86      * Sets the optional content filters for
87      * this library. This method may throw
88      * a CoreException if the model is not
89      * editable.
90      *
91      * @param filters an array of filter strings
92      */

93     void setContentFilters(String JavaDoc[] filters) throws CoreException;
94     
95     /**
96      * Export a particular package in a library.
97      * This method may throw a CoreException if
98      * the model is not editable.
99      *
100      * @param filter a package name
101      */

102     void addContentFilter(String JavaDoc filter) throws CoreException;
103
104     /**
105      * Remove a package from the export list.
106      * This method may throw a CoreException if
107      * the model is not editable.
108      *
109      * @param filter a package name
110      */

111     void removeContentFilter(String JavaDoc filter) throws CoreException;
112     
113     
114     /**
115      * Sets the optional package prefixes for this library.
116      * This method may throw a CoreException if the model is not
117      * editable.
118      *
119      * @param packages an array of package prefixes
120      */

121     void setPackages(String JavaDoc[] packages) throws CoreException;
122     /**
123      * Sets whether types in this library will be
124      * visible to other plug-ins. This method
125      * may throw a CoreException if the model is
126      * not editable.
127      */

128     void setExported(boolean value) throws CoreException;
129     /**
130      * Sets the library type. Must be either CODE or RESOURCE.
131      * @throws CoreException if the model is not editable.
132      */

133     void setType(String JavaDoc type) throws CoreException;
134 }
135
Popular Tags