Package java.util.prefs

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


        // Absolute path.
        // 1. The node does not exist. Create it.
        Preferences prefs0 = Preferences.userRoot().node("/an1/san1");
        assertNotNull("should not be null", prefs0);
        assertTrue("expected node == /an1/san1, " + prefs0.absolutePath(), prefs0.absolutePath().equals("/an1/san1"));

        // 2. If node exists. Get it.
        Preferences prefs1 = Preferences.userRoot().node("/an1/san1");
        assertNotNull("should not be null", prefs1);
        assertTrue("expected node == /an1/san1, " + prefs1.absolutePath(), prefs1.absolutePath().equals("/an1/san1"));
View Full Code Here


        // Absolute path.
        // 1. The node does not exist. Create it.
        Preferences prefs0 = Preferences.userRoot().node("/an1/san1");
        assertNotNull("should not be null", prefs0);
        assertTrue("expected node == /an1/san1, " + prefs0.absolutePath(), prefs0.absolutePath().equals("/an1/san1"));

        // 2. If node exists. Get it.
        Preferences prefs1 = Preferences.userRoot().node("/an1/san1");
        assertNotNull("should not be null", prefs1);
        assertTrue("expected node == /an1/san1, " + prefs1.absolutePath(), prefs1.absolutePath().equals("/an1/san1"));
View Full Code Here

        assertTrue("expected node == /an1/san1, " + prefs0.absolutePath(), prefs0.absolutePath().equals("/an1/san1"));

        // 2. If node exists. Get it.
        Preferences prefs1 = Preferences.userRoot().node("/an1/san1");
        assertNotNull("should not be null", prefs1);
        assertTrue("expected node == /an1/san1, " + prefs1.absolutePath(), prefs1.absolutePath().equals("/an1/san1"));

        //Relative path.
        Preferences prefs3 = Preferences.userRoot().node("/an1");
        Preferences prefs4 = prefs3.node("rn1/srn1");
        assertNotNull("should not be null", prefs4);
View Full Code Here

        assertTrue("expected node == /an1/san1, " + prefs0.absolutePath(), prefs0.absolutePath().equals("/an1/san1"));

        // 2. If node exists. Get it.
        Preferences prefs1 = Preferences.userRoot().node("/an1/san1");
        assertNotNull("should not be null", prefs1);
        assertTrue("expected node == /an1/san1, " + prefs1.absolutePath(), prefs1.absolutePath().equals("/an1/san1"));

        //Relative path.
        Preferences prefs3 = Preferences.userRoot().node("/an1");
        Preferences prefs4 = prefs3.node("rn1/srn1");
        assertNotNull("should not be null", prefs4);
View Full Code Here

        //Relative path.
        Preferences prefs3 = Preferences.userRoot().node("/an1");
        Preferences prefs4 = prefs3.node("rn1/srn1");
        assertNotNull("should not be null", prefs4);
        assertTrue("expected node == /an1/rn1/srn1, " + prefs4.absolutePath(), prefs4.absolutePath().equals(
                "/an1/rn1/srn1"));

        try
        {
            String[] childrenNames = prefs3.childrenNames();
View Full Code Here

        //Relative path.
        Preferences prefs3 = Preferences.userRoot().node("/an1");
        Preferences prefs4 = prefs3.node("rn1/srn1");
        assertNotNull("should not be null", prefs4);
        assertTrue("expected node == /an1/rn1/srn1, " + prefs4.absolutePath(), prefs4.absolutePath().equals(
                "/an1/rn1/srn1"));

        try
        {
            String[] childrenNames = prefs3.childrenNames();
View Full Code Here

        {
            log.debug("Added user preferences node: " + fullPath);
        }
        try
        {
            if ((null != preferences) && preferences.absolutePath().equals(fullPath))
            {
                // Add user principal.
                atnProviderProxy.addUserPrincipal(userPrincipal);
                if ( password != null )
                {
View Full Code Here

        assertEquals("expected group principal full path == testgetgroup", "testgetgroup", groupPrincipal.getName());

        // Test the Group Preferences.
        Preferences preferences = group.getPreferences();
        assertEquals("expected group node == /group/testgetgroup", SecurityHelper
                .getPreferencesFullPath(groupPrincipal), preferences.absolutePath());

        // Cleanup test.
        try
        {
            gms.removeGroup("testgetgroup");
View Full Code Here

        {
            String[] names = prefs.childrenNames();
            for (int i = 0; i < names.length; i++)
            {
                Preferences childPrefs = prefs.node(names[i]);
                DefaultMutableTreeNode child = new DefaultMutableTreeNode(new RoleTreeItem(childPrefs.absolutePath(), names[i]));
                parent.insert(child);
                processPreferences(childPrefs, child);
            }
        }
        catch (BackingStoreException bse)
View Full Code Here

                                null));
                }
                else
                {
                    Preferences prefs = Preferences.userRoot().node(selectedRoles[0]);
                    roleActionForm.setRolePath(prefs.absolutePath());
                    roleActionForm.setRoleName(prefs.name());
                   
                    PanelTabStateListener panelTabState = (PanelTabStateListener) vr.resolveVariable(facesContext,
                            PanelTabStateListener.PANEL_TAB_STATE);
                    panelTabState.renderEditRole();
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.