01: /*
02: * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
03: * @version $Id: PortletServiceConfig.java 6385 2007-10-25 14:02:26Z wehrens $
04: */
05: package org.gridsphere.portlet.service.spi;
06:
07: import javax.servlet.ServletContext;
08: import java.util.Enumeration;
09:
10: /**
11: * The <code>PortletServiceConfig</code> is the interface through which
12: * portlet services access the configuration settings from the services
13: * descriptor file.
14: */
15: public interface PortletServiceConfig {
16:
17: /**
18: * Returns the init parameter with the given name.
19: *
20: * @param name the name of the requested init parameter.
21: * @return the init parameter
22: */
23: public String getInitParameter(String name);
24:
25: /**
26: * Returns the init parameter with the given name.
27: *
28: * @param name the name of the init parameter.
29: * @param value the value of the init parameter
30: */
31: public void setInitParameter(String name, String value);
32:
33: /**
34: * Returns the init parameter with the given name. It returns the given default
35: * value if the parameter is not found.
36: *
37: * @param name the name of the requested init parameter.
38: * @param defaultValue the default value to return.
39: * @return the init parameter value if exists, otherwise defaultValue
40: */
41: public String getInitParameter(String name, String defaultValue);
42:
43: /**
44: * Returns an enumeration with the names of all init parameters provided in the portlet service configuration.
45: *
46: * @return an enumeration of the init parameters
47: */
48: public Enumeration getInitParameterNames();
49:
50: /**
51: * Returns the servlet configuration
52: *
53: * @return the servlet configuration
54: */
55: public ServletContext getServletContext();
56:
57: }
|