Examples of childrenNames()


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

            in = PreferencesTest.class
                    .getResourceAsStream("/prefs/java/util/prefs/userprefs.xml");
            Preferences.importPreferences(in);

            prefs = Preferences.userNodeForPackage(PreferencesTest.class);
            assertEquals(1, prefs.childrenNames().length);
            assertTrue(prefs.nodeExists("mock/child/grandson"));
            assertEquals("newvalue", prefs.get("prefskey", null));
            assertEquals("oldvalue2", prefs.get("prefskey2", null));
            assertEquals("newvalue3", prefs.get("prefskey3", null));
View Full Code Here

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

    try {
      if( isListening ) {
        ggOutputConfig.stopListening();
      }
      childPrefs  = audioPrefs.node( PrefsUtil.NODE_OUTPUTCONFIGS );
      cfgIDs    = childPrefs.childrenNames();
      cfgItems  = new TreeSet( StringItem.valueComparator );
      for( int i = 0; i < cfgIDs.length; i++ ) {
        cfgItems.add( new StringItem( cfgIDs[ i ], childPrefs.node( cfgIDs[ i ]).get( RoutingConfig.KEY_NAME, cfgIDs[ i ])));
      }
      ggOutputConfig.removeAllItems();
View Full Code Here

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

    }

    public static String[] getReportNamesForClass(Class<? extends TotalReport> reportClass) throws
            BackingStoreException, NoSuchFieldException, IllegalAccessException {
        Preferences reportClassNode = Prefs.REPORT_CONFIG_PREFS.node(getReportTypeName(reportClass));
        return reportClassNode.childrenNames();
    }

    /**
     * gets Default column for aggregating class (i.e. which to sort on)
     *
 
View Full Code Here

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

     */
    public static void clearAllReportConfigsForClass(Class<? extends TotalReport> reportClass)
            throws BackingStoreException, NoSuchFieldException, IllegalAccessException {
        String reportTypeName = ReportConfig.getReportTypeName(reportClass);
        Preferences reportClassNode = Prefs.REPORT_CONFIG_PREFS.node(reportTypeName);
        String[] reportNames = reportClassNode.childrenNames();
        for (String reportName : reportNames) {
            Preferences reportNode = reportClassNode.node(reportName);
            reportNode.removeNode();
        }
    }
View Full Code Here

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

    }

    public static void setStandardConfigInPrefs(Class<? extends TotalReport> reportClass) throws
            BackingStoreException, NoSuchFieldException, IllegalAccessException {
        Preferences reportClassNode = Prefs.REPORT_CONFIG_PREFS.node(getReportTypeName(reportClass));
        String[] childrenNames = reportClassNode.childrenNames();
        if (childrenNames.length == 0 || !Arrays.asList(childrenNames).contains(Prefs.STANDARD_NAME)) {
            clearAllReportConfigsForClass(reportClass);
            ReportConfig reportConfig = getStandardReportConfig(reportClass);
            reportConfig.saveReportConfig();
        }
View Full Code Here

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

    @SuppressWarnings("unused")
    public ArrayList<ReportConfig> getReportConfigsForClass(Class<? extends TotalReport> reportClass) throws
            BackingStoreException, NoSuchFieldException, IllegalAccessException {
        ArrayList<ReportConfig> reportConfigs = new ArrayList<>();
        Preferences reportClassNode = prefs.node(getReportTypeName(reportClass));
        String[] reportNames = reportClassNode.childrenNames();
        for (String reportName : reportNames) {
            reportConfigs.add(new ReportConfig(reportClass, reportName));
        }
        return reportConfigs;
    }
View Full Code Here

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

        }

        if ((args.length == 2) && args[1].equals("all")) {
            System.out.println("Performing a full clean - will attempt to scrub everything...");
            Preferences topNode = Preferences.userRoot().node(PREFERENCE_NODE_PARENT);
            for (String childNode : topNode.childrenNames()) {
                if (childNode.startsWith("spawn")) {
                    topNode.node(childNode).removeNode();
                }
            }
View Full Code Here

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

            Properties configProps = new Properties();
            Preferences topNode = userRoot.node(NODE_PARENT);

            // each --pref, including the default preferences are just one level down from the parent
            for (String pref : topNode.childrenNames()) {
                Preferences prefNode = topNode.node(pref);

                for (String key : prefNode.keys()) {
                    String configPropKey = NODE_PREFIX + prefNode.name() + NODE_DELIM + key;
                    String configPropVal = prefNode.get(key, "");
View Full Code Here

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

            Preferences userPrefs = Preferences.userRoot().node(userNode);
            String[] childNames = null;
            try
            {
                //will keys work just as well
                childNames = userPrefs.childrenNames();
            } catch (BackingStoreException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
View Full Code Here

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

            }
            Users.removeAll(rem);

            try {
                Preferences pref = pref_root.node(getPrefNode());
                for (String u : pref.childrenNames()) {
                    Preferences pref_u = pref.node(u);
                    if (pref_u.get("ConnectRole", "").compareTo("") != 0) {
                        OUser os = new OUser(this, pref_u.get("UserName", ""), pref_u.get("Password", ""),
                                pref_u.getBoolean("SavePassword", false),
                                RoleTypes.valueOf(pref_u.get("ConnectRole", "")),
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.