[jboss-svn-commits] JBL Code SVN: r5339 - in labs/jbossesb/trunk/product/core/common: src/org/jboss/soa/esb/util tests/src/org/jboss/soa/esb tests/src/org/jboss/soa/esb/util
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Jul 28 05:55:54 EDT 2006
Author: tfennelly
Date: 2006-07-28 05:55:45 -0400 (Fri, 28 Jul 2006)
New Revision: 5339
Added:
labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/W3CDomUtils.java
labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java
labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest_testfile1.xml
Modified:
labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/BobjStdDTO.java
labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/EsbUtil.java
labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/EsbUtilUnitTest.java
Log:
Added unit tests for BobjStdDTO.
Added some Javadoc to BobjStdDTO.
Removed some unused methods - hope this doesn't cause any issues!!!
Modified: labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/BobjStdDTO.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/BobjStdDTO.java 2006-07-28 04:54:17 UTC (rev 5338)
+++ labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/BobjStdDTO.java 2006-07-28 09:55:45 UTC (rev 5339)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.soa.esb.util;
@@ -32,378 +32,461 @@
import org.w3c.dom.*;
+/**
+ * {@link org.jboss.soa.esb.util.BaseBusinessObject} Data Transfer Object.
+ * <p/>
+ * {@link org.jboss.soa.esb.util.BaseBusinessObject} implementations use this
+ * class to create a serialized XML representation of their data. They do this
+ * in their {@link org.jboss.soa.esb.util.BaseBusinessObject#toDTO()} method
+ * implementation.
+ * <p/>
+ * This serialized XML form is used for object persistense. The DTO is also
+ * decorated with the following properties to aid lookup and processing
+ * of their persisted form:
+ * <ul>
+ * <li><b>{@link #getUid() UID}</b> //TODO: Define!!</li>
+ * <li><b>{@link #getStamp()() Stamp}</b> //TODO: Define!!</li>
+ * <li><b>{@link #getSnap()() Snap}</b> //TODO: Define!!</li>
+ * <li><b>{@link #getSnapType()()() SnapType}</b> //TODO: Define!!</li>
+ * <li><b>{@link #getSnapDate()()()() SnapDate}</b> //TODO: Define!!</li>
+ * <li><b>{@link #getBatch()()() Batch}</b> //TODO: Define!!</li>
+ * </ul>
+ *
+ * @see #getFromXml(String)
+ * @author <a href="mailto:schifest at gmail.com">Esteban Shifman</a>
+ */
+
@SuppressWarnings("serial")
-public class BobjStdDTO implements Serializable
-{
- private static final transient String s_sCharset = "ISO-8859-1";
- public static String getCharset() { return s_sCharset; }
+public class BobjStdDTO implements Serializable {
+ private static final transient String s_sCharset = "ISO-8859-1";
- private static final transient String s_sEncoding
- = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
+ public static String getCharset() {
+ return s_sCharset;
+ }
- // Some attribute names for the toXML() and fromXML()
- public final static String BOBJ_PACKAGE = "__BobjPkg";
- public final static String BOBJ_CLASS = "__Class";
+ private static final transient String s_sEncoding = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
- protected String m_sClassNm;
- protected String m_sElemNm;
- protected Map<String,Object> m_oAtts;
- protected List<BobjStdDTO> m_oChild;
- protected String[][] m_saaLocators;
- public void setLocators(String[][] p_saa) { m_saaLocators = p_saa; }
- public String[][] getLocators() { return m_saaLocators; }
+ // Some attribute names for the toXML() and fromXML()
+ public final static String BOBJ_PACKAGE = "__BobjPkg";
- //Getters
- public String classNm() { return m_sClassNm; }
- public String elementNm() { return m_sElemNm; }
- public boolean isList() { return null!=m_oChild; }
- public boolean isEmpty()
- {return (isList()) ? (m_oChild).isEmpty() : m_oAtts.isEmpty(); }
+ public final static String BOBJ_CLASS = "__Class";
-// protected BObjStdDTO() {}
- public BobjStdDTO(String p_sClassNm) {this(p_sClassNm,null,null); }
- public BobjStdDTO(String p_sClassNm, String p_sElemNm)
- {this(p_sClassNm,p_sElemNm,null); }
- public BobjStdDTO(String p_sClassNm, List<BobjStdDTO> p_oList)
- {this(p_sClassNm,null,p_oList); }
- protected BobjStdDTO(String p_sClassNm, String p_sElemNm, List<BobjStdDTO> p_oList)
- {initialize(p_sClassNm,p_sElemNm,p_oList); }
+ protected String m_sClassNm;
- protected BobjStdDTO(BobjStdDTO p_o)
- { if (null!=p_o)
- { m_sClassNm = p_o.m_sClassNm;
- m_sElemNm = p_o.m_sElemNm;
- if (null!=p_o.m_oChild)m_oChild = new ArrayList<BobjStdDTO>(p_o.m_oChild);
- if (null!=p_o.m_oAtts) m_oAtts = new HashMap<String,Object>(p_o.m_oAtts);
- }
- } //__________________________________
+ protected String m_sElemNm;
- private void initialize(String p_sClassNm, String p_sElemNm, List<BobjStdDTO> p_oList)
- { m_sClassNm = p_sClassNm;
- m_sElemNm = (null != p_sElemNm) ? p_sElemNm
- : m_sClassNm.substring(1+m_sClassNm.lastIndexOf("."));
- m_oChild= p_oList;
- if (null==m_oChild)
- m_oAtts = new HashMap<String,Object>();
- } //__________________________________
+ protected Map<String, Object> m_oAtts;
- private BobjStdDTO (Element p_n) throws Exception
- { String sElem = p_n.getNodeName();
+ protected List<BobjStdDTO> m_oChild;
- String sClass = null;
- try { sClass = p_n.getAttribute(BOBJ_CLASS); }
- catch (Exception eC) {}
- sClass = (null == sClass) ? sElem
- : ("".equals(sClass)) ? sElem : sClass;
- p_n.removeAttribute(BOBJ_CLASS);
+ protected String[][] m_saaLocators;
- String sList = null;
- try { sList = p_n.getAttribute("List"); }
- catch (Exception eL) { }
- boolean m_bList = (null == sList) ? false
- : ("".equals(sList)) ? false : true;
- p_n.removeAttribute("List");
+ public void setLocators(String[][] p_saa) {
+ m_saaLocators = p_saa;
+ }
- NodeList NL = p_n.getChildNodes();
- int iQch = NL.getLength();
- if (m_bList)
- { List<BobjStdDTO> olCh = new ArrayList<BobjStdDTO>();
- for (int i1=0; i1<iQch; i1++)
- { Node oCurr = NL.item(i1);
- if (Node.ELEMENT_NODE != oCurr.getNodeType()) continue;
- BobjStdDTO oThisCh = new BobjStdDTO((Element)NL.item(i1));
- oThisCh.m_sElemNm = oThisCh.m_sClassNm = sClass;
- olCh.add(oThisCh);
- }
- initialize(sClass,sElem,olCh);
- return;
- }
+ public String[][] getLocators() {
+ return m_saaLocators;
+ }
- initialize(sClass,sElem,null);
- this.addMap(mapFromAtts(p_n.getAttributes()));
+ // Getters
+ public String classNm() {
+ return m_sClassNm;
+ }
- for (int i1=0; i1<iQch; i1++)
- { Node oCurr = NL.item(i1);
- if (Node.ELEMENT_NODE != oCurr.getNodeType()) continue;
- this.addDto(((Element)oCurr).getNodeName()
- ,new BobjStdDTO(((Element)oCurr)));
- }
- } //__________________________________
-
- private void setLongAttr(String p_s,long pL)
- { try { addAttr(p_s,Long.toString(pL)); }
- catch (Exception e) { e.printStackTrace(); }
- } //__________________________________
- private void setStringAttr(String p_s,String pVal)
- { try { addAttr(p_s,pVal); }
- catch (Exception e) { e.printStackTrace(); }
- } //__________________________________
-
- private long attrAsLong(String p_s)
- { try
- { String sVal = getAttr(p_s);
- if (! EsbUtil.isNullString(sVal))
- return Long.parseLong(sVal);
+ public String elementNm() {
+ return m_sElemNm;
}
- catch (Exception e) {/* OK just fall through and return default*/ }
- return 0;
- } //__________________________________
- private String attrAsString(String p_s)
- { try { return getAttr(p_s); }
- catch (Exception e) {/* OK just fall through and return default*/ }
- return null;
- } //__________________________________
+ public boolean isList() {
+ return null != m_oChild;
+ }
- public long getStamp(){ return attrAsLong(BaseBusinessObject.HIDDEN.stamp.toString()); }
- public long getUid() { return attrAsLong(BaseBusinessObject.HIDDEN.uid.toString()); }
- public long getSnap() { return attrAsLong(BaseBusinessObject.HIDDEN.snap.toString()); }
- public long getBatch(){ return attrAsLong(BaseBusinessObject.HIDDEN.batch.toString()); }
- public String getSnapType(){ return attrAsString(BaseBusinessObject.HIDDEN.type.toString()); }
- public String getSnapDate(){ return attrAsString(BaseBusinessObject.HIDDEN.dtSnap.toString()); }
+ public boolean isEmpty() {
+ return (isList()) ? (m_oChild).isEmpty() : m_oAtts.isEmpty();
+ }
- public void setStamp (long pL) { setLongAttr(BaseBusinessObject.HIDDEN.stamp.toString(),pL); }
- public void setUid (long pL) { setLongAttr(BaseBusinessObject.HIDDEN.uid.toString(),pL); }
- public void setSnap (long pL) { setLongAttr(BaseBusinessObject.HIDDEN.snap.toString(),pL); }
- public void setBatch (long pL) { setLongAttr(BaseBusinessObject.HIDDEN.batch.toString(),pL); }
- public void setSnapType(String pS){ setStringAttr(BaseBusinessObject.HIDDEN.type.toString(),pS); }
- public void setSnapDate(String pS){ setStringAttr(BaseBusinessObject.HIDDEN.dtSnap.toString(),pS); }
-
- public String fullClassName()
- { String sPkg = "";
- try { sPkg = getAttr(BobjStdDTO.BOBJ_PACKAGE); }
- catch (Exception e) {/* just leave it empty */ }
- String sConstrPkg = (sPkg.endsWith(".")) ? sPkg : sPkg+".";
- return sConstrPkg+classNm();
- } //__________________________________
+ protected BobjStdDTO(String p_sClassNm, String p_sElemNm,
+ List<BobjStdDTO> p_oList) {
+ initialize(p_sClassNm, p_sElemNm, p_oList);
+ }
- public List<? extends BaseBusinessObject> getChildObjList(String p_sElem, Class pCls) throws Exception
- { BobjStdDTO oChDto = this.getDTO(p_sElem);
- if (null == oChDto) return null;
- if (! oChDto.isList()) throw new Exception ("Child DTO is not List");
- return oChDto.listDtoToList(pCls);
- } //__________________________________
+ private void initialize(String p_sClassNm, String p_sElemNm,
+ List<BobjStdDTO> p_oList) {
+ m_sClassNm = p_sClassNm;
+ m_sElemNm = (null != p_sElemNm) ? p_sElemNm : m_sClassNm
+ .substring(1 + m_sClassNm.lastIndexOf("."));
+ m_oChild = p_oList;
+ if (null == m_oChild)
+ m_oAtts = new HashMap<String, Object>();
+ } // __________________________________
- private List<BaseBusinessObject> listDtoToList(Class pCls) throws Exception
- { if (! isList()) throw new Exception("BObjStdDTO is not a List");
- Class [] oaCls = {BobjStdDTO.class};
- Constructor CC=pCls.getConstructor (oaCls);
- List<BaseBusinessObject> LL = new ArrayList<BaseBusinessObject>();
- Object [] oaParms = new BobjStdDTO[1];
- for (BobjStdDTO oCurr : m_oChild)
- { oaParms[0] = oCurr;
- LL.add((BaseBusinessObject)CC.newInstance(oaParms));
- }
- return (LL.size()>0) ? LL : null;
- } //__________________________________
+ private BobjStdDTO(Element p_n) throws Exception {
+ String sElem = p_n.getNodeName();
- public Map<String,Object> getAttrMap() throws Exception
- { return m_oAtts;
- } //__________________________________
+ String sClass = null;
+ try {
+ sClass = p_n.getAttribute(BOBJ_CLASS);
+ } catch (Exception eC) {
+ }
+ sClass = (null == sClass) ? sElem : ("".equals(sClass)) ? sElem
+ : sClass;
+ p_n.removeAttribute(BOBJ_CLASS);
- public BobjStdDTO getDTO(String p_sKey) throws Exception
- { if (isList()) throw new Exception("BObjStdDTO is a List");
- Object oRet = m_oAtts.get(p_sKey);
- if (null == oRet) return null;
- if (oRet instanceof BobjStdDTO) return (BobjStdDTO)oRet;
- throw new Exception ("Value is not BObjStdDTO");
- } //__________________________________
+ String sList = null;
+ try {
+ sList = p_n.getAttribute("List");
+ } catch (Exception eL) {
+ }
+ boolean m_bList = (null == sList) ? false : ("".equals(sList)) ? false
+ : true;
+ p_n.removeAttribute("List");
- public String getAttr(String p_sKey) throws Exception
- { if (isList()) throw new Exception("BObjStdDTO is a List");
- Object oRet = m_oAtts.get(p_sKey);
- if (null == oRet) return null;
- if (oRet instanceof String) return (String)oRet;
- throw new Exception ("Value is not an attribute");
- } //__________________________________
+ NodeList NL = p_n.getChildNodes();
+ int iQch = NL.getLength();
+ if (m_bList) {
+ List<BobjStdDTO> olCh = new ArrayList<BobjStdDTO>();
+ for (int i1 = 0; i1 < iQch; i1++) {
+ Node oCurr = NL.item(i1);
+ if (Node.ELEMENT_NODE != oCurr.getNodeType())
+ continue;
+ BobjStdDTO oThisCh = new BobjStdDTO((Element) NL.item(i1));
+ oThisCh.m_sElemNm = oThisCh.m_sClassNm = sClass;
+ olCh.add(oThisCh);
+ }
+ initialize(sClass, sElem, olCh);
+ return;
+ }
- @SuppressWarnings("unchecked")
- public void addAttr(String p_sKey, String p_sAtt) throws Exception
- { if (isList()) throw new Exception("BObjStdDTO is a List");
- if (null == p_sKey) return;
- m_oAtts.remove(p_sKey);
- if (null != p_sAtt)
- if (p_sAtt.trim().length() > 0)
- m_oAtts.put(p_sKey,p_sAtt.trim());
- } //__________________________________
+ initialize(sClass, sElem, null);
+ this.addMap(mapFromAtts(p_n.getAttributes()));
- @SuppressWarnings("unchecked")
- public void addDto(String p_sKey, BobjStdDTO p_oDto) throws Exception
- { if (isList()) throw new Exception("BObjStdDTO is a List");
- if (null == p_sKey) return;
- m_oAtts.remove(p_sKey);
- if (null == p_oDto) return;
- if (p_oDto.isEmpty()) return;
- p_oDto.m_sElemNm=p_sKey;
- m_oAtts.put(p_sKey,p_oDto);
- } //__________________________________
+ for (int i1 = 0; i1 < iQch; i1++) {
+ Node oCurr = NL.item(i1);
+ if (Node.ELEMENT_NODE != oCurr.getNodeType())
+ continue;
+ this.addDto(((Element) oCurr).getNodeName(), new BobjStdDTO(
+ ((Element) oCurr)));
+ }
+ } // __________________________________
- @SuppressWarnings("unchecked")
- public void addBobj(String p_sKey, BaseBusinessObject p_oBob) throws Exception
- { if (isList()) throw new Exception("BObjStdDTO is a List");
- if (null == p_sKey) return;
- m_oAtts.remove(p_sKey);
- if (null == p_oBob) return;
- BobjStdDTO oDto = p_oBob.toDTO();
- if (oDto.isEmpty()) return;
- oDto.m_sElemNm=p_sKey;
- m_oAtts.put(p_sKey,oDto);
- } //__________________________________
+ private void setLongAttr(String p_s, long pL) {
+ try {
+ addAttr(p_s, Long.toString(pL));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } // __________________________________
- @SuppressWarnings("unchecked")
- private void addMap(Map<String,Object> p_oM) throws Exception
- { if (isList()) throw new Exception("BObjStdDTO is a List");
- if (null == p_oM) return;
- for (Map.Entry<String,Object> oCurr : p_oM.entrySet())
- m_oAtts.put(oCurr.getKey(), oCurr.getValue());
- } //__________________________________
+ private void setStringAttr(String p_s, String pVal) {
+ try {
+ addAttr(p_s, pVal);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } // __________________________________
- public String toXml() throws Exception { return toXml(false); }
+ private long attrAsLong(String p_s) {
+ try {
+ String sVal = getAttr(p_s);
+ if (!EsbUtil.isNullString(sVal))
+ return Long.parseLong(sVal);
+ } catch (Exception e) {/* OK just fall through and return default */
+ }
+ return 0;
+ } // __________________________________
- public String toXml(boolean p_bDecl) throws Exception
- { Document oDoc = toDoc();
- oDoc.normalize();
- DOMSource src = new DOMSource(oDoc);
+ private String attrAsString(String p_s) {
+ try {
+ return getAttr(p_s);
+ } catch (Exception e) {/* OK just fall through and return default */
+ }
+ return null;
+ } // __________________________________
- OutputStream oStrm = new ByteArrayOutputStream(1000);
- StreamResult res = new StreamResult(oStrm);
+ public long getStamp() {
+ return attrAsLong(BaseBusinessObject.HIDDEN.stamp.toString());
+ }
- Transformer oTf = TransformerFactory.newInstance().newTransformer();
- oTf.setOutputProperty(OutputKeys.INDENT, "no");
- oTf.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION
- ,(p_bDecl)? "no":"yes");
+ public long getUid() {
+ return attrAsLong(BaseBusinessObject.HIDDEN.uid.toString());
+ }
- oTf.setOutputProperty(OutputKeys.ENCODING, s_sCharset);
- oTf.transform(src,res);
- return oStrm.toString();
- } //__________________________________
+ public long getSnap() {
+ return attrAsLong(BaseBusinessObject.HIDDEN.snap.toString());
+ }
- public BaseBusinessObject getBobj(String p_sObj)
- { if (null == p_sObj) return null;
- try
- { BobjStdDTO oDto = this.getDTO(p_sObj);
- return BaseBusinessObject.getFromDTO(oDto);
- }
- catch (Exception e) {return null; }
- } //__________________________________
+ public long getBatch() {
+ return attrAsLong(BaseBusinessObject.HIDDEN.batch.toString());
+ }
- public Document toDoc()
- {
- DocumentBuilder oDB = null;
- try { oDB = DocumentBuilderFactory.newInstance().newDocumentBuilder(); }
- catch (Exception e) {}
- Document oDoc = oDB.newDocument();
- oDoc.appendChild(toElement(oDoc));
- return oDoc;
- } //__________________________________
+ public String getSnapType() {
+ return attrAsString(BaseBusinessObject.HIDDEN.type.toString());
+ }
- public Node toElement(Document p_oDoc)
- { return (isList()) ? listToElement(p_oDoc)
- : mapToElement (p_oDoc);
- } //__________________________________
+ public String getSnapDate() {
+ return attrAsString(BaseBusinessObject.HIDDEN.dtSnap.toString());
+ }
- private Node mapToElement(Document p_oDoc)
- { if (null == m_oAtts) return null;
- Element onRet = p_oDoc.createElement(m_sElemNm);
- for (Map.Entry<String,Object> oCurr: m_oAtts.entrySet())
- { if (oCurr.getValue() instanceof BobjStdDTO)
- { onRet.appendChild(((BobjStdDTO)oCurr.getValue()).toElement(p_oDoc));
- continue;
- }
- else
-// System.out.println("Elem<"+sKey+"> Val<"+oVal.toString()+">");
- onRet.setAttribute(oCurr.getKey(),oCurr.getValue().toString());
- }
+ public void setStamp(long pL) {
+ setLongAttr(BaseBusinessObject.HIDDEN.stamp.toString(), pL);
+ }
- boolean bPutClass = (null != m_sClassNm) && (! m_sElemNm.equals(m_sClassNm));
- if (bPutClass)onRet.setAttribute(BOBJ_CLASS,m_sClassNm);
- else onRet.removeAttribute(BOBJ_CLASS);
+ public void setUid(long pL) {
+ setLongAttr(BaseBusinessObject.HIDDEN.uid.toString(), pL);
+ }
- return onRet;
- } //__________________________________
+ public void setSnap(long pL) {
+ setLongAttr(BaseBusinessObject.HIDDEN.snap.toString(), pL);
+ }
- private Node listToElement(Document p_oDoc)
- { if (null == m_oChild) return null;
- if (m_oChild.isEmpty()) return null;
+ public void setBatch(long pL) {
+ setLongAttr(BaseBusinessObject.HIDDEN.batch.toString(), pL);
+ }
- Element onRet = p_oDoc.createElement(m_sElemNm);
- onRet.setAttribute("List","yes");
- if ( ! m_sElemNm.equals(m_sClassNm))
- onRet.setAttribute(BOBJ_CLASS,m_sClassNm);
+ public void setSnapType(String pS) {
+ setStringAttr(BaseBusinessObject.HIDDEN.type.toString(), pS);
+ }
- for (BobjStdDTO oCurr : m_oChild)
- { oCurr.m_sClassNm=null;
- oCurr.m_sElemNm="it";
- onRet.appendChild(oCurr.toElement(p_oDoc));
- }
- return onRet;
- } //__________________________________
+ public void setSnapDate(String pS) {
+ setStringAttr(BaseBusinessObject.HIDDEN.dtSnap.toString(), pS);
+ }
- public static synchronized BobjStdDTO getFromXml(String p_s) throws Exception
- {StringBuffer sb = new StringBuffer(s_sEncoding)
- .append("\n").append(p_s);
- DocumentBuilder oDB = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- Document oDoc = oDB.parse(new ByteArrayInputStream (sb.toString()
- .getBytes(s_sCharset)));
- return new BobjStdDTO(oDoc.getDocumentElement());
- } //__________________________________
+ public String fullClassName() {
+ String sPkg = "";
+ try {
+ sPkg = getAttr(BobjStdDTO.BOBJ_PACKAGE);
+ } catch (Exception e) {/* just leave it empty */
+ }
+ String sConstrPkg = (sPkg.endsWith(".")) ? sPkg : sPkg + ".";
+ return sConstrPkg + classNm();
+ } // __________________________________
- @SuppressWarnings("unused")
- private static synchronized List<BobjStdDTO> getChildList
- (String p_sClass, NodeList p_nl, String p_sPkgPfx)
- throws Exception
- { int iQel = p_nl.getLength();
- if (iQel < 1) return null;
- Class oClass = Class.forName(p_sPkgPfx+p_sClass);
- Class [] oaCls = new Class[] {String.class};
- Object [] oaStr = new Object[] {p_sClass};
- Constructor CC = oClass.getConstructor(oaCls);
- List<BobjStdDTO> olRet = new ArrayList<BobjStdDTO>(2*iQel);
- for (int i1=0; i1<iQel; i1++)
- { Node onCurr = p_nl.item(i1);
- if (Node.ELEMENT_NODE != onCurr.getNodeType()) continue;
- BobjStdDTO oDto = ((BaseBusinessObject)CC.newInstance(oaStr)).toDTO();
- oDto.addMap(BobjStdDTO.mapFromAtts(onCurr.getAttributes()));
- olRet.add(oDto);
- }
- return olRet;
- } //__________________________________
+ public List<? extends BaseBusinessObject> getChildObjList(String p_sElem,
+ Class pCls) throws Exception {
+ BobjStdDTO oChDto = this.getDTO(p_sElem);
+ if (null == oChDto)
+ return null;
+ if (!oChDto.isList())
+ throw new Exception("Child DTO is not List");
+ return oChDto.listDtoToList(pCls);
+ } // __________________________________
- private static synchronized Map<String,Object> mapFromAtts(NamedNodeMap p_oNnm)
- { if (null == p_oNnm) return null;
- int iQatt = p_oNnm.getLength();
- if (iQatt < 1) return null;
- Map<String,Object> omAtts = new HashMap<String,Object>();
- for (int i2=0; i2<iQatt;i2++)
- { Node nAtt = p_oNnm.item(i2);
- omAtts.put(nAtt.getNodeName(),nAtt.getNodeValue());
- }
- return omAtts;
- } //__________________________________
+ private List<BaseBusinessObject> listDtoToList(Class pCls) throws Exception {
+ if (!isList())
+ throw new Exception("BObjStdDTO is not a List");
+ Class[] oaCls = { BobjStdDTO.class };
+ Constructor CC = pCls.getConstructor(oaCls);
+ List<BaseBusinessObject> LL = new ArrayList<BaseBusinessObject>();
+ Object[] oaParms = new BobjStdDTO[1];
+ for (BobjStdDTO oCurr : m_oChild) {
+ oaParms[0] = oCurr;
+ LL.add((BaseBusinessObject) CC.newInstance(oaParms));
+ }
+ return (LL.size() > 0) ? LL : null;
+ } // __________________________________
- public void Dump(String p_s) throws Exception { System.out.println(p_s);Dump(0); }
+ public Map<String, Object> getAttrMap() throws Exception {
+ return m_oAtts;
+ } // __________________________________
- public void Dump(int p_iLev) throws Exception
- { byte[] ba = new byte[3*p_iLev]; Arrays.fill(ba,(byte)' ');
- String sTab = new String(ba);
- System.out.print(sTab+"Elem "+m_sElemNm+" Class "+m_sClassNm);
- if (isList())
- { System.out.println(" LIST");
- for (BobjStdDTO oCurr : m_oChild)
- oCurr.Dump(1+p_iLev);
- return;
- }
- System.out.print("\n"+sTab);
+ public BobjStdDTO getDTO(String p_sKey) throws Exception {
+ if (isList())
+ throw new Exception("BObjStdDTO is a List");
+ Object oRet = m_oAtts.get(p_sKey);
+ if (null == oRet)
+ return null;
+ if (oRet instanceof BobjStdDTO)
+ return (BobjStdDTO) oRet;
+ throw new Exception("Value is not BObjStdDTO");
+ } // __________________________________
- for (EnumMap.Entry<String,Object> oCurr : m_oAtts.entrySet())
- { if (oCurr.getValue() instanceof String)
- System.out.print(" " + oCurr.getKey()+"<"+oCurr.getValue()+">");
- }
- System.out.println();
- for (EnumMap.Entry<String,Object> oCurr : m_oAtts.entrySet())
- { if (oCurr.getValue() instanceof BobjStdDTO)
- ((BobjStdDTO)oCurr.getValue()).Dump(1+p_iLev);
- }
- } //__________________________________
-
-} //____________________________________________________________________________
+ public String getAttr(String p_sAttrName) throws Exception {
+ if (isList()) {
+ throw new UnsupportedOperationException("BObjStdDTO is a List. Cannot call getAttr method. Use isList to check!");
+ }
+ Object oRet = m_oAtts.get(p_sAttrName);
+ if (null == oRet) {
+ return null;
+ }
+ if (oRet instanceof String) {
+ return (String) oRet;
+ }
+ throw new IllegalArgumentException("p_sAttrName is not an attribute");
+ } // __________________________________
+
+ @SuppressWarnings("unchecked")
+ public void addAttr(String p_sKey, String p_sAtt) throws Exception {
+ if (isList())
+ throw new Exception("BObjStdDTO is a List");
+ if (null == p_sKey)
+ return;
+ m_oAtts.remove(p_sKey);
+ if (null != p_sAtt)
+ if (p_sAtt.trim().length() > 0)
+ m_oAtts.put(p_sKey, p_sAtt.trim());
+ } // __________________________________
+
+ @SuppressWarnings("unchecked")
+ public void addDto(String p_sKey, BobjStdDTO p_oDto) throws Exception {
+ if (isList())
+ throw new Exception("BObjStdDTO is a List");
+ if (null == p_sKey)
+ return;
+ m_oAtts.remove(p_sKey);
+ if (null == p_oDto)
+ return;
+ if (p_oDto.isEmpty())
+ return;
+ p_oDto.m_sElemNm = p_sKey;
+ m_oAtts.put(p_sKey, p_oDto);
+ } // __________________________________
+
+ @SuppressWarnings("unchecked")
+ private void addMap(Map<String, Object> p_oM) throws Exception {
+ if (isList())
+ throw new Exception("BObjStdDTO is a List");
+ if (null == p_oM)
+ return;
+ for (Map.Entry<String, Object> oCurr : p_oM.entrySet())
+ m_oAtts.put(oCurr.getKey(), oCurr.getValue());
+ } // __________________________________
+
+ public String toXml() throws Exception {
+ return toXml(false);
+ }
+
+ public String toXml(boolean p_bDecl) throws Exception {
+ Document oDoc = toDoc();
+ oDoc.normalize();
+ DOMSource src = new DOMSource(oDoc);
+
+ OutputStream oStrm = new ByteArrayOutputStream(1000);
+ StreamResult res = new StreamResult(oStrm);
+
+ Transformer oTf = TransformerFactory.newInstance().newTransformer();
+ oTf.setOutputProperty(OutputKeys.INDENT, "no");
+ oTf.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, (p_bDecl) ? "no"
+ : "yes");
+
+ oTf.setOutputProperty(OutputKeys.ENCODING, s_sCharset);
+ oTf.transform(src, res);
+ return oStrm.toString();
+ } // __________________________________
+
+ public Document toDoc() {
+ DocumentBuilder oDB = null;
+ try {
+ oDB = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ } catch (Exception e) {
+ }
+ Document oDoc = oDB.newDocument();
+ oDoc.appendChild(toElement(oDoc));
+ return oDoc;
+ } // __________________________________
+
+ public Node toElement(Document p_oDoc) {
+ return (isList()) ? listToElement(p_oDoc) : mapToElement(p_oDoc);
+ } // __________________________________
+
+ private Node mapToElement(Document p_oDoc) {
+ if (null == m_oAtts)
+ return null;
+ Element onRet = p_oDoc.createElement(m_sElemNm);
+ for (Map.Entry<String, Object> oCurr : m_oAtts.entrySet()) {
+ if (oCurr.getValue() instanceof BobjStdDTO) {
+ onRet.appendChild(((BobjStdDTO) oCurr.getValue())
+ .toElement(p_oDoc));
+ continue;
+ } else
+ // System.out.println("Elem<"+sKey+">
+ // Val<"+oVal.toString()+">");
+ onRet.setAttribute(oCurr.getKey(), oCurr.getValue().toString());
+ }
+
+ boolean bPutClass = (null != m_sClassNm)
+ && (!m_sElemNm.equals(m_sClassNm));
+ if (bPutClass)
+ onRet.setAttribute(BOBJ_CLASS, m_sClassNm);
+ else
+ onRet.removeAttribute(BOBJ_CLASS);
+
+ return onRet;
+ } // __________________________________
+
+ private Node listToElement(Document p_oDoc) {
+ if (null == m_oChild)
+ return null;
+ if (m_oChild.isEmpty())
+ return null;
+
+ Element onRet = p_oDoc.createElement(m_sElemNm);
+ onRet.setAttribute("List", "yes");
+ if (!m_sElemNm.equals(m_sClassNm))
+ onRet.setAttribute(BOBJ_CLASS, m_sClassNm);
+
+ for (BobjStdDTO oCurr : m_oChild) {
+ oCurr.m_sClassNm = null;
+ oCurr.m_sElemNm = "it";
+ onRet.appendChild(oCurr.toElement(p_oDoc));
+ }
+ return onRet;
+ } // __________________________________
+
+ public static synchronized BobjStdDTO getFromXml(String xmlBob)
+ throws Exception {
+
+ if(EsbUtil.isNullString(xmlBob)) {
+ throw new IllegalArgumentException("null or empty 'xmlBob' arg in call.");
+ }
+
+ StringBuffer sb = new StringBuffer(s_sEncoding).append("\n")
+ .append(xmlBob);
+ DocumentBuilder oDB = DocumentBuilderFactory.newInstance()
+ .newDocumentBuilder();
+ Document oDoc = oDB.parse(new ByteArrayInputStream(sb.toString()
+ .getBytes(s_sCharset)));
+ return new BobjStdDTO(oDoc.getDocumentElement());
+ } // __________________________________
+
+ private static synchronized Map<String, Object> mapFromAtts(
+ NamedNodeMap p_oNnm) {
+ if (null == p_oNnm)
+ return null;
+ int iQatt = p_oNnm.getLength();
+ if (iQatt < 1)
+ return null;
+ Map<String, Object> omAtts = new HashMap<String, Object>();
+ for (int i2 = 0; i2 < iQatt; i2++) {
+ Node nAtt = p_oNnm.item(i2);
+ omAtts.put(nAtt.getNodeName(), nAtt.getNodeValue());
+ }
+ return omAtts;
+ } // __________________________________
+
+ public void Dump(int p_iLev) throws Exception {
+ byte[] ba = new byte[3 * p_iLev];
+ Arrays.fill(ba, (byte) ' ');
+ String sTab = new String(ba);
+ System.out.print(sTab + "Elem " + m_sElemNm + " Class " + m_sClassNm);
+ if (isList()) {
+ System.out.println(" LIST");
+ for (BobjStdDTO oCurr : m_oChild)
+ oCurr.Dump(1 + p_iLev);
+ return;
+ }
+ System.out.print("\n" + sTab);
+
+ for (EnumMap.Entry<String, Object> oCurr : m_oAtts.entrySet()) {
+ if (oCurr.getValue() instanceof String)
+ System.out.print(" " + oCurr.getKey() + "<"
+ + oCurr.getValue() + ">");
+ }
+ System.out.println();
+ for (EnumMap.Entry<String, Object> oCurr : m_oAtts.entrySet()) {
+ if (oCurr.getValue() instanceof BobjStdDTO)
+ ((BobjStdDTO) oCurr.getValue()).Dump(1 + p_iLev);
+ }
+ } // __________________________________
+
+} // ____________________________________________________________________________
Modified: labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/EsbUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/EsbUtil.java 2006-07-28 04:54:17 UTC (rev 5338)
+++ labs/jbossesb/trunk/product/core/common/src/org/jboss/soa/esb/util/EsbUtil.java 2006-07-28 09:55:45 UTC (rev 5339)
@@ -93,36 +93,6 @@
}
} // __________________________________
- public static Context getJndiContext() {
- return jndiContextFromSysProp(null);
- } // __________________________________
-
- public static Context jndiContextFromSysProp(String p_sSysProp) {
- String sProp = (null == p_sSysProp) ? "appServer" : p_sSysProp;
- return getJbossJndiContext(System.getProperty(sProp));
- } // __________________________________
-
- public static Context getJbossJndiContext(String p_sServer) {
- if (null == p_sServer)
- return null;
- Properties oPr = new Properties();
- oPr.setProperty(Context.PROVIDER_URL, p_sServer);
- oPr.setProperty(Context.INITIAL_CONTEXT_FACTORY,
- "org.jnp.interfaces.NamingContextFactory");
- oPr.setProperty(Context.URL_PKG_PREFIXES,
- "jboss.naming:org.jnp.interfaces");
- try {
- return new InitialContext(oPr);
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- } // __________________________________
-
- public static String classSuffix(Class pCls) {
- return pCls.getSimpleName();
- } // __________________________________
-
public static Logger getDefaultLogger(Class p_oCls) {
Logger oRet = Logger.getLogger(p_oCls.getName());
Appender oApp = new ConsoleAppender(new TTCCLayout("ISO8601"));
Added: labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/W3CDomUtils.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/W3CDomUtils.java 2006-07-28 04:54:17 UTC (rev 5338)
+++ labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/W3CDomUtils.java 2006-07-28 09:55:45 UTC (rev 5339)
@@ -0,0 +1,35 @@
+package org.jboss.soa.esb;
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Document;
+
+public abstract class W3CDomUtils {
+
+ public static String serialize(Document document) {
+ DOMSource src = new DOMSource(document);
+
+ ByteArrayOutputStream byteBuf = new ByteArrayOutputStream(5000);
+ StreamResult res = new StreamResult(byteBuf);
+
+ try {
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.transform(src, res);
+ } catch (Exception e) {
+ e.printStackTrace();
+ TestCase.fail("Failed to serialise doc. See above stack trace.");
+ }
+
+ return byteBuf.toString();
+ }
+}
Added: labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java 2006-07-28 04:54:17 UTC (rev 5338)
+++ labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java 2006-07-28 09:55:45 UTC (rev 5339)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.util;
+
+import org.jboss.soa.esb.StreamUtils;
+import org.jboss.soa.esb.StringUtils;
+import org.jboss.soa.esb.W3CDomUtils;
+import org.w3c.dom.Document;
+
+import junit.framework.TestCase;
+
+/**
+ * BobjStdDTO unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class BobjStdDTOUnitTest extends TestCase {
+
+ public void test_getFromXml_String() throws Exception {
+ try {
+ BobjStdDTO.getFromXml(null);
+ fail("expected IllegalArgumentException");
+ } catch(IllegalArgumentException e) {
+ // expected
+ }
+ try {
+ BobjStdDTO.getFromXml(" ");
+ fail("expected IllegalArgumentException");
+ } catch(IllegalArgumentException e) {
+ // expected
+ }
+
+ String source = new String(StreamUtils.readStream(
+ getClass().getResourceAsStream("BobjStdDTOUnitTest_testfile1.xml")));
+ BobjStdDTO rootBob = BobjStdDTO.getFromXml(source);
+
+ // Check the attributes on the root element of the serialised object representation...
+ assertEquals("Brum", rootBob.getAttr("fmlyN"));
+ assertEquals("Daniel", rootBob.getAttr("givN"));
+ assertEquals("Mr.", rootBob.getAttr("pfx"));
+ assertEquals("the 1st.", rootBob.getAttr("sfx"));
+ assertTrue(!rootBob.isEmpty());
+ assertTrue(!rootBob.isList());
+
+ // Check the nested Address - this is a "List"....
+ BobjStdDTO childBob = rootBob.getDTO("Laddr");
+ assertNotNull(childBob);
+ assertTrue(!childBob.isEmpty());
+ assertTrue(childBob.isList());
+ // Address is a list type. Calling getAttr should result in an exception...
+ try {
+ childBob.getAttr("xx");
+ fail("expected UnsupportedOperationException");
+ } catch (UnsupportedOperationException e) {
+ // expected
+ }
+ assertEquals("Address", childBob.m_sClassNm);
+ assertEquals(null, childBob.m_oAtts);
+
+ // Run a few more checks...
+ childBob = rootBob.getDTO("Lpho");
+ assertNotNull(childBob);
+ childBob = rootBob.getDTO("Lemail");
+ assertNotNull(childBob);
+
+ // TODO: Add tests for the locator and batch "stuff"!
+ }
+
+ public void test_toDoc() throws Exception {
+ String source = new String(StreamUtils.readStream(
+ getClass().getResourceAsStream("BobjStdDTOUnitTest_testfile1.xml")));
+ BobjStdDTO bob = BobjStdDTO.getFromXml(source);
+
+ // Call toDoc on the Bob, serialise it and compare the serialised
+ // form to the original input. They should match...
+ Document doc = bob.toDoc();
+ String serialisedVer = W3CDomUtils.serialize(doc);
+ assertTrue(StringUtils.equalsIgnoreLinebreaks(source, serialisedVer, false));
+ }
+
+ public void test_MiscTests() throws Exception {
+ String source = new String(StreamUtils.readStream(
+ getClass().getResourceAsStream("BobjStdDTOUnitTest_testfile1.xml")));
+ BobjStdDTO bob = BobjStdDTO.getFromXml(source);
+
+ // Calling dump simply to improve the coverage figures - this is a dev utility method
+ // so testing this isn't so important...
+ bob.Dump(0);
+
+ // Check the setter and getter methods. This is a bit anal but makes a
+ // big diff on the coverage figures for this class...
+ bob.setUid(1234);
+ assertEquals(1234, bob.getUid());
+ bob.setBatch(1234);
+ assertEquals(1234, bob.getBatch());
+ bob.setSnap(1234);
+ assertEquals(1234, bob.getSnap());
+ bob.setStamp(1234);
+ assertEquals(1234, bob.getStamp());
+ bob.setSnapDate("30/12/1990");
+ assertEquals("30/12/1990", bob.getSnapDate());
+ bob.setSnapType("blah");
+ assertEquals("blah", bob.getSnapType());
+ }
+}
Added: labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest_testfile1.xml
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest_testfile1.xml 2006-07-28 04:54:17 UTC (rev 5338)
+++ labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest_testfile1.xml 2006-07-28 09:55:45 UTC (rev 5339)
@@ -0,0 +1,18 @@
+<Person fmlyN="Brum" givN="Daniel" pfx="Mr." sfx="the 1st.">
+<Laddr List="yes" __Class="Address">
+<it cntry="Argentina" postalZip="1642" provSt="Buenos Aires" strLine1="Balcarce" strNum="50" twnCty1="San Isidro">
+<Lpho List="yes" __Class="Telephone">
+<it city="416" num="555-1212" rol="torIP"/>
+<it city="11" cntry="54" ext="7" num="4555-1111" rol="home"/>
+</Lpho>
+</it>
+</Laddr>
+<Lpho List="yes" __Class="Telephone">
+<it city="416" cntry="1" num="555-1212" rol="basement"/>
+<it city="416" num="666-4444" rol="cell"/>
+</Lpho>
+<Lemail List="yes" __Class="OneValue">
+<it rol="home" v="myaddr at gmail.com"/>
+<it rol="work" v="john.smith at jboss.com"/>
+</Lemail>
+</Person>
\ No newline at end of file
Modified: labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/EsbUtilUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/EsbUtilUnitTest.java 2006-07-28 04:54:17 UTC (rev 5338)
+++ labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/util/EsbUtilUnitTest.java 2006-07-28 09:55:45 UTC (rev 5339)
@@ -43,7 +43,8 @@
Properties props = new Properties();
props.load(new ByteArrayInputStream(buf.toByteArray()));
- // Just make sure that something was dumped to the printstream...
+ // Just make sure that something was dumped to the printstream
+ // by checking for a property we know will be in the System...
assertTrue(props.containsKey("file.separator"));
}
@@ -101,19 +102,8 @@
assertEquals(-1L, EsbUtil.parseLong("-1"));
}
- public void testGetJndiContext() {
- }
-
- public void testJndiContextFromSysProp() {
- }
-
- public void testGetJbossJndiContext() {
- }
-
- public void testClassSuffix() {
- }
-
public void testGetDefaultLogger() {
+ // Cheating here - just getting the coverage results up a little more :-)
+ EsbUtil.getDefaultLogger(EsbUtil.class);
}
-
}
More information about the jboss-svn-commits
mailing list