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 javax.el.ELContext;
20: import java.beans.FeatureDescriptor;
21: import java.util.Map;
22:
23: /**
24: * Encapsulates information needed by the ImplicitObjectResolver
25: *
26: * @author Stan Silvert
27: */
28: public class RequestScopeImplicitObject extends ImplicitObject {
29:
30: private static final String NAME = "requestScope".intern();
31:
32: /** Creates a new instance of RequestScopeImplicitObject */
33: public RequestScopeImplicitObject() {
34: }
35:
36: public Object getValue(ELContext context) {
37: return externalContext(context).getRequestMap();
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(NAME, "Request scope attributes",
50: Map.class);
51: }
52:
53: }
|