KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > deprecated > taglibs > button > SiteMapButtonTag


1 package org.jahia.deprecated.taglibs.button;
2
3 import javax.servlet.jsp.JspException JavaDoc;
4
5 import org.jahia.data.JahiaData;
6 import org.jahia.exceptions.JahiaException;
7
8
9 /**
10  * Class SiteMapButtonTag : draw the full link ("<a href...>...</a>") allowing to
11  * to access the site map
12  *
13  * @author Jerome Tamiotti
14  */

15 public class SiteMapButtonTag extends AbstractButtonTag {
16
17     private String JavaDoc title = "Site&nbsp;map";
18     private String JavaDoc style = "";
19
20     public void setTitle(String JavaDoc title) {
21         this.title = title;
22     }
23
24     public void setStyle(String JavaDoc style) {
25         this.style = style;
26     }
27
28     public String JavaDoc getTitle() {
29         return this.title;
30     }
31
32     public String JavaDoc getStyle() {
33         return this.style;
34     }
35
36     public boolean testRights (JahiaData jData) {
37         // site map is always reachable
38
return true;
39     }
40
41     public String JavaDoc getLauncher(JahiaData jData) throws JahiaException {
42         // returns the URL that accesses the site map
43
return jData.gui().html().drawSiteMapLauncher();
44     }
45
46     public int doEndTag() throws JspException JavaDoc {
47         // let's reinitialize the tag variables to allow tag object reuse in
48
// pooling.
49
title = "Site&nbsp;map";
50         style = "";
51         return EVAL_PAGE;
52     }
53
54 }
55
Popular Tags