[EMAIL PROTECTED] wrote on 06/25/2006 12:37:41 AM: > Hi all, > > I am having a doubt regarding the Conditional Permissions! > > 1. What is the set of Basic permissions assigned to a bundle at the > time of its installation?
It is the union of all permission guarded by Conditions which evaluate to true for the subject bundle. Note, a permission set can be added to conditional permission admin which are not guarded. Thus, these permissions apply to all bundles. > > 2. Is there any way to find the set of actual permissions assigned > to the bundle or to be assigned to the bundle from the > ConditionalPermissionAdmin? getConditionalPermissionInfos() > enumerates the complete list. is there any way to retrieve the > permissions related to a specific bundle? > You can call getProtectionDomain on the Class object of a class loaded from the subject bundle. Then enumerate the permission in the protection domain. However, the enumeration may not include permissions guarded by mutable or postponed evalutation conditions since those conditions must be evaluated at the time of a permission check. > 3. What happens when a permission is set in one tuple and revoked > in another tuple? Permissions cannot be revoked. The Java 2 permission model really only supports additive permissions. > Say for example, there is a tuple { [BundleLocationCondition > "*mylocation*"] (ServicePermission "....MyClass" "*") } > and there is also another tuple { [BundleLocationCondition > "*mylocation*"] (ServicePermission "....MyClass" "GET") } > > According to the first tuple, the bundles satisfying the > locationcondition should be allowed to get and register services of > type MyClass. But according to the second tuple, bundles satisfyingt > he condition shouldnot be allowed to register a service of type > MyClass. What is the actual permissions for the bundle that > satisfies the given locationcondition in this case? In this example, it is the union of the permissions. So it is the union of the actions "*" and "GET" which I would assume is "*". > > Cheers > Joe > > > -- > > ---------------- > * Believing in yourself is an endless destination; > But, believing your have failed is the end of the journey. > * A pound a fret cant pay an ounce a debt. > _______________________________________________ > osgi-dev mailing list > osgi-dev@bundles.osgi.org > http://bundles.osgi.org/mailman/listinfo/osgi-dev BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [EMAIL PROTECTED] Office: +1 407 849 9117 Mobile: +1 386 848 3788 _______________________________________________ osgi-dev mailing list osgi-dev@bundles.osgi.org http://bundles.osgi.org/mailman/listinfo/osgi-dev