Package java.util.prefs

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


        // now that all the arguments were processed, let's load in our config (this allows the -p to come after -c)
        if (clean_config) {
            Preferences prefsNode = getPreferencesNode();
            if (clean_token) {
                prefsNode.removeNode();
            } else {
                // remove everything EXCEPT the security token
                String[] prefKeys = prefsNode.keys();
                if (prefKeys != null && prefKeys.length > 0) {
                    for (String prefKey : prefKeys) {
View Full Code Here


   public static final void cleanAgent()
   throws Exception
   {
      Preferences node = getNode( "rhq-agent" );
      node.removeNode();
      node.flush();
   }

   public static final void cleanServer()
   throws Exception
View Full Code Here

   public static final void cleanServer()
   throws Exception
   {
      Preferences node = getNode( "rhq-server" );
      node.removeNode();
      node.flush();
   }

   public static final Preferences getNode( String name )
   {
View Full Code Here

  private void removeNode(Preferences prefs, String property) {
    if (prefs != null) {
      try {
        if (prefs.nodeExists(property)) {
          Preferences node = prefs.node(property);
          node.removeNode();
        }
      } catch (BackingStoreException e) {
        //
      }
    }
View Full Code Here

    if ((getPreferences(wikipedia) != null) && (property != null) && (id != null)) {
      Preferences globalNode = getPreferences(wikipedia).node(property);
      try {
        if (globalNode.nodeExists(id)) {
          Preferences node = globalNode.node(id);
          node.removeNode();
        }
      } catch (BackingStoreException e) {
        //
      }
    }
View Full Code Here

        {
            if(Preferences.systemRoot().nodeExists(appNodePath))
            {                  
                Preferences node = Preferences.systemRoot().node(appNodePath);
               // log.info("Removing Application preference node "+node.absolutePath());
                node.removeNode();
            }
        }
        catch (BackingStoreException e)
        {
           throw new RegistryException(e.toString(), e);
View Full Code Here

            log.error(msg, se);

            // Remove the preferences node.
            try
            {
                preferences.removeNode();
            }
            catch (BackingStoreException bse)
            {
                bse.printStackTrace();
            }
View Full Code Here

            }
            // Remove preferences
            Preferences rolePref = Preferences.userRoot().node((String) roles[i]);
            try
            {
                rolePref.removeNode();
            }
            catch (BackingStoreException bse)
            {
                KeyedMessage msg =
                    SecurityException.UNEXPECTED.create("RoleManager.removeRole",
View Full Code Here

            log.error(se.getMessage(), se);

            // Remove the preferences node.
            try
            {
                preferences.removeNode();
            } catch (BackingStoreException bse)
            {
                bse.printStackTrace();
            }
            throw se;
View Full Code Here

        atnProviderProxy.removeUserPrincipal(userPrincipal);
        // Remove preferences
        Preferences preferences = Preferences.userRoot().node(fullPath);
        try
        {
            preferences.removeNode();
        } catch (BackingStoreException bse)
        {
            bse.printStackTrace();
        }
    }
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.