Package org.osgi.framework

Examples of org.osgi.framework.AdminPermission$ImplHolder


    {
        Object sm = System.getSecurityManager();

        if (sm != null)
        {
            ((SecurityManager) sm).checkPermission(new AdminPermission(this,
                AdminPermission.EXECUTE));
        }

        getFramework().startBundle(this, options);
    }
View Full Code Here


    {
        Object sm = System.getSecurityManager();

        if (sm != null)
        {
            ((SecurityManager) sm).checkPermission(new AdminPermission(this,
                AdminPermission.LIFECYCLE));
        }

        getFramework().updateBundle(this, is);
    }
View Full Code Here

    {
        Object sm = System.getSecurityManager();

        if (sm != null)
        {
            ((SecurityManager) sm).checkPermission(new AdminPermission(this,
                AdminPermission.EXECUTE));
        }

        getFramework().stopBundle(this, ((options & Bundle.STOP_TRANSIENT) == 0));
    }
View Full Code Here

    {
        Object sm = System.getSecurityManager();

        if (sm != null)
        {
            ((SecurityManager) sm).checkPermission(new AdminPermission(this,
                AdminPermission.LIFECYCLE));
        }

        // After a bundle is uninstalled, the spec says getHeaders() should
        // return the localized headers for the default locale at the time of
View Full Code Here

        Object sm = System.getSecurityManager();

        if (sm != null)
        {
            ((SecurityManager) sm).checkPermission(
                new AdminPermission(m_felix, AdminPermission.RESOLVE));
        }
        synchronized (m_requests)
        {
            // Start a thread to perform asynchronous package refreshes.
            if (m_thread == null)
View Full Code Here

        Object sm = System.getSecurityManager();

        if (sm != null)
        {
            ((SecurityManager) sm).checkPermission(
                new AdminPermission(m_felix, AdminPermission.RESOLVE));
        }

        return m_felix.resolveBundles(bundles);
    }
View Full Code Here

        String pathFragment = validName.getSchemePath();
        String schemeName = validName.getScheme();

        if (validName.hasInterface()) {
            if (OsgiName.FRAMEWORK_PATH.equals(pathFragment) && "bundleContext".equals(validName.getServiceName())) {
                AdminPermission adminPermission =
                    new AdminPermission(callerContext.getBundle(), AdminPermission.CONTEXT);               
                try {
                    AccessController.checkPermission(adminPermission);
                    return callerContext;
                } catch (AccessControlException accessControlException) {
                    NamingException namingException = new NameNotFoundException("Caller does not have permissions to get BundleContext.");
View Full Code Here

        SecurityManager sm = System.getSecurityManager();
        if (sm != null)
        {
            LOGGER.finest("Found security manager");

            sm.checkPermission(new AdminPermission(bundle, action));
        }

        LOGGER.exiting(CLASS_NAME, "checkAdminPermission");
    }
View Full Code Here

     * {@inheritDoc}
     */
    public Dictionary getHeaders(String locale)
    {
        SecurityManager sm = System.getSecurityManager();
        if (sm != null) sm.checkPermission(new AdminPermission(this, AdminPermission.METADATA));

        ArchiveStore archiveStore = getCurrentGeneration().getArchiveStore();

        if (locale != null && locale.length() == 0) return AttributeUtils.allocateReadOnlyDictionary(archiveStore.getAttributes());

View Full Code Here

    public void refreshPackages(Bundle[] bundles)
    {
        LOGGER.entering(CLASS_NAME, "refreshPackages", bundles);

        SecurityManager sm = System.getSecurityManager();
        if (sm != null) sm.checkPermission(new AdminPermission(framework.getBundleManager().getBundle(0), AdminPermission.RESOLVE));

        framework.getExecutorService().submit(new RefreshPackagesRunnable(framework, bundles));

        LOGGER.exiting(CLASS_NAME, "refreshPackages");
    }
View Full Code Here

TOP

Related Classes of org.osgi.framework.AdminPermission$ImplHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.