01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.cocoon.components.modules.input;
19:
20: import org.apache.avalon.framework.configuration.Configuration;
21: import org.apache.avalon.framework.configuration.ConfigurationException;
22: import org.apache.avalon.framework.thread.ThreadSafe;
23:
24: import java.util.Iterator;
25: import java.util.Map;
26:
27: /**
28: * NullInputModule returns a null object. Use this if you want to
29: * explicitly forbid a parameter to be filled. E.g. a database column
30: * shall be filled with a default value, your forms never contain that
31: * parameter but you don't want anyone to provide this parameter
32: * manually.
33: *
34: * @author <a href="mailto:haul@apache.org">Christian Haul</a>
35: * @version $Id: NullInputModule.java 433543 2006-08-22 06:22:54Z crossley $
36: */
37: public class NullInputModule extends AbstractInputModule implements
38: ThreadSafe {
39:
40: public Object getAttribute(String name, Configuration modeConf,
41: Map objectModel) throws ConfigurationException {
42:
43: return null;
44: }
45:
46: public Iterator getAttributeNames(Configuration modeConf,
47: Map objectModel) throws ConfigurationException {
48:
49: return null;
50: }
51:
52: public Object[] getAttributeValues(String name,
53: Configuration modeConf, Map objectModel)
54: throws ConfigurationException {
55:
56: return null;
57:
58: }
59:
60: }
|