Package java.util.prefs

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


        for ( int i = 0; i < childrenNames.length; i++ ) {
          Preferences node = icEjbNode.node( childrenNames[i] );

          icConfig = Collections.synchronizedMap( new HashMap() );

          String[] keys = node.keys();

          for ( int j = 0; j < keys.length; j++ ) {
            String value = node.get( keys[i], "" );

            if ( value != null ) {
View Full Code Here


      String clazz = prefs.get("class", null);
      Object obj = null;
    try {
      Class cls = Thread.currentThread().getContextClassLoader().loadClass(clazz);
      obj = cls.newInstance();
        String[] keys = prefs.keys();
        for (int i = 0; i < keys.length; i++) {
          if (keys[i] != null && (!keys[i].startsWith("class <<") && !keys[i].equals("class")) ) {
            String val = prefs.get(keys[i], null);
            if (val != null) {
              String methodName = "set" + keys[i].substring(0,1).toUpperCase() + keys[i].substring(1);
View Full Code Here

      String clazz = prefs.get("class", null);
      Object obj = null;
    try {
      Class cls = Class.forName(clazz);
      obj = cls.newInstance();
        String[] keys = prefs.keys();
        for (int i = 0; i < keys.length; i++) {
          if (keys[i] != null && (!keys[i].startsWith("class <<") && !keys[i].equals("class")) ) {
            String val = prefs.get(keys[i], null);
            if (val != null) {
              String methodName = "set" + keys[i].substring(0,1).toUpperCase() + keys[i].substring(1);
View Full Code Here

            {
                Preferences node = ejbNode.node( childrenNames[i] );
               
                Map nodeMap = Collections.synchronizedMap( new HashMap() );
               
                String[] keys = node.keys();
               
                for ( int j = 0; j < keys.length; j++ )
                {
                    String value = node.get( keys[i], "" );
                   
View Full Code Here

                {
                    Preferences node = icNode.node( childrenNames[i] );
                   
                    Map nodeMap = Collections.synchronizedMap( new HashMap() );
                   
                    String[] keys = node.keys();
                   
                    for ( int j = 0; j < keys.length; j++ )
                    {
                        String value = node.get( keys[i], "" );
                       
View Full Code Here

                {
                    Preferences node = icEjbNode.node( childrenNames[i] );
                   
                    icConfig = Collections.synchronizedMap( new HashMap() );
                   
                    String[] keys = node.keys();
                   
                    for ( int j = 0; j < keys.length; j++ )
                    {
                        String value = node.get( keys[i], "" );
                       
View Full Code Here

      String clazz = prefs.get("class", null);
      Object obj = null;
    try {
      Class cls = Class.forName(clazz);
      obj = cls.newInstance();
        String[] keys = prefs.keys();
        for (int i = 0; i < keys.length; i++) {
          if (keys[i] != null && (!keys[i].startsWith("class <<") && !keys[i].equals("class")) ) {
            String val = prefs.get(keys[i], null);
            if (val != null) {
              String methodName = "set" + keys[i].substring(0,1).toUpperCase() + keys[i].substring(1);
View Full Code Here

            {
                Preferences node = ejbNode.node( childrenNames[i] );
               
                Map nodeMap = Collections.synchronizedMap( new HashMap() );
               
                String[] keys = node.keys();
               
                for ( int j = 0; j < keys.length; j++ )
                {
                    String value = node.get( keys[i], "" );
                   
View Full Code Here

      MultiPreferencesFactory.setFactory(factory);
      String nodeName = "this/is/a/test/testListKeys";
     
      Preferences pref = fillTree(isSystemRoot, nodeName);
     
      String[] keys = pref.keys();
      assert keys.length == 1 : "There should only be one key in this node.";
      assert keys[0].equals("test") : "the key should be named test";
    } finally {
      MultiPreferencesFactory.setFactory(savedFactory);
    }
View Full Code Here

        // No property has been defined nor added to the node. There should be
        // no property and adding a child should return null.
        Preferences pref0 = Preferences.userRoot();
        try
        {
            String[] propertyKeys = pref0.keys();
            if (propertyKeys.length > 0)
            {
                assertTrue("expected no children, " + propertyKeys.length + ", " + propertyKeys[0],
                        propertyKeys.length == 0);
            }
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.