Package org.apache.pluto.om.common

Examples of org.apache.pluto.om.common.Preference


       
        entity.store();
       
        assertNotNull(entity);
       
        Preference pref = entity.getPreferenceSet().get("pref1");
       
        assertNotNull(pref);
       
        //test entity removal via undeploy
        File demoWar = new File(deploySrc, "demo.war");
View Full Code Here


        assertNotNull(pd);

        assertNotNull(pd.getPreferenceSet());

        Preference pref1 = pd.getPreferenceSet().get("pref1");

        assertNotNull(pref1);

        Iterator itr = pref1.getValues();
        int count = 0;
        while (itr.hasNext())
        {
            count++;
            System.out.println("Value " + count + "=" + itr.next());
View Full Code Here

            HttpServletRequest request)
    {
        Locale locale = request.getLocale();
        String titleKey = createTitleKey(locale, false);

        Preference titlePref = window.getPortletEntity().getPreferenceSet()
                .get(titleKey);
        if (titlePref == null)
        {
            titleKey = createTitleKey(locale, true);
            titlePref = window.getPortletEntity().getPreferenceSet().get(
                    titleKey);
        }

        if (titlePref != null)
        {
            Iterator values = titlePref.getValues();
            if (values.hasNext())
            {
                return (String) titlePref.getValues().next();
            }
        }

        return null;
    }
View Full Code Here

    public Preference get(String name)
    {
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            Preference preference = (Preference)iterator.next();
            if (preference.getName().equals(name)) {
                return preference;
            }
        }
        return null;
    }
View Full Code Here

    public Preference remove(String name)
    {
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            Preference preference = (Preference)iterator.next();
            if (preference.getName().equals(name)) {
                super.remove(preference);
                return preference;
            }
        }
        return null;
View Full Code Here

     */
    public Preference get( String key )
    {
        try
        {
            Preference pref = null;
            if (prefsRootNode.nodeExists(key))
            {
                pref = new PrefsPreference(prefsRootNode.node(key), key);
            }
            else if(defaults != null)
View Full Code Here

        {
            this.prefs = new HashMap(fragment.getPreferences().size());
            Iterator itr = fragment.getPreferences().iterator();       
            while(itr.hasNext())
            {
                Preference pref = (Preference) itr.next();
                prefs.put(pref.getName(), pref);
            }
        }
        else
        {
            this.prefs = new HashMap();
        }
       
        Iterator iterator = preferenceSet.iterator();
        while(iterator.hasNext())
        {
            Preference pref = (Preference) iterator.next();
            prefs.put(pref.getName(), pref);
        }       
    }
View Full Code Here

        }       
    }

    public Preference add(String arg0, List arg1)
    {       
        Preference pref = preferenceSet.add(arg0, arg1);
        prefs.put(arg0, pref);
        return pref;
    }
View Full Code Here

        preferenceSet.remove(pref);
    }

    public Preference remove(String name)
    {
        Preference pref = (Preference) prefs.remove(name);
        preferenceSet.remove(name);
        return pref;
    }
View Full Code Here

        assertNotNull(pd);

        assertNotNull(pd.getPreferenceSet());

        Preference pref1 = pd.getPreferenceSet().get("pref1");

        assertNotNull(pref1);

        Iterator itr = pref1.getValues();
        int count = 0;
        while (itr.hasNext())
        {
            count++;
            System.out.println("Value " + count + "=" + itr.next());
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.common.Preference

Copyright © 2018 www.massapicom. 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.