1 5 package org.exoplatform.test.mocks.portlet; 6 7 import java.util.* ; 8 import javax.portlet.* ; 9 10 17 public class MockPortletConfig implements PortletConfig { 18 19 String portletName_ ; 20 PortletContext context_ = null ; 21 Hashtable parameters_ = new Hashtable() ; 22 ResourceBundle res_ ; 23 24 public MockPortletConfig(PortletContext context) { 25 parameters_ = new Hashtable() ; 26 context_ = context; 27 parameters_.put("template-location", "/WEB-INF/templates/html") ; 28 } 29 30 public String getPortletName () { 31 return portletName_ ; 32 } 33 public void setPortletName(String name) { portletName_ = name ; } 34 35 public PortletContext getPortletContext () { 36 return context_ ; 37 } 38 39 public void setResourceBundle(ResourceBundle res) { 40 res_ = res ; 41 } 42 43 public java.util.ResourceBundle getResourceBundle(java.util.Locale locale) { 44 return res_ ; 45 } 46 47 public String getInitParameter(java.lang.String name) { 48 return (String ) parameters_.get(name) ; 49 } 50 51 public void setInitParameter(String name, String value) { 52 parameters_.put(name, value) ; 53 } 54 55 public java.util.Enumeration getInitParameterNames() { 56 return null ; 57 } 58 } 59 60 | Popular Tags |