Package java.util.prefs

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


        try {
            if (!newPrefDir.exists() && Preferences.systemRoot().node("/com").nodeExists("adito")) {
                Preferences from = Preferences.systemRoot().node("/com/adito");
                log.warn("Migrating preferences");
                try {
                    copyNode(from.node("core"), PREF.node("core"));
                    from.node("core").removeNode();
                    copyNode(from.node("plugin"), PREF.node("plugin"));
                    from.node("plugin").removeNode();
                    copyNode(from.node("extensions"), PREF.node("extensions"));
                    from.node("extensions").removeNode();
View Full Code Here


            if (!newPrefDir.exists() && Preferences.systemRoot().node("/com").nodeExists("adito")) {
                Preferences from = Preferences.systemRoot().node("/com/adito");
                log.warn("Migrating preferences");
                try {
                    copyNode(from.node("core"), PREF.node("core"));
                    from.node("core").removeNode();
                    copyNode(from.node("plugin"), PREF.node("plugin"));
                    from.node("plugin").removeNode();
                    copyNode(from.node("extensions"), PREF.node("extensions"));
                    from.node("extensions").removeNode();
                    copyNode(from.node("dbupgrader"), PREF.node("dbupgrader"));
View Full Code Here

                Preferences from = Preferences.systemRoot().node("/com/adito");
                log.warn("Migrating preferences");
                try {
                    copyNode(from.node("core"), PREF.node("core"));
                    from.node("core").removeNode();
                    copyNode(from.node("plugin"), PREF.node("plugin"));
                    from.node("plugin").removeNode();
                    copyNode(from.node("extensions"), PREF.node("extensions"));
                    from.node("extensions").removeNode();
                    copyNode(from.node("dbupgrader"), PREF.node("dbupgrader"));
                    from.node("dbupgrader").removeNode();
View Full Code Here

                log.warn("Migrating preferences");
                try {
                    copyNode(from.node("core"), PREF.node("core"));
                    from.node("core").removeNode();
                    copyNode(from.node("plugin"), PREF.node("plugin"));
                    from.node("plugin").removeNode();
                    copyNode(from.node("extensions"), PREF.node("extensions"));
                    from.node("extensions").removeNode();
                    copyNode(from.node("dbupgrader"), PREF.node("dbupgrader"));
                    from.node("dbupgrader").removeNode();
                } catch (Exception e) {
View Full Code Here

                try {
                    copyNode(from.node("core"), PREF.node("core"));
                    from.node("core").removeNode();
                    copyNode(from.node("plugin"), PREF.node("plugin"));
                    from.node("plugin").removeNode();
                    copyNode(from.node("extensions"), PREF.node("extensions"));
                    from.node("extensions").removeNode();
                    copyNode(from.node("dbupgrader"), PREF.node("dbupgrader"));
                    from.node("dbupgrader").removeNode();
                } catch (Exception e) {
                    log.error("Failed to migrate preferences.", e);
View Full Code Here

                    copyNode(from.node("core"), PREF.node("core"));
                    from.node("core").removeNode();
                    copyNode(from.node("plugin"), PREF.node("plugin"));
                    from.node("plugin").removeNode();
                    copyNode(from.node("extensions"), PREF.node("extensions"));
                    from.node("extensions").removeNode();
                    copyNode(from.node("dbupgrader"), PREF.node("dbupgrader"));
                    from.node("dbupgrader").removeNode();
                } catch (Exception e) {
                    log.error("Failed to migrate preferences.", e);
                }
View Full Code Here

                    from.node("core").removeNode();
                    copyNode(from.node("plugin"), PREF.node("plugin"));
                    from.node("plugin").removeNode();
                    copyNode(from.node("extensions"), PREF.node("extensions"));
                    from.node("extensions").removeNode();
                    copyNode(from.node("dbupgrader"), PREF.node("dbupgrader"));
                    from.node("dbupgrader").removeNode();
                } catch (Exception e) {
                    log.error("Failed to migrate preferences.", e);
                }
                try {
View Full Code Here

                    copyNode(from.node("plugin"), PREF.node("plugin"));
                    from.node("plugin").removeNode();
                    copyNode(from.node("extensions"), PREF.node("extensions"));
                    from.node("extensions").removeNode();
                    copyNode(from.node("dbupgrader"), PREF.node("dbupgrader"));
                    from.node("dbupgrader").removeNode();
                } catch (Exception e) {
                    log.error("Failed to migrate preferences.", e);
                }
                try {
                    from.flush();
View Full Code Here

            Preferences p = ContextHolder.getContext().getPreferences().node("dbupgrader");
            if (p.nodeExists("currentDataVersion")) {
                log.warn("Migrating database versions from preferences to properties file in "
                                + ContextHolder.getContext().getDBDirectory().getAbsolutePath() + ".");
                versions = new Properties();
                p = p.node("currentDataVersion");
                String[] c = p.keys();
                for (int i = 0; i < c.length; i++) {
                    versions.put(c[i], p.get(c[i], ""));
                }
                FileOutputStream fos = new FileOutputStream(versionsFile);
View Full Code Here

    // audioboxes
    value = AudioBoxConfig.ID_DEFAULT;
    putDontOverwrite( childPrefs, KEY_AUDIOBOX, value );
    try {
      if( !childPrefs.nodeExists( NODE_AUDIOBOXES )) {
        childPrefs2  = childPrefs.node( NODE_AUDIOBOXES );
        new AudioBoxConfig( value, "Default", 8, 8, true ).toPrefs( childPrefs2.node( value ));
      }
    }
    catch( BackingStoreException e1 ) {
      warnings.add( e1.toString() );
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.