You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre Bourret (JIRA)" <ji...@apache.org> on 2013/06/07 14:27:19 UTC

[jira] [Updated] (FELIX-4111) TypeDeclarations for handlers do not expose namespace (explicitly)

     [ https://issues.apache.org/jira/browse/FELIX-4111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierre Bourret updated FELIX-4111:
----------------------------------

    Attachment: FELIX-4111_possible_fix__TypeDeclarations_for_handlers_do_not_expose_namespace_explicitly.patch

Here is a possible fix for this issue.

I've added a method getComponentNameSpace() that returns the namespace (retrieved from metadata).
If the targeted iPOJO extension is "handler" and the component metadata doesn't define the "namespace" attribute, the method returns the implicit namespace (for core handlers) : "org.apache.felix.ipojo"
                
> 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
>            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