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: package org.apache.cocoon.portal.layout.renderer.aspect;
18:
19: import java.util.Map;
20:
21: import org.apache.cocoon.portal.PortalService;
22: import org.apache.cocoon.portal.layout.Layout;
23: import org.xml.sax.ContentHandler;
24: import org.xml.sax.SAXException;
25:
26: /**
27: * The renderer aspect context is passed to every renderer aspect.
28: * Using this context, a renderer aspect can get it's configuration
29: * and it can invoke (if wanted) the next aspect in the aspect chain.
30: *
31: * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
32: * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
33: *
34: * @version CVS $Id: RendererAspectContext.java 433543 2006-08-22 06:22:54Z crossley $
35: */
36: public interface RendererAspectContext {
37:
38: /**
39: * Stream out raw layout
40: */
41: void invokeNext(Layout layout, PortalService service,
42: ContentHandler handler) throws SAXException;
43:
44: /**
45: * Get the "compiled" configuration of the aspect.
46: */
47: Object getAspectConfiguration();
48:
49: /**
50: * Set an attribute
51: */
52: void setAttribute(String key, Object attribute);
53:
54: /**
55: * Get an attribute
56: */
57: Object getAttribute(String key);
58:
59: /**
60: * Remove an attribute
61: */
62: void removeAttribute(String key);
63:
64: /**
65: * Get the object model
66: */
67: Map getObjectModel();
68:
69: /**
70: * Return whether rendering is enabled for this chain.
71: * @return true if rendering is enabled, false otherwise.
72: */
73: boolean isRendering();
74: }
|