public class SecurityHelper
extends java.lang.Object
Constructor and Description |
---|
SecurityHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canRegisterService(org.osgi.framework.BundleContext context)
Checks that the given bundle context is in a state where it is possible to register services.
|
static boolean |
canUpdateService(org.osgi.framework.ServiceRegistration registration)
Checks that the given service registration can be updated.
|
static boolean |
hasPermissionToGetService(java.lang.String itf,
org.osgi.framework.BundleContext comp)
Checks if the component bundle context has enough permission
to get the given service.
|
static boolean |
hasPermissionToGetServices(java.lang.String[] itfs,
org.osgi.framework.BundleContext comp)
Checks if the component bundle context has enough permission
to get the given services.
|
static boolean |
hasPermissionToRegisterService(java.lang.String itf,
org.osgi.framework.BundleContext comp)
Checks if the component bundle context has enough permission
to register the given service.
|
static boolean |
hasPermissionToRegisterServices(java.lang.String[] itfs,
org.osgi.framework.BundleContext comp)
Checks if the component bundle context has enough permission
to register the given services.
|
static org.osgi.framework.BundleContext |
selectContextToGetService(java.lang.String itf,
org.osgi.framework.BundleContext comp,
org.osgi.framework.BundleContext ipojo)
Gets a bundle context to get the given service.
|
static org.osgi.framework.BundleContext |
selectContextToRegisterService(java.lang.String itf,
org.osgi.framework.BundleContext comp,
org.osgi.framework.BundleContext ipojo)
Gets a bundle context to register the given service.
|
static org.osgi.framework.BundleContext |
selectContextToRegisterServices(java.lang.String[] itfs,
org.osgi.framework.BundleContext comp,
org.osgi.framework.BundleContext ipojo)
Gets a bundle context to register the given services.
|
public static org.osgi.framework.BundleContext selectContextToRegisterServices(java.lang.String[] itfs, org.osgi.framework.BundleContext comp, org.osgi.framework.BundleContext ipojo)
itfs
- the service interfacescomp
- the component bundle contextipojo
- the ipojo bundle contextcomp
if the bundle has enough permission
to register the service, ipojo
otherwise.public static org.osgi.framework.BundleContext selectContextToRegisterService(java.lang.String itf, org.osgi.framework.BundleContext comp, org.osgi.framework.BundleContext ipojo)
itf
- the service interfacecomp
- the component bundle contextipojo
- the ipojo bundle contextcomp
if the bundle has enough permission
to register the service, ipojo
otherwise.public static org.osgi.framework.BundleContext selectContextToGetService(java.lang.String itf, org.osgi.framework.BundleContext comp, org.osgi.framework.BundleContext ipojo)
itf
- the service interfacecomp
- the component bundle contextipojo
- the ipojo bundle contextcomp
if the bundle has enough permission
to get the service, ipojo
otherwise.public static boolean hasPermissionToGetService(java.lang.String itf, org.osgi.framework.BundleContext comp)
itf
- the service interfacecomp
- the component bundle contexttrue
if the bundle has enough permission
to get the service, false
otherwise.public static boolean hasPermissionToGetServices(java.lang.String[] itfs, org.osgi.framework.BundleContext comp)
itfs
- the service interfacescomp
- the component bundle contexttrue
if the bundle has enough permission
to get the services, false
otherwise.public static boolean hasPermissionToRegisterService(java.lang.String itf, org.osgi.framework.BundleContext comp)
itf
- the service interfacecomp
- the component bundle contexttrue
if the bundle has enough permission
to register the service, false
otherwise.public static boolean hasPermissionToRegisterServices(java.lang.String[] itfs, org.osgi.framework.BundleContext comp)
itfs
- the service interfacescomp
- the component bundle contexttrue
if the bundle has enough permission
to register the services, false
otherwise.public static boolean canRegisterService(org.osgi.framework.BundleContext context)
context
- the bundle contextpublic static boolean canUpdateService(org.osgi.framework.ServiceRegistration registration)
registration
- the service registrationCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.