Package org.osgi.framework

Examples of org.osgi.framework.AdminPermission


                                "read,write,delete"));
    }
    StringBuffer sb = new StringBuffer("(id=");
    sb.append(b.getBundleId());
    sb.append(")");
    pc.add(new AdminPermission(sb.toString(),
                               AdminPermission.RESOURCE + "," +
                               AdminPermission.METADATA + "," +
                               AdminPermission.CLASS));
    pc.add(new PropertyPermission("org.osgi.framework.*", "read"));
    return pc;
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

            Felix felix = (Felix) framework;
            long bundleId = Util.getBundleIdFromRevisionId(u.getHost());
            Bundle bundle = felix.getBundle(bundleId);
            if (bundle != null)
            {
                sm.checkPermission(new AdminPermission(bundle, AdminPermission.RESOURCE));
                return true;
            }
        }
        else
        {
View Full Code Here

        {
            result = m_felix.installBundle(m_bundle, location, is);
            // Do check the bundle again in case that is was installed
            // already.
            ((SecurityManager) sm).checkPermission(
                new AdminPermission(result, AdminPermission.LIFECYCLE));
        }
        else
        {
            result = m_felix.installBundle(m_bundle, location, is);
        }
View Full Code Here

        if (sm != null)
        {
            if (l instanceof SynchronousBundleListener)
            {
                ((SecurityManager) sm).checkPermission(new AdminPermission(m_bundle,
                    AdminPermission.LISTENER));
            }
        }

        m_felix.addBundleListener(m_bundle, l);
View Full Code Here

        if (sm != null)
        {
            if (l instanceof SynchronousBundleListener)
            {
                ((SecurityManager) sm).checkPermission(new AdminPermission(m_bundle,
                    AdminPermission.LISTENER));
            }
        }

        m_felix.removeBundleListener(m_bundle, l);
View Full Code Here

        Object sm = System.getSecurityManager();

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

        return m_context;
    }
View Full Code Here

        if (sm != null)
        {
            try
            {
                ((SecurityManager) sm).checkPermission(new AdminPermission(this,
                    AdminPermission.RESOURCE));
            }
            catch (Exception e)
            {
                return null; // No permission
View Full Code Here

        if (sm != null)
        {
            try
            {
                ((SecurityManager) sm).checkPermission(new AdminPermission(this,
                    AdminPermission.RESOURCE));
            }
            catch (Exception e)
            {
                return null; // No permission
View Full Code Here

TOP

Related Classes of org.osgi.framework.AdminPermission

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.