Package org.apache.jetspeed.serializer.objects

Examples of org.apache.jetspeed.serializer.objects.JSEntityPreferences


        }
    }

    private void importEntityPref(PortletDefinition pd, JSEntity entity, Map settings, Logger log)
    {
        JSEntityPreferences preferences = entity.getEntityPreferences();
        if ((preferences == null) || (preferences.size() == 0))
            return;
        try
        {
            Iterator it = preferences.iterator();
            while (it.hasNext())
            {
                Map<String, PortletPreference> portletPreference = new HashMap<String, PortletPreference>();
                JSEntityPreference preference = (JSEntityPreference) it.next();
                String userName = preference.getPrincapalName();
View Full Code Here


    JSEntity exportEntityPref(PortletDefinition definition, String windowId, Map settings, Logger log)
    {
        JSEntity jsEntity = null;
        jsEntity = new JSEntity();
        jsEntity.setId(windowId);
        JSEntityPreferences entityPreferences = new JSEntityPreferences();
        Set<String> userNames = prefsProvider.getUserNames(definition, windowId);
        for (String userName : userNames)
        {
            Map<String, PortletPreference> userPreferences = prefsProvider.getUserPreferences(definition, windowId, userName);
            JSEntityPreference userPreference = new JSEntityPreference();
            userPreference.setPrincapalName(userName);
            Iterator<String> preferences = userPreferences.keySet().iterator();
            JSNVPElements v = new JSNVPElements("preference");
            while (preferences.hasNext())
            {
                String pKey = preferences.next();
                PortletPreference portletPreference = userPreferences.get(pKey);
                JSNVPElement element = new JSNVPElement();
                element.setKey(pKey);
                element.setValues(portletPreference.getValues());
                element.setReadOnly(portletPreference.isReadOnly());
                v.add(element);
            }
            if (v.size() > 0)
            {
                userPreference.setPreferences(v);
                entityPreferences.add(userPreference);
            }
            if (!entityPreferences.isEmpty())
            {
                log.debug("processed preferences for entity=" + windowId);
                jsEntity.setEntityPreferences(entityPreferences);
            }
        }
View Full Code Here

        }
    }

    private void importEntityPref(JSApplication app, JSPortlet portlet, JSEntity entity, PortletDefinition pd, Map settings, Logger log)
    {
        JSEntityPreferences preferences = entity.getEntityPreferences();
        if ((preferences == null) || (preferences.size() == 0))
            return;

        try
        {
            Iterator it = preferences.iterator();
            while (it.hasNext())
            {
                Map<String, PortletPreference> portletPreference = new HashMap<String, PortletPreference>();
                Object preference = it.next();
                String userName = null;
View Full Code Here

    JSEntity exportEntityPref(PortletDefinition definition, String windowId, Map settings, Logger log)
    {
        JSEntity jsEntity = null;
        jsEntity = new JSEntity();
        jsEntity.setId(windowId);
        JSEntityPreferences entityPreferences = new JSEntityPreferences();
        Set<String> userNames = prefsProvider.getUserNames(definition, windowId);
        for (String userName : userNames)
        {
            Map<String, PortletPreference> userPreferences = prefsProvider.getUserPreferences(definition, windowId, userName);
            JSEntityPreference userPreference = new JSEntityPreference();
            userPreference.setPrincapalName(userName);
            Iterator<String> preferences = userPreferences.keySet().iterator();
            JSNVPElements v = new JSNVPElements("preference");
            while (preferences.hasNext())
            {
                String pKey = preferences.next();
                PortletPreference portletPreference = userPreferences.get(pKey);
                JSNVPElement element = new JSNVPElement();
                element.setKey(pKey);
                element.setValues(portletPreference.getValues());
                element.setReadOnly(portletPreference.isReadOnly());
                v.add(element);
            }
            if (v.size() > 0)
            {
                userPreference.setPreferences(v);
                entityPreferences.add(userPreference);
            }
            if (!entityPreferences.isEmpty())
            {
                log.debug("processed preferences for entity=" + windowId);
                jsEntity.setEntityPreferences(entityPreferences);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.serializer.objects.JSEntityPreferences

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.