ejtools-cvs Mailing List for EJTools (Page 113)
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
|
From: Laurent E. <let...@us...> - 2002-04-21 18:43:17
|
Update of /cvsroot/ejtools/applications/jndi.browser In directory usw-pr-cvs1:/tmp/cvs-serv17704/applications/jndi.browser Log Message: Directory /cvsroot/ejtools/applications/jndi.browser added to the repository |
From: Laurent E. <let...@us...> - 2002-04-21 18:43:04
|
Update of /cvsroot/ejtools/applications/jmx.browser In directory usw-pr-cvs1:/tmp/cvs-serv17660/applications/jmx.browser Log Message: Directory /cvsroot/ejtools/applications/jmx.browser added to the repository |
From: Laurent E. <let...@us...> - 2002-04-21 18:42:49
|
Update of /cvsroot/ejtools/applications/deployment In directory usw-pr-cvs1:/tmp/cvs-serv17571/applications/deployment Log Message: Directory /cvsroot/ejtools/applications/deployment added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 11:43:56
|
Update of /cvsroot/ejtools/libraries/common/src/main/net/sourceforge/ejtools/servlet/http In directory usw-pr-cvs1:/tmp/cvs-serv29135/src/main/net/sourceforge/ejtools/servlet/http Modified Files: XSLFilter.java Log Message: Change content type management Index: XSLFilter.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/net/sourceforge/ejtools/servlet/http/XSLFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XSLFilter.java 19 Apr 2002 07:04:50 -0000 1.1 --- XSLFilter.java 20 Apr 2002 11:43:52 -0000 1.2 *************** *** 22,25 **** --- 22,26 ---- { protected Transformer transformer = null; + protected String stylePath = null; protected String contentType = null; protected FilterConfig config = null; *************** *** 29,43 **** this.config = config; - System.out.println("Acquiring parameters..."); this.contentType = config.getInitParameter("mime-type"); String styleSheet = config.getInitParameter("stylesheet"); ! System.out.println("Acquiring styletsheet " + styleSheet ); ! String stylePath = config.getServletContext().getRealPath(styleSheet); try { ! System.out.println("Compiling styletsheet " + stylePath); ! TransformerFactory tFactory = TransformerFactory.newInstance(); transformer = tFactory.newTransformer(new StreamSource(stylePath)); --- 30,42 ---- this.config = config; this.contentType = config.getInitParameter("mime-type"); + System.out.println("Acquiring parameter mime-type=" + contentType); String styleSheet = config.getInitParameter("stylesheet"); ! System.out.println("Acquiring parameter stylesheet=" + styleSheet); String stylePath = config.getServletContext().getRealPath(styleSheet); try { ! System.out.println("Compiling stylesheet..."); TransformerFactory tFactory = TransformerFactory.newInstance(); transformer = tFactory.newTransformer(new StreamSource(stylePath)); *************** *** 45,50 **** catch (Exception e) { ! transformer = null; ! throw new ServletException(e.toString()); } } --- 44,48 ---- catch (Exception e) { ! System.out.println(e.toString()); } } *************** *** 57,65 **** public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { StringResponseWrapper wrapper = new StringResponseWrapper((HttpServletResponse) response); chain.doFilter(request, wrapper); - response.setContentType(contentType); - PrintWriter out = response.getWriter(); StringReader reader = new StringReader(wrapper.toString()); Source source = new StreamSource(reader); --- 55,64 ---- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { + response.setContentType(contentType); + PrintWriter out = response.getWriter(); + StringResponseWrapper wrapper = new StringResponseWrapper((HttpServletResponse) response); chain.doFilter(request, wrapper); StringReader reader = new StringReader(wrapper.toString()); Source source = new StreamSource(reader); *************** *** 67,75 **** --- 66,77 ---- try { + System.out.println("Creating Writer..."); StringWriter writer = new StringWriter(); StreamResult result = new StreamResult(writer); + System.out.println("Applying stylesheet..."); transformer.transform(source, result); + System.out.println("Ouputing..."); response.setContentLength(writer.toString().length()); out.println(writer.toString()); |
From: Laurent E. <let...@us...> - 2002-04-20 11:43:14
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/etc In directory usw-pr-cvs1:/tmp/cvs-serv28991/src/etc Added Files: default.mf Log Message: Initial Import --- NEW FILE: default.mf --- Specification-Title: @module.name@ @version.major@.@version.minor@.@version.revision@-@version.tag@ Specification-Version: @version.major@.@version.minor@.@version.revision@-@version.tag@ Specification-Vendor: EJTools Project Implementation-Title: @module.name@ @version.major@.@version.minor@.@version.revision@-@version.tag@ Implementation-Version: @version.major@.@version.minor@.@version.revision@-@version.tag@ Implementation-Vendor: EJTools Project |
From: Laurent E. <let...@us...> - 2002-04-20 11:42:57
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml In directory usw-pr-cvs1:/tmp/cvs-serv28884 Added Files: XmlComponent.java XmlContainer.java XmlEditor.java XmlIconable.java XmlLink.java XmlPrintable.java XmlText.java XmlTreeNode.java Log Message: Initial Import --- NEW FILE: XmlComponent.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml; import java.util.Vector; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlComponent extends Vector implements XmlPrintable { /** Description of the Field */ protected String name = ""; /** Constructor for the XmlComponent object */ public XmlComponent() { this("component"); } /** * Constructor for the XmlText object * * @param name Description of Parameter */ public XmlComponent(String name) { this.name = name; } /** * Description of the Method * * @param document Description of Parameter * @exception Exception Description of Exception */ public void appendTo(Document document) throws Exception { document.appendChild(this.printXml(document)); } /** * Description of the Method * * @param document Description of Parameter * @return Description of the Returned Value * @exception Exception Description of Exception */ public Element printXml(Document document) throws Exception { Element element = document.createElement(this.name); return element; } /** * Description of the Method * * @return Description of the Returned Value */ public String toString() { return "Xml Component"; } } --- NEW FILE: XmlContainer.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlContainer extends XmlComponent { /** Constructor for the XmlComponent object */ public XmlContainer() { super("container"); } /** * Constructor for the XmlText object * * @param name Description of Parameter */ public XmlContainer(String name) { super(name); } /** * Description of the Method * * @param document Description of Parameter * @return Description of the Returned Value * @exception Exception Description of Exception */ public Element printXml(Document document) throws Exception { Element element = document.createElement(this.name); // Append the children for (int i = 0; i < this.size(); i++) { XmlPrintable object = (XmlPrintable) this.elementAt(i); element.appendChild(object.printXml(document)); } return element; } /** * Description of the Method * * @return Description of the Returned Value */ public String toString() { return "Xml Container"; } } --- NEW FILE: XmlEditor.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlEditor extends XmlText { /** Description of the Field */ protected String type = ""; /** Constructor for the XmlText object */ public XmlEditor() { super("editor"); } /** * Setter for the target attribute * * @param type The new value */ public void setType(String type) { this.type = type; } /** * Getter for the target attribute * * @return The value of target attribute */ public String getType() { return type; } /** * Description of the Method * * @return Description of the Returned Value */ public String toString() { return "Xml Editor (text=" + text + ", type=" + type + ")"; } /** * Description of the Method * * @param document Description of Parameter * @return Description of the Returned Value * @exception Exception Description of Exception */ public Element printXml(Document document) throws Exception { Element element = super.printXml(document); element.setAttribute("type", this.type); return element; } } --- NEW FILE: XmlIconable.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public interface XmlIconable { public String getSmallIcon(); public String getBigIcon(); } --- NEW FILE: XmlLink.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlLink extends XmlText { /** Description of the Field */ protected String target = ""; /** Constructor for the XmlText object */ public XmlLink() { super("link"); } /** * Setter for the target attribute * * @param target The new value for target attribute */ public void setTarget(String target) { this.target = target; } /** * Getter for the target attribute * * @return The value of target attribute */ public String getTarget() { return target; } /** * Description of the Method * * @return Description of the Returned Value */ public String toString() { return "Xml Link (text=" + text + ", target=" + target + ")"; } /** * Description of the Method * * @param document Description of Parameter * @return Description of the Returned Value * @exception Exception Description of Exception */ public Element printXml(Document document) throws Exception { Element element = super.printXml(document); element.setAttribute("target", this.target); return element; } } --- NEW FILE: XmlPrintable.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public interface XmlPrintable { /** * Description of the Method * * @param document Description of Parameter * @return Description of the Returned Value * @exception Exception Description of Exception */ public Element printXml(Document document) throws Exception; /** * Description of the Method * * @param document Description of Parameter * @exception Exception Description of Exception */ public void appendTo(Document document) throws Exception; } --- NEW FILE: XmlText.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlText extends XmlComponent { /** Description of the Field */ protected String text = ""; /** Constructor for the XmlText object */ public XmlText() { super("text"); } /** * Constructor for the XmlText object * * @param name Description of Parameter */ public XmlText(String name) { super(name); } /** * Setter for the text attribute * * @param text The new value for text attribute */ public void setText(String text) { this.text = "" + text; } /** * Getter for the text attribute * * @return The value of text attribute */ public String getText() { return text; } /** * Description of the Method * * @return Description of the Returned Value */ public String toString() { return "Xml Text (text=" + text + ")"; } /** * Description of the Method * * @param document Description of Parameter * @return Description of the Returned Value * @exception Exception Description of Exception */ public Element printXml(Document document) throws Exception { Element element = super.printXml(document); element.appendChild(document.createTextNode(this.text)); return element; } } --- NEW FILE: XmlTreeNode.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlTreeNode extends XmlContainer { protected String smallIcon = null; protected String bigIcon = null; /** Description of the Field */ protected Object userObject = null; /** Description of the Field */ protected XmlPrintable object = null; /** Constructor for the XmlNode object */ public XmlTreeNode() { super("tree-node"); } public Element printXml(Document document) throws Exception { Element element = super.printXml(document); if (smallIcon != null) { element.setAttribute("small-icon", this.smallIcon); } if (bigIcon != null) { element.setAttribute("big-icon", this.bigIcon); } return element; } /** * Setter for the userObject attribute * * @param userObject The new value for userObject attribute */ public void setUserObject(Object userObject) { remove(this.object); this.userObject = userObject; if (XmlPrintable.class.isAssignableFrom(userObject.getClass())) { this.object = (XmlPrintable) userObject; } else { XmlText text = new XmlText(); text.setText(userObject.toString()); this.object = text; } if (XmlIconable.class.isAssignableFrom(userObject.getClass())) { this.smallIcon = ((XmlIconable) userObject).getSmallIcon(); this.bigIcon = ((XmlIconable) userObject).getBigIcon(); } add(this.object); } /** * Getter for the userObject attribute * * @return The value of userObject attribute */ public Object getUserObject() { return userObject; } /** * Description of the Method * * @return Description of the Returned Value */ public String toString() { return "Xml TreeNode (userObject=" + userObject + ")"; } } |
From: Laurent E. <let...@us...> - 2002-04-20 11:42:37
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/taglib In directory usw-pr-cvs1:/tmp/cvs-serv28818 Added Files: BeanContextXmlProxyTag.java XslApplyTag.java Log Message: Initial Import --- NEW FILE: BeanContextXmlProxyTag.java --- package net.sourceforge.ejtools.xml.taglib; import java.beans.beancontext.*; import java.io.*; import java.util.*; import javax.servlet.http.HttpSession; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import org.w3c.dom.*; import com.sun.xml.tree.*; import net.sourceforge.ejtools.xml.*; import net.sourceforge.ejtools.xml.beans.*; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class BeanContextXmlProxyTag extends TagSupport { /** Description of the Field */ protected String id = null; /** Constructor for the BeanContextXmlProxyTag object */ public BeanContextXmlProxyTag() { } /** * Setter for the id attribute * * @param id The new value for id attribute */ public void setId(String id) { this.id = id; } /** * Getter for the id attribute * * @return The value of id attribute */ public String getId() { return id; } /** * Description of the Method * * @return Description of the Returned Value * @exception JspException Description of Exception */ public int doStartTag() throws JspException { return SKIP_BODY; } /** * Description of the Method * * @return Description of the Returned Value * @exception JspException Description of Exception */ public int doEndTag() throws JspException { try { Object o = null; BeanContextXmlProxy object = null; if ((o = pageContext.getAttribute(id)) != null) { object = (BeanContextXmlProxy) o; } else if ((o = pageContext.getSession().getAttribute(id)) != null) { object = (BeanContextXmlProxy) o; } else if ((o = pageContext.getServletContext().getAttribute(id)) != null) { object = (BeanContextXmlProxy) o; } if (object != null) { XmlDocument doc = new XmlDocument(); XmlComponent comp = object.getXmlProxy(); comp.appendTo(doc); doc.writeXml(new XmlWriteContext(pageContext.getOut(), 3)); } } catch (Exception e) { e.printStackTrace(); } return (EVAL_PAGE); } } --- NEW FILE: XslApplyTag.java --- package net.sourceforge.ejtools.xml.taglib; import java.beans.beancontext.*; import java.io.*; import java.util.*; import javax.servlet.http.HttpSession; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; /** * Description of the Class * * @author letiembl * @created 28 février 2002 */ public class XslApplyTag extends BodyTagSupport { private Transformer transformer = null; /** The body content of this tag */ private String body = null; /** The name of the XSL stylesheet bean. */ private String xsl = null; /** * Setter for the xsl attribute * * @param xsl The new value for xsl attribute */ public void setXsl(String xsl) { this.xsl = xsl; } /** * Getter for the xsl attribute * * @return The value of xsl attribute */ public String getXsl() { return xsl; } /** * Validate the attributes that were specified for consistency. Evaluate the * body content of this tag if we will be using it as the XML data source; * otherwise skip it. * * @return Description of the Returned Value * @exception JspException if a JSP error occurs */ public int doStartTag() throws JspException { try { TransformerFactory tFactory = TransformerFactory.newInstance(); transformer = tFactory.newTransformer(new StreamSource(xsl)); } catch (Exception e) { throw new JspException(e.toString()); } return (EVAL_BODY_TAG); } /** * Save the body content that has been processed, but do not iterate. * * @return Description of the Returned Value * @exception JspException if a JSP error has occurred */ public int doAfterBody() throws JspException { body = bodyContent.getString().trim(); System.out.println(body); return (SKIP_BODY); } /** * Finish up by performing the transformation and rendering the output. * * @return Description of the Returned Value * @exception JspException if a JSP exception occurs */ public int doEndTag() throws JspException { try { // Prepare an input source for the data StreamSource data = new StreamSource(new StringReader(body)); // Prepare an output source for the results StreamResult result = new StreamResult(pageContext.getOut()); transformer.transform(data, result); } catch (Exception e) { throw new JspException(e.toString()); } return (EVAL_PAGE); } /** Release any allocated resources. */ public void release() { this.body = null; } } |
From: Laurent E. <let...@us...> - 2002-04-20 11:42:24
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/editors In directory usw-pr-cvs1:/tmp/cvs-serv28761 Added Files: XmlBooleanEditor.java XmlIntegerEditor.java XmlLongEditor.java XmlObjectNameEditor.java XmlPropertyEditor.java XmlPropertyEditorManager.java XmlPropertyEditorSupport.java XmlStringEditor.java Log Message: Initial Import --- NEW FILE: XmlBooleanEditor.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.editors; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlBooleanEditor extends XmlPropertyEditorSupport { /** Constructor */ public XmlBooleanEditor() { super(); this.renderer.setType(Boolean.TYPE.getName()); } } --- NEW FILE: XmlIntegerEditor.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.editors; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlIntegerEditor extends XmlPropertyEditorSupport { /** Constructor */ public XmlIntegerEditor() { super(); this.renderer.setType(Integer.TYPE.getName()); } } --- NEW FILE: XmlLongEditor.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.editors; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlLongEditor extends XmlPropertyEditorSupport { /** Constructor */ public XmlLongEditor() { super(); this.renderer.setType(Long.TYPE.getName()); } } --- NEW FILE: XmlObjectNameEditor.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.editors; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlObjectNameEditor extends XmlPropertyEditorSupport { /** Constructor */ public XmlObjectNameEditor() { super(); this.renderer.setType(javax.management.ObjectName.class.getName()); } } --- NEW FILE: XmlPropertyEditor.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.editors; import net.sourceforge.ejtools.xml.XmlComponent; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public interface XmlPropertyEditor { /** * Setter for the value attribute * * @param value The new value */ public void setValue(Object value); /** * Setter for the asText attribute * * @param text The new value */ public void setAsText(String text); /** * Getter for the asText attribute * * @return The value */ public String getAsText(); /** * Getter for the tags attribute * * @return The value */ public String[] getTags(); /** * Description of the Method * * @return Description of the Returned Value */ public boolean supportsCustomRenderer(); /** * Getter for the customRenderer attribute * * @return The value */ public XmlComponent getCustomRenderer(); } --- NEW FILE: XmlPropertyEditorManager.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.editors; import java.util.Hashtable; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlPropertyEditorManager { private static String searchPath[] = {"com.etiemble.xml.editors"}; private static Hashtable registry; /** * Setter for the editorSearchPath attribute * * @param path The new value */ public static synchronized void setEditorSearchPath(String path[]) { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPropertiesAccess(); } if (path == null) { path = new String[0]; } searchPath = path; } /** * Getter for the editorSearchPath attribute * * @return The value */ public static synchronized String[] getEditorSearchPath() { // Return a copy of the searchPath. String result[] = new String[searchPath.length]; for (int i = 0; i < searchPath.length; i++) { result[i] = searchPath[i]; } return result; } /** * Description of the Method * * @param targetType Description of Parameter * @param xmlEditorClass Description of Parameter */ public static void registerXmlEditor(Class targetType, Class xmlEditorClass) { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPropertiesAccess(); } initialize(); if (xmlEditorClass == null) { registry.remove(targetType); } else { registry.put(targetType, xmlEditorClass); } } /** * Description of the Method * * @param targetType Description of Parameter * @return Description of the Returned Value */ public static synchronized XmlPropertyEditor findXmlEditor(Class targetType) { initialize(); Class xmlEditorClass = (Class) registry.get(targetType); if (xmlEditorClass != null) { try { Object o = xmlEditorClass.newInstance(); return (XmlPropertyEditor) o; } catch (Exception ex) { System.err.println("Couldn't instantiate type editor \"" + xmlEditorClass.getName() + "\" : " + ex); } } // We couldn't find a suitable Editor. return null; } /** * Description of the Method * * @param targetType Description of Parameter * @param name Description of Parameter */ private static synchronized void load(Class targetType, String name) { String xmlEditorName = name; for (int i = 0; i < searchPath.length; i++) { try { xmlEditorName = searchPath[i] + "." + name; Class cls = Class.forName(xmlEditorName); registry.put(targetType, cls); return; } catch (Exception ex) { // Drop through and try next package. } } // This shouldn't happen. System.err.println("load of " + xmlEditorName + " failed"); } /** Description of the Method */ private static synchronized void initialize() { if (registry != null) { return; } registry = new java.util.Hashtable(); load(Integer.TYPE, "XmlIntegerEditor"); load(Long.TYPE, "XmlLongEditor"); load(Boolean.TYPE, "XmlBooleanEditor"); load(java.lang.String.class, "XmlStringEditor"); load(javax.management.ObjectName.class, "XmlObjectNameEditor"); } } --- NEW FILE: XmlPropertyEditorSupport.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.editors; import net.sourceforge.ejtools.xml.XmlComponent; import net.sourceforge.ejtools.xml.XmlEditor; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlPropertyEditorSupport implements XmlPropertyEditor { /** Description of the Field */ protected XmlEditor renderer = new XmlEditor(); /** Description of the Field */ protected Object value = null; /** Constructor for use by derived PropertyEditor classes. */ public XmlPropertyEditorSupport() { } /** * Setter for the value attribute * * @param value The new value for value attribute */ public void setValue(Object value) { this.value = value; renderer.setText("" + this.value); } /** * Setter for the asText attribute * * @param value The new value */ public void setAsText(String value) { if (value instanceof String) { setValue(value); renderer.setText(value); return; } throw new java.lang.IllegalArgumentException(value); } /** * Getter for the asText attribute * * @return The value of asText attribute */ public String getAsText() { if (value instanceof String) { return (String) value; } return ("" + value); } /** * Getter for the tags attribute * * @return The value of tags attribute */ public String[] getTags() { return null; } /** * Getter for the customRenderer attribute * * @return The value */ public XmlComponent getCustomRenderer() { return renderer; } /** * Description of the Method * * @return Description of the Returned Value */ public boolean supportsCustomRenderer() { return true; } } --- NEW FILE: XmlStringEditor.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.editors; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class XmlStringEditor extends XmlPropertyEditorSupport { /** Constructor */ public XmlStringEditor() { super(); this.renderer.setType(java.lang.String.class.getName()); } } |
From: Laurent E. <let...@us...> - 2002-04-20 11:42:10
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/beans In directory usw-pr-cvs1:/tmp/cvs-serv28695 Added Files: BeanContextXmlProxy.java BeanContextXmlTree.java GenericXmlCustomizer.java MethodXmlCustomizer.java PropertyXmlCustomizer.java XmlCustomizer.java Log Message: Initial Import --- NEW FILE: BeanContextXmlProxy.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.beans; import net.sourceforge.ejtools.xml.XmlComponent; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public interface BeanContextXmlProxy { /** * Getter for the xmlProxy attribute * * @return The value of xmlProxy attribute */ public XmlComponent getXmlProxy(); } --- NEW FILE: BeanContextXmlTree.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.beans; import java.beans.beancontext.BeanContext; import java.util.Collection; import java.util.Iterator; import net.sourceforge.ejtools.xml.XmlTreeNode; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class BeanContextXmlTree extends XmlTreeNode { /** * Constructor for the BeanContextXmlTree object * * @param context Description of Parameter */ public BeanContextXmlTree(BeanContext context) { this.setUserObject(context); updateTree((BeanContext) getUserObject(), this); } /** * Description of the Method * * @param collection Description of Parameter * @param node Description of Parameter */ private void updateTree(Collection collection, XmlTreeNode node) { for (Iterator iterator = collection.iterator(); iterator.hasNext(); ) { Object obj = iterator.next(); XmlTreeNode node2 = new XmlTreeNode(); node2.setUserObject(obj); node.add(node2); if (obj instanceof Collection) { updateTree((Collection) obj, node2); } } } } --- NEW FILE: GenericXmlCustomizer.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.beans; import java.beans.BeanInfo; import java.beans.Introspector; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import java.util.Enumeration; import org.w3c.dom.Document; import org.w3c.dom.Element; import net.sourceforge.ejtools.xml.XmlContainer; import net.sourceforge.ejtools.xml.XmlText; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class GenericXmlCustomizer extends XmlContainer implements XmlCustomizer { /** Description of the Field */ protected Object object = null; /** Description of the Field */ protected BeanInfo beaninfo = null; /** Constructor for the GenericXMLCustomizer object */ public GenericXmlCustomizer() { this(null, null); } /** * Constructor for the GenericXmlCustomizer object * * @param object Description of Parameter */ public GenericXmlCustomizer(Object object) { this(object, null); } /** * Constructor * * @param object Description of Parameter * @param beaninfo Description of Parameter */ public GenericXmlCustomizer(Object object, BeanInfo beaninfo) { super("customizer"); setObject(object); setBeanInfo(beaninfo); } /** * Setter for the beanInfo attribute * * @param beaninfo The new value */ public void setBeanInfo(BeanInfo beaninfo) { if (beaninfo != null) { this.beaninfo = beaninfo; } else { try { if (object instanceof BeanInfo) { // The object is a BeanInfo this.beaninfo = (BeanInfo) object; } else { // Get the default BeanInfo this.beaninfo = Introspector.getBeanInfo(object.getClass()); } } catch (Exception e) { } } try { XmlContainer descriptor = new XmlContainer("descriptor"); add(descriptor); XmlText name = new XmlText("name"); name.setText(beaninfo.getBeanDescriptor().getName()); descriptor.add(name); XmlText displayName = new XmlText("display-name"); displayName.setText(beaninfo.getBeanDescriptor().getDisplayName()); descriptor.add(displayName); XmlText description = new XmlText("description"); description.setText(beaninfo.getBeanDescriptor().getShortDescription()); descriptor.add(description); Enumeration enum = beaninfo.getBeanDescriptor().attributeNames(); while (enum.hasMoreElements()) { String featureName = (String) enum.nextElement(); String featureValue = beaninfo.getBeanDescriptor().getValue(featureName).toString(); XmlText feature = new XmlText(featureName); feature.setText(featureValue); descriptor.add(feature); } XmlContainer properties = new XmlContainer("properties"); add(properties); PropertyDescriptor[] pd = this.beaninfo.getPropertyDescriptors(); for (int i = 0; i < pd.length; i++) { Method rm = pd[i].getReadMethod(); System.out.println("Read Method " + rm); if (rm != null) { if (!rm.getDeclaringClass().equals(java.lang.Object.class) && !pd[i].isHidden()) { PropertyXmlCustomizer pc = new PropertyXmlCustomizer(object, pd[i]); properties.add(pc); } } } XmlContainer methods = new XmlContainer("methods"); add(methods); MethodDescriptor[] md = this.beaninfo.getMethodDescriptors(); for (int i = 0; i < md.length; i++) { Method m = md[i].getMethod(); Class c = m.getDeclaringClass(); // Skip java.lang.Object methods // Skip java.lang.reflect.Proxy methods // Skip java.beans.BeanInfo methods if (!c.equals(java.lang.Object.class) && !c.equals(java.lang.reflect.Proxy.class) && !c.equals(java.beans.BeanInfo.class)) { // Skip the getters and the setters if (!m.getName().startsWith("get") && !m.getName().startsWith("set") && !m.getName().startsWith("is")) { MethodXmlCustomizer mc = new MethodXmlCustomizer(md[i]); methods.add(mc); } } } } catch (Exception e) { e.printStackTrace(); } } /** * Setter for the object attribute * * @param object The new value for object attribute */ public void setObject(Object object) { this.object = object; } } --- NEW FILE: MethodXmlCustomizer.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.beans; import java.beans.MethodDescriptor; import java.util.Enumeration; import org.w3c.dom.Document; import org.w3c.dom.Element; import net.sourceforge.ejtools.xml.XmlContainer; import net.sourceforge.ejtools.xml.XmlText; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class MethodXmlCustomizer extends XmlContainer { /** Description of the Field */ protected MethodDescriptor md = null; /** * Constructor for the MethodXmlEditor object * * @param md Description of Parameter */ public MethodXmlCustomizer(MethodDescriptor md) { super("method"); this.md = md; // Add method attributes Enumeration enum = md.attributeNames(); while (enum.hasMoreElements()) { String featureName = (String) enum.nextElement(); String featureValue = md.getValue(featureName).toString(); XmlText feature = new XmlText(featureName); feature.setText(featureValue); add(feature); } // Add return type XmlText type = new XmlText("type"); type.setText(md.getMethod().getReturnType().getName()); add(type); /* * ParameterDescriptor[] params = md.getParameterDescriptors(); * for (int i = 0; i < params.length; i++) * { * } */ } /** * Description of the Method * * @return Description of the Returned Value */ public String toString() { return "Xml Method (method=" + md.getMethod().getName() + ")"; } /** * Description of the Method * * @param document Description of Parameter * @return Description of the Returned Value * @exception Exception Description of Exception */ public Element printXml(Document document) throws Exception { // Build output Element element = super.printXml(document); element.setAttribute("name", md.getName()); element.setAttribute("display-name", md.getDisplayName()); element.setAttribute("description", md.getShortDescription()); return element; } } --- NEW FILE: PropertyXmlCustomizer.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.beans; import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import org.w3c.dom.Document; import org.w3c.dom.Element; import net.sourceforge.ejtools.xml.XmlComponent; import net.sourceforge.ejtools.xml.XmlContainer; import net.sourceforge.ejtools.xml.XmlText; import net.sourceforge.ejtools.xml.editors.XmlPropertyEditor; import net.sourceforge.ejtools.xml.editors.XmlPropertyEditorManager; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public class PropertyXmlCustomizer extends XmlContainer { /** Description of the Field */ protected PropertyDescriptor pd = null; /** Description of the Field */ protected Object object = null; /** * Constructor for the GenericXMLCustomizer object * * @param object Description of Parameter * @param pd Description of Parameter */ public PropertyXmlCustomizer(Object object, PropertyDescriptor pd) { super("property"); this.object = object; this.pd = pd; try { Class propertyType = pd.getPropertyType(); XmlText type = new XmlText("type"); type.setText(propertyType.getName()); add(type); Method getter = pd.getReadMethod(); Object value = getter.invoke(object, new Object[0]); if (propertyType.isArray()) { Class componentType = propertyType.getComponentType(); System.out.println("Component " + componentType); XmlPropertyEditor editor = XmlPropertyEditorManager.findXmlEditor(componentType); if (editor != null && value != null) { Object[] list = (Object[]) value; for (int i = 0; i < list.length; i++) { XmlComponent renderer = null; editor = XmlPropertyEditorManager.findXmlEditor(componentType); editor.setValue(list[i]); if (editor.supportsCustomRenderer()) { renderer = editor.getCustomRenderer(); } else { XmlText content = new XmlText(); content.setText(list[i].toString()); renderer = content; } add(renderer); } } } else { XmlPropertyEditor editor = XmlPropertyEditorManager.findXmlEditor(propertyType); if (editor != null) { XmlComponent renderer = null; editor.setValue(value); if (editor.supportsCustomRenderer()) { renderer = editor.getCustomRenderer(); } else { XmlText content = new XmlText(); content.setText((String) value); renderer = content; } add(renderer); } } } catch (Exception e) { e.printStackTrace(); } } /** * Description of the Method * * @return Description of the Returned Value */ public String toString() { return "Xml Property (Name=" + pd.getName() + ")"; } /** * Description of the Method * * @param document Description of Parameter * @return Description of the Returned Value * @exception Exception Description of Exception */ public Element printXml(Document document) throws Exception { // Build output Element element = super.printXml(document); element.setAttribute("name", pd.getName()); element.setAttribute("display-name", pd.getDisplayName()); element.setAttribute("description", pd.getShortDescription()); return element; } } --- NEW FILE: XmlCustomizer.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.xml.beans; import java.beans.BeanInfo; /** * Description of the Class * * @author letiembl * @created 26 février 2002 */ public interface XmlCustomizer { /** * Setter for the object attribute * * @param bean The new value for object attribute */ public void setObject(Object bean); /** * Setter for the beanInfo attribute * * @param beaninfo The new value */ public void setBeanInfo(BeanInfo beaninfo); } |
From: Laurent E. <let...@us...> - 2002-04-20 11:41:04
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/taglib In directory usw-pr-cvs1:/tmp/cvs-serv28401/taglib Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/taglib added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 11:40:47
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/editors In directory usw-pr-cvs1:/tmp/cvs-serv28326/editors Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/editors added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 11:40:35
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/beans In directory usw-pr-cvs1:/tmp/cvs-serv28258/beans Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml/beans added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 11:40:21
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml In directory usw-pr-cvs1:/tmp/cvs-serv28179/xml Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools/xml added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 11:40:07
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools In directory usw-pr-cvs1:/tmp/cvs-serv28102/ejtools Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge/ejtools added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 11:39:52
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge In directory usw-pr-cvs1:/tmp/cvs-serv27994/sourceforge Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/main/net/sourceforge added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 10:16:33
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main/net In directory usw-pr-cvs1:/tmp/cvs-serv6941/net Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/main/net added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 10:14:12
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/resources In directory usw-pr-cvs1:/tmp/cvs-serv6345/resources Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/resources added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 10:13:49
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/main In directory usw-pr-cvs1:/tmp/cvs-serv6242/main Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/main added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 10:13:37
|
Update of /cvsroot/ejtools/libraries/xmlweb/src/etc In directory usw-pr-cvs1:/tmp/cvs-serv6206/etc Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src/etc added to the repository |
From: Laurent E. <let...@us...> - 2002-04-20 10:13:24
|
Update of /cvsroot/ejtools/libraries/xmlweb/src In directory usw-pr-cvs1:/tmp/cvs-serv6151/src Log Message: Directory /cvsroot/ejtools/libraries/xmlweb/src added to the repository |
From: Laurent E. <let...@us...> - 2002-04-19 07:22:38
|
Update of /cvsroot/ejtools/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv30832 Modified Files: modules Log Message: Define module "ejtools-all" Index: modules =================================================================== RCS file: /cvsroot/ejtools/CVSROOT/modules,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** modules 16 Mar 2002 14:12:05 -0000 1.1 --- modules 19 Apr 2002 07:22:35 -0000 1.2 *************** *** 25,26 **** --- 25,27 ---- # can be useful for creating a module that consists of many directories # spread out over the entire source repository. + ejtools-all &build &thirdparty &libraries &applications |
From: Laurent E. <let...@us...> - 2002-04-19 07:22:13
|
Update of /cvsroot/ejtools/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv30651 Modified Files: checkoutlist Log Message: Reformat file Index: checkoutlist =================================================================== RCS file: /cvsroot/ejtools/CVSROOT/checkoutlist,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** checkoutlist 3 Apr 2002 20:08:33 -0000 1.2 --- checkoutlist 19 Apr 2002 07:22:10 -0000 1.3 *************** *** 1,14 **** ! # The "checkoutlist" file is used to support additional version controlled ! # administrative files in $CVSROOT/CVSROOT, such as template files. ! # ! # The first entry on a line is a filename which will be checked out from ! # the corresponding RCS file in the $CVSROOT/CVSROOT directory. ! # The remainder of the line is an error message to use if the file cannot ! # be checked out. ! # ! # File format: ! # ! # [<whitespace>]<filename><whitespace><error message><end-of-line> ! # ! # comment lines begin with '#' ! syncmail --- 1,14 ---- ! # The "checkoutlist" file is used to support additional version controlled ! # administrative files in $CVSROOT/CVSROOT, such as template files. ! # ! # The first entry on a line is a filename which will be checked out from ! # the corresponding RCS file in the $CVSROOT/CVSROOT directory. ! # The remainder of the line is an error message to use if the file cannot ! # be checked out. ! # ! # File format: ! # ! # [<whitespace>]<filename><whitespace><error message><end-of-line> ! # ! # comment lines begin with '#' ! syncmail |
From: Laurent E. <let...@us...> - 2002-04-19 07:13:52
|
Update of /cvsroot/ejtools/libraries/j2ee.icons In directory usw-pr-cvs1:/tmp/cvs-serv27383 Added Files: module.properties Log Message: Initial Import --- NEW FILE: module.properties --- version.major=1 version.minor=0 version.revision=0 version.tag=alpha module.name=j2ee.icons module.display.name=J2EE Icons module.archive.name=ejtools.j2ee.icons module.package=net.sourceforge.ejtools.* module.javadoc.title=EJTools - J2EE Icons |
From: Laurent E. <let...@us...> - 2002-04-19 07:12:29
|
Update of /cvsroot/ejtools/libraries/j2ee.icons/src/main In directory usw-pr-cvs1:/tmp/cvs-serv26268/main Added Files: icons.xcf icons16.xcf icons24.xcf Log Message: Initial Import --- NEW FILE: icons.xcf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icons16.xcf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icons24.xcf --- (This appears to be a binary file; contents omitted.) |
From: Laurent E. <let...@us...> - 2002-04-19 07:12:28
|
Update of /cvsroot/ejtools/libraries/j2ee.icons/src/etc In directory usw-pr-cvs1:/tmp/cvs-serv26268/etc Added Files: default.mf Log Message: Initial Import --- NEW FILE: default.mf --- Specification-Title: @module.name@ @version.major@.@version.minor@.@version.revision@-@version.tag@ Specification-Version: @version.major@.@version.minor@.@version.revision@-@version.tag@ Specification-Vendor: EJTools Project Implementation-Title: @module.name@ @version.major@.@version.minor@.@version.revision@-@version.tag@ Implementation-Version: @version.major@.@version.minor@.@version.revision@-@version.tag@ Implementation-Vendor: EJTools Project |