01: /*
02: * Copyright 2004, 2005, 2006 Odysseus Software GmbH
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: package de.odysseus.calyxo.base.access;
17:
18: import javax.servlet.http.HttpServletRequest;
19:
20: /**
21: * An accessor is a factory-like object, which produces a java object,
22: * parametrized with a request. The purpose of accessors is to
23: * supply a tree of beans and maps, which are to be traversed in EL
24: * expressions.
25: *
26: * @author Christoph Beck
27: */
28: public interface Accessor {
29: /**
30: * Configure and answer an object for the given request.
31: *
32: * @param request the request we process
33: * @return an object
34: */
35: public Object get(HttpServletRequest request);
36:
37: /**
38: * Answer true if the result of <code>@link #get(HttpServletRequest)</code>
39: * may be cached in a contained accessor (eg. in a <code>@link AccessorMap</code>)
40: * throughout the request.
41: *
42: * @return true iff cachable
43: */
44: public boolean isCacheable();
45: }
|