Examples of removeNode()


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

                .publicChildSpi("child2"));

        Preferences grandchild = pref.node("child/grandchild");
        assertSame(grandchild, child.childSpi("grandchild"));
        assertSame(grandchild, child.cachedChildrenImpl()[0]);
        grandchild.removeNode();
        assertNotSame(grandchild, pref.node("child/grandchild"));

        grandchild = pref.node("child3/grandchild");
        AbstractPreferences[] childs = ((MockAbstractPreferences) pref)
        .cachedChildrenImpl();
View Full Code Here

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

        assertFalse(pref.nodeExists("child"));
        Preferences grandchild = pref.node("child/grandchild");
        assertTrue(pref.nodeExists("child"));
        assertTrue(pref.nodeExists("child/grandchild"));
        grandchild.removeNode();
        assertTrue(pref.nodeExists("child"));
        assertFalse(pref.nodeExists("child/grandchild"));
        assertFalse(grandchild.nodeExists(""));

        assertFalse(pref.nodeExists("child2/grandchild"));
View Full Code Here

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

            Preferences.importPreferences(in);
            prefs = Preferences.userNodeForPackage(PreferencesTest.class);
        } finally {
            try {
                prefs = Preferences.userRoot().node("tests");
                prefs.removeNode();
            } catch (Exception e) {
                // Ignored
            }
        }
    }
View Full Code Here

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

        assertEquals("System Preference Node: " + p.absolutePath(), p
                .toString());

        assertEquals(0, p.childrenNames().length);
        assertEquals(0, p.keys().length);
        parent.removeNode();
        try {
            Preferences.userNodeForPackage(null);
            fail("should throw NullPointerException");
        } catch (NullPointerException e) {
            // Expected
View Full Code Here

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

      }
      final Preferences authNode = storageBackend.node(name);
      final String url = authNode.get(URL_KEY, null);
      if (url == null)
      {
        authNode.removeNode();
        continue;
      }

      final long authTime = authNode.getLong(VERSION_KEY, 0);
      final DataHolder<T> data = new DataHolder<T>(create(url, authTime));
View Full Code Here

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

    this.harness.check(two, "A valid key, on an invalid subnode");
   
    try
      {
        _prefs.flush();
        _prefs.removeNode();
      }
    catch (BackingStoreException e)
      {
        print(e.getLocalizedMessage());
        this.harness.fail("call to testSpecialCharacters() fail to removeNode");
View Full Code Here

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

        final String name = childNodeNames[i];
        final Preferences p = userPreferences.node(name);
        final String type = p.get("type", null);
        if (type == null)
        {
          p.removeNode();
        }
        else if (type.equals("local"))
        {
          final Properties props = new Properties();
          if (p.nodeExists("properties"))
View Full Code Here

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

    try
    {
      final Preferences node = userPreferences.node(name);
      if (node != null)
      {
        node.removeNode();
        userPreferences.flush();
      }
    }
    catch (BackingStoreException e)
    {
View Full Code Here

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

  public void remove( int index )
  throws BackingStoreException
  {
    if( (index < 0) || (index >= collData.size()) ) throw new ArrayIndexOutOfBoundsException();
    final Preferences node = prefs.node( String.valueOf( collData.size() - 1 ));
    node.removeNode();
    collData.remove( index );
    for( int i = index; i < collData.size(); i++ ) {
      dataToNode( i );
    }
  }
View Full Code Here

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

        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();
        }
    }

    /**
     * clears individual preference node
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.