EMMA Coverage Report (generated Fri Sep 15 10:32:43 EDT 2006)
[all classes][org.apache.pluto.driver.tags]

COVERAGE SUMMARY FOR SOURCE FILE [PortletHeaderLinksTag.java]

nameclass, %method, %block, %line, %
PortletHeaderLinksTag.java0%   (0/1)0%   (0/2)0%   (0/38)0%   (0/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PortletHeaderLinksTag0%   (0/1)0%   (0/2)0%   (0/38)0%   (0/11)
PortletHeaderLinksTag (): void 0%   (0/1)0%   (0/3)0%   (0/1)
doStartTag (): int 0%   (0/1)0%   (0/35)0%   (0/10)

1package org.apache.pluto.driver.tags;
2 
3import java.io.IOException;
4 
5import javax.servlet.http.HttpServletRequest;
6import javax.servlet.jsp.JspException;
7import javax.servlet.jsp.tagext.TagSupport;
8 
9import org.apache.pluto.PortletWindow;
10import org.apache.pluto.driver.AttributeKeys;
11 
12/**
13 * The portlet header links tag is used to print the dynamic portlet links to
14 * the page.
15 */
16public class PortletHeaderLinksTag extends TagSupport {
17 
18    // TagSupport Impl ---------------------------------------------------------
19 
20    /**
21     * Method invoked when the start tag is encountered. This method retrieves
22     * the portlet title and print it to the page.
23     * 
24     * @see org.apache.pluto.services.PortalCallbackService#setTitle(HttpServletRequest,
25     *      PortletWindow, String)
26     * @see org.apache.pluto.driver.services.container.PortalCallbackServiceImpl#setTitle(HttpServletRequest,
27     *      PortletWindow, String)
28     * 
29     * @throws JspException
30     */
31    public int doStartTag() throws JspException {
32 
33        // Ensure that the portlet header links tag resides within a portlet tag.
34        PortletTag parentTag = (PortletTag) TagSupport.findAncestorWithClass(this, PortletTag.class);
35        if (parentTag == null) {
36            throw new JspException("Portlet header links tag may only reside within a pluto:portlet tag.");
37        }
38 
39        // Print out the portlet header links to page.
40        try {
41            String header = (String) pageContext.getRequest().getAttribute(AttributeKeys.PORTLET_TITLE);
42            if (header != null) {
43                pageContext.getOut().print(""/*header*/);
44            }
45        } catch (IOException ex) {
46            throw new JspException(ex);
47        }
48        return SKIP_BODY;
49    }
50}

[all classes][org.apache.pluto.driver.tags]
EMMA 2.0.5312 (C) Vladimir Roubtsov