KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > pageflow > interceptor > InterceptorConfig


1 /*
2  * Copyright 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  * $Header:$
17  */

18 package org.apache.beehive.netui.pageflow.interceptor;
19
20 import java.io.Serializable JavaDoc;
21 import java.util.Map JavaDoc;
22 import java.util.HashMap JavaDoc;
23
24 /**
25  * Class to hold configuration parameters for registered {@link Interceptor}s.
26  */

27 public class InterceptorConfig
28         implements Serializable JavaDoc
29 {
30     private String JavaDoc _interceptorClass;
31     private Map JavaDoc/*< String, String >*/ _customProperties = new HashMap JavaDoc/*< String, String >*/();
32
33     protected InterceptorConfig()
34     {
35     }
36
37     protected InterceptorConfig( String JavaDoc interceptorClass )
38     {
39         _interceptorClass = interceptorClass;
40     }
41
42     public String JavaDoc getInterceptorClass()
43     {
44         return _interceptorClass;
45     }
46
47     public void setInterceptorClass( String JavaDoc interceptorClass )
48     {
49         _interceptorClass = interceptorClass;
50     }
51     
52     public Map JavaDoc/*< String, String >*/ getCustomProperties()
53     {
54         return _customProperties;
55     }
56     
57     void addCustomProperty( String JavaDoc name, String JavaDoc value )
58     {
59         _customProperties.put( name, value );
60     }
61     
62     public String JavaDoc getCustomProperty( String JavaDoc name )
63     {
64         return ( String JavaDoc ) _customProperties.get( name );
65     }
66 }
67
Popular Tags