use of org.apache.felix.ipojo.api.HandlerConfiguration in project felix by apache.
the class CompositeComponentType method generateComponentMetadata.
/**
* Generates the component description.
* @return the component type description of
* the current component type
*/
private Element generateComponentMetadata() {
Element element = new Element("composite", "");
if (m_name != null) {
element.addAttribute(new Attribute("name", m_name));
}
if (m_version != null) {
element.addAttribute(new Attribute("version", m_version));
}
if (!m_public) {
element.addAttribute(new Attribute("public", "false"));
}
for (int i = 0; i < m_contained.size(); i++) {
Instance inst = (Instance) m_contained.get(i);
element.addElement(inst.getElement());
}
for (int i = 0; i < m_imported.size(); i++) {
ImportedService inst = (ImportedService) m_imported.get(i);
element.addElement(inst.getElement());
}
for (int i = 0; i < m_instantiated.size(); i++) {
InstantiatedService inst = (InstantiatedService) m_instantiated.get(i);
element.addElement(inst.getElement());
}
for (int i = 0; i < m_exported.size(); i++) {
ExportedService inst = (ExportedService) m_exported.get(i);
element.addElement(inst.getElement());
}
for (int i = 0; i < m_provided.size(); i++) {
ProvidedService inst = (ProvidedService) m_provided.get(i);
element.addElement(inst.getElement());
}
// External handlers
for (int i = 0; i < m_handlers.size(); i++) {
HandlerConfiguration hc = (HandlerConfiguration) m_handlers.get(i);
element.addElement(hc.getElement());
}
return element;
}
Aggregations