Package java.util.prefs

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


        continue;
      }

      final long authTime = authNode.getLong(VERSION_KEY, 0);
      final DataHolder<T> data = new DataHolder<T>(create(url, authTime));
      final String[] options = authNode.keys();
      for (int j = 0; j < options.length; j++)
      {
        final String option = options[j];
        if (option.startsWith("#"))
        {
View Full Code Here


            String newPassword = admin.generatePassword();

            String urlGUID = makeGUID(userName, newPassword);

            Preferences pref = user.getUserAttributes();
            String[] keys = pref.keys();
            Map userAttributes = new HashMap();
            if (keys != null)
            {
                for (int ix = 0; ix < keys.length; ix++)
                {
View Full Code Here

        Principal userPrincipal = createPrincipal(user.getSubject(), UserPrincipal.class);            
        this.principal = userPrincipal.getName();
        try
        {
            Preferences userAttributes = user.getUserAttributes();
            String[] keys = userAttributes.keys();
            for (int ix = 0; ix < keys.length; ix++)
            {
                attributes.put(keys[ix], userAttributes.get(keys[ix], null));
            }
        }
View Full Code Here

                // Loading the userinfo
                User user = userManager.getUser(principal.getName());
                if(user != null)
                {
                  Preferences prefs = user.getUserAttributes();
                  String[] prefKeys = prefs.keys();
                  Map prefsSet = new HashMap();
                  for(int i = 0; i<prefKeys.length; i++)
                  {
                    prefsSet.put(prefKeys[i], prefs.get(prefKeys[i], "No value"));                   
                  }
View Full Code Here

                        {
                            Preferences userInfoPrefs = userPrefs.node(userInfoPropertySet);
                            String[] propertyKeys = null;
                            try
                            {
                                propertyKeys = userInfoPrefs.keys();
                                if ((null != propertyKeys) && log.isDebugEnabled())
                                {
                                    log.debug("Found " + propertyKeys.length + " children for " + userInfoPrefs.absolutePath());
                                }
                            }
View Full Code Here

    {
        try
        {
            Preferences descNode = prefNode.node("description");
          
            String[] keys = descNode.keys();
            ArrayList descs = new ArrayList(keys.length);
            for(int i=0; i < keys.length; i++)
            {
                PreferenceDescriptionImpl desc = new PreferenceDescriptionImpl();
                String localeKey = keys[i];
View Full Code Here

        // No property has been defined nor added to the node. This should return
        // the property value
        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

        assertTrue("expected prop1 == true, " + prop1, prop1.equals("true"));

        // There should be 1 property under pref1.
        try
        {
            String[] propertyKeys = pref1.keys();
            assertEquals("expected 1 child, ", 1, propertyKeys.length);
        }
        catch (BackingStoreException bse)
        {
            assertTrue("backing store exception: " + bse, false);
View Full Code Here

        Principal userPrincipal = createPrincipal(user.getSubject(), UserPrincipal.class);            
        this.principal = userPrincipal.getName();
        try
        {
            Preferences userAttributes = user.getUserAttributes();
            String[] keys = userAttributes.keys();
            for (int ix = 0; ix < keys.length; ix++)
            {
                attributes.put(keys[ix], userAttributes.get(keys[ix], null));
            }
        }
View Full Code Here

            String newPassword = admin.generatePassword();

            String urlGUID = makeGUID(userName, newPassword);

            Preferences pref = user.getUserAttributes();
            String[] keys = pref.keys();
            Map userAttributes = new HashMap();
            if (keys != null)
            {
                for (int ix = 0; ix < keys.length; ix++)
                {
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.