Package org.apache.pluto.om.common

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


            //PersistenceStore store = registry.getPersistenceStore();
           
            //store.getTransaction().begin();
           
            PortletDefinitionComposite pdef = registry.getPortletDefinitionByUniqueName(uniqueId);
            PreferenceSet prefSet = pdef.getPreferenceSet();
            Iterator prefIter = prefSet.iterator();
            while (prefIter.hasNext())
            {
                PreferenceComposite pref = (PreferenceComposite) prefIter.next();
               
                String prefName = pref.getName();
View Full Code Here


              break;
            }
          }

          IPortletPreferencesStore portletPrefStore = PortletPreferencesStoreFactory.getPortletPreferencesStoreImpl();
          PreferenceSet preferences = null;
          try {
              preferences = portletPrefStore.getDefinitionPreferences(channelPublishId);
          }
          catch (Exception e) {
              log.error(e,e);
              preferences = null;
          }
          if (preferences != null){
            for (Iterator prefItr = preferences.iterator(); prefItr.hasNext();) {
                Preference pref = (Preference)prefItr.next();
 
                String name = pref.getName();
                String value = "";
                String override;
View Full Code Here

    }
   
    public void loadPreferences() throws IOException {
        try {
            IPortletPreferencesStore portletPrefsStore = PortletPreferencesStoreFactory.getPortletPreferencesStoreImpl();
            PreferenceSet publishPreferences = portletPrefsStore.getDefinitionPreferences(channelDefinition.getId());
           
            ((PreferenceSetImpl)preferences).addAll(publishPreferences);
        } catch (Exception e) {
            log.error("Could not load portlet definition preferences", e);
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

    }

    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

        {
            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

            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

        {
            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

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.