01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/portal/tags/sakai_2-4-1/portal-api/api/src/java/org/sakaiproject/portal/api/PortalRenderContext.java $
03: * $Id: PortalRenderContext.java 29143 2007-04-19 01:10:38Z ajpoland@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.portal.api;
21:
22: /**
23: * This interface represent the Render Context, it allows the portal
24: * implementation to put values into the render context. There is a utility dump
25: * method to dump the context. Instances of this class should be created per
26: * request via an Implimention of the RenderContextEngine
27: *
28: * @author ieb
29: * @since Sakai 2.4
30: * @version $Rev: 29143 $
31: *
32: */
33: public interface PortalRenderContext {
34:
35: /**
36: * Set a value agaaisnt a Key, normally a value might be a String,
37: * Collection or a Map, but depending on the render engine technology other
38: * objects may be acceptable.
39: *
40: * @param string
41: * @param value
42: */
43: void put(String string, Object value);
44:
45: /**
46: * Convert the render context to a string suitable for dumping to a log file
47: * or console.
48: *
49: * @return
50: */
51: String dump();
52:
53: /**
54: * Return true if the context needs this part of the portal
55: *
56: * @param includeOption
57: * @return
58: */
59: boolean uses(String includeOption);
60:
61: /**
62: * Get the render engine associated with this context.
63: *
64: * @return
65: */
66: PortalRenderEngine getRenderEngine();
67:
68: }
|