KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > util > Config


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.util;
18
19 //standard java stuff
20
import java.util.Map JavaDoc;
21 import java.util.Iterator JavaDoc;
22
23 /**
24  * Defines a standard object configuration
25  * A Config provides the parameters passed in the current request as well
26  * as init parameters.
27  *
28  * @author <a HREF="mailto:raphael@apache.org">RaphaŽl Luta</a>
29  * @version $Id: Config.java,v 1.10 2004/02/23 03:23:42 jford Exp $
30  */

31 public interface Config
32 {
33
34     /**
35     Returns the name for this configuration
36     */

37     public String JavaDoc getName();
38
39     /**
40     Sets the name of this configuration
41     */

42     public void setName(String JavaDoc name);
43
44     /**
45     Used to define a Portlet's parameters.
46     */

47     public void setInitParameters( Map JavaDoc init_params );
48
49     /**
50     Used to override Portlet's parameters.
51     */

52     public void addInitParameters( Map JavaDoc init_params );
53
54     /**
55     Retrieves the PortletController parameters
56     */

57     public Map JavaDoc getInitParameters();
58
59     /**
60     Used to define a PortletController's parameter.if value is null, removes
61     the key from the stored properties
62     */

63     public void setInitParameter(String JavaDoc name, Object JavaDoc value);
64
65     /**
66     Returns a parameter (or null) that was given the controller.
67     */

68     public String JavaDoc getInitParameter(String JavaDoc name);
69
70     /**
71     Returns a parameter (or defaultValue) that was given the controller.
72     */

73     public String JavaDoc getInitParameter(String JavaDoc name, String JavaDoc defaultValue);
74
75     /**
76     Returns the parameter names of this Config.
77     */

78     public Iterator JavaDoc getInitParameterNames();
79
80 }
81
Popular Tags