[ https://issues.apache.org/jira/browse/FELIX-4111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13682019#comment-13682019 ]
Guillaume Sauthier commented on FELIX-4111: ------------------------------------------- It appears that TypeDeclaration interface is semantically coupled with a component declaration (<component ..> in metadata.xml). getComponentName(), and getComponentVersion() are only valuable in component's declaration. For handler, the namespaces may also be useful. But iPOJO supports generic type declaration (in shelbie's: <sh:command-instance action="..." />), and no 'name' attribute is mandatory ... So this issue is more complex that it sounds at first view, it need more thinking to get a clean solution. As a consequence I propose to move the resolution of this issue to the next iPOJO release. > TypeDeclarations for handlers do not expose namespace (explicitly) > ------------------------------------------------------------------ > > Key: FELIX-4111 > URL: https://issues.apache.org/jira/browse/FELIX-4111 > Project: Felix > Issue Type: Bug > Components: iPOJO > Affects Versions: ipojo-runtime-1.10 > Environment: N/A > Reporter: Pierre Bourret > Assignee: Guillaume Sauthier > Priority: Minor > Attachments: > FELIX-4111_possible_fix__TypeDeclarations_for_handlers_do_not_expose_namespace_explicitly.patch > > > The TypeDeclaration services allows to retrieve the component types that have > been declared, and their current status (bound/unbound , reason, ...) > However, there is something missing about iPOJO handlers : their > TypeDeclaration services do not allow to retrieve their namespaces. For > example, the dependency handler TypeDeclaration.getComponentName() method > returns "requires". > It would be very appreciable to retrieve the namespace information via the > getComponentName() method (or getComponentNameSpace() ?). > One possible workaround it to retrieve the namespace from the component > metadata : > String ns = > typeDeclaration().getComponentMetadata().getAttribute("namespace"); > It is not very elegant since it relies on iPOJO internals (the metadata > structure) and it returns null for iPOJO core handlers (instead of the > "org.apache.felix.ipojo" namespace) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira