private Map<String, Object> getAttributes(ParameterizedAttribute attribs) { Map<String, Object> atts = new HashMap<String, Object>(); for (String key : attribs.getAttributes().keySet()) { Parameter param = attribs.getAttribute(key); atts.put(key.trim(), param.getValue().toString().trim()); } return atts; }
private Map<String, String> getDirectives(ParameterizedAttribute attribs) { Map<String, String> dirs = new HashMap<String, String>(); for (String key : attribs.getDirectives().keySet()) { String value = attribs.getDirectiveValue(key, String.class); dirs.put(key.trim(), value.trim()); } return dirs; }
public boolean isSingleton() { parseSymbolicName(); if (parameters == null) return false; return "true".equals(parameters.getDirectiveValue(Constants.SINGLETON_DIRECTIVE, String.class)); }
public String getBundleSymbolicName() { String symbolicName = null; ParameterizedAttribute parameters = parseSymbolicName(); if (parameters != null) symbolicName = parameters.getAttribute(); else if (getBundleManifestVersion() == 1) symbolicName = ANONYMOUS_BUNDLE_SYMBOLIC_NAME; return symbolicName; }
public String getFragmentAttachment() { parseSymbolicName(); if (parameters == null) return null; return parameters.getDirectiveValue(Constants.FRAGMENT_ATTACHMENT_DIRECTIVE, String.class); }
addFragmentHostCapability(symbolicName, bundleVersion, atts, dirs); } else { String hostName = fragmentHost.getAttribute(); addIdentityCapability(symbolicName, bundleVersion, IDENTITY_TYPE_FRAGMENT, idatts, iddirs); Map<String, Object> atts = getAttributes(fragmentHost); if (requireBundles != null && requireBundles.isEmpty() == false) { for (ParameterizedAttribute attr : requireBundles) { String name = attr.getAttribute(); Map<String, Object> atts = getAttributes(attr); Map<String, String> dirs = getDirectives(attr);