KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > jsp > taglib > security > MayChangeContextTag


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.bridge.jsp.taglib.security;
11
12 import org.mmbase.bridge.jsp.taglib.Condition;
13 import javax.servlet.jsp.JspTagException JavaDoc;
14
15
16 /**
17  * A very simple tag to check if node may be linked to.
18  *
19  * @author Michiel Meeuwissen
20  * @version $Id: MayChangeContextTag.java,v 1.6 2004/07/19 15:25:53 michiel Exp $
21  */

22
23 public class MayChangeContextTag extends MayWriteTag implements Condition {
24
25     public int doStartTag() throws JspTagException JavaDoc {
26         if ((getNode().mayChangeContext()) != getInverse()) {
27             return EVAL_BODY;
28         } else {
29             return SKIP_BODY;
30         }
31     }
32
33 }
34
Popular Tags