ejtools-cvs Mailing List for EJTools (Page 6)
Brought to you by:
letiemble
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(471) |
May
(303) |
Jun
(176) |
Jul
(67) |
Aug
(64) |
Sep
(84) |
Oct
(148) |
Nov
(57) |
Dec
(272) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(356) |
Feb
(304) |
Mar
(214) |
Apr
(22) |
May
(7) |
Jun
(25) |
Jul
|
Aug
(5) |
Sep
(106) |
Oct
|
Nov
(95) |
Dec
(193) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
Update of /cvsroot/ejtools/libraries/servlet/src/main/org/ejtools/servlet/http In directory sc8-pr-cvs1:/tmp/cvs-serv18305/servlet/src/main/org/ejtools/servlet/http Modified Files: CharResponseWrapper.java StringResponseWrapper.java XSLFilter.java Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides generic purpose Servlet Filters. </body> </html> Index: CharResponseWrapper.java =================================================================== RCS file: /cvsroot/ejtools/libraries/servlet/src/main/org/ejtools/servlet/http/CharResponseWrapper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CharResponseWrapper.java 15 Sep 2003 22:04:41 -0000 1.2 --- CharResponseWrapper.java 13 Dec 2003 21:24:50 -0000 1.3 *************** *** 1,59 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http; ! ! import java.io.CharArrayWriter; ! import java.io.PrintWriter; ! ! import javax.servlet.http.HttpServletResponse; ! import javax.servlet.http.HttpServletResponseWrapper; ! ! /** ! * A Response wrapper that allows the manipulation of the Servlet Response. Create a buffer based on a Char array. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class CharResponseWrapper extends HttpServletResponseWrapper ! { ! /** Buffer used to store content */ ! protected CharArrayWriter output = null; ! ! ! /** ! * Constructor for the CharResponseWrapper object ! * ! * @param response Response stream to wrap ! */ ! public CharResponseWrapper(HttpServletResponse response) ! { ! super(response); ! output = new CharArrayWriter(); ! } ! ! ! /** ! * Return a writer that wraps the buffered content ! * ! * @return The writer of the wrapper ! */ ! public PrintWriter getWriter() ! { ! return new PrintWriter(output); ! } ! ! ! /** ! * Return the content of the buffer ! * ! * @return The content as String ! */ ! public String toString() ! { ! return output.toString(); ! } ! } --- 1,60 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http; ! ! import java.io.CharArrayWriter; ! import java.io.PrintWriter; ! ! import javax.servlet.http.HttpServletResponse; ! import javax.servlet.http.HttpServletResponseWrapper; ! ! /** ! * A Response wrapper that allows the manipulation of the Servlet Response. ! * <p>Create a buffer based on a Char array.</p> ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class CharResponseWrapper extends HttpServletResponseWrapper ! { ! /** Buffer used to store content */ ! protected CharArrayWriter output = null; ! ! ! /** ! * Constructor for the CharResponseWrapper object ! * ! * @param response Response stream to wrap ! */ ! public CharResponseWrapper(HttpServletResponse response) ! { ! super(response); ! output = new CharArrayWriter(); ! } ! ! ! /** ! * Return a writer that wraps the buffered content ! * ! * @return The writer of the wrapper ! */ ! public PrintWriter getWriter() ! { ! return new PrintWriter(output); ! } ! ! ! /** ! * Return the content of the buffer ! * ! * @return The content as String ! */ ! public String toString() ! { ! return output.toString(); ! } ! } Index: StringResponseWrapper.java =================================================================== RCS file: /cvsroot/ejtools/libraries/servlet/src/main/org/ejtools/servlet/http/StringResponseWrapper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StringResponseWrapper.java 15 Sep 2003 22:04:41 -0000 1.2 --- StringResponseWrapper.java 13 Dec 2003 21:24:50 -0000 1.3 *************** *** 1,59 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http; ! ! import java.io.PrintWriter; ! import java.io.StringWriter; ! ! import javax.servlet.http.HttpServletResponse; ! import javax.servlet.http.HttpServletResponseWrapper; ! ! /** ! * A Response wrapper that allows the manipulation of the Servlet Response. Create a buffer based on a String. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class StringResponseWrapper extends HttpServletResponseWrapper ! { ! /** Buffer used to store content */ ! protected StringWriter output = null; ! ! ! /** ! * Constructor for the StringResponseWrapper object ! * ! * @param response Response stream to wrap ! */ ! public StringResponseWrapper(HttpServletResponse response) ! { ! super(response); ! output = new StringWriter(); ! } ! ! ! /** ! * Return a writer that wraps the buffered content ! * ! * @return The writer of the wrapper ! */ ! public PrintWriter getWriter() ! { ! return new PrintWriter(output); ! } ! ! ! /** ! * Return the content of the buffer ! * ! * @return The content as String ! */ ! public String toString() ! { ! return output.toString(); ! } ! } --- 1,60 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http; ! ! import java.io.PrintWriter; ! import java.io.StringWriter; ! ! import javax.servlet.http.HttpServletResponse; ! import javax.servlet.http.HttpServletResponseWrapper; ! ! /** ! * A Response wrapper that allows the manipulation of the Servlet Response. ! * <p>Create a buffer based on a String.</p> ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class StringResponseWrapper extends HttpServletResponseWrapper ! { ! /** Buffer used to store content */ ! protected StringWriter output = null; ! ! ! /** ! * Constructor for the StringResponseWrapper object ! * ! * @param response Response stream to wrap ! */ ! public StringResponseWrapper(HttpServletResponse response) ! { ! super(response); ! output = new StringWriter(); ! } ! ! ! /** ! * Return a writer that wraps the buffered content ! * ! * @return The writer of the wrapper ! */ ! public PrintWriter getWriter() ! { ! return new PrintWriter(output); ! } ! ! ! /** ! * Return the content of the buffer ! * ! * @return The content as String ! */ ! public String toString() ! { ! return output.toString(); ! } ! } Index: XSLFilter.java =================================================================== RCS file: /cvsroot/ejtools/libraries/servlet/src/main/org/ejtools/servlet/http/XSLFilter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XSLFilter.java 15 Sep 2003 22:04:41 -0000 1.2 --- XSLFilter.java 13 Dec 2003 21:24:50 -0000 1.3 *************** *** 1,139 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http; ! ! import java.io.IOException; ! import java.io.PrintWriter; ! import java.io.StringReader; ! import java.io.StringWriter; ! ! import javax.servlet.Filter; ! import javax.servlet.FilterChain; ! import javax.servlet.FilterConfig; ! import javax.servlet.ServletException; ! import javax.servlet.ServletRequest; ! import javax.servlet.ServletResponse; ! import javax.servlet.http.HttpServletResponse; ! import javax.xml.transform.Source; ! import javax.xml.transform.Transformer; ! import javax.xml.transform.TransformerFactory; ! import javax.xml.transform.stream.StreamResult; ! import javax.xml.transform.stream.StreamSource; ! ! import org.apache.log4j.Logger; ! ! /** ! * HTTP Servlet filter that applies a XSL stylesheet on a XML stream. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class XSLFilter implements Filter ! { ! /** Filter configuration */ ! protected FilterConfig config = null; ! /** Content type of the output */ ! protected String contentType = null; ! /** Absolute path the stylesheet */ ! protected String stylePath = null; ! /** XSL transformer */ ! protected Transformer transformer = null; ! /** Log4j Logger */ ! protected static Logger logger = Logger.getLogger(XSLFilter.class); ! ! ! /** Destroy the filter */ ! public void destroy() ! { ! this.config = null; ! } ! ! ! /** ! * Main method of the filter ! * ! * @param request Incoming request ! * @param response Outgoing response ! * @param chain Filter chain to forward the request and the response ! * @exception IOException In case of error ! * @exception ServletException In case of error ! */ ! public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) ! throws IOException, ServletException ! { ! // Set content type and get the original response ! response.setContentType(contentType); ! PrintWriter out = response.getWriter(); ! ! // Wrap the response with a buffer and follow the chain ! StringResponseWrapper wrapper = new StringResponseWrapper((HttpServletResponse) response); ! chain.doFilter(request, wrapper); ! ! // Create a reader with the result ! StringReader reader = new StringReader(wrapper.toString()); ! Source source = new StreamSource(reader); ! ! try ! { ! // Create the final response writer ! logger.debug("Creating Writer..."); ! StringWriter writer = new StringWriter(); ! StreamResult result = new StreamResult(writer); ! ! // Transform according to XSL stylesheet ! logger.debug("Applying stylesheet..."); ! transformer.transform(source, result); ! ! // Print out the result ! logger.debug("Ouputing..."); ! response.setContentLength(writer.toString().length()); ! out.println(writer.toString()); ! } ! catch (Exception e) ! { ! logger.error("Error during transformation " + e.getMessage()); ! out.println(wrapper.toString()); ! } ! } ! ! ! /** ! * Performs the initialization of the filter ! * ! * @param config The filter configuration ! * @exception ServletException Exception thrown if the filter was not properly configured ! */ ! public void init(FilterConfig config) ! throws ServletException ! { ! this.config = config; ! ! // Get the content type ! this.contentType = config.getInitParameter("mime-type"); ! logger.debug("Acquiring parameter mime-type=" + contentType); ! ! // Get the stylesheet ! String styleSheet = config.getInitParameter("stylesheet"); ! logger.debug("Acquiring parameter stylesheet=" + styleSheet); ! ! // Set the absolute position of the stylesheet ! String stylePath = config.getServletContext().getRealPath(styleSheet); ! ! try ! { ! // Prepare the XSL transformer ! logger.debug("Compiling stylesheet..."); ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! transformer = tFactory.newTransformer(new StreamSource(stylePath)); ! } ! catch (Exception e) ! { ! logger.fatal("Failed to init the filter " + e.getMessage()); ! throw new ServletException(e.getMessage()); ! } ! } ! } --- 1,139 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http; ! ! import java.io.IOException; ! import java.io.PrintWriter; ! import java.io.StringReader; ! import java.io.StringWriter; ! ! import javax.servlet.Filter; ! import javax.servlet.FilterChain; ! import javax.servlet.FilterConfig; ! import javax.servlet.ServletException; ! import javax.servlet.ServletRequest; ! import javax.servlet.ServletResponse; ! import javax.servlet.http.HttpServletResponse; ! import javax.xml.transform.Source; ! import javax.xml.transform.Transformer; ! import javax.xml.transform.TransformerFactory; ! import javax.xml.transform.stream.StreamResult; ! import javax.xml.transform.stream.StreamSource; ! ! import org.apache.log4j.Logger; ! ! /** ! * HTTP Servlet filter that applies a XSL stylesheet on a XML stream. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class XSLFilter implements Filter ! { ! /** Filter configuration */ ! protected FilterConfig config = null; ! /** Content type of the output */ ! protected String contentType = null; ! /** Absolute path the stylesheet */ ! protected String stylePath = null; ! /** XSL transformer */ ! protected Transformer transformer = null; ! /** Log4j Logger */ ! protected static Logger logger = Logger.getLogger(XSLFilter.class); ! ! ! /** Destroy the filter */ ! public void destroy() ! { ! this.config = null; ! } ! ! ! /** ! * Main method of the filter ! * ! * @param request Incoming request ! * @param response Outgoing response ! * @param chain Filter chain to forward the request and the response ! * @exception IOException In case of error ! * @exception ServletException In case of error ! */ ! public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) ! throws IOException, ServletException ! { ! // Set content type and get the original response ! response.setContentType(contentType); ! PrintWriter out = response.getWriter(); ! ! // Wrap the response with a buffer and follow the chain ! StringResponseWrapper wrapper = new StringResponseWrapper((HttpServletResponse) response); ! chain.doFilter(request, wrapper); ! ! // Create a reader with the result ! StringReader reader = new StringReader(wrapper.toString()); ! Source source = new StreamSource(reader); ! ! try ! { ! // Create the final response writer ! logger.debug("Creating Writer..."); ! StringWriter writer = new StringWriter(); ! StreamResult result = new StreamResult(writer); ! ! // Transform according to XSL stylesheet ! logger.debug("Applying stylesheet..."); ! transformer.transform(source, result); ! ! // Print out the result ! logger.debug("Ouputing..."); ! response.setContentLength(writer.toString().length()); ! out.println(writer.toString()); ! } ! catch (Exception e) ! { ! logger.error("Error during transformation " + e.getMessage()); ! out.println(wrapper.toString()); ! } ! } ! ! ! /** ! * Performs the initialization of the filter ! * ! * @param config The filter configuration ! * @exception ServletException Exception thrown if the filter was not properly configured ! */ ! public void init(FilterConfig config) ! throws ServletException ! { ! this.config = config; ! ! // Get the content type ! this.contentType = config.getInitParameter("mime-type"); ! logger.debug("Acquiring parameter mime-type=" + contentType); ! ! // Get the stylesheet ! String styleSheet = config.getInitParameter("stylesheet"); ! logger.debug("Acquiring parameter stylesheet=" + styleSheet); ! ! // Set the absolute position of the stylesheet ! String stylePath = config.getServletContext().getRealPath(styleSheet); ! ! try ! { ! // Prepare the XSL transformer ! logger.debug("Compiling stylesheet..."); ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! transformer = tFactory.newTransformer(new StreamSource(stylePath)); ! } ! catch (Exception e) ! { ! logger.fatal("Failed to init the filter " + e.getMessage()); ! throw new ServletException(e.getMessage()); ! } ! } ! } |
From: <let...@us...> - 2003-12-14 09:48:30
|
Update of /cvsroot/ejtools/libraries/servlet In directory sc8-pr-cvs1:/tmp/cvs-serv18305/servlet Modified Files: .classpath project.xml Log Message: Add more javadocs. Add package.html files. Index: .classpath =================================================================== RCS file: /cvsroot/ejtools/libraries/servlet/.classpath,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .classpath 15 Sep 2003 22:04:41 -0000 1.2 --- .classpath 13 Dec 2003 21:24:50 -0000 1.3 *************** *** 5,10 **** <classpathentry kind="src" path="/ejtools-thirdparty"/> <classpathentry kind="var" path="JRE_LIB" sourcepath="JDK_SRC"/> - <classpathentry kind="var" path="MAVEN_REPO/sun/jars/j2ee-1.4.0.jar"/> <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar"/> <classpathentry kind="output" path="bin"/> </classpath> --- 5,10 ---- <classpathentry kind="src" path="/ejtools-thirdparty"/> <classpathentry kind="var" path="JRE_LIB" sourcepath="JDK_SRC"/> <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/libraries/servlet/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** project.xml 15 Sep 2003 22:00:14 -0000 1.1 --- project.xml 13 Dec 2003 21:24:50 -0000 1.2 *************** *** 14,24 **** <id>ejtools-servlet</id> <groupId>ejtools</groupId> ! <name>Servlet Stuff</name> <currentVersion>1.0.0</currentVersion> <url>/libraries/servlet</url> <dependencies> <dependency> ! <id>log4j</id> ! <version>1.2.8</version> </dependency> <!-- Project dependencies --> --- 14,24 ---- <id>ejtools-servlet</id> <groupId>ejtools</groupId> ! <name>Servlet Util</name> <currentVersion>1.0.0</currentVersion> <url>/libraries/servlet</url> <dependencies> <dependency> ! <id>servletapi</id> ! <version>2.3</version> </dependency> <!-- Project dependencies --> *************** *** 27,36 **** <groupId>ejtools</groupId> <version>1.0.0</version> - </dependency> - <!-- Local dependencies --> - <dependency> - <id>sun</id> - <artifactId>j2ee</artifactId> - <version>1.3.1</version> </dependency> </dependencies> --- 27,30 ---- |
From: <let...@us...> - 2003-12-14 09:48:29
|
Update of /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree In directory sc8-pr-cvs1:/tmp/cvs-serv18305/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree Modified Files: BeanContextTreeTag.java IndentedObject.java TreeIconRendererTag.java TreeLeafTag.java TreeNameRendererTag.java TreeRenderer.java TreeSpacerTag.java Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides JSP tags to flatten hierarchy to display them as a tree. </body> </html> Index: BeanContextTreeTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree/BeanContextTreeTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BeanContextTreeTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- BeanContextTreeTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 1,254 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import java.beans.beancontext.BeanContext; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Vector; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="generateTree" ! * body-content="empty" ! */ ! public class BeanContextTreeTag extends TagSupport ! { ! /** Description of the Field */ ! protected String id = null; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! BeanContext context = null; ! ! if (property != null) ! { ! context = (BeanContext) RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! context = (BeanContext) RequestUtils.lookup(pageContext, name, scope); ! } ! ! if (ignore) ! { ! if (context == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! // Create the beancontext collection ! Collection collection = populate(context, ""); ! pageContext.setAttribute(id, collection); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the id attribute of the BeanContextTreeTag object ! * ! * @return The id value ! * @jsp:attribute name="id" ! * required="true" ! * rtexprvalue="true" ! */ ! public String getId() ! { ! return (this.id); ! } ! ! ! /** ! * Gets the ignore attribute of the BeanContextTreeTag object ! * ! * @return The ignore value ! * @jsp:attribute name="ignore" ! * required="false" ! * rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" ! * required="true" ! * rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the BeanContextTreeTag object ! * ! * @return The property value ! * @jsp:attribute name="property" ! * required="false" ! * rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" ! * required="false" ! * rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Description of the Method */ ! public void release() ! { ! super.release(); ! ignore = false; ! name = null; ! property = null; ! scope = null; ! id = null; ! } ! ! ! /** ! * Sets the id attribute of the BeanContextTreeTag object ! * ! * @param id The new id value ! */ ! public void setId(String id) ! { ! this.id = id; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new value for ignore attribute ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new value for name attribute ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the BeanContextTreeTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new value for scope attribute ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! * @param depth Description of the Parameter ! * @return Description of the Return Value ! */ ! protected Collection populate(BeanContext context, String depth) ! { ! String newDepth = depth; ! Collection result = new Vector(); ! ! Iterator it = context.iterator(); ! while (it.hasNext()) ! { ! BeanContext bc = (BeanContext) it.next(); ! IndentedObject o = new IndentedObject(); ! o.setObject(bc); ! o.setDepth(depth); ! if (it.hasNext()) ! { ! newDepth = depth + "1"; ! } ! else ! { ! newDepth = depth + "0"; ! o.setLast(true); ! } ! result.add(o); ! ! Collection collection = populate(bc, newDepth); ! result.addAll(collection); ! } ! return result; ! } ! } --- 1,254 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import java.beans.beancontext.BeanContext; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Vector; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="generateTree" ! * body-content="empty" ! */ ! public class BeanContextTreeTag extends TagSupport ! { ! /** Description of the Field */ ! protected String id = null; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! BeanContext context = null; ! ! if (property != null) ! { ! context = (BeanContext) RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! context = (BeanContext) RequestUtils.lookup(pageContext, name, scope); ! } ! ! if (ignore) ! { ! if (context == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! // Create the beancontext collection ! Collection collection = populate(context, ""); ! pageContext.setAttribute(id, collection); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the id attribute of the BeanContextTreeTag object ! * ! * @return The id value ! * @jsp:attribute name="id" ! * required="true" ! * rtexprvalue="true" ! */ ! public String getId() ! { ! return (this.id); ! } ! ! ! /** ! * Gets the ignore attribute of the BeanContextTreeTag object ! * ! * @return The ignore value ! * @jsp:attribute name="ignore" ! * required="false" ! * rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" ! * required="true" ! * rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the BeanContextTreeTag object ! * ! * @return The property value ! * @jsp:attribute name="property" ! * required="false" ! * rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" ! * required="false" ! * rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Description of the Method */ ! public void release() ! { ! super.release(); ! ignore = false; ! name = null; ! property = null; ! scope = null; ! id = null; ! } ! ! ! /** ! * Sets the id attribute of the BeanContextTreeTag object ! * ! * @param id The new id value ! */ ! public void setId(String id) ! { ! this.id = id; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new value for ignore attribute ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new value for name attribute ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the BeanContextTreeTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new value for scope attribute ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! * @param depth Description of the Parameter ! * @return Description of the Return Value ! */ ! protected Collection populate(BeanContext context, String depth) ! { ! String newDepth = depth; ! Collection result = new Vector(); ! ! Iterator it = context.iterator(); ! while (it.hasNext()) ! { ! BeanContext bc = (BeanContext) it.next(); ! IndentedObject o = new IndentedObject(); ! o.setObject(bc); ! o.setDepth(depth); ! if (it.hasNext()) ! { ! newDepth = depth + "1"; ! } ! else ! { ! newDepth = depth + "0"; ! o.setLast(true); ! } ! result.add(o); ! ! Collection collection = populate(bc, newDepth); ! result.addAll(collection); ! } ! return result; ! } ! } Index: IndentedObject.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree/IndentedObject.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IndentedObject.java 15 Sep 2003 21:58:25 -0000 1.3 --- IndentedObject.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 1,105 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class IndentedObject ! { ! /** Description of the Field */ ! protected String depth = null; ! /** Description of the Field */ ! protected boolean last = false; ! /** Description of the Field */ ! protected Object o = null; ! ! ! /** Constructor for the IndentedObject object */ ! public IndentedObject() { } ! ! ! /** ! * Gets the depth attribute of the IndentedObject object ! * ! * @return The depth value ! */ ! public String getDepth() ! { ! return this.depth; ! } ! ! ! /** ! * Gets the object attribute of the IndentedObject object ! * ! * @return The object value ! */ ! public Object getObject() ! { ! return this.o; ! } ! ! ! /** ! * Gets the last attribute of the IndentedObject object ! * ! * @return The last value ! */ ! public boolean isLast() ! { ! return this.last; ! } ! ! ! /** ! * Sets the depth attribute of the IndentedObject object ! * ! * @param depth The new depth value ! */ ! public void setDepth(String depth) ! { ! this.depth = depth; ! } ! ! ! /** ! * Sets the last attribute of the IndentedObject object ! * ! * @param last The new last value ! */ ! public void setLast(boolean last) ! { ! this.last = last; ! } ! ! ! /** ! * Sets the object attribute of the IndentedObject object ! * ! * @param o The new object value ! */ ! public void setObject(Object o) ! { ! this.o = o; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public String toString() ! { ! return "D=" + depth + " L=" + last + " O=" + o; ! } ! } --- 1,105 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class IndentedObject ! { ! /** Description of the Field */ ! protected String depth = null; ! /** Description of the Field */ ! protected boolean last = false; ! /** Description of the Field */ ! protected Object o = null; ! ! ! /** Constructor for the IndentedObject object */ ! public IndentedObject() { } ! ! ! /** ! * Gets the depth attribute of the IndentedObject object ! * ! * @return The depth value ! */ ! public String getDepth() ! { ! return this.depth; ! } ! ! ! /** ! * Gets the object attribute of the IndentedObject object ! * ! * @return The object value ! */ ! public Object getObject() ! { ! return this.o; ! } ! ! ! /** ! * Gets the last attribute of the IndentedObject object ! * ! * @return The last value ! */ ! public boolean isLast() ! { ! return this.last; ! } ! ! ! /** ! * Sets the depth attribute of the IndentedObject object ! * ! * @param depth The new depth value ! */ ! public void setDepth(String depth) ! { ! this.depth = depth; ! } ! ! ! /** ! * Sets the last attribute of the IndentedObject object ! * ! * @param last The new last value ! */ ! public void setLast(boolean last) ! { ! this.last = last; ! } ! ! ! /** ! * Sets the object attribute of the IndentedObject object ! * ! * @param o The new object value ! */ ! public void setObject(Object o) ! { ! this.o = o; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public String toString() ! { ! return "D=" + depth + " L=" + last + " O=" + o; ! } ! } Index: TreeIconRendererTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree/TreeIconRendererTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TreeIconRendererTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- TreeIconRendererTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 1,185 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="treeIconRenderer" body-content="empty" ! */ ! public class TreeIconRendererTag extends TagSupport ! { ! /** Description of the Field */ ! protected String className = null; ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String img = null; ! Object o = null; ! ! if (property != null) ! { ! o = RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! o = RequestUtils.lookup(pageContext, name, scope); ! } ! ! if (o == null) ! { ! return (SKIP_BODY); ! } ! ! try ! { ! TreeRenderer renderer = (TreeRenderer) Class.forName(this.className).newInstance(); ! ! img = renderer.getIcon(o); ! } ! catch (Exception e) ! { ! img = null; ! } ! if (img == null) ! { ! img = ""; ! } ! ! ResponseUtils.write(pageContext, "<img src=\"" + img + "\"/>"); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeRendererTag object ! * ! * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the class attribute of the TreeRendererTag object ! * ! * @return The class value ! * @jsp:attribute name="renderer" required="true" rtexprvalue="true" ! */ ! public String getRenderer() ! { ! return (this.className); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! scope = null; ! className = null; ! property = null; ! name = null; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeRendererTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the class attribute of the TreeRendererTag object ! * ! * @param className The new class value ! */ ! public void setRenderer(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } --- 1,185 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="treeIconRenderer" body-content="empty" ! */ ! public class TreeIconRendererTag extends TagSupport ! { ! /** Description of the Field */ ! protected String className = null; ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String img = null; ! Object o = null; ! ! if (property != null) ! { ! o = RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! o = RequestUtils.lookup(pageContext, name, scope); ! } ! ! if (o == null) ! { ! return (SKIP_BODY); ! } ! ! try ! { ! TreeRenderer renderer = (TreeRenderer) Class.forName(this.className).newInstance(); ! ! img = renderer.getIcon(o); ! } ! catch (Exception e) ! { ! img = null; ! } ! if (img == null) ! { ! img = ""; ! } ! ! ResponseUtils.write(pageContext, "<img src=\"" + img + "\"/>"); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeRendererTag object ! * ! * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the class attribute of the TreeRendererTag object ! * ! * @return The class value ! * @jsp:attribute name="renderer" required="true" rtexprvalue="true" ! */ ! public String getRenderer() ! { ! return (this.className); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! scope = null; ! className = null; ! property = null; ! name = null; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeRendererTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the class attribute of the TreeRendererTag object ! * ! * @param className The new class value ! */ ! public void setRenderer(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } Index: TreeLeafTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree/TreeLeafTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TreeLeafTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- TreeLeafTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 1,176 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="treeLeaf" body-content="empty" ! */ ! public class TreeLeafTag extends TagSupport ! { ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! /** Description of the Field */ ! protected boolean value = false; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String img = null; ! boolean leaf = getValue(); ! ! if (name != null) ! { ! if (property != null) ! { ! leaf = ((Boolean) RequestUtils.lookup(pageContext, name, property, scope)).booleanValue(); ! } ! else ! { ! leaf = ((Boolean) RequestUtils.lookup(pageContext, name, scope)).booleanValue(); ! } ! } ! ! if (leaf) ! { ! img = "<img src=\"images/tree/join.gif\"/>"; ! } ! else ! { ! img = "<img src=\"images/tree/joinbottom.gif\"/>"; ! } ! ! ResponseUtils.write(pageContext, img); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! * @jsp:attribute name="name" required="false" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeSpacerTag object ! * ! * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** ! * Gets the follow attribute of the TreeSpacerTag object ! * ! * @return The follow value ! * @jsp:attribute name="value" required="false" rtexprvalue="true" ! */ ! public boolean getValue() ! { ! return (this.value); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! value = false; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeSpacerTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Sets the follow attribute of the TreeSpacerTag object ! * ! * @param value The new value value ! */ ! public void setValue(boolean value) ! { ! this.value = value; ! } ! ! } ! --- 1,176 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="treeLeaf" body-content="empty" ! */ ! public class TreeLeafTag extends TagSupport ! { ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! /** Description of the Field */ ! protected boolean value = false; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String img = null; ! boolean leaf = getValue(); ! ! if (name != null) ! { ! if (property != null) ! { ! leaf = ((Boolean) RequestUtils.lookup(pageContext, name, property, scope)).booleanValue(); ! } ! else ! { ! leaf = ((Boolean) RequestUtils.lookup(pageContext, name, scope)).booleanValue(); ! } ! } ! ! if (leaf) ! { ! img = "<img src=\"images/tree/join.gif\"/>"; ! } ! else ! { ! img = "<img src=\"images/tree/joinbottom.gif\"/>"; ! } ! ! ResponseUtils.write(pageContext, img); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! * @jsp:attribute name="name" required="false" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeSpacerTag object ! * ! * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** ! * Gets the follow attribute of the TreeSpacerTag object ! * ! * @return The follow value ! * @jsp:attribute name="value" required="false" rtexprvalue="true" ! */ ! public boolean getValue() ! { ! return (this.value); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! value = false; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeSpacerTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Sets the follow attribute of the TreeSpacerTag object ! * ! * @param value The new value value ! */ ! public void setValue(boolean value) ! { ! this.value = value; ! } ! ! } ! Index: TreeNameRendererTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree/TreeNameRendererTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TreeNameRendererTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- TreeNameRendererTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 1,186 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="treeNameRenderer" body-content="empty" ! */ ! public class TreeNameRendererTag extends TagSupport ! { ! /** Description of the Field */ ! protected String className = null; ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String display = null; ! Object o = null; ! ! if (property != null) ! { ! o = RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! o = RequestUtils.lookup(pageContext, name, scope); ! } ! ! if (o == null) ! { ! return (SKIP_BODY); ! } ! ! try ! { ! TreeRenderer renderer = (TreeRenderer) Class.forName(this.className).newInstance(); ! ! display = renderer.getDisplayName(o); ! } ! catch (Exception e) ! { ! display = null; ! } ! if (display == null) ! { ! display = ""; ! } ! ! ResponseUtils.write(pageContext, display); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeRendererTag object ! * ! * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the class attribute of the TreeRendererTag object ! * ! * @return The class value ! * @jsp:attribute name="renderer" required="true" rtexprvalue="true" ! */ ! public String getRenderer() ! { ! return (this.className); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! scope = null; ! className = null; ! property = null; ! name = null; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeRendererTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the class attribute of the TreeRendererTag object ! * ! * @param className The new class value ! */ ! public void setRenderer(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } --- 1,186 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="treeNameRenderer" body-content="empty" ! */ ! public class TreeNameRendererTag extends TagSupport ! { ! /** Description of the Field */ ! protected String className = null; ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String display = null; ! Object o = null; ! ! if (property != null) ! { ! o = RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! o = RequestUtils.lookup(pageContext, name, scope); ! } ! ! if (o == null) ! { ! return (SKIP_BODY); ! } ! ! try ! { ! TreeRenderer renderer = (TreeRenderer) Class.forName(this.className).newInstance(); ! ! display = renderer.getDisplayName(o); ! } ! catch (Exception e) ! { ! display = null; ! } ! if (display == null) ! { ! display = ""; ! } ! ! ResponseUtils.write(pageContext, display); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeRendererTag object ! * ! * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the class attribute of the TreeRendererTag object ! * ! * @return The class value ! * @jsp:attribute name="renderer" required="true" rtexprvalue="true" ! */ ! public String getRenderer() ! { ! return (this.className); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! scope = null; ! className = null; ! property = null; ! name = null; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeRendererTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the class attribute of the TreeRendererTag object ! * ! * @param className The new class value ! */ ! public void setRenderer(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } Index: TreeRenderer.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree/TreeRenderer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TreeRenderer.java 15 Sep 2003 21:58:25 -0000 1.3 --- TreeRenderer.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 1,36 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import java.io.Serializable; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface TreeRenderer extends Serializable ! { ! /** ! * Gets the icon attribute of the TreeRenderer object ! * ! * @param o Description of the Parameter ! * @return The icon value ! */ ! public String getIcon(Object o); ! ! ! /** ! * Gets the displayName attribute of the TreeRenderer object ! * ! * @param o Description of the Parameter ! * @return The displayName value ! */ ! public String getDisplayName(Object o); ! } --- 1,36 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import java.io.Serializable; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface TreeRenderer extends Serializable ! { ! /** ! * Gets the icon attribute of the TreeRenderer object ! * ! * @param o Description of the Parameter ! * @return The icon value ! */ ! public String getIcon(Object o); ! ! ! /** ! * Gets the displayName attribute of the TreeRenderer object ! * ! * @param o Description of the Parameter ! * @return The displayName value ! */ ! public String getDisplayName(Object o); ! } Index: TreeSpacerTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/tree/TreeSpacerTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TreeSpacerTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- TreeSpacerTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 1,191 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="treeSpacer" body-content="empty" ! */ ! public class TreeSpacerTag extends TagSupport ! { ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! /** Description of the Field */ ! protected String value = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String img = null; ! String follow = getValue(); ! ! if (follow == null) ! { ! if (name == null) ! { ! return (SKIP_BODY); ! } ! if (property != null) ! { ! follow = (String) RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! follow = (String) RequestUtils.lookup(pageContext, name, scope); ! } ! } ! ! if (follow.length() <= 0) ! { ! return (SKIP_BODY); ! } ! ! StringBuffer output = new StringBuffer(); ! ! for (int i = 0; i < follow.length(); i++) ! { ! if ("1".equals(follow.substring(i, i + 1))) ! { ! img = "<img src=\"images/tree/line.gif\"/>"; ! } ! else ! { ! img = "<img src=\"images/tree/empty.gif\"/>"; ! } ! output.append(img); ! } ! ! ResponseUtils.write(pageContext, output.toString()); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! * @jsp:attribute name="name" required="false" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeSpacerTag object ! * ! * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** ! * Gets the follow attribute of the TreeSpacerTag object ! * ! * @return The follow value ! * @jsp:attribute name="value" required="false" rtexprvalue="true" ! */ ! public String getValue() ! { ! return (this.value); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! value = null; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeSpacerTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Sets the follow attribute of the TreeSpacerTag object ! * ! * @param value The new value value ! */ ! public void setValue(String value) ! { ! this.value = value; ! } ! ! } ! --- 1,191 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.servlet.http.jsp.tagext.tree; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="treeSpacer" body-content="empty" ! */ ! public class TreeSpacerTag extends TagSupport ! { ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! /** Description of the Field */ ! protected String value = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String img = null; ! String follow = getValue(); ! ! if (follow == null) ! { ! if (name == null) ! { ! return (SKIP_BODY); ! } ! if (property != null) ! { ! follow = (String) RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! follow = (String) RequestUtils.lookup(pageContext, name, scope); ! } ! } ! ! if (follow.length() <= 0) ! { ! return (SKIP_BODY); ! } ! ! StringBuffer output = new StringBuffer(); ! ! for (int i = 0; i < follow.length(); i++) ! { ! if ("1".equals(follow.substring(i, i + 1))) ! { ! img = "<img src=\"images/tree/line.gif\"/>"; ! } ! else ! { ! img = "<img src=\"images/tree/empty.gif\"/>"; ! } ! output.append(img); ! } ! ! ResponseUtils.write(pageContext, output.toString()); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! * @jsp:attribute name="name" required="false" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeSpacerTag object ! * ! * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** ! * Gets the follow attribute of the TreeSpacerTag object ! * ! * @return The follow value ! * @jsp:attribute name="value" required="false" rtexprvalue="true" ! */ ! public String getValue() ! { ! return (this.value); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! value = null; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeSpacerTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Sets the follow attribute of the TreeSpacerTag object ! * ! * @param value The new value value ! */ ! public void setValue(String value) ! { ! this.value = value; ! } ! ! } ! |
Update of /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext In directory sc8-pr-cvs1:/tmp/cvs-serv18305/taglib/src/main/org/ejtools/servlet/http/jsp/tagext Modified Files: CheckBoxObjectTag.java HiddenObjectTag.java ObjectClassTag.java RequestParameterTag.java Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides generic purpose JSP tags. </body> </html> Index: CheckBoxObjectTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/CheckBoxObjectTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CheckBoxObjectTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- CheckBoxObjectTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 14,43 **** /** ! * Description of the Class * * @author Laurent Etiemble * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="checkbox" body-content="empty" */ public class CheckBoxObjectTag extends TagSupport { ! /** Description of the Field */ protected String id = null; ! /** Description of the Field */ protected String name = null; ! /** Description of the Field */ protected String property = null; ! /** Description of the Field */ protected String scope = null; ! /** Description of the Field */ protected String value = "true"; /** ! * Description of the Method * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception */ public int doStartTag() --- 14,50 ---- /** ! * Tag that generates an HTML checkbox input field ! * <p> ! * The field is created with :<ul> ! * <li>The <code>id</code> parameter : used as the name</li> ! * <li>The <code>name</code>,<code>property</code> and <code>scope</code> parameter : used to fetch an object. This object is then used as the value</li> ! * <li>The <code>value</code> parameter : used to check/uncheck the field</li> ! * </ul> ! * </p> * * @author Laurent Etiemble * @version $Revision$ ! * @jsp:tag name="checkbox" ! * body-content="empty" */ public class CheckBoxObjectTag extends TagSupport { ! /** Id property of the tag */ protected String id = null; ! /** Name property of the tag */ protected String name = null; ! /** Property property of the tag */ protected String property = null; ! /** Scope property of the tag */ protected String scope = null; ! /** Value property of the tag */ protected String value = "true"; /** ! * Executed when the start tag is encountered * ! * @return An int value to resume or not the processing ! * @exception JspException In case of problem */ public int doStartTag() *************** *** 49,67 **** if (property != null) { ! object = RequestUtils.lookup(pageContext, name, property, scope); } else { ! object = RequestUtils.lookup(pageContext, name, scope); } if (object == null) { ! throw new JspException("Unable to find bean " + name + " or its property " + property); } StringBuffer output = new StringBuffer(); output.append("<input type=\"checkbox\" name=\""); ! output.append(id); output.append("\""); if (Boolean.valueOf(object.toString()).booleanValue()) --- 56,75 ---- if (property != null) { ! object = RequestUtils.lookup(pageContext, this.name, this.property, this.scope); } else { ! object = RequestUtils.lookup(pageContext, this.name, this.scope); } if (object == null) { ! throw new JspException("Unable to find bean " + this.name + " or its property " + this.property); } + // Output the field StringBuffer output = new StringBuffer(); output.append("<input type=\"checkbox\" name=\""); ! output.append(this.id); output.append("\""); if (Boolean.valueOf(object.toString()).booleanValue()) *************** *** 70,74 **** } output.append(" value=\""); ! output.append(ResponseUtils.filter(value.toString())); output.append("\"/>"); --- 78,82 ---- } output.append(" value=\""); ! output.append(ResponseUtils.filter(this.value.toString())); output.append("\"/>"); *************** *** 81,136 **** /** ! * Gets the id attribute of the HiddenObjectTag object * * @return The id value ! * @jsp:attribute name="id" required="true" rtexprvalue="true" */ public String getId() { ! return (this.id); } /** ! * Getter for the name attribute * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" */ public String getName() { ! return (this.name); } /** ! * Gets the property attribute of the HiddenObjectTag object * * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" */ public String getProperty() { ! return (this.property); } /** ! * Getter for the scope attribute * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" */ public String getScope() { ! return (this.scope); } /** ! * Gets the value attribute of the CheckBoxObjectTag object * * @return The value value ! * @jsp:attribute name="value" required="false" rtexprvalue="true" */ public String getValue() --- 89,154 ---- /** ! * Gets the id value of this tag * * @return The id value ! * @jsp:attribute name="id" ! * required="true" ! * rtexprvalue="true" */ public String getId() { ! return this.id; } /** ! * Gets the name value of this tag * ! * @return The name value ! * @jsp:attribute name="name" ! * required="true" ! * rtexprvalue="true" */ public String getName() { ! return this.name; } /** ! * Gets the property value of this tag * * @return The property value ! * @jsp:attribute name="property" ! * required="false" ! * rtexprvalue="true" */ public String getProperty() { ! return this.property; } /** ! * Gets the scope value of this tag * ! * @return The scope value ! * @jsp:attribute name="scope" ! * required="false" ! * rtexprvalue="true" */ public String getScope() { ! return this.scope; } /** ! * Gets the value value of this tag * * @return The value value ! * @jsp:attribute name="value" ! * required="false" ! * rtexprvalue="true" */ public String getValue() *************** *** 144,157 **** { super.release(); ! id = null; ! name = null; ! property = null; ! scope = null; ! value = "true"; } /** ! * Sets the id attribute of the HiddenObjectTag object * * @param id The new id value --- 162,175 ---- { super.release(); ! this.id = null; ! this.name = null; ! this.property = null; ! this.scope = null; ! this.value = "true"; } /** ! * Sets the id value of this tag * * @param id The new id value *************** *** 164,170 **** /** ! * Setter for the name attribute * ! * @param name The new value for name attribute */ public void setName(String name) --- 182,188 ---- /** ! * Sets the name value of this tag * ! * @param name The new name value */ public void setName(String name) *************** *** 175,179 **** /** ! * Sets the property attribute of the HiddenObjectTag object * * @param property The new property value --- 193,197 ---- /** ! * Sets the property value of this tag * * @param property The new property value *************** *** 186,192 **** /** ! * Setter for the scope attribute * ! * @param scope The new value for scope attribute */ public void setScope(String scope) --- 204,210 ---- /** ! * Sets the scope value of this tag * ! * @param scope The new scope value */ public void setScope(String scope) *************** *** 197,201 **** /** ! * Sets the value attribute of the CheckBoxObjectTag object * * @param value The new value value --- 215,219 ---- /** ! * Sets the value value of this tag * * @param value The new value value *************** *** 205,209 **** this.value = value; } - } --- 223,226 ---- Index: HiddenObjectTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/HiddenObjectTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HiddenObjectTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- HiddenObjectTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 14,41 **** /** ! * Description of the Class * * @author Laurent Etiemble * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="hidden" body-content="empty" */ public class HiddenObjectTag extends TagSupport { ! /** Description of the Field */ protected String id = null; ! /** Description of the Field */ protected String name = null; ! /** Description of the Field */ protected String property = null; ! /** Description of the Field */ protected String scope = null; /** ! * Description of the Method * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception */ public int doStartTag() --- 14,47 ---- /** ! * Tag that generates an HTML hidden input field ! * <p> ! * The field is created with :<ul> ! * <li>The <code>id</code> parameter : used as the name</li> ! * <li>The <code>name</code>,<code>property</code> and <code>scope</code> parameter : used to fetch an object. This object is then used as the value</li> ! * </ul> ! * </p> * * @author Laurent Etiemble * @version $Revision$ ! * @jsp:tag name="hidden" ! * body-content="empty" */ public class HiddenObjectTag extends TagSupport { ! /** Id property of the tag */ protected String id = null; ! /** Name property of the tag */ protected String name = null; ! /** Property property of the tag */ protected String property = null; ! /** Scope property of the tag */ protected String scope = null; /** ! * Executed when the start tag is encountered * ! * @return An int value to resume or not the processing ! * @exception JspException In case of problem */ public int doStartTag() *************** *** 47,65 **** if (property != null) { ! object = RequestUtils.lookup(pageContext, name, property, scope); } else { ! object = RequestUtils.lookup(pageContext, name, scope); } if (object == null) { ! throw new JspException("Unable to find bean " + name + " or its property " + property); } StringBuffer output = new StringBuffer(); output.append("<input type=\"hidden\" name=\""); ! output.append(id); output.append("\" value=\""); output.append(ResponseUtils.filter(object.toString())); --- 53,72 ---- if (property != null) { ! object = RequestUtils.lookup(pageContext, this.name, this.property, this.scope); } else { ! object = RequestUtils.lookup(pageContext, this.name, this.scope); } if (object == null) { ! throw new JspException("Unable to find bean " + this.name + " or its property " + this.property); } + // Output the field StringBuffer output = new StringBuffer(); output.append("<input type=\"hidden\" name=\""); ! output.append(this.id); output.append("\" value=\""); output.append(ResponseUtils.filter(object.toString())); *************** *** 74,121 **** /** ! * Gets the id attribute of the HiddenObjectTag object * * @return The id value ! * @jsp:attribute name="id" required="true" rtexprvalue="true" */ public String getId() { ! return (this.id); } /** ! * Getter for the name attribute * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" */ public String getName() { ! return (this.name); } /** ! * Gets the property attribute of the HiddenObjectTag object * * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" */ public String getProperty() { ! return (this.property); } /** ! * Getter for the scope attribute * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" */ public String getScope() { ! return (this.scope); } --- 81,136 ---- /** ! * Gets the id value of this tag * * @return The id value ! * @jsp:attribute name="id" ! * required="true" ! * rtexprvalue="true" */ public String getId() { ! return this.id; } /** ! * Gets the name value of this tag * ! * @return The name value ! * @jsp:attribute name="name" ! * required="true" ! * rtexprvalue="true" */ public String getName() { ! return this.name; } /** ! * Gets the property value of this tag * * @return The property value ! * @jsp:attribute name="property" ! * required="false" ! * rtexprvalue="true" */ public String getProperty() { ! return this.property; } /** ! * Gets the scope value of this tag * ! * @return The scope value ! * @jsp:attribute name="scope" ! * required="false" ! * rtexprvalue="true" */ public String getScope() { ! return this.scope; } *************** *** 125,137 **** { super.release(); ! id = null; ! name = null; ! property = null; ! scope = null; } /** ! * Sets the id attribute of the HiddenObjectTag object * * @param id The new id value --- 140,152 ---- { super.release(); ! this.id = null; ! this.name = null; ! this.property = null; ! this.scope = null; } /** ! * Sets the id value of this tag * * @param id The new id value *************** *** 144,150 **** /** ! * Setter for the name attribute * ! * @param name The new value for name attribute */ public void setName(String name) --- 159,165 ---- /** ! * Sets the name value of this tag * ! * @param name The new name value */ public void setName(String name) *************** *** 155,159 **** /** ! * Sets the property attribute of the HiddenObjectTag object * * @param property The new property value --- 170,174 ---- /** ! * Sets the property value of this tag * * @param property The new property value *************** *** 166,172 **** /** ! * Setter for the scope attribute * ! * @param scope The new value for scope attribute */ public void setScope(String scope) --- 181,187 ---- /** ! * Sets the scope value of this tag * ! * @param scope The new scope value */ public void setScope(String scope) Index: ObjectClassTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/ObjectClassTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ObjectClassTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- ObjectClassTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 13,40 **** /** ! * Description of the Class * * @author Laurent Etiemble * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="className" body-content="empty" */ public class ObjectClassTag extends TagSupport { ! /** Description of the Field */ protected String id = null; ! /** Description of the Field */ protected String name = null; ! /** Description of the Field */ protected String property = null; ! /** Description of the Field */ protected String scope = null; /** ! * Description of the Method * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception */ public int doStartTag() --- 13,46 ---- /** ! * Tag that put the object class in the page context ! * <p> ! * The object class is put in the context with :<ul> ! * <li>The <code>id</code> parameter : used as the identifier</li> ! * <li>The <code>name</code>,<code>property</code> and <code>scope</code> parameter : used to fetch an object. This object class it then computes</li> ! * </ul> ! * </p> * * @author Laurent Etiemble * @version $Revision$ ! * @jsp:tag name="className" ! * body-content="empty" */ public class ObjectClassTag extends TagSupport { ! /** Id property of the tag */ protected String id = null; ! /** Name property of the tag */ protected String name = null; ! /** Property property of the tag */ protected String property = null; ! /** Scope property of the tag */ protected String scope = null; /** ! * Executed when the start tag is encountered * ! * @return An int value to resume or not the processing ! * @exception JspException In case of problem */ public int doStartTag() *************** *** 46,63 **** if (property != null) { ! object = RequestUtils.lookup(pageContext, name, property, scope); } else { ! object = RequestUtils.lookup(pageContext, name, scope); } if (object == null) { ! throw new JspException("Unable to find bean " + name + " or its property " + property); } // Put the classname in the pagecontext ! pageContext.setAttribute(id, object.getClass().getName()); // Continue processing this page --- 52,69 ---- if (property != null) { ! object = RequestUtils.lookup(pageContext, this.name, this.property, this.scope); } else { ! object = RequestUtils.lookup(pageContext, this.name, this.scope); } if (object == null) { ! throw new JspException("Unable to find bean " + this.name + " or its property " + this.property); } // Put the classname in the pagecontext ! pageContext.setAttribute(this.id, object.getClass().getName()); // Continue processing this page *************** *** 67,114 **** /** ! * Gets the id attribute of the HiddenObjectTag object * * @return The id value ! * @jsp:attribute name="id" required="true" rtexprvalue="true" */ public String getId() { ! return (this.id); } /** ! * Getter for the name attribute * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" */ public String getName() { ! return (this.name); } /** ! * Gets the property attribute of the HiddenObjectTag object * * @return The property value ! * @jsp:attribute name="property" required="false" rtexprvalue="true" */ public String getProperty() { ! return (this.property); } /** ! * Getter for the scope attribute * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" */ public String getScope() { ! return (this.scope); } --- 73,128 ---- /** ! * Gets the id value of this tag * * @return The id value ! * @jsp:attribute name="id" ! * required="true" ! * rtexprvalue="true" */ public String getId() { ! return this.id; } /** ! * Gets the name value of this tag * ! * @return The name value ! * @jsp:attribute name="name" ! * required="true" ! * rtexprvalue="true" */ public String getName() { ! return this.name; } /** ! * Gets the property value of this tag * * @return The property value ! * @jsp:attribute name="property" ! * required="false" ! * rtexprvalue="true" */ public String getProperty() { ! return this.property; } /** ! * Gets the scope value of this tag * ! * @return The scope value ! * @jsp:attribute name="scope" ! * required="false" ! * rtexprvalue="true" */ public String getScope() { ! return this.scope; } *************** *** 118,130 **** { super.release(); ! id = null; ! name = null; ! property = null; ! scope = null; } /** ! * Sets the id attribute of the HiddenObjectTag object * * @param id The new id value --- 132,144 ---- { super.release(); ! this.id = null; ! this.name = null; ! this.property = null; ! this.scope = null; } /** ! * Sets the id value of this tag * * @param id The new id value *************** *** 137,143 **** /** ! * Setter for the name attribute * ! * @param name The new value for name attribute */ public void setName(String name) --- 151,157 ---- /** ! * Sets the name value of this tag * ! * @param name The new name value */ public void setName(String name) *************** *** 148,152 **** /** ! * Sets the property attribute of the HiddenObjectTag object * * @param property The new property value --- 162,166 ---- /** ! * Sets the property value of this tag * * @param property The new property value *************** *** 159,165 **** /** ! * Setter for the scope attribute * ! * @param scope The new value for scope attribute */ public void setScope(String scope) --- 173,179 ---- /** ! * Sets the scope value of this tag * ! * @param scope The new scope value */ public void setScope(String scope) Index: RequestParameterTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/RequestParameterTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RequestParameterTag.java 15 Sep 2003 21:58:25 -0000 1.3 --- RequestParameterTag.java 13 Dec 2003 21:24:50 -0000 1.4 *************** *** 13,40 **** /** ! * Description of the Class * * @author Laurent Etiemble * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="requestParameter" body-content="empty" */ public class RequestParameterTag extends TagSupport { ! /** Description of the Field */ protected String id = null; ! /** Description of the Field */ protected String name = null; ! /** Description of the Field */ protected String type = null; ! /** Description of the Field */ protected String value = null; /** ! * Description of the Method * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception */ public int doStartTag() --- 13,48 ---- /** ! * Tag that put a request parameter in the page context ! * <p> ! * The request parameter is put in the context with :<ul> ! * <li>The <code>id</code> parameter : used as the identifier</li> ! * <li>The <code>name</code> parameter : used to fetch the request parameter</li> ! * <li>The <code>type</code> parameter : used to type the request parameter</li> ! * <li>The <code>value</code> parameter : used as a default value if the request parameter is not found</li> ! * </ul> ! * </p> * * @author Laurent Etiemble * @version $Revision$ ! * @jsp:tag name="requestParameter" ! * body-content="empty" */ public class RequestParameterTag extends TagSupport { ! /** Id property of the tag */ protected String id = null; ! /** Name property of the tag */ protected String name = null; ! /** Type property of the tag */ protected String type = null; ! /** Value property of the tag */ protected String value = null; /** ! * Executed when the start tag is encountered * ! * @return An int value to resume or not the processing ! * @exception JspException In case of problem */ public int doStartTag() *************** *** 43,61 **** String s = null; ! s = pageContext.getRequest().getParameter(name); ! if ((s == null) && (value == null)) { ! throw new JspException("Request parameter " + name + " not found and value is not provided"); } if (s == null) { ! s = value; } ! Object object = this.convert(s, type); // Put the value in the pagecontext ! pageContext.setAttribute(id, object); // Continue processing this page --- 51,69 ---- String s = null; ! s = pageContext.getRequest().getParameter(this.name); ! if ((s == null) && (this.value == null)) { ! throw new JspException("Request parameter " + this.name + " not found and value is not provided"); } if (s == null) { ! s = this.value; } ! Object object = this.convert(s, this.type); // Put the value in the pagecontext ! pageContext.setAttribute(this.id, object); // Continue processing this page *************** *** 65,112 **** /** ! * Gets the id attribute of the HiddenObjectTag object * * @return The id value ! * @jsp:attribute name="id" required="true" rtexprvalue="true" */ public String getId() { ! return (this.id); } /** ! * Getter for the name attribute * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" */ public String getName() { ! return (this.name); } /** ! * Gets the property attribute of the HiddenObjectTag object * ! * @return The property value ! * @jsp:attribute name="type" required="false" rtexprvalue="true" */ public String getType() { ! return (this.type); } /** ! * Returns the value. * ! * @return String ! * @jsp:attribute name="value" required="false" rtexprvalue="true" */ public String getValue() { ! return value; } --- 73,128 ---- /** ! * Gets the id value of this tag * * @return The id value ! * @jsp:attribute name="id" ! * required="true" ! * rtexprvalue="true" */ public String getId() { ! return this.id; } /** ! * Gets the name value of this tag * ! * @return The name value ! * @jsp:attribute name="name" ! * required="true" ! * rtexprvalue="true" */ public String getName() { ! return this.name; } /** ! * Gets the type value of this tag * ! * @return The type value ! * @jsp:attribute name="type" ! * required="false" ! * rtexprvalue="true" */ public String getType() { ! return this.type; } /** ! * Gets the value value of this tag * ! * @return The value value ! * @jsp:attribute name="value" ! * required="false" ! * rtexprvalue="true" */ public String getValue() { ! return this.value; } *************** *** 116,127 **** { super.release(); ! id = null; ! name = null; ! type = null; } /** ! * Sets the id attribute of the HiddenObjectTag object * * @param id The new id value --- 132,144 ---- { super.release(); ! this.id = null; ! this.name = null; ! this.type = null; ! this.value = null; } /** ! * Sets the id value of this tag * * @param id The new id value *************** *** 134,140 **** /** ! * Setter for the name attribute * ! * @param name The new value for name attribute */ public void setName(String name) --- 151,157 ---- /** ! * Sets the name value of this tag * ! * @param name The new name value */ public void setName(String name) *************** *** 145,149 **** /** ! * Sets the property attribute of the HiddenObjectTag object * * @param type The new type value --- 162,166 ---- /** ! * Sets the type value of this tag * * @param type The new type value *************** *** 156,162 **** /** ! * Sets the value. * ! * @param value The value to set */ public void setValue(String value) --- 173,179 ---- /** ! * Sets the value value of this tag * ! * @param value The new value value */ public void setValue(String value) *************** *** 167,177 **** /** ! * Description of the Method * ! * @param s Description of the Parameter ! * @param type Description of the Parameter ! * @return Description of the Return Value */ ! private Object convert(String s, String type) { Class c = ClassTools.getClass(type); --- 184,194 ---- /** ! * Used to transform a string into a type object * ! * @param s The string representation of the object ! * @param type The type of the object ! * @return A type object */ ! protected Object convert(String s, String type) { Class c = ClassTools.getClass(type); |
From: <let...@us...> - 2003-12-14 09:48:26
|
Update of /cvsroot/ejtools/libraries/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/iteration In directory sc8-pr-cvs1:/tmp/cvs-serv18305/taglib/src/main/org/ejtools/servlet/http/jsp/tagext/iteration Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides JSP tags to iterate over a collection. Pages and number of items are customizable. </body> </html> |
From: <let...@us...> - 2003-12-14 09:47:56
|
Update of /cvsroot/ejtools/libraries/j2ee.icons/src/resources/frameGraphics In directory sc8-pr-cvs1:/tmp/cvs-serv14858/j2ee.icons/src/resources/frameGraphics Log Message: Directory /cvsroot/ejtools/libraries/j2ee.icons/src/resources/frameGraphics added to the repository |
From: <let...@us...> - 2003-12-14 09:47:48
|
Update of /cvsroot/ejtools/libraries/common/src/resources/org/ejtools/util In directory sc8-pr-cvs1:/tmp/cvs-serv12455/common/src/resources/org/ejtools/util Log Message: Directory /cvsroot/ejtools/libraries/common/src/resources/org/ejtools/util added to the repository |
From: <let...@us...> - 2003-12-14 09:47:48
|
Update of /cvsroot/ejtools/libraries/common/src/resources/org In directory sc8-pr-cvs1:/tmp/cvs-serv12386/common/src/resources/org Log Message: Directory /cvsroot/ejtools/libraries/common/src/resources/org added to the repository |
From: <let...@us...> - 2003-12-14 09:47:10
|
Update of /cvsroot/ejtools/libraries/j2ee.management In directory sc8-pr-cvs1:/tmp/cvs-serv9476 Added Files: .classpath .cvsignore .project project.properties project.xml Log Message: Add up-to-date JSR77 implementation. Can skip the Sun one. --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src/main"/> <classpathentry kind="src" path="/ejtools-thirdparty"/> <classpathentry kind="var" path="JRE_LIB" sourcepath="JDK_SRC"/> <classpathentry kind="var" path="MAVEN_REPO/ejb/jars/ejb-2.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/mx4j/jars/mx4j-jmx-1.1.1.jar"/> <classpathentry kind="output" path="bin"/> </classpath> --- NEW FILE: .cvsignore --- bin dist output target --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>ejtools-libraries-management</name> <comment></comment> <projects> <project>ejtools-thirdparty</project> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> --- NEW FILE: project.properties --- # ================================================================================ # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at gnu.org. # # $Revision: 1.1 $ # ================================================================================ maven.repo.remote=file:${basedir}/../../thirdparty,http://www.ibiblio.org/maven --- NEW FILE: project.xml --- <?xml version="1.0" encoding="UTF-8"?> <!-- # ================================================================================ # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at gnu.org. # # $Revision: 1.1 $ # ================================================================================ --> <project> <extend>${basedir}/../../project.xml</extend> <id>ejtools-j2ee-management</id> <groupId>ejtools</groupId> <name>J2EE Management</name> <currentVersion>1.0.0</currentVersion> <url>/libraries/j2ee.management</url> <package>org.ejtools,javax</package> <dependencies> <dependency> <id>ejb</id> <version>2.1</version> </dependency> <dependency> <id>mx4j</id> <artifactId>mx4j-jmx</artifactId> <version>1.1.1</version> </dependency> </dependencies> </project> |
From: <let...@us...> - 2003-12-14 09:46:59
|
Update of /cvsroot/ejtools/libraries/j2ee.management/src/main/javax/management/j2ee/statistics In directory sc8-pr-cvs1:/tmp/cvs-serv7911/src/main/javax/management/j2ee/statistics Log Message: Directory /cvsroot/ejtools/libraries/j2ee.management/src/main/javax/management/j2ee/statistics added to the repository |
From: <let...@us...> - 2003-12-14 09:46:56
|
Update of /cvsroot/ejtools/libraries/j2ee.management/src/main/javax/management In directory sc8-pr-cvs1:/tmp/cvs-serv6975/src/main/javax/management Log Message: Directory /cvsroot/ejtools/libraries/j2ee.management/src/main/javax/management added to the repository |
From: <let...@us...> - 2003-12-14 09:46:53
|
Update of /cvsroot/ejtools/libraries/j2ee.management/xdocs/images In directory sc8-pr-cvs1:/tmp/cvs-serv5329/xdocs/images Log Message: Directory /cvsroot/ejtools/libraries/j2ee.management/xdocs/images added to the repository |
From: <let...@us...> - 2003-12-14 09:46:52
|
Update of /cvsroot/ejtools/libraries/j2ee.management/src In directory sc8-pr-cvs1:/tmp/cvs-serv5233/src Log Message: Directory /cvsroot/ejtools/libraries/j2ee.management/src added to the repository |
From: <let...@us...> - 2003-12-14 09:46:51
|
Update of /cvsroot/ejtools/libraries/j2ee.management In directory sc8-pr-cvs1:/tmp/cvs-serv5057/j2ee.management Log Message: Directory /cvsroot/ejtools/libraries/j2ee.management added to the repository |
From: <let...@us...> - 2003-12-14 09:46:49
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise/deploy/spi/factories In directory sc8-pr-cvs1:/tmp/cvs-serv4692/src/test/test/enterprise/deploy/spi/factories Added Files: AdvancedDeploymentFactory.java BasicDeploymentFactory.java Log Message: Add up-to-date implementation for the JSR 88. No need for the Sun one. --- NEW FILE: AdvancedDeploymentFactory.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package test.enterprise.deploy.spi.factories; import javax.enterprise.deploy.spi.DeploymentManager; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException; import javax.enterprise.deploy.spi.factories.DeploymentFactory; import test.enterprise.deploy.spi.AdvancedDeploymentManager; /** * Description of the Class * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class AdvancedDeploymentFactory implements DeploymentFactory { /** Description of the Field */ public final static String NAME = "AdvancedDeploymentFactory"; /** Description of the Field */ public final static String URI = "deployer:advanced:"; /** Description of the Field */ public final static String VERSION = "1.0"; /** Constructor for the BasicDeploymentFactory object */ public AdvancedDeploymentFactory() { super(); } /** * Gets the deploymentManager attribute of the BasicDeploymentFactory object * * @param uri Description of the Parameter * @param username Description of the Parameter * @param password Description of the Parameter * @return The deploymentManager value * @exception DeploymentManagerCreationException Description of the Exception */ public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException { return new AdvancedDeploymentManager(uri); } /** * Gets the disconnectedDeploymentManager attribute of the BasicDeploymentFactory * object * * @param uri Description of the Parameter * @return The disconnectedDeploymentManager * value * @exception DeploymentManagerCreationException Description of the Exception */ public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException { return new AdvancedDeploymentManager(uri); } /** * Gets the displayName attribute of the BasicDeploymentFactory object * * @return The displayName value */ public String getDisplayName() { return NAME; } /** * Gets the productVersion attribute of the BasicDeploymentFactory object * * @return The productVersion value */ public String getProductVersion() { return VERSION; } /** * Description of the Method * * @param uri Description of the Parameter * @return Description of the Return Value */ public boolean handlesURI(String uri) { return uri.startsWith(URI); } } --- NEW FILE: BasicDeploymentFactory.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package test.enterprise.deploy.spi.factories; import javax.enterprise.deploy.spi.DeploymentManager; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException; import javax.enterprise.deploy.spi.factories.DeploymentFactory; import test.enterprise.deploy.spi.BasicDeploymentManager; /** * Description of the Class * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class BasicDeploymentFactory implements DeploymentFactory { /** Description of the Field */ public final static String NAME = "BasicDeploymentFactory"; /** Description of the Field */ public final static String URI = "deployer:basic:"; /** Description of the Field */ public final static String VERSION = "1.0"; /** Constructor for the BasicDeploymentFactory object */ public BasicDeploymentFactory() { super(); } /** * Gets the deploymentManager attribute of the BasicDeploymentFactory object * * @param uri Description of the Parameter * @param username Description of the Parameter * @param password Description of the Parameter * @return The deploymentManager value * @exception DeploymentManagerCreationException Description of the Exception */ public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException { return new BasicDeploymentManager(uri); } /** * Gets the disconnectedDeploymentManager attribute of the BasicDeploymentFactory * object * * @param uri Description of the Parameter * @return The disconnectedDeploymentManager * value * @exception DeploymentManagerCreationException Description of the Exception */ public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException { return new BasicDeploymentManager(uri); } /** * Gets the displayName attribute of the BasicDeploymentFactory object * * @return The displayName value */ public String getDisplayName() { return NAME; } /** * Gets the productVersion attribute of the BasicDeploymentFactory object * * @return The productVersion value */ public String getProductVersion() { return VERSION; } /** * Description of the Method * * @param uri Description of the Parameter * @return Description of the Return Value */ public boolean handlesURI(String uri) { return uri.startsWith(URI); } } |
From: <let...@us...> - 2003-12-14 09:46:49
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/spi/factories In directory sc8-pr-cvs1:/tmp/cvs-serv4692/src/main/javax/enterprise/deploy/spi/factories Added Files: DeploymentFactory.java package.html Log Message: Add up-to-date implementation for the JSR 88. No need for the Sun one. --- NEW FILE: DeploymentFactory.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi.factories; import javax.enterprise.deploy.spi.DeploymentManager; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException; /** * The DeploymentFactory interface is a deployment driver for a J2EE plaform product. * It returns a DeploymentManager object which represents a connection to a specific * J2EE platform product. <p> * * Each application server vendor must provide an implementation of this class in * order for the J2EE Deployment API to work with their product.</p> <p> * * The class implementing this interface should have a public no-argument constructor, * and it should be stateless (two instances of the class should always behave the * same). It is suggested but not required that the class have a static initializer * that registers an instance of the class with the DeploymentFactoryManager class. * </p> <p> * * A connected or disconnected DeploymentManager can be requested. A DeploymentManager * that runs connected to the platform can provide access to J2EE resources. A DeploymentManager * that runs disconnected only provides module deployment configuration support.</p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.spi.DeploymentManager */ public interface DeploymentFactory { /** * Tests whether this factory can create a DeploymentManager object based on the * specificed URI. This does not indicate whether such an attempt will be successful, * only whether the factory can handle the uri. * * @param uri The uri to check * @return true if the factory can handle the uri. */ public boolean handlesURI(String uri); /** * Return a <code>connected</code> DeploymentManager instance. * * @param uri The URI that specifies the connection * parameters * @param username An optional username (may be * null if no authentication is required for this platform). * @param password An optional password (may be * null if no authentication is required for this platform). * @return A ready DeploymentManager instance. * @exception DeploymentManagerCreationException occurs when a DeploymentManager * could not be returned (server down, unable to authenticate, etc). */ public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException; /** * Return a <code>disconnected</code> DeploymentManager instance. * * @param uri the uri of the DeploymentManager * to return. * @return A DeploymentManager disconnected * instance. * @exception DeploymentManagerCreationException occurs if the DeploymentManager * could not be created. */ public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException; /** * Provide a string with the name of this vendor's DeploymentManager. * * @return the name of the vendor's DeploymentManager. */ public String getDisplayName(); /** * Provide a string identifying version of this vendor's DeploymentManager. * * @return the name of the vendor's DeploymentManager. */ public String getProductVersion(); } --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides J2EE Product Vendor deployment factory implementation classes. <h2>Package Specification</h2> <ul> <li><a href="http://jcp.org/jsr/detail/88.jsp">JSR 88, J2EE Application Deployment</a></li> </ul> <h2>Related Documentation</h2> For overviews, tutorials, examples, guides, and tool documentation, please see: <ul> <li><a href="http://java.sun.com/j2ee/tools">J2EE Tools</a></li> </ul> </body> </html> |
From: <let...@us...> - 2003-12-14 09:46:48
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/shared/factories In directory sc8-pr-cvs1:/tmp/cvs-serv4692/src/main/javax/enterprise/deploy/shared/factories Added Files: DeploymentFactoryManager.java package.html Log Message: Add up-to-date implementation for the JSR 88. No need for the Sun one. --- NEW FILE: DeploymentFactoryManager.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.shared.factories; import java.util.ArrayList; import java.util.Iterator; import javax.enterprise.deploy.spi.DeploymentManager; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException; import javax.enterprise.deploy.spi.factories.DeploymentFactory; /** * The DeploymentFactoryManager class is a central registry for J2EE DeploymentFactory * objects. <p> * * The DeploymentFactoryManager retains references to DeploymentFactory objects loaded * by a tool.</p> <p> * * A DeploymentFactory object provides a reference to a DeploymentManager.</p> <p> * * The DeploymentFactoryManager has been implemented as a singleton. A tool gets * a reference to the DeploymentFactoryManager via the getInstance method.</p> <p> * * The DeploymentFactoryManager can return two types of DeploymentManagers, a connected * DeploymentManager and a disconnected DeploymentManager.</p> <p> * * The connected DeploymentManager provides access to any product resources that * may be required for configurations and deployment. The method to retrieve a connected * DeploymentManager is getDeploymentManager. This method provides parameters for * user name and password that the product may require for user authentication.</p> * <p> * * A disconnected DeploymentManager does not provide access to a running J2EE product. * The method to retrieve a disconnected DeploymentManager is getDisconnectedDeploymentManager. * A disconnected DeploymentManager does not need user authentication information. * <p> * * * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.spi.DeploymentManager * @see javax.enterprise.deploy.spi.factories.DeploymentFactory */ public final class DeploymentFactoryManager { private ArrayList factories = new ArrayList(); private static DeploymentFactoryManager instance = new DeploymentFactoryManager(); /** Private constructor for Singleton implementation */ private DeploymentFactoryManager() { } /** * Retrieve the lists of currently registered DeploymentFactories. * * @return the list of DeploymentFactory objects or an empty array if there * are none. */ public DeploymentFactory[] getDeploymentFactories() { return (DeploymentFactory[]) this.factories.toArray(new DeploymentFactory[this.factories.size()]); } /** * Retrieves a DeploymentManager instance to use for deployment. <p> * * The caller provides a URI and optional username and password, and all registered * DeploymentFactories will be checked. The first one to understand the URI provided * will attempt to initiate a server connection and return a ready DeploymentManager * instance.</p> * * @param uri The uri to check * @param username An optional username (may be * null if no authentication is required for this platform). * @param password An optional password (may be * null if no authentication is required for this platform). * @return A ready DeploymentManager instance. * @exception DeploymentManagerCreationException Occurs when the factory appropriate * to the specified URI was unable to initialize a DeploymentManager instance * (server down, unable to authenticate, etc.). */ public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException { if (uri == null) { throw new IllegalArgumentException("URI for DeploymentManager cannot be null"); } DeploymentManager manager = null; for (Iterator i = this.factories.iterator(); i.hasNext(); ) { DeploymentFactory factory = (DeploymentFactory) i.next(); if (factory.handlesURI(uri)) { manager = factory.getDeploymentManager(uri, username, password); break; } } if (manager == null) { throw new DeploymentManagerCreationException("Could not get a DeploymentManager; No registered DeploymentFactory handles URI '" + uri + "'."); } return manager; } /** * Return a disconnected DeploymentManager instance. <p> * * The caller provides a URI, and all registered DeploymentFactories will be checked. * The first one to understand the URI provided will return a ready DeploymentManager * instance.</p> * * @param uri The uri to check * @return A ready DeploymentManager instance. * @exception DeploymentManagerCreationException Occurs when the factory appropriate * to the specified URI was unable to initialize a DeploymentManager instance * (server down, etc.). */ public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException { if (uri == null) { throw new IllegalArgumentException("URI for DeploymentManager should not be null"); } DeploymentManager manager = null; for (Iterator i = this.factories.iterator(); i.hasNext(); ) { DeploymentFactory factory = (DeploymentFactory) i.next(); if (factory.handlesURI(uri)) { manager = factory.getDisconnectedDeploymentManager(uri); break; } } if (manager == null) { throw new DeploymentManagerCreationException("Could not get a DeploymentManager; No registered DeploymentFactory handles URI '" + uri + "'."); } return manager; } /** * Registers a DeploymentFactory so it will be able to handle requests. * * @param factory The DeploymentFactory to register */ public void registerDeploymentFactory(DeploymentFactory factory) { if (factory == null) { throw new IllegalArgumentException("DeploymentFactory to register cannot be null"); } if (!this.factories.contains(factory)) { this.factories.add(factory); } } /** * Retrieve the Singleton DeploymentFactoryManager * * @return The DeploymentFactoryManager instance */ public static DeploymentFactoryManager getInstance() { return DeploymentFactoryManager.instance; } } --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides shared factory manager object for Tool Vendor and Product Vendor implementation classes. <h2>Package Specification</h2> <ul> <li><a href="http://jcp.org/jsr/detail/88.jsp">JSR 88, J2EE Application Deployment</a></li> </ul> <h2>Related Documentation</h2> For overviews, tutorials, examples, guides, and tool documentation, please see: <ul> <li><a href="http://java.sun.com/j2ee/tools">J2EE Tools</a></li> </ul> </body> </html> |
From: <let...@us...> - 2003-12-14 09:46:48
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/model/exceptions In directory sc8-pr-cvs1:/tmp/cvs-serv4692/src/main/javax/enterprise/deploy/model/exceptions Added Files: DDBeanCreateException.java package.html Log Message: Add up-to-date implementation for the JSR 88. No need for the Sun one. --- NEW FILE: DDBeanCreateException.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.model.exceptions; /** * This exception reports errors in generating a DDBean. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.1 */ public class DDBeanCreateException extends Exception { /** Creates new <code>DDBeanCreateException</code> without detail message. */ public DDBeanCreateException() { super(); } /** * Constructs an <code>DDBeanCreateException</code> with the specified detail * message. * * @param msg the detail message. */ public DDBeanCreateException(String msg) { super(msg); } } --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides Tool Vendor exception implementation classes. <h2>Package Specification</h2> <ul> <li><a href="http://jcp.org/jsr/detail/88.jsp">JSR 88, J2EE Application Deployment</a></li> </ul> <h2>Related Documentation</h2> For overviews, tutorials, examples, guides, and tool documentation, please see: <ul> <li><a href="http://java.sun.com/j2ee/tools">J2EE Tools</a></li> </ul> </body> </html> |
From: <let...@us...> - 2003-12-14 09:46:47
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/model In directory sc8-pr-cvs1:/tmp/cvs-serv4692/src/main/javax/enterprise/deploy/model Added Files: DDBean.java DDBeanRoot.java DeployableObject.java J2eeApplicationObject.java XpathEvent.java XpathListener.java package.html Log Message: Add up-to-date implementation for the JSR 88. No need for the Sun one. --- NEW FILE: DDBean.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.model; /** * An interface for beans that represent a fragment of a standard deployment descriptor. * A link is provided to the J2EE application that includes this bean. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public interface DDBean { /** * Returns the original xpath string provided by the DConfigBean. * * @return The XPath of this Bean. */ public String getXpath(); /** * Returns the XML text for by this bean. * * @return The XML text for this Bean. */ public String getText(); /** * Returns a tool-specific reference for attribute ID on an element in the deployment * descriptor. This attribute is defined for J2EE 1.2 and 1.3 components. * * @return The XML text for this Bean or 'null' if no attribute was specifed * with the tag. */ public String getId(); /** * Return the root element for this DDBean. * * @return The DDBeanRoot at the root of this DDBean tree. */ public DDBeanRoot getRoot(); /** * Return a list of DDBeans based upon the XPath. * * @param xpath An XPath string referring to a location in the same deployment * descriptor as this standard bean. * @return a list of DDBeans or 'null' if no matching XML data is found. */ public DDBean[] getChildBean(String xpath); /** * Return a list of text values for a given XPath in the deployment descriptor. * * @param xpath An XPath. * @return The list text values for this XPath or 'null' if no matching * XML data is found. */ public String[] getText(String xpath); /** * Register a listener for a specific XPath. * * @param xpath The XPath this listener is to be registered for. * @param xpl The listener object. */ public void addXpathListener(String xpath, XpathListener xpl); /** * Unregister a listener for a specific XPath. * * @param xpath The XPath from which this listener is to be unregistered. * @param xpl The listener object. */ public void removeXpathListener(String xpath, XpathListener xpl); /** * Returns the list of attribute names associated with the XML element. * * @return a list of attribute names on this element. Null is returned if there * are no attributes. */ public String[] getAttributeNames(); /** * Returns the string value of the named attribute. * * @param attrName The attribute name * @return a the value of the attribute. Null is returned if there is * no such attribute. */ public String getAttributeValue(String attrName); } --- NEW FILE: DDBeanRoot.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.model; import javax.enterprise.deploy.shared.ModuleType; /** * An interface that represents the root of a standard deployment descriptor. A DDBeanRoot * is a type of DDBean. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.shared.ModuleType */ public interface DDBeanRoot extends DDBean { /** * Return the ModuleType of deployment descriptor. * * @return The ModuleType of deployment descriptor */ public ModuleType getType(); /** * Return the containing DeployableObject * * @return The DeployableObject that contains this deployment descriptor */ public DeployableObject getDeployableObject(); /** * A convenience method to return the DTD version number. The DeployableObject * has this information. * * @return a string containing the DTD version number This method is being * deprecated. Two DD data formats are being used, DTD and XML Schema. DDBeanRoot.getDDBeanRootVersion * should be used in its place. * @deprecated As of version 1.1 replaced by DDBeanRoot.getDDBeanRootVersion() */ public String getModuleDTDVersion(); /** * Returns the version number of an XML instance document. This method is replacing * the methods DDBeanRoot.getModuleDTDVersion and DeployableObject.getModuleDTDVersion. * This method returns the version number of any J2EE XML instance document. * * @return a string that is the version number of the XML instance document. * Null is returned if no version number can be found. */ public String getDDBeanRootVersion(); /** * Return the XPath for this standard bean. The root XPath is "/". * * @return "/" this is the root standard bean. */ public String getXpath(); /** * Returns the filename relative to the root of the module of the XML instance * document this DDBeanRoot represents. * * @return String the filename relative to the root of the module */ public String getFilename(); } --- NEW FILE: DeployableObject.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.model; import java.io.FileNotFoundException; import java.io.InputStream; import java.util.Enumeration; import javax.enterprise.deploy.model.exceptions.DDBeanCreateException; import javax.enterprise.deploy.shared.ModuleType; /** * The DeployableObject interface is an abstract representation of a J2EE deployable * module (JAR, WAR, RAR, EAR). A DeployableObject provides access to the module's * deployment descriptor and class files. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.shared.ModuleType */ public interface DeployableObject { /** * Return the ModuleType of deployment descriptor (i.e., EAR, JAR, WAR, RAR) this * deployable object represents. Values are found in DeploymentManager. * * @return The ModuleType of deployable object */ public ModuleType getType(); /** * Return the top level standard bean representing the root of the deployment * descriptor. * * @return A standard bean representing the deployment descriptor. */ public DDBeanRoot getDDBeanRoot(); /** * Return an array of standard beans representing the XML content returned based * upon the XPath. * * @param xpath An XPath string identifying the data to be extracted from the * deployment descriptor. * @return a array of DDBeans or 'null' if no matching data found. */ public DDBean[] getChildBean(String xpath); /** * Return the XML content associated with the XPath from a deployment descriptor. * * @param xpath An xpath string referring to a location in the deployment descriptor * @return a list XML content or 'null' if no matching data found. */ public String[] getText(String xpath); /** * Retrieve the specified class from this deployable module. <p> * * One use: to get all finder methods from an EJB If the tool is attempting to * package an module and retrieve a class from the package, the class request * may fail. The class may not yet be available. The tool should respect the manifest * cross-path entries.</p> * * @param className Class to retrieve. * @return Class representation of the class */ public Class getClassFromScope(String className); /** * Returns the DTD version number given in the XML DOCTYPE text provided in every * standard J2EE module's deployment descriptor file. * * @return a string containing the DTD version number * @deprecated As of version 1.1 replaced by DDBeanRoot.getDDBeanRootVersion() */ public String getModuleDTDVersion(); /** * Returns a DDBeanRoot object for the XML instance document named. This method * should be used to return DDBeanRoot objects for non deployment descriptor XML * instance documents such as WSDL files. * * @param filename The full path for the XML instance document * relative to root of the DeployableObject archive * @return a DDBeanRoot object for the XML data. * @exception FileNotFoundException if the named file can not be found * @exception DDBeanCreateException if an error is encountered creating the DDBeanRoot * object. */ public DDBeanRoot getDDBeanRoot(String filename) throws FileNotFoundException, DDBeanCreateException; /** * Returns an enumeration of the module file entries. All elements in the enumeration * are of type String. Each String represents a file name relative to the root * of the module. * * @return an enumeration of the archive file entries. */ public Enumeration entries(); /** * Returns the InputStream for the given entry name The file name must be relative * to the root of the module. * * @param name the file name relative to the root of the module. * @return the InputStream for the given entry name or null if not found. */ public InputStream getEntry(String name); } --- NEW FILE: J2eeApplicationObject.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.model; import javax.enterprise.deploy.shared.ModuleType; /** * J2eeApplicationObject is an interface that represents a J2EE application (EAR); * it maintains a DeployableObject for each module in the archive. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.shared.ModuleType */ public interface J2eeApplicationObject extends DeployableObject { /** * Return the DeployableObject of the specified URI designator. * * @param uri Describes where to get the module from. * @return the DeployableObject describing the j2ee module at this uri or * 'null' if there is not match. */ public DeployableObject getDeployableObject(String uri); /** * Return the all DeployableObjects of the specified type. * * @param type The type of module to return. * @return the list of DeployableObjects describing the j2ee module at this * uri or 'null' if there are no matches. */ public DeployableObject[] getDeployableObjects(ModuleType type); /** * Return the all DeployableObjects in this application. * * @return the DeployableObject describing the j2ee module at this uri or 'null' * if there are no matches. */ public DeployableObject[] getDeployableObjects(); /** * Return the list of URIs of the designated module type. * * @param type The type of module to return. * @return the Uris of the contained modules or 'null' if there are no matches. */ public String[] getModuleUris(ModuleType type); /** * Return the list of URIs for all modules in the application. * * @return the Uris of the contained modules or 'null' if there are no matches. */ public String[] getModuleUris(); /** * Return a list of DDBean based upon an XPath; all deployment descriptors of * the specified type are searched. * * @param type The type of deployment descriptor to query. * @param xpath An XPath string referring to a location in the deployment descriptor * @return The list of DDBeans or 'null' of there are no matches. */ public DDBean[] getChildBean(ModuleType type, String xpath); /** * Return the text value from the XPath; search only the deployment descriptors * of the specified type. * * @param type The type of deployment descriptor to query. * @param xpath An xpath string referring to a location in the deployment descriptor * @return The text values of this xpath or 'null' if there are no matches. */ public String[] getText(ModuleType type, String xpath); /** * Register a listener for changes in XPath that are related to this deployableObject. * * @param type The type of deployment descriptor to query. * @param xpath The xpath to listen for. * @param xpl The listener. */ public void addXpathListener(ModuleType type, String xpath, XpathListener xpl); /** * Unregister the listener for an XPath. * * @param type The type of deployment descriptor to query. * @param xpath The xpath to listen for. * @param xpl The listener. */ public void removeXpathListener(ModuleType type, String xpath, XpathListener xpl); } --- NEW FILE: XpathEvent.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.model; import java.beans.PropertyChangeEvent; /** * An Event class describing ConfigBeans being added/subtracted from a server configuration. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public class XpathEvent { /** The associated ConfigBean */ private DDBean bean; /** The change event */ private PropertyChangeEvent pce; /** The event type */ private Object type; /** Adding a DDBean */ public final static Object BEAN_ADDED = new Object(); /** Removing a DDBean */ public final static Object BEAN_CHANGED = new Object(); /** Changing a DDBean */ public final static Object BEAN_REMOVED = new Object(); /** * A description of a change in the ConfigBean tree. * * @param bean The ConfigBean being added/removed. * @param type Indicates an add/change/remove event. */ public XpathEvent(DDBean bean, Object type) { this.bean = bean; this.type = type; } /** * Returns the bean being added/removed/changed. * * @return The bean being added/removed/changed. */ public DDBean getBean() { return this.bean; } /** * Returns the event * * @return The event value */ public PropertyChangeEvent getChangeEvent() { return this.pce; } /** * Is this an add event ? * * @return True if it is an add event */ public boolean isAddEvent() { return (BEAN_ADDED == this.type); } /** * Is this an change event ? * * @return True if it is an change event */ public boolean isChangeEvent() { return (BEAN_CHANGED == this.type); } /** * Is this an remove event ? * * @return True if it is an remove event */ public boolean isRemoveEvent() { return (BEAN_REMOVED == this.type); } /** * Sets the event * * @param pce The event value */ public void setChangeEvent(PropertyChangeEvent pce) { this.pce = pce; } } --- NEW FILE: XpathListener.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.model; /** * The listener interface for receiving XpathEvents. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.model.XpathEvent */ public interface XpathListener { /** * Called when a XPath Event occurs. * * @param xpe The XPath Event */ public void fireXpathEvent(XpathEvent xpe); } --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides Tool Vendor implementation classes. <h2>Package Specification</h2> <ul> <li><a href="http://jcp.org/jsr/detail/88.jsp">JSR 88, J2EE Application Deployment</a></li> </ul> <h2>Related Documentation</h2> For overviews, tutorials, examples, guides, and tool documentation, please see: <ul> <li><a href="http://java.sun.com/j2ee/tools">J2EE Tools</a></li> </ul> </body> </html> |
From: <let...@us...> - 2003-12-14 09:46:45
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise/deploy/shared In directory sc8-pr-cvs1:/tmp/cvs-serv4480/src/test/test/enterprise/deploy/shared Log Message: Directory /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise/deploy/shared added to the repository |
From: <let...@us...> - 2003-12-14 09:46:43
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/shared/factories In directory sc8-pr-cvs1:/tmp/cvs-serv3681/src/main/javax/enterprise/deploy/shared/factories Log Message: Directory /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/shared/factories added to the repository |
From: <let...@us...> - 2003-12-14 09:46:42
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise/deploy/model In directory sc8-pr-cvs1:/tmp/cvs-serv3436/src/test/test/enterprise/deploy/model Log Message: Directory /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise/deploy/model added to the repository |
From: <let...@us...> - 2003-12-14 09:46:41
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise/deploy In directory sc8-pr-cvs1:/tmp/cvs-serv3378/src/test/test/enterprise/deploy Log Message: Directory /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise/deploy added to the repository |
From: <let...@us...> - 2003-12-14 09:46:40
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise In directory sc8-pr-cvs1:/tmp/cvs-serv3348/src/test/test/enterprise Log Message: Directory /cvsroot/ejtools/libraries/j2ee.deployment/src/test/test/enterprise added to the repository |
From: <let...@us...> - 2003-12-14 09:46:38
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment In directory sc8-pr-cvs1:/tmp/cvs-serv2889/j2ee.deployment Log Message: Directory /cvsroot/ejtools/libraries/j2ee.deployment added to the repository |