Class MutableBundleManifest
- java.lang.Object
-
- org.eclipse.tycho.versions.bundle.MutableBundleManifest
-
public class MutableBundleManifest extends Object
-
-
Constructor Summary
Constructors Constructor Description MutableBundleManifest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ManifestAttribute attribute)
Map<String,String>
getExportedPackagesVersion()
Get a map containing the name of packages in Export-Package manifest attribute as a map.String
getFragmentHostSymbolicName()
String
getFragmentHostVersion()
Map<String,String>
getImportPackagesVersions()
Get a map containing the name of packages in Import-Package manifest attribute as a map.Map<String,String>
getRequiredBundleVersions()
Read the RequiredBundle with optional versionsString
getSymbolicName()
String
getVersion()
boolean
isFragment()
static MutableBundleManifest
read(File file)
static MutableBundleManifest
read(InputStream is)
void
setFragmentHostVersion(String newVersion)
void
setVersion(String version)
void
updateExportedPackageVersions(Map<String,String> versionsToUpdate)
Updates version for packages in Export-Package with the version provided in the map.void
updateImportedPackageVersions(Map<String,String> versionsToUpdate)
Updates version range for packages in Import-Package with the version provided in the map.void
updateRequiredBundleVersions(Map<String,String> versionsToUpdate)
Updates version range for bundles in Require-Bundle with the versions provided in the map.static void
write(MutableBundleManifest mf, File file)
static void
write(MutableBundleManifest mf, OutputStream os)
-
-
-
Method Detail
-
add
public void add(ManifestAttribute attribute)
-
read
public static MutableBundleManifest read(File file) throws IOException
- Throws:
IOException
-
read
public static MutableBundleManifest read(InputStream is) throws IOException
- Throws:
IOException
-
write
public static void write(MutableBundleManifest mf, File file) throws IOException
- Throws:
IOException
-
write
public static void write(MutableBundleManifest mf, OutputStream os) throws IOException
- Throws:
IOException
-
getSymbolicName
public String getSymbolicName()
-
getVersion
public String getVersion()
-
getFragmentHostSymbolicName
public String getFragmentHostSymbolicName()
-
isFragment
public boolean isFragment()
-
getFragmentHostVersion
public String getFragmentHostVersion()
-
setFragmentHostVersion
public void setFragmentHostVersion(String newVersion)
-
getRequiredBundleVersions
public Map<String,String> getRequiredBundleVersions()
Read the RequiredBundle with optional versions- Returns:
-
updateRequiredBundleVersions
public void updateRequiredBundleVersions(Map<String,String> versionsToUpdate)
Updates version range for bundles in Require-Bundle with the versions provided in the map.- Parameters:
versionsToUpdate
- the bundle/version-range map. Keys are the bundle symbolicnames to update and the values are the new version range to apply.
-
getImportPackagesVersions
public Map<String,String> getImportPackagesVersions()
Get a map containing the name of packages in Import-Package manifest attribute as a map.The map keys are the package names and the values are the version range if present or null when absent.
- Returns:
-
updateImportedPackageVersions
public void updateImportedPackageVersions(Map<String,String> versionsToUpdate)
Updates version range for packages in Import-Package with the version provided in the map.- Parameters:
versionsToUpdate
- the package/version-range map. Keys are the package names to update and the values are the new version range to apply.
-
getExportedPackagesVersion
public Map<String,String> getExportedPackagesVersion()
Get a map containing the name of packages in Export-Package manifest attribute as a map.- Returns:
- the package/version map. Keys are the package names and the values are the version if present or null when absent.
-
updateExportedPackageVersions
public void updateExportedPackageVersions(Map<String,String> versionsToUpdate)
Updates version for packages in Export-Package with the version provided in the map.- Parameters:
versionsToUpdate
- the package/version map. Keys are the package names to update and the values are the newVersion to apply.
-
setVersion
public void setVersion(String version)
-
-