Package org.apache.pluto.container.om.portlet

Examples of org.apache.pluto.container.om.portlet.Preferences


            pi.setShortTitle(src.portletInfo.shortTitle);
            pi.setKeywords(src.portletInfo.keywords);
        }
        if (src.portletPreferences != null)
        {
            Preferences prefs = target.getPortletPreferences();
            prefs.setPreferencesValidator(src.portletPreferences.preferencesValidator);
            if (src.portletPreferences.preference != null)
            {
                for (PreferenceType p : src.portletPreferences.preference)
                {
                    Preference pref = prefs.addPreference(p.name);
                    if (p.value != null)
                    {
                        for (String value : p.value)
                        {
                            pref.addValue(value);
View Full Code Here


            pi.setShortTitle(src.portletInfo.shortTitle);
            pi.setKeywords(src.portletInfo.keywords);
        }
        if (src.portletPreferences != null)
        {
            Preferences prefs = target.getPortletPreferences();
            prefs.setPreferencesValidator(src.portletPreferences.preferencesValidator);
            if (src.portletPreferences.preference != null)
            {
                for (PreferenceType p : src.portletPreferences.preference)
                {
                    Preference pref = prefs.addPreference(p.name);
                    if (p.value != null)
                    {
                        for (String value : p.value)
                        {
                            pref.addValue(value);
View Full Code Here

    public Map<String,PortletPreference> getDefaultPreferences( PortletWindow portletWindow,
                                                              PortletRequest request )
      throws PortletContainerException {
        Map<String,PortletPreference> preferences = null;
        PortletDefinition portlet = portletWindow.getPortletDefinition();
        Preferences prefs = portlet.getPortletPreferences();
        if (prefs != null && prefs.getPortletPreferences() != null) {
            preferences = new HashMap<String,PortletPreference>(prefs.getPortletPreferences().size());
            for (Preference pref : prefs.getPortletPreferences()) {
                String[] values = null;
                if (pref.getValues() != null && pref.getValues().size() > 0) {
                    values = pref.getValues().toArray(new String[pref.getValues().size()]);
                }
                preferences.put(pref.getName(), new PortletPreferenceImpl(pref.getName(), values, pref.isReadOnly()));
View Full Code Here

        if (validator != null) {
            return validator;
        }

        // Try to construct the validator instance for the portlet definition.
        Preferences portletPreferencesDD = portletDD.getPortletPreferences();
       
        if (portletPreferencesDD != null) {
            String className = portletPreferencesDD.getPreferencesValidator();
            if (className != null) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Creating preferences validator: " + className);
                }
                ClassLoader loader = Thread.currentThread().getContextClassLoader();
View Full Code Here

        final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
       
        //Add descriptor prefs to base Map
        final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
        final PortletDefinition portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinitionId);
        final Preferences descriptorPreferences = portletDescriptor.getPortletPreferences();
        for (final Preference preference : descriptorPreferences.getPortletPreferences()) {
            final IPortletPreference preferenceWrapper = new PortletPreferenceImpl(preference);
            basePortletPreferences.put(preferenceWrapper.getName(), preferenceWrapper);
        }

        //Add definition prefs to base Map
View Full Code Here

        final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
       
        //Add descriptor prefs to base Map
        final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
        final PortletDefinition portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinitionId);
        final Preferences descriptorPreferences = portletDescriptor.getPortletPreferences();
        for (final Preference preference : descriptorPreferences.getPortletPreferences()) {
            final IPortletPreference preferenceWrapper = new PortletPreferenceImpl(preference);
            basePortletPreferences.put(preferenceWrapper.getName(), preferenceWrapper);
        }

        //Add definition prefs to base Map
View Full Code Here

    @Override
    protected void loadBasePortletPreferences(IPortletDefinition portletDefinition, Map<String, IPortletPreference> basePortletPreferences) {
        //Add descriptor prefs to base Map
        final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
        final PortletDefinition portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinitionId);
        final Preferences descriptorPreferences = portletDescriptor.getPortletPreferences();
        for (final Preference preference : descriptorPreferences.getPortletPreferences()) {
            final IPortletPreference preferenceWrapper = new PortletPreferenceImpl(preference);
            basePortletPreferences.put(preferenceWrapper.getName(), preferenceWrapper);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.container.om.portlet.Preferences

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.