Package org.exoplatform.portal.application

Examples of org.exoplatform.portal.application.Preference


   public void testCreatePortletPreferences() throws Exception
   {
      ArrayList<Preference> prefs = new ArrayList<Preference>();
      for (int i = 0; i < 5; i++)
      {
         Preference pref = new Preference();
         pref.setName("name" + i);
         pref.addValue("value" + i);
         prefs.add(pref);
      }

      //
      PortletPreferences portletPreferences = new PortletPreferences();
View Full Code Here


      assertEquals("web/BannerPortlet", storage_.getId(banner1.getState()));

      // Update site prefs
      PortletPreferences sitePrefs = new PortletPreferences();
      sitePrefs.setWindowId("portal#test:/web/BannerPortlet/banner");
      sitePrefs.setPreferences(new ArrayList<Preference>(Collections.singleton(new Preference())));
      sitePrefs.getPreferences().get(0).setName("template");
      sitePrefs.getPreferences().get(0).getValues().add("bar");
      storage_.save(sitePrefs);

      // Check that page prefs have not changed
View Full Code Here

               if (state != null)
               {
                  ArrayList<Preference> list = new ArrayList<Preference>();
                  for (org.exoplatform.portal.pom.spi.portlet.Preference preference : state)
                  {
                     Preference pref = new Preference();
                     pref.setName(preference.getName());
                     pref.setValues(new ArrayList<String>(preference.getValues()));
                     pref.setReadOnly(preference.isReadOnly());
                     list.add(pref);
                  }
                  PortletPreferences prefs = new PortletPreferences();
                  prefs.setWindowId(windowId);
                  prefs.setPreferences(list);
View Full Code Here

         {
            PortletBuilder builder = new PortletBuilder();
            ctx.parsePastStartTag(m_uri, "preferences");
            while (ctx.isAt(m_uri, "preference"))
            {
               Preference value = (Preference)ctx.unmarshalElement();
               builder.add(value.getName(), value.getValues(), value.isReadOnly());
            }
            ctx.parsePastEndTag(m_uri, "preferences");
            state = new TransientApplicationState<Portlet>(applicationName + "/" + portletName, builder.build());
         }
         else
View Full Code Here

      //
      ctx.parsePastStartTag(m_uri, m_name);
      while (ctx.isAt(m_uri, "preference"))
      {
         Preference value = (Preference)ctx.unmarshalElement();
         builder.add(value.getName(), value.getValues(), value.isReadOnly());
      }
      ctx.parsePastEndTag(m_uri, m_name);

      //
      return builder.build();
View Full Code Here

            if (ctx.isAt(m_uri, "preferences")) {
                PortletBuilder builder = new PortletBuilder();
                ctx.parsePastStartTag(m_uri, "preferences");
                while (ctx.isAt(m_uri, "preference")) {
                    Preference value = (Preference) ctx.unmarshalElement();
                    builder.add(value.getName(), value.getValues(), value.isReadOnly());
                }
                ctx.parsePastEndTag(m_uri, "preferences");
                state = new TransientApplicationState(contentId, builder.build());
            } else {
                state = new TransientApplicationState(contentId, null);
View Full Code Here

         {
            PortletBuilder builder = new PortletBuilder();
            ctx.parsePastStartTag(m_uri, "preferences");
            while (ctx.isAt(m_uri, "preference"))
            {
               Preference value = (Preference)ctx.unmarshalElement();
               builder.add(value.getName(), value.getValues(), value.isReadOnly());
            }
            ctx.parsePastEndTag(m_uri, "preferences");
            state = new TransientApplicationState(contentId, builder.build());
         }
         else
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.application.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.