Package org.apache.jetspeed.om.portlet

Examples of org.apache.jetspeed.om.portlet.Preference


        initParam.addDescription(lang).setDescription("This is a test portlet parameter");

        addDublinCore(portlet.getMetadata());

        Preferences prefs = portlet.getPortletPreferences();
        Preference pref = prefs.addPreference("preference 1");
        pref.addValue("value 1");
        pref.addValue("value 2");
       
        Language language = portlet.addLanguage(Locale.getDefault());
        language.setTitle("Portlet 1");
        language.setShortTitle("Portlet 1");
View Full Code Here


        Map<String, PortletPreference> prefMap = PortletDefinitionImpl.portletPreferencesProvider.retrieveDefaultPreferences(this);       
        Preferences preferences = new PreferencesImpl();
        List<Preference> list = preferences.getPortletPreferences();
        for (PortletPreference pref : prefMap.values())
        {
            Preference p = preferences.addPreference(pref.getName());
            p.setReadOnly(pref.isReadOnly());
            for (String s : pref.getValues())
            {
                p.addValue(s);
            }
        }
        return preferences;
    }
View Full Code Here

        {
            throw new FailedToStorePortletDefinitionException(e);
        }
        for (Preference pref : source.getPortletPreferences().getPortletPreferences())
        {
            Preference copyPref = copy.addDescriptorPreference(pref.getName());
            copyPref.setReadOnly(pref.isReadOnly());
           
            for (String value : pref.getValues())
            {
                copyPref.addValue(value);
            }           
        }
        try
        {
            preferenceService.storeDefaults(copy);
View Full Code Here

        initParam.addDescription(lang).setDescription("This is a test portlet parameter");

        addDublinCore(portlet.getMetadata());

        Preferences prefs = portlet.getPortletPreferences();
        Preference pref = prefs.addPreference("preference 1");
        pref.addValue("value 1");
        pref.addValue("value 2");
       
        Language language = portlet.addLanguage(Locale.getDefault());
        language.setTitle("Portlet 1");
        language.setShortTitle("Portlet 1");
       
View Full Code Here

        jpd.setPortletClass(pd.getPortletClass());
        jpd.setResourceBundle(pd.getResourceBundle());
        jpd.setPreferenceValidatorClassname(pd.getPortletPreferences().getPreferencesValidator());
        for (org.apache.pluto.container.om.portlet.Preference preference : pd.getPortletPreferences().getPortletPreferences())
        {
            Preference jpref = jpd.getDescriptorPreferences().addPreference(preference.getName());
            jpref.setReadOnly(preference.isReadOnly());
            for (String value : preference.getValues())
            {
                jpref.addValue(value);
            }
           
        }       
        for (org.apache.pluto.container.om.portlet.ContainerRuntimeOption cro : pd.getContainerRuntimeOptions())
        {
View Full Code Here

        Map<String, PortletPreference> prefMap = PortletDefinitionImpl.portletPreferencesProvider.retrieveDefaultPreferences(this);       
        Preferences preferences = new PreferencesImpl();
        List<Preference> list = preferences.getPortletPreferences();
        for (PortletPreference pref : prefMap.values())
        {
            Preference p = preferences.addPreference(pref.getName());
            p.setReadOnly(pref.isReadOnly());
            String [] values = pref.getValues();
            if (values != null)
            {
                for (String s : values)
                {
                    p.addValue(s);
                }
            }
        }
        return preferences;
    }
View Full Code Here

        initParam.addDescription(lang).setDescription("This is a test portlet parameter");

        addDublinCore(portlet.getMetadata());

        Preferences prefs = portlet.getPortletPreferences();
        Preference pref = prefs.addPreference("preference 1");
        pref.addValue("value 1");
        pref.addValue("value 2");
       
        Language language = portlet.addLanguage(Locale.getDefault());
        language.setTitle(title);
        language.setShortTitle(title);
View Full Code Here

        {
            throw new FailedToStorePortletDefinitionException(e);
        }
        for (Preference pref : source.getPortletPreferences().getPortletPreferences())
        {
            Preference copyPref = copy.addDescriptorPreference(pref.getName());
            copyPref.setReadOnly(pref.isReadOnly());

            for (String value : pref.getValues())
            {
                copyPref.addValue(value);
            }
        }
        try
        {
            preferenceService.storeDefaults(copy, (Preferences)null);
View Full Code Here

        InitParam initParam = portlet.addInitParam("testparam");
        initParam.setParamValue("test value");
        initParam.addDescription(lang).setDescription("This is a test portlet parameter");

        Preferences prefs = portlet.getPortletPreferences();
        Preference pref = prefs.addPreference("preference 1");
        pref.addValue("value 1");
        pref.addValue("value 2");

        Language language = portlet.addLanguage(Locale.getDefault());
        language.setTitle("Portlet 1");
        language.setShortTitle("Portlet 1");
View Full Code Here

        jpd.setPortletClass(pd.getPortletClass());
        jpd.setResourceBundle(pd.getResourceBundle());
        jpd.setPreferenceValidatorClassname(pd.getPortletPreferences().getPreferencesValidator());
        for (org.apache.pluto.container.om.portlet.Preference preference : pd.getPortletPreferences().getPortletPreferences())
        {
            Preference jpref = jpd.getDescriptorPreferences().addPreference(preference.getName());
            jpref.setReadOnly(preference.isReadOnly());
            for (String value : preference.getValues())
            {
                jpref.addValue(value);
            }
           
        }       
        for (org.apache.pluto.container.om.portlet.ContainerRuntimeOption cro : pd.getContainerRuntimeOptions())
        {
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.portlet.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.