Thread: [Ejtools-cvs] CVS: libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/taglib BeanContextXmlProxyT
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-05-05 20:22:34
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/taglib In directory usw-pr-cvs1:/tmp/cvs-serv10756/xmlweb/src/main/net/sourceforge/ejtools/xml/taglib Modified Files: BeanContextXmlProxyTag.java XslApplyTag.java Log Message: Add some JavaDocs Index: BeanContextXmlProxyTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/taglib/BeanContextXmlProxyTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanContextXmlProxyTag.java 25 Apr 2002 20:15:25 -0000 1.2 --- BeanContextXmlProxyTag.java 5 May 2002 20:22:31 -0000 1.3 *************** *** 1,71 **** package net.sourceforge.ejtools.xml.taglib; ! import java.beans.beancontext.*; ! import java.io.*; ! import java.util.*; ! import javax.servlet.http.HttpSession; ! import javax.servlet.jsp.*; ! import javax.servlet.jsp.tagext.*; ! import org.w3c.dom.*; ! import com.sun.xml.tree.*; ! import net.sourceforge.ejtools.xml.*; ! import net.sourceforge.ejtools.xml.beans.*; /** ! * Description of the Class * ! * @author letiembl ! * @created 26 février 2002 */ public class BeanContextXmlProxyTag extends TagSupport { ! /** Description of the Field */ protected String id = null; ! /** Constructor for the BeanContextXmlProxyTag object */ public BeanContextXmlProxyTag() { } /** ! * Setter for the id attribute ! * ! * @param id The new value for id attribute ! */ ! public void setId(String id) ! { ! this.id = id; ! } ! ! ! /** ! * Getter for the id attribute ! * ! * @return The value of id attribute ! */ ! public String getId() ! { ! return id; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception ! */ ! public int doStartTag() throws JspException ! { ! return SKIP_BODY; ! } ! ! ! /** ! * Description of the Method * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception */ public int doEndTag() throws JspException --- 1,39 ---- + /* + * EJTools, the Enterprise Java Tools + * + * Distributable under LGPL license. + * See terms of license at www.gnu.org. + */ package net.sourceforge.ejtools.xml.taglib; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! import net.sourceforge.ejtools.xml.XmlComponent; ! import net.sourceforge.ejtools.xml.beans.BeanContextXmlProxy; /** ! * Description of the Class * ! * @author letiembl ! * @created 26 février 2002 ! * @version $Revision$ ! * @todo JavaDoc to complete */ public class BeanContextXmlProxyTag extends TagSupport { ! /** Description of the Field */ protected String id = null; ! /** Constructor for the BeanContextXmlProxyTag object */ public BeanContextXmlProxyTag() { } /** ! * Description of the Method * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception */ public int doEndTag() throws JspException *************** *** 93,97 **** XmlComponent comp = object.getXmlProxy(); ! pageContext.getOut().print(comp.toXml()); } } --- 61,65 ---- XmlComponent comp = object.getXmlProxy(); ! pageContext.getOut().print(comp.toXml()); } } *************** *** 102,105 **** --- 70,107 ---- return (EVAL_PAGE); + } + + + /** + * Description of the Method + * + * @return Description of the Returned Value + * @exception JspException Description of Exception + */ + public int doStartTag() throws JspException + { + return SKIP_BODY; + } + + + /** + * Getter for the id attribute + * + * @return The value of id attribute + */ + public String getId() + { + return id; + } + + + /** + * Setter for the id attribute + * + * @param id The new value for id attribute + */ + public void setId(String id) + { + this.id = id; } } Index: XslApplyTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/taglib/XslApplyTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XslApplyTag.java 30 Apr 2002 21:08:17 -0000 1.3 --- XslApplyTag.java 5 May 2002 20:22:31 -0000 1.4 *************** *** 1,5 **** --- 1,12 ---- + /* + * EJTools, the Enterprise Java Tools + * + * Distributable under LGPL license. + * See terms of license at www.gnu.org. + */ package net.sourceforge.ejtools.xml.taglib; import java.io.StringReader; + import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; *************** *** 10,56 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 28 février 2002 */ public class XslApplyTag extends BodyTagSupport { ! private Transformer transformer = null; ! /** The body content of this tag */ private String body = null; ! /** The name of the XSL stylesheet bean. */ private String xsl = null; /** ! * Setter for the xsl attribute * ! * @param xsl The new value for xsl attribute */ ! public void setXsl(String xsl) { ! this.xsl = xsl; } /** ! * Getter for the xsl attribute * ! * @return The value of xsl attribute */ ! public String getXsl() { ! return xsl; } /** ! * Validate the attributes that were specified for consistency. Evaluate the ! * body content of this tag if we will be using it as the XML data source; ! * otherwise skip it. * ! * @return Description of the Returned Value ! * @exception JspException if a JSP error occurs */ public int doStartTag() throws JspException --- 17,86 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 28 février 2002 ! * @version $Revision$ ! * @todo JavaDoc to complete */ public class XslApplyTag extends BodyTagSupport { ! /** The body content of this tag */ private String body = null; ! /** Description of the Field */ ! private Transformer transformer = null; ! /** The name of the XSL stylesheet bean. */ private String xsl = null; /** ! * Save the body content that has been processed, but do not iterate. * ! * @return Description of the Returned Value ! * @exception JspException if a JSP error has occurred */ ! public int doAfterBody() throws JspException { ! body = bodyContent.getString().trim(); ! ! // System.out.println(body); ! ! return (SKIP_BODY); } /** ! * Finish up by performing the transformation and rendering the output. * ! * @return Description of the Returned Value ! * @exception JspException if a JSP exception occurs */ ! public int doEndTag() throws JspException { ! try ! { ! // Prepare an input source for the data ! StreamSource data = new StreamSource(new StringReader(body)); ! ! // Prepare an output source for the results ! StreamResult result = new StreamResult(pageContext.getOut()); ! ! transformer.transform(data, result); ! } ! catch (Exception e) ! { ! throw new JspException(e.toString()); ! } ! return (EVAL_PAGE); } /** ! * Validate the attributes that were specified for consistency. Evaluate the ! * body content of this tag if we will be using it as the XML data source; ! * otherwise skip it. * ! * @return Description of the Returned Value ! * @exception JspException if a JSP error occurs */ public int doStartTag() throws JspException *************** *** 71,119 **** /** ! * Save the body content that has been processed, but do not iterate. * ! * @return Description of the Returned Value ! * @exception JspException if a JSP error has occurred */ ! public int doAfterBody() throws JspException { ! body = bodyContent.getString().trim(); - // System.out.println(body); ! return (SKIP_BODY); } /** ! * Finish up by performing the transformation and rendering the output. * ! * @return Description of the Returned Value ! * @exception JspException if a JSP exception occurs */ ! public int doEndTag() throws JspException ! { ! try ! { ! // Prepare an input source for the data ! StreamSource data = new StreamSource(new StringReader(body)); ! ! // Prepare an output source for the results ! StreamResult result = new StreamResult(pageContext.getOut()); ! ! transformer.transform(data, result); ! } ! catch (Exception e) ! { ! throw new JspException(e.toString()); ! } ! return (EVAL_PAGE); ! } ! ! ! /** Release any allocated resources. */ ! public void release() { ! this.body = null; } } --- 101,129 ---- /** ! * Getter for the xsl attribute * ! * @return The value of xsl attribute */ ! public String getXsl() { ! return xsl; ! } ! /** Release any allocated resources. */ ! public void release() ! { ! this.body = null; } /** ! * Setter for the xsl attribute * ! * @param xsl The new value for xsl attribute */ ! public void setXsl(String xsl) { ! this.xsl = xsl; } } |