Package org.apache.pluto.om.common

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


    }

    public void removePortletEntity( PortletEntity portletEntity ) throws PortletEntityNotDeletedException
    {
        PreferenceSet prefsSet  = portletEntity.getPreferenceSet();
        getPersistenceBrokerTemplate().delete(portletEntity);
       
        if(prefsSet instanceof PrefsPreferenceSetImpl)
        {
            try
View Full Code Here


        {
            throw new IllegalStateException("You must call PortletEntityImpl.setPorteltEntityDao() before "
                    + "invoking PortletEntityImpl.store().");
        }

        PreferenceSet preferenceSet = (PreferenceSet)perPrincipalPrefs.get(principal);
        pac.storePreferenceSet(preferenceSet, this);
        dirty = false;
        if (preferenceSet != null)
        {
            backupValues(preferenceSet);
View Full Code Here

        {
            throw new IllegalStateException("You must set pageManager before "
                    + "invoking PortletEntityImpl.store().");
        }
       
        PreferenceSet preferenceSet = this.pagePreferenceSet;
        List preferences = new ArrayList();
       
        for (Iterator it = preferenceSet.iterator(); it.hasNext(); )
        {
            Preference pref = (Preference) it.next();
           
            FragmentPreference preference = pm.newFragmentPreference();
            preference.setName(pref.getName());
View Full Code Here

    }

    public void removePortletEntity( PortletEntity portletEntity ) throws PortletEntityNotDeletedException
    {
        PreferenceSet prefsSet  = portletEntity.getPreferenceSet();
        getPersistenceBrokerTemplate().delete(portletEntity);
       
        if(prefsSet instanceof PrefsPreferenceSetImpl)
        {
            try
View Full Code Here

        {
            throw new IllegalStateException("You must call PortletEntityImpl.setPorteltEntityDao() before "
                    + "invoking PortletEntityImpl.store().");
        }

        PreferenceSet preferenceSet = (PreferenceSet)perPrincipalPrefs.get(principal);
        pac.storePreferenceSet(preferenceSet, this);
        dirty = false;
    }
View Full Code Here

        {
            throw new IllegalStateException("You must set pageManager before "
                    + "invoking PortletEntityImpl.store().");
        }
       
        PreferenceSet preferenceSet = this.pagePreferenceSet;
        List preferences = new ArrayList();
       
        for (Iterator it = preferenceSet.iterator(); it.hasNext(); )
        {
            Preference pref = (Preference) it.next();
           
            FragmentPreference preference = pm.newFragmentPreference();
            preference.setName(pref.getName());
View Full Code Here

        {
            validator.validate(this);
        }

        // transfer changes to the top preference set
        PreferenceSet preferences = (PreferenceSet)preferenceSetList.get(0);
        PreferenceSetCtrl preferencesCtrl = (PreferenceSetCtrl)ControllerObjectAccess.get(preferences);

        // modified preferences
        Iterator iter = changedPreferences.keySet().iterator();
        while (iter.hasNext())
        {
            String key = (String) iter.next();
            String[] values = (String[])changedPreferences.get(key);

            // null values are allowed
            List newValues = null;
            if (values != null)
            {
                // convert values from string[] to collection
                newValues = new ArrayList(values.length);
                for (int i=0;i<values.length;i++)
                    newValues.add(values[i]);
            }

            // transfer changings
            Preference preference = preferences.get(key);
            if (preference != null)
            {
                // change preference
                PreferenceCtrl preferenceCtrl = (PreferenceCtrl)ControllerObjectAccess.get(preference);
                preferenceCtrl.setValues(newValues);
View Full Code Here

          PortletEntityImpl pe = new PortletEntityImpl();
          pe.setId(pd.getName());

          // Copy preferences
          ArrayList destPrefs = new ArrayList();
          PreferenceSet prefSet = pd.getPreferenceSet();
          for (Iterator prefs = prefSet.iterator(); prefs.hasNext();)
          {
            Preference src = (Preference) prefs.next();
            ArrayList destValues = new ArrayList();
            for (Iterator values = src.getValues(); values.hasNext();)
            {
View Full Code Here

            count++;
        }
        assertTrue("PortletInfo Count != 1, count = " + count, count == 1);

        // Portlet Preferences
        PreferenceSet prefs = portlet.getPreferenceSet();
        it = prefs.iterator();
        count = 0;
        while (it.hasNext())
        {
            PreferenceComposite pref = (PreferenceComposite) it.next();
            assertNotNull("Preference.Name is null", pref.getName());
View Full Code Here

            count++;
        }
        assertTrue("PortletInfo Count != 1, count = " + count, count == 1);

        // Portlet Preferences
        PreferenceSet prefs = portlet.getPreferenceSet();
        it = prefs.iterator();
        count = 0;
        while (it.hasNext())
        {
            PreferenceComposite pref = (PreferenceComposite) it.next();
            assertNotNull("Preference.Name is null", pref.getName());
View Full Code Here

TOP

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

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.