Package java.util.prefs

Examples of java.util.prefs.Preferences.node()


        try {
            p.keys();
        } catch (BackingStoreException e) {
        }
        p.name();
        p.node(null);
        try {
            p.nodeExists(null);
        } catch (BackingStoreException e1) {
        }
        p.parent();
View Full Code Here


        // "subchild1");
        Preferences child1 = pref.node("child1");

        pref.node("child2");
        pref.node("child3");
        child1.node("subchild1");

        assertSame(pref, child1.parent());
        assertEquals(3, pref.childrenNames().length);
    }
View Full Code Here

    @Override
    public void addPluginImplementation(String pluginInterfaceName, String pluginImplementationAddress) {

        Preferences implementations = Preferences.userRoot().node(applicationName).node(pluginInterfaceName);
        implementations.node(UUID.randomUUID().toString()).put("value", pluginImplementationAddress);

    }// END Method addPluginImplementation


    @Override
View Full Code Here

        try {

            Preferences implementations = Preferences.userRoot().node(applicationName).node(pluginInterfaceName);

            for (String currentPluginImplementationId : implementations.childrenNames())
                if (implementations.node(currentPluginImplementationId).get("value", "local:").equals(pluginImplementationAddress)) {
                    implementations.node(currentPluginImplementationId).removeNode();
                    break;
                }

        } catch (BackingStoreException ex) {
View Full Code Here

            Preferences implementations = Preferences.userRoot().node(applicationName).node(pluginInterfaceName);

            for (String currentPluginImplementationId : implementations.childrenNames())
                if (implementations.node(currentPluginImplementationId).get("value", "local:").equals(pluginImplementationAddress)) {
                    implementations.node(currentPluginImplementationId).removeNode();
                    break;
                }

        } catch (BackingStoreException ex) {
            Logger.getLogger(JavaPreferencesPersistenceDriver.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

        try {

            Preferences implementations = Preferences.userRoot().node(applicationName).node(pluginInterfaceName);

            for (String currentPluginImplementationId : implementations.childrenNames())
                if (implementations.node(currentPluginImplementationId).get("value", "local:").equals(pluginImplementationAddress))
                    return true;

        } catch (BackingStoreException ex) {
            Logger.getLogger(JavaPreferencesPersistenceDriver.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

        try {

            Preferences implementations = Preferences.userRoot().node(applicationName).node(pluginInterfaceName);

            for (String currentPluginImplementationId : implementations.childrenNames())
                rslt.add(implementations.node(currentPluginImplementationId).get("value", null));

        } catch (BackingStoreException ex) {
            Logger.getLogger(JavaPreferencesPersistenceDriver.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

               
                platformNode = systemRoot.node( NODE_NAME_PLATFORM );
               
                if ( platformNode.nodeExists( NODE_NAME_HANDLERS ) )
                {
                    handlersNode = platformNode.node( NODE_NAME_HANDLERS );
                }

                if ( platformNode.nodeExists( NODE_NAME_LOGGERS ) )
                {
                    loggersNode = platformNode.node( NODE_NAME_LOGGERS );
View Full Code Here

                    handlersNode = platformNode.node( NODE_NAME_HANDLERS );
                }

                if ( platformNode.nodeExists( NODE_NAME_LOGGERS ) )
                {
                    loggersNode = platformNode.node( NODE_NAME_LOGGERS );
                }
            }
        }
        catch ( BackingStoreException e )
        {
View Full Code Here

        String[] children = prefs2.childrenNames();
        Arrays.sort(children);
        assertEquals("a", children[0]);
        assertEquals("b", children[1]);
        assertEquals(1, prefs2.getLong("pa", 0));
        assertEquals(2, prefs2.node("a").getLong("pb", 0));
        assertEquals(2, prefs2.node("/a").getLong("pb", 0));
        assertEquals(3, prefs2.node("/a/b").getLong("pc", 0));
        Preferences prefs2a = prefs2.node("/a");
        assertEquals(2, prefs2a.getLong("pb", 0));
        assertEquals(-1, prefs2.node("/a/c").getLong("px", -1));
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.