Package org.apache.pluto.om.common

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


    /* (non-Javadoc)
     * @see org.apache.pluto.om.common.PreferenceSet#get(java.lang.String)
     */
    public Preference get(String name) {
        for (Iterator it = preferences.iterator(); it.hasNext();) {
            Preference pref = (Preference) it.next();
            if (pref.getName().equals(name)) {
                return pref;
            }
        }
        return null;
    }
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

     */
    static public HashMap createPreferenceMap(Collection preferences) {
        HashMap returnValue = new HashMap();
        Iterator iterator = preferences.iterator();
        while (iterator.hasNext()) {
            Preference preference = (Preference)iterator.next();           
            returnValue.put(preference.getName(), preference.getValues());
        }
        return returnValue;
    }
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.