01: /*
02: * Copyright 2006 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.myfaces.el.unified.resolver.implicitobject;
18:
19: import java.beans.FeatureDescriptor;
20: import java.util.Map;
21: import javax.el.ELContext;
22:
23: /**
24: * Encapsulates information needed by the ImplicitObjectResolver
25: *
26: * @author Stan Silvert
27: */
28: public class HeaderValuesImplicitObject extends ImplicitObject {
29:
30: private static final String NAME = "headerValues".intern();
31:
32: /** Creates a new instance of HeaderValuesImplicitObject */
33: public HeaderValuesImplicitObject() {
34: }
35:
36: public Object getValue(ELContext context) {
37: return externalContext(context).getRequestHeaderValuesMap();
38: }
39:
40: public String getName() {
41: return NAME;
42: }
43:
44: public Class getType() {
45: return null;
46: }
47:
48: public FeatureDescriptor getDescriptor() {
49: return makeDescriptor(
50: NAME,
51: "Map whose keys are a set of request header names and whose values are all of the values (of type String[]) for each header name.",
52: Map.class);
53: }
54:
55: }
|