Package org.osgi.service.cm

Examples of org.osgi.service.cm.ConfigurationPermission


    @Test
    public void testTargetedPID() throws Exception
    {
        try
        {
            new ConfigurationPermission(REGION, ConfigurationPermission.TARGET);
        }
        catch (IllegalArgumentException e)
        {
            return;//not an R5 CA
        }
View Full Code Here


            return true;
        }
        if (configBundleLocation.startsWith( "?" ))
        {
            //multilocation
            return bundle.hasPermission(new ConfigurationPermission(configBundleLocation, ConfigurationPermission.TARGET));
        }
        return configBundleLocation.equals(bundle.getLocation());
    }
View Full Code Here

    @Test
    public void testRegionBinding() throws Exception
    {
        try
        {
            new ConfigurationPermission(REGION, ConfigurationPermission.TARGET);
        }
        catch (IllegalArgumentException e)
        {
            return;//not an R5 CA
        }
View Full Code Here

        else if ( location.startsWith( "?" ) )
        {
            // multi-location
            if ( System.getSecurityManager() != null )
            {
                final boolean hasPermission = bundle.hasPermission( new ConfigurationPermission( location,
                    ConfigurationPermission.TARGET ) );
                log( LogService.LOG_DEBUG, "canReceive={0}: bundle={1}; configuration={2} (SecurityManager check)",
                    new Object[]
                        { new Boolean( hasPermission ), bundle.getLocation(), location } );
                return hasPermission;
View Full Code Here

            // CM 1.4 / 104.11.1 Implicit permission
            if ( name != null && ( checkOwn || !name.equals( getBundle().getLocation() ) ) )
            {
                try
                {
                    sm.checkPermission( new ConfigurationPermission( name, ConfigurationPermission.CONFIGURE ) );

                    configurationManager.log( LogService.LOG_DEBUG,
                        "Explicit Permission; grant CONFIGURE permission on configuration bound to {0} to bundle {1}",
                        new Object[]
                            { name, getBundle().getLocation() } );
View Full Code Here

        else if ( location.startsWith( "?" ) )
        {
            // multi-location
            if ( System.getSecurityManager() != null )
            {
                final boolean hasPermission = bundle.hasPermission( new ConfigurationPermission( location,
                    ConfigurationPermission.TARGET ) );
                log( LogService.LOG_DEBUG, "canReceive={0}: bundle={1}; configuration={2} (SecurityManager check)",
                    new Object[]
                        { new Boolean( hasPermission ), bundle.getLocation(), location } );
                return hasPermission;
View Full Code Here

    @Test
    public void testTargetedPID() throws Exception
    {
        try
        {
            new ConfigurationPermission(REGION, ConfigurationPermission.TARGET);
        }
        catch (IllegalArgumentException e)
        {
            return;//not an R5 CA
        }
View Full Code Here

    @Test
    public void testRegionBinding() throws Exception
    {
        try
        {
            new ConfigurationPermission(REGION, ConfigurationPermission.TARGET);
        }
        catch (IllegalArgumentException e)
        {
            return;//not an R5 CA
        }
View Full Code Here

            return true;
        }
        if (configBundleLocation.startsWith( "?" ))
        {
            //multilocation
            return bundle.hasPermission(new ConfigurationPermission(configBundleLocation, ConfigurationPermission.TARGET));
        }
        return configBundleLocation.equals(bundle.getLocation());
    }
View Full Code Here

    List perms = super.getTestPermissions();
    // export package
    perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
    perms.add(new PropertyPermission("*", "read,write"));
    perms.add(new FilePermission("<<ALL FILES>>", "read,delete,write"));
    perms.add(new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE));
    return perms;
  }
View Full Code Here

TOP

Related Classes of org.osgi.service.cm.ConfigurationPermission

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.