|
|||||||||||||||||||
| Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| RenderPageValve.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 |
/* |
|
| 2 |
* Angkor Web Framework |
|
| 3 |
* |
|
| 4 |
* Distributable under LGPL license. |
|
| 5 |
* See terms of license at gnu.org. |
|
| 6 |
*/ |
|
| 7 |
package com.tirsen.angkor.process; |
|
| 8 |
|
|
| 9 |
import com.tirsen.angkor.Page; |
|
| 10 |
import com.tirsen.angkor.RenderContext; |
|
| 11 |
|
|
| 12 |
/** |
|
| 13 |
* TODO document RenderPageValve |
|
| 14 |
* |
|
| 15 |
* <!-- $Id: RenderPageValve.java,v 1.1 2002/10/13 19:59:22 tirsen Exp $ --> |
|
| 16 |
* |
|
| 17 |
* @author $Author: tirsen $ |
|
| 18 |
* @version $Revision: 1.1 $ |
|
| 19 |
*/ |
|
| 20 |
public class RenderPageValve implements Valve |
|
| 21 |
{
|
|
| 22 |
private Page page; |
|
| 23 |
|
|
| 24 |
public static final ExecuteContext.Attribute PageAttribute = new ExecuteContext.Attribute("Page");
|
|
| 25 |
|
|
| 26 | 1 |
public RenderPageValve(Page page) |
| 27 |
{
|
|
| 28 | 1 |
this.page = page; |
| 29 |
} |
|
| 30 |
|
|
| 31 | 1 |
public void execute(ExecuteContext exec) throws Exception |
| 32 |
{
|
|
| 33 | 1 |
exec.setAttribute(PageAttribute, page); |
| 34 | 1 |
try |
| 35 |
{
|
|
| 36 | 1 |
page.render((RenderContext) exec.getAttribute(ExecuteContext.RenderContextAttribute)); |
| 37 |
} |
|
| 38 |
finally |
|
| 39 |
{
|
|
| 40 | 1 |
exec.setAttribute(PageAttribute, null); |
| 41 |
} |
|
| 42 |
} |
|
| 43 |
} |
|
| 44 |
|
|
||||||||||