Interface IBundleProjectService
- 
 public interface IBundleProjectServiceService used to create and configure bundle project descriptions.An instance of this service can be obtained from a ServiceCalleras followsServiceCaller.callOnce(getClass(), IBundleContextService.class, (service) -> ...); - Since:
- 3.6
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description IBundleProjectDescriptiongetDescription(IProject project)Returns a bundle description for the given project.IBundleClasspathEntrynewBundleClasspathEntry(IPath sourceFolder, IPath binaryFolder, IPath library)Creates and returns a new bundle classpath entry defining the relationship between a source, binaries, and library on the Bundle-Classpath header.IHostDescriptionnewHost(String name, VersionRange range)Creates and returns a new host description.IPackageExportDescriptionnewPackageExport(String name, Version version, boolean api, String[] friends)Constructs a new package export description.IPackageImportDescriptionnewPackageImport(String name, VersionRange range, boolean optional)Creates and returns a new package import description.IRequiredBundleDescriptionnewRequiredBundle(String name, VersionRange range, boolean optional, boolean export)Creates and returns a new required bundle description.voidsetBundleRoot(IProject project, IPath bundleRoot)Sets the location within the project where the root of the bundle and its associated artifacts will reside, ornullto indicate the default bundle root location should be used (project folder).
 
- 
- 
- 
Method Detail- 
getDescriptionIBundleProjectDescription getDescription(IProject project) throws CoreException Returns a bundle description for the given project. If the project does not exist, the description can be used to create a new bundle project. If the project does exist, the description can be used to modify a project.- Parameters:
- project- project
- Returns:
- bundle description for the associated project
- Throws:
- CoreException- if unable to create a description on an existing project
 
 - 
newHostIHostDescription newHost(String name, VersionRange range) Creates and returns a new host description.- Parameters:
- name- symbolic name of the host
- range- version constraint or- null
- Returns:
- host description
 
 - 
newPackageImportIPackageImportDescription newPackageImport(String name, VersionRange range, boolean optional) Creates and returns a new package import description.- Parameters:
- name- fully qualified name of imported package
- range- version constraint or- null
- optional- whether the import is optional
- Returns:
- package import description
 
 - 
newPackageExportIPackageExportDescription newPackageExport(String name, Version version, boolean api, String[] friends) Constructs a new package export description.- Parameters:
- name- fully qualified package name
- version- version or- null
- api- whether the package is considered API
- friends- symbolic names of bundles that are friends, or- null; when friends are specified the package will not be API
- Returns:
- package export description
 
 - 
newRequiredBundleIRequiredBundleDescription newRequiredBundle(String name, VersionRange range, boolean optional, boolean export) Creates and returns a new required bundle description.- Parameters:
- name- symbolic name of required bundle
- range- version constraint or- null
- optional- whether the required bundle is optional
- export- whether the required bundle is re-exported
- Returns:
- required bundle description
 
 - 
newBundleClasspathEntryIBundleClasspathEntry newBundleClasspathEntry(IPath sourceFolder, IPath binaryFolder, IPath library) Creates and returns a new bundle classpath entry defining the relationship between a source, binaries, and library on the Bundle-Classpath header.When a source folder is specified, the binary folder defines its output folder, or may be nullto indicate that the project's default output folder is used by the source folder. When only a binary folder is specified, there is no source associated with the folder. When no source or binary are specified, it indicates the library is included in the project as an archive.- Parameters:
- sourceFolder- source folder or- null
- binaryFolder- binary folder or- null
- library- associated entry on the Bundle-Classpath header or- nullto indicate default entry "."
- Returns:
- a new bundle classpath entry
 
 - 
setBundleRootvoid setBundleRoot(IProject project, IPath bundleRoot) throws CoreException Sets the location within the project where the root of the bundle and its associated artifacts will reside, ornullto indicate the default bundle root location should be used (project folder).The bundle root is the folder containing the META-INF/folder. When the bundle root location is modified, existing bundle artifacts at the old root are not moved or modified. When creating a new bundle projectIBundleProjectDescription.setBundleRoot(IPath)can be used to specify an initial bundle root location. To modify the bundle root location of an existing project, this method must be used.- Parameters:
- project- project that must exist and be open
- bundleRoot- project relative path to bundle root artifacts in the project or- null
- Throws:
- CoreException- if setting the root fails
 
 
- 
 
-