[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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.

HTH

Tom



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


From:

"David Conde" <dconde@xxxxxxxx>

To:

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

Date:

06/18/2009 02:55 AM

Subject:

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




Hi,

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
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


GIF image

GIF image