1 5 package org.exoplatform.services.portletcontainer.imp; 6 7 8 import javax.portlet.PortletPreferences; 9 import javax.portlet.PreferencesValidator; 10 import javax.portlet.ValidatorException; 11 import org.exoplatform.services.portletcontainer.impl.portletAPIImp.PortletPreferencesImp; 12 import org.exoplatform.services.portletcontainer.pci.ExoWindowID; 13 import org.exoplatform.services.portletcontainer.pci.model.ExoPortletPreferences; 14 import org.exoplatform.services.portletcontainer.pci.model.Portlet; 15 16 22 public class TestPersistentManager extends BaseTest { 23 public TestPersistentManager(String s) { 24 super(s); 25 } 26 27 public void setUp() throws Exception { 28 super.setUp(); 29 } 30 31 public void testStorePortletPreferences() throws Exception { 32 ExoWindowID windowID = new ExoWindowID("exotest:/hello/HelloWorld/banner"); 33 ExoPortletPreferences prefs = 34 ((Portlet) portletApp_.getPortlet().get(0)).getPortletPreferences(); 35 PreferencesValidator validator = new PreferencesValidator() { 36 public void validate(PortletPreferences portletPreferences) throws ValidatorException { 37 } 38 }; 39 PortletPreferencesImp preferences = new PortletPreferencesImp(validator, 40 prefs, windowID, persister); 41 preferences.setMethodCalledIsAction(true); 44 preferences.store(); 45 57 } 58 } | Popular Tags |