KickJava   Java API By Example, From Geeks To Geeks.

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


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 deleted.
18  *
19  * @author Michiel Meeuwissen
20  * @version $Id: MayDeleteTag.java,v 1.7 2004/07/19 15:25:54 michiel Exp $
21  */

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