Clover coverage report - Coverage timestamp: Sa Jul 7 2007 09:11:40 CEST FRAMES NO FRAMES |
file stats: | LOC: | 32 |  | Methods: | 2
| NCLOC: | 17 |  | Classes: | 1
Source file | Conditionals | Statements | Methods | TOTAL
GroupTag.java | 0% | 0% | 0% | 0% |

1 |  | /*
2 |  | * Copyright (c) 2002-2003 by OpenSymphony
3 |  | * All rights reserved.
4 |  | */
5 |  | package com.opensymphony.oscache.web.tag;
6 |  |
7 |  | import javax.servlet.jsp.JspTagException;
8 |  | import javax.servlet.jsp.tagext.TagSupport;
9 |  |
10 |  | /**
11 |  | * GroupTag is a tag that adds a group to an ancestor CacheTag's groups.<p>
12 |  | *
13 |  | * @author <a href="mailto:robvdv@yahoo.com">Robert van der Vliet</a>
14 |  | */
15 |  | public class GroupTag extends TagSupport {
16 |  | private Object group = null;
17 |  |
18 | 0 | public int doStartTag() throws JspTagException {
19 | 0 | CacheTag ancestorCacheTag = (CacheTag) TagSupport.findAncestorWithClass(this, CacheTag.class);
20 |  |
21 | 0 | if (ancestorCacheTag == null) {
22 | 0 | throw new JspTagException("GroupTag cannot be used from outside a CacheTag");
23 |  | }
24 |  |
25 | 0 | ancestorCacheTag.addGroup(String.valueOf(group));
26 | 0 | return EVAL_BODY_INCLUDE;
27 |  | }
28 |  |
29 | 0 | public void setGroup(Object group) {
30 | 0 | this.group = group;
31 |  | }
32 |  | }