return result;
}
private static FragmentDescription obtainBundleFragementHost(Attributes headers) throws BundleException
{
FragmentDescription fragmentDescription = null;
if (headers.containsKey(Constants.FRAGMENT_HOST))
{
Map<String, Object> parameters = new HashMap<String, Object>();
String description = headers.getValue(Constants.FRAGMENT_HOST);
int index = description.indexOf(';');
if (index != -1)
{
fragmentDescription = new FragmentDescription(Util.checkSymbolName(description.substring(0, index)), parameters);
Util.parseParameters(description.substring(index + 1), fragmentDescription, parameters, true);
}
else
{
fragmentDescription = new FragmentDescription(Util.checkSymbolName(description), parameters);
}
if (parameters.containsKey("bundle-version"))
{
try
{
fragmentDescription.setVersionRange(VersionRange.parseVersionRange((String) parameters.get("bundle-verison")));
}
catch (IllegalArgumentException e)
{
throw new BundleException("Illegal value for extension parameter", e);
}
}
else
{
fragmentDescription.setVersionRange(FragmentDescription.DEFAULT_VERSION_RANGE);
}
if (parameters.containsKey("extension"))
{
try
{
fragmentDescription.setExtension(Extension.valueOf((String) parameters.get("extension")));
}
catch (IllegalArgumentException e)
{
throw new BundleException("Illegal value for extension parameter", e);
}