Package org.osgi.service.cm

Examples of org.osgi.service.cm.Configuration.update()


        try
        {
            delay();
            testListener.assertNoEvent();

            config.update( new Hashtable<String, Object>()
            {
                {
                    put( "x", "x" );
                }
            } );
View Full Code Here


                }
            } );
            delay();
            testListener.assertEvent( ConfigurationEvent.CM_UPDATED, pid, null, true, ++eventCount );

            config.update( new Hashtable<String, Object>()
            {
                {
                    put( "x", "x" );
                }
            } );
View Full Code Here

            config.setBundleLocation( "new_Location" );
            delay();
            testListener.assertEvent( ConfigurationEvent.CM_LOCATION_CHANGED, pid, null, true, ++eventCount );

            config.update();
            testListener.assertNoEvent();

            config.delete();
            config = null;
            delay();
View Full Code Here

        {
            delay();
            testListener.assertNoEvent();
            testListenerAsync.assertNoEvent();

            config.update( new Hashtable<String, Object>()
            {
                {
                    put( "x", "x" );
                }
            } );
View Full Code Here

            } );
            delay();
            testListener.assertEvent( ConfigurationEvent.CM_UPDATED, pid, null, false, ++eventCount );
            testListenerAsync.assertEvent( ConfigurationEvent.CM_UPDATED, pid, null, true, ++eventCountAsync );

            config.update( new Hashtable<String, Object>()
            {
                {
                    put( "x", "x" );
                }
            } );
View Full Code Here

            config.setBundleLocation( "new_Location" );
            delay();
            testListener.assertEvent( ConfigurationEvent.CM_LOCATION_CHANGED, pid, null, false, ++eventCount );
            testListenerAsync.assertEvent( ConfigurationEvent.CM_LOCATION_CHANGED, pid, null, true, ++eventCountAsync );

            config.update();
            testListener.assertNoEvent();
            testListenerAsync.assertNoEvent();

            config.delete();
            config = null;
View Full Code Here

                if (config != null) {
                    if (config.getBundleLocation() != null) {
                        config.setBundleLocation(null);
                    }
                    config.update(getDictionary());
                    ctx.log("Installed configuration {} from resource {}", config.getPid(), getResource());
                    if ( this.factoryPid != null ) {
                        this.aliasPid = config.getPid();
                    }
                    this.setFinishedState(ResourceState.INSTALLED, this.getCompositeAliasPid());
View Full Code Here

                        {
                            // assumption: config is not null and as a non-null password String property
                            final String pwd = ( String ) config.get( OsgiManager.PROP_PASSWORD );
                            final String hashedPassword = Password.hashPassword( pwd );
                            newConfig.put( OsgiManager.PROP_PASSWORD, hashedPassword );
                            cfg.update( newConfig );
                        }
                    }
                    catch ( Exception e )
                    {
                        // IOException from getting/updated config
View Full Code Here

                        props.put( propName, MetaTypeSupport.toArray( attributeType, vec ) );
                    }
                }
            }

            config.update( props );
        }

        // redirect to the new configuration (if existing)
        return (config != null) ? config.getPid() : ""; //$NON-NLS-1$
    }
View Full Code Here

        if ( value != null )
        {
            props.put( targetKey, value );
        }
        Configuration config = getConfigurationAdmin().getConfiguration( pid, null );
        config.update(props);
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.