[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] Getting local permission from a bundle programatically

Thank you very much for your answer




De: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] En nombre de Thomas Watson
Enviado el: jueves, 18 de junio de 2009 15:24
Para: Equinox development mailing list
Asunto: Re: [equinox-dev] Getting local permission from a bundle programatically


By local permissions I assume you are talking about getting the content of the OSGI-INF/permissions.perm file. The recommended way to get the content of this file is to use the following

Bundle bundle = getBundle();
URL localPermissions = bundle.getEntry("OSGI-INF/permissions.perm");

The method getEntry should be used to get an entry of a bundle file instead of getResource to handle cases where '.' (dot) is not on the Bundle-ClassPath. This is because getEntry just uses the raw content of the bundle instead of using the bundle's class loader to find the resource.



Inactive hide details for "David Conde" ---06/18/2009 02:55:26 AM---Hi,"David Conde" ---06/18/2009 02:55:26 AM---Hi,


"David Conde" <dconde@xxxxxxxx>


"'Equinox development mailing list'" <equinox-dev@xxxxxxxxxxx>


06/18/2009 02:55 AM


[equinox-dev] Getting local permission from a bundle programatically


I am trying to get local permissions from a bundle by programming, is there any way to do this?

I have found a method in Bundle class which is called âgetResources (String name)â, and I would like to know if this could be the solution.

Thanks in advance_______________________________________________
equinox-dev mailing list

GIF image

PNG image

PNG image