Examples of VWComponent


Examples of org.netbeans.server.uihandler.statistics.VWComponents.VWComponent

   
    /*
     */
    protected Map<VWComponent, Integer> process(LogRecord rec) {
        if ("COMPONENT_NAME".equals(rec.getMessage())) {
            VWComponent comp = new VWComponent(getStringParam(rec, 1, UNKNOWN),
                    getStringParam(rec, 0, UNKNOWN));
            return Collections.singletonMap(comp, ONE);
        }
        else {
            return newData();
View Full Code Here

Examples of org.netbeans.server.uihandler.statistics.VWComponents.VWComponent

    protected Map<VWComponent, Integer> read(Preferences pref) throws BackingStoreException {
        Map<VWComponent, Integer> result = new TreeMap<VWComponent, Integer> ();
        for (String n : pref.keys()) {
            Integer value = pref.getInt(n, ZERO);
            result.put(new VWComponent(n), value);
        }
        return result;
    }
View Full Code Here

Examples of org.netbeans.server.uihandler.statistics.VWComponents.VWComponent

            fail("Right class Map: " + o);
        }
        Map<VWComponent, Integer> m = (Map<VWComponent, Integer>) o;
        assertEquals("6 components: " + m, 6, m.size());

        assertEquals(m.get(new VWComponent("com.sun.webui.jsf.component.Button:Button")), new Integer(2));
        assertEquals(m.get(new VWComponent("com.sun.webui.jsf.component.Label:Label")), new Integer(3));
        assertEquals(m.get(new VWComponent("com.sun.webui.jsf.component.Table:Table")), new Integer(3));
        assertEquals(m.get(new VWComponent("com.sun.webui.jsf.component.TextField:Text Field")), new Integer(1));
        assertEquals(m.get(new VWComponent("javax.faces.component.html.HtmlInputText:Text Field")), new Integer(1));
        assertEquals(m.get(new VWComponent("javax.faces.component.html.HtmlOutputLabel:Component Label")), new Integer(1));
    }
View Full Code Here

Examples of org.netbeans.server.uihandler.statistics.VWComponents.VWComponent

    }

    public void testWrite() throws BackingStoreException {
        VWComponents statistic = new VWComponents();
        Map<VWComponent, Integer> map = new TreeMap<VWComponent, Integer>();
        map.put(new VWComponent("com.sun.data.provider.impl.BasicTransactionalTableDataProvider", "Basic Transactional Table Data Provider"), 10);
        Preferences pref = new DatabaseTestCase.TestPreferences();
        statistic.write(pref, map);
        String[] keys = pref.keys();
        assertEquals("just one item", 1, keys.length);
        assertEquals("saved value", "10", pref.get(keys[0], "0"));
View Full Code Here

Examples of org.netbeans.server.uihandler.statistics.VWComponents.VWComponent

    }

    public void testWrite2() throws BackingStoreException {
        VWComponents statistic = new VWComponents();
        Map<VWComponent, Integer> map = new TreeMap<VWComponent, Integer>();
        map.put(new VWComponent("BasicTransactionalTableDataProviderBasicTransactionalTableDataProviderBasicTransactionalTableDataProvider", "Basic Transactional Table Data Provider"), 10);
        Preferences pref = new DatabaseTestCase.TestPreferences();
        statistic.write(pref, map);
        String[] keys = pref.keys();
        assertEquals("just one item", 1, keys.length);
        assertEquals("saved value", "10", pref.get(keys[0], "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.