comsuite-svn Mailing List for Communications Suite (Page 4)
                
                Brought to you by:
                
                    zduniak
                    
                
            
            
        
        
        
    You can subscribe to this list here.
| 2006 | Jan | Feb | Mar | Apr | May | Jun | Jul (10) | Aug (16) | Sep (48) | Oct (47) | Nov (4) | Dec (1) | 
|---|
| 
      
      
      From: <zd...@us...> - 2006-09-22 18:42:13
      
     | 
| Revision: 145
          http://svn.sourceforge.net/comsuite/?rev=145&view=rev
Author:   zduniak
Date:     2006-09-22 11:42:03 -0700 (Fri, 22 Sep 2006)
Log Message:
-----------
- log4j.properties for web project slightly reconfigured
- welcome page for middleware project changed
Modified Paths:
--------------
    trunk/code/CSAdminPanel/JavaSource/log4j.properties
    trunk/code/CSMiddleware/war/index.jsp
Modified: trunk/code/CSAdminPanel/JavaSource/log4j.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/log4j.properties	2006-09-22 18:10:48 UTC (rev 144)
+++ trunk/code/CSAdminPanel/JavaSource/log4j.properties	2006-09-22 18:42:03 UTC (rev 145)
@@ -12,10 +12,12 @@
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d %p [%c:%L] - %m%n
 
+### set log levels - for more verbose logging change 'info' to 'debug' ###
+log4j.rootLogger=warn, stdout, file
 
+log4j.logger.org.apache.myfaces=warn
+
 ### Communications Suite logger
-log4j.logger.org.commsuite=debug, stdout, file
+log4j.logger.org.commsuite=debug
 
-log4j.logger.org.apache.myfaces=warn
-
-log4j.logger.org.commsuite.aop=DEBUG
+log4j.logger.org.commsuite.aop=debug
Modified: trunk/code/CSMiddleware/war/index.jsp
===================================================================
--- trunk/code/CSMiddleware/war/index.jsp	2006-09-22 18:10:48 UTC (rev 144)
+++ trunk/code/CSMiddleware/war/index.jsp	2006-09-22 18:42:03 UTC (rev 145)
@@ -1,37 +1,10 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 <html>
-<head></head>
-	<body>
-		<form id="loginForm" action="loginuser">
-		<table>
-			<tr>
-				<td>
-				<td>
-				<table>
-					<tr>
-						<td>TODO: TITLE</td>
-					</tr>
-					<tr>
-						<td>
-						<table>
-							<tr>
-								<td>Login: </td>
-								<td><input type="text" name="j_username" /></td>
-							</tr>
-							<tr>
-								<td>Password: </td>
-								<td><input type="password" name="j_password" /></td>
-							</tr>
-							<tr>
-								<td><input type="submit" value=" Login " /></td>
-							</tr>
-						</table>
-						</td>
-					</tr>
-				</table>
-				</td>
-			</tr>
-		</table>
-	</form>
-	</body>
+<head>
+<title>Communications Suite</title>
+<META HTTP-EQUIV="Refresh"
+      CONTENT="0; URL=/CommunicationsSuiteAdmin">
+</head>
+<body>
+Loading...
+</body>
 </html>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <zd...@us...> - 2006-09-22 18:11:45
      
     | 
| Revision: 144
          http://svn.sourceforge.net/comsuite/?rev=144&view=rev
Author:   zduniak
Date:     2006-09-22 11:10:48 -0700 (Fri, 22 Sep 2006)
Log Message:
-----------
Log4j upgrade: 1.2.13 -> 1.2.14
Modified Paths:
--------------
    trunk/code/CSAdminPanel/.classpath
    trunk/code/CSCommon/.classpath
    trunk/code/CSMiddleware/.classpath
    trunk/code/CSRemoteClient/.classpath
    trunk/code/CSTests/.classpath
Added Paths:
-----------
    trunk/code/CSCommon/lib/log4j-1.2.14.jar
    trunk/code/CSRemoteClient/lib/log4j-1.2.14.jar
Removed Paths:
-------------
    trunk/code/CSCommon/lib/log4j-1.2.13.jar
    trunk/code/CSRemoteClient/lib/log4j-1.2.13.jar
Modified: trunk/code/CSAdminPanel/.classpath
===================================================================
--- trunk/code/CSAdminPanel/.classpath	2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSAdminPanel/.classpath	2006-09-22 18:10:48 UTC (rev 144)
@@ -5,7 +5,6 @@
 	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.0"/>
 	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container/CSAdminPanel"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/CSCommon"/>
-	<classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.13.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/javolution.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/spring.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/commons-collections-3.1.jar"/>
@@ -22,5 +21,6 @@
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-impl-1.1.3.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
+	<classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.14.jar"/>
 	<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
 </classpath>
Modified: trunk/code/CSCommon/.classpath
===================================================================
--- trunk/code/CSCommon/.classpath	2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSCommon/.classpath	2006-09-22 18:10:48 UTC (rev 144)
@@ -3,7 +3,6 @@
 	<classpathentry kind="src" path="src"/>
 	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="lib" path="lib/spring.jar"/>
-	<classpathentry kind="lib" path="lib/log4j-1.2.13.jar"/>
 	<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
 	<classpathentry kind="lib" path="lib/commons-httpclient-3.0.jar"/>
 	<classpathentry kind="lib" path="lib/commons-lang-2.1.jar"/>
@@ -21,5 +20,6 @@
 	<classpathentry kind="lib" path="lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
 	<classpathentry kind="lib" path="lib/xbean-2.2.0.jar"/>
+	<classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Deleted: trunk/code/CSCommon/lib/log4j-1.2.13.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSCommon/lib/log4j-1.2.14.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSCommon/lib/log4j-1.2.14.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/code/CSMiddleware/.classpath
===================================================================
--- trunk/code/CSMiddleware/.classpath	2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSMiddleware/.classpath	2006-09-22 18:10:48 UTC (rev 144)
@@ -5,7 +5,6 @@
 	<classpathentry kind="lib" path="lib/hibernate3.jar"/>
 	<classpathentry kind="lib" path="lib/commons-dbcp.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/spring.jar"/>
-	<classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.13.jar"/>
 	<classpathentry kind="lib" path="lib/gnu-hylafax-0.0.9.2.jar"/>
 	<classpathentry kind="lib" path="lib/gnu-inet-ftp-0.0.9.2.jar"/>
 	<classpathentry kind="lib" path="lib/quartz-1.5.2.jar"/>
@@ -34,5 +33,6 @@
 	<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
+	<classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.14.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Modified: trunk/code/CSRemoteClient/.classpath
===================================================================
--- trunk/code/CSRemoteClient/.classpath	2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSRemoteClient/.classpath	2006-09-22 18:10:48 UTC (rev 144)
@@ -7,12 +7,12 @@
 	<classpathentry kind="lib" path="lib/commons-lang-2.1.jar"/>
 	<classpathentry kind="lib" path="lib/jaxrpc.jar"/>
 	<classpathentry kind="lib" path="lib/je.jar"/>
-	<classpathentry kind="lib" path="lib/log4j-1.2.13.jar"/>
 	<classpathentry kind="lib" path="lib/saaj.jar"/>
 	<classpathentry kind="lib" path="lib/spring.jar"/>
 	<classpathentry kind="lib" path="lib/wsdl4j-1.5.1.jar"/>
 	<classpathentry kind="lib" path="lib/commons-logging-1.1.jar"/>
 	<classpathentry kind="lib" path="lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
 	<classpathentry kind="lib" path="lib/geronimo-javamail_1.3.1_spec-1.1.jar"/>
+	<classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Deleted: trunk/code/CSRemoteClient/lib/log4j-1.2.13.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSRemoteClient/lib/log4j-1.2.14.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSRemoteClient/lib/log4j-1.2.14.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/code/CSTests/.classpath
===================================================================
--- trunk/code/CSTests/.classpath	2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSTests/.classpath	2006-09-22 18:10:48 UTC (rev 144)
@@ -11,7 +11,6 @@
 	<classpathentry kind="lib" path="lib/junit-4.0.jar"/>
 	<classpathentry kind="lib" path="lib/nekohtml.jar"/>
 	<classpathentry kind="lib" path="lib/Tidy.jar"/>
-	<classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.13.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/spring.jar"/>
 	<classpathentry kind="lib" path="/CSMiddleware/lib/hibernate3.jar"/>
 	<classpathentry kind="lib" path="lib/spring-mock.jar"/>
@@ -34,5 +33,6 @@
 	<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-jms_1.1_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
+	<classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.14.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <zd...@us...> - 2006-09-21 21:12:01
      
     | 
| Revision: 143
          http://svn.sourceforge.net/comsuite/?rev=143&view=rev
Author:   zduniak
Date:     2006-09-21 14:11:53 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
Unnecessary files and folders deleted (from scratchpad package)
Removed Paths:
-------------
    trunk/code/CSMiddleware/src/org/commsuite/scratchpad/wisniewska/
    trunk/code/CSMiddleware/src/org/commsuite/scratchpad/zduniakm/SAPInstancesSupplier.java
    trunk/code/CSMiddleware/src/org/commsuite/scratchpad/zduniakm/sapemulator/
Deleted: trunk/code/CSMiddleware/src/org/commsuite/scratchpad/zduniakm/SAPInstancesSupplier.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/scratchpad/zduniakm/SAPInstancesSupplier.java	2006-09-21 21:06:39 UTC (rev 142)
+++ trunk/code/CSMiddleware/src/org/commsuite/scratchpad/zduniakm/SAPInstancesSupplier.java	2006-09-21 21:11:53 UTC (rev 143)
@@ -1,73 +0,0 @@
-/* $Id$
- * 
- * Communications Suite.
- * Copyright (C) 2006 Szymon Kuzniak, Rafal Malinowski, Marek Musielak, Pawel Walkiewicz,
- * Agnieszka Wisniewska, Marcin Zduniak, Liliana Ziolek.
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * 
- * This program 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 General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
- */
-package org.commsuite.scratchpad.zduniakm;
-
-import java.util.Collection;
-
-import javolution.util.FastTable;
-
-import org.apache.log4j.Logger;
-import org.commsuite.model.SAPInstanceDef;
-
-/**
- * @since 1.0
- * @author Marcin Zduniak
- * 
- * @deprecated We should use SAP Instances defined in DB instead.
- */
-public class SAPInstancesSupplier {
-    
-    private static final Logger logger = Logger.getLogger(SAPInstancesSupplier.class);
-
-    public SAPInstancesSupplier() {
-        super();
-    }
-    
-    public static Collection<SAPInstanceDef> obtainSAPInstances() {
-        logger.info("Running obtainSAPInstances() method.");
-        
-        final SAPInstanceDef inst = new SAPInstanceDef();
-        
-        inst.setClient("100");
-        inst.setDefaultInstance(true);
-        //inst.setGruop();
-        inst.setGwhost("bcz.bcc.com.pl");
-        inst.setGwserv("sapgw44");
-        inst.setHost(inst.getGwhost());
-        //inst.setId() // assigned by DB
-//        inst.setLanguage("EN");
-        inst.setLoadBalancing(false);
-        inst.setMaxConnectionsInPool(5);
-        inst.setName("BCC_BCZ_100");
-        inst.setPassword("changeme");
-        inst.setProgid("ZTESTJCO");
-        inst.setSystemNumber("44");
-        inst.setUser("cstest");
-        inst.setUnicode(false);
-        inst.setId(1234567890L);
-        inst.setAdminEmail("mar...@bc...");
-        
-        final Collection<SAPInstanceDef> collection = new FastTable<SAPInstanceDef>();
-        collection.add(inst);
-        return collection;
-    }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <zd...@us...> - 2006-09-21 21:09:14
      
     | 
| Revision: 142
          http://svn.sourceforge.net/comsuite/?rev=142&view=rev
Author:   zduniak
Date:     2006-09-21 14:06:39 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
SAPEmulator moved to more appropriate package.
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/sapContext.xml
    trunk/code/CSMiddleware/war/WEB-INF/web.xml
Added Paths:
-----------
    trunk/code/CSMiddleware/src/org/commsuite/tests/
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/SAPEmulatingServlet.java
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_FAX_z-PL-literkami.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_HTM_Mantis.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ODP.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_RTF.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_SMS_z-PL-literkami.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TIFF-kilka-w-zalaczniku.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT-wyslane-jako-SMS_w_jednym_dlugim_zalaczniku.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT-wyslane-jako-fax.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT_wyslane-jako-SMS-3-zalaczniki.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_XLS.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_bmp.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc_InnyDokument.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc_Word60.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_gif.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_htm.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_jpeg.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_jpg.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ods.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_odt.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_pdf_main_msg.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_png.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_pps.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ppt.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxc.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxd.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxi.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxw_wersja1.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxw_wersja2.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Agniesi.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Marcina.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Rafala.ser
    trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/XCHGVERSION_1140895388800.ser
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/SAPEmulatingServlet.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/SAPEmulatingServlet.java	                        (rev 0)
+++ trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/SAPEmulatingServlet.java	2006-09-21 21:06:39 UTC (rev 142)
@@ -0,0 +1,109 @@
+/* $Id$
+ * 
+ * Communications Suite.
+ * Copyright (C) 2006 Szymon Kuzniak, Rafal Malinowski, Marek Musielak, Pawel Walkiewicz,
+ * Agnieszka Wisniewska, Marcin Zduniak, Liliana Ziolek.
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program 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 General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
+package org.commsuite.tests.emulator;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.commsuite.sap.ISAPComm;
+import org.commsuite.sap.SAPComm;
+import org.commsuite.util.SpringMiddlewareContext;
+
+import com.sap.mw.jco.JCO;
+
+/**
+ * @since 1.0
+ * @author Marcin Zduniak
+ */
+public class SAPEmulatingServlet extends HttpServlet {
+
+    private static final long serialVersionUID = 9071969523995027656L;
+
+    public SAPEmulatingServlet() {
+        super();
+    }
+
+    @Override
+    protected void service(HttpServletRequest req, HttpServletResponse res)
+            throws ServletException, IOException {
+        final String action = req.getParameter("a");
+        final PrintWriter out = res.getWriter();
+        out.print("<html>");
+        if (null == action) {
+            showAllFiles(out);
+        } else {
+            try {
+                simulateJCOFunction(action);
+                out.print("Messages sent");
+            } catch (Throwable e) {
+                out.print("Exception: ");
+                out.print(e.getMessage());
+                e.printStackTrace();
+            }
+        }
+        out.print("</html>");
+    }
+
+    private void simulateJCOFunction(String action) throws IOException, ClassNotFoundException {
+        final String path = getResPath() + "/" + action;
+        final InputStream is = new FileInputStream(new File(path));
+        final ObjectInputStream objIn = new ObjectInputStream(is);
+        final Object obj = objIn.readObject();
+
+        if (obj instanceof JCO.Function) {
+            final JCO.Function function = (JCO.Function) obj;
+            for (ISAPComm isapComm : SpringMiddlewareContext.getSAPCommManager().getSapComms().values()) {
+                final SAPComm sapComm = (SAPComm) isapComm;
+                sapComm.handleJCORequest(function, "ISO8859_2");
+            }
+        }
+    }
+
+    private String getResPath() {
+        final String path = this.getClass().getResource("/").getPath() + "/"
+                + this.getClass().getPackage().getName().replace('.', '/') + "/res";
+        return path;
+    }
+
+    private void showAllFiles(PrintWriter out) {
+        final File resPath = new File(getResPath());
+        
+        if (null == resPath) {
+            out.append("Could not find path to files.");
+            return;
+        }
+        
+        out.append("Available test messages:<br/><br/>");
+        for (String name : resPath.list()) {
+            out.append("<a href='?a=" + name + "'>" + name + "</a><br/>");
+        }
+    }
+
+}
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/SAPEmulatingServlet.java
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_FAX_z-PL-literkami.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_FAX_z-PL-literkami.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_HTM_Mantis.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_HTM_Mantis.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ODP.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ODP.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_RTF.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_RTF.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_SMS_z-PL-literkami.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_SMS_z-PL-literkami.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TIFF-kilka-w-zalaczniku.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TIFF-kilka-w-zalaczniku.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT-wyslane-jako-SMS_w_jednym_dlugim_zalaczniku.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT-wyslane-jako-SMS_w_jednym_dlugim_zalaczniku.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT-wyslane-jako-fax.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT-wyslane-jako-fax.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT_wyslane-jako-SMS-3-zalaczniki.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_TXT_wyslane-jako-SMS-3-zalaczniki.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_XLS.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_XLS.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_bmp.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_bmp.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc_InnyDokument.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc_InnyDokument.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc_Word60.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_doc_Word60.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_gif.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_gif.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_htm.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_htm.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_jpeg.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_jpeg.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_jpg.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_jpg.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ods.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ods.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_odt.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_odt.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_pdf_main_msg.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_pdf_main_msg.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_png.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_png.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_pps.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_pps.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ppt.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_ppt.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxc.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxc.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxd.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxd.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxi.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxi.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxw_wersja1.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxw_wersja1.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxw_wersja2.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_sxw_wersja2.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Agniesi.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Agniesi.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Marcina.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Marcina.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Rafala.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/SX_OBJECT_RECEIVE_to_powinien_byc_SMS_do_Rafala.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/XCHGVERSION_1140895388800.ser
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/src/org/commsuite/tests/emulator/res/XCHGVERSION_1140895388800.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/code/CSMiddleware/src/sapContext.xml
===================================================================
--- trunk/code/CSMiddleware/src/sapContext.xml	2006-09-21 20:46:12 UTC (rev 141)
+++ trunk/code/CSMiddleware/src/sapContext.xml	2006-09-21 21:06:39 UTC (rev 142)
@@ -12,11 +12,6 @@
 			<bean factory-bean="sapInstanceDefManager"
 				factory-method="getSAPInstances">
 			</bean>
-			<!-- 
-				<bean
-				class="org.commsuite.scratchpad.zduniakm.SAPInstancesSupplier"
-				factory-method="obtainSAPInstances" />
-			-->
 		</property>
 	</bean>
 
Modified: trunk/code/CSMiddleware/war/WEB-INF/web.xml
===================================================================
--- trunk/code/CSMiddleware/war/WEB-INF/web.xml	2006-09-21 20:46:12 UTC (rev 141)
+++ trunk/code/CSMiddleware/war/WEB-INF/web.xml	2006-09-21 21:06:39 UTC (rev 142)
@@ -149,7 +149,7 @@
 	<servlet>
 		<servlet-name>SAPEmulator</servlet-name>
 		<servlet-class>
-			org.commsuite.scratchpad.zduniakm.sapemulator.SAPEmulatingServlet
+			org.commsuite.tests.emulator.SAPEmulatingServlet
 		</servlet-class>
 	</servlet>
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <zd...@us...> - 2006-09-21 20:46:37
      
     | 
| Revision: 141
          http://svn.sourceforge.net/comsuite/?rev=141&view=rev
Author:   zduniak
Date:     2006-09-21 13:46:12 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
Little improvements in source code (layout, docs mainly)
Modified Paths:
--------------
    trunk/code/CSAdminPanel/.classpath
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/security/ClientAuthenticationHandler.java
    trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
    trunk/code/CSMiddleware/.classpath
    trunk/code/CSMiddleware/lib-notversioned/README.txt
    trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
    trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
Modified: trunk/code/CSAdminPanel/.classpath
===================================================================
--- trunk/code/CSAdminPanel/.classpath	2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSAdminPanel/.classpath	2006-09-21 20:46:12 UTC (rev 141)
@@ -21,6 +21,6 @@
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-api-1.1.3.jar"/>
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-impl-1.1.3.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
-	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.2.1.jar"/>
+	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
 	<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
 </classpath>
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/security/ClientAuthenticationHandler.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/security/ClientAuthenticationHandler.java	2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/security/ClientAuthenticationHandler.java	2006-09-21 20:46:12 UTC (rev 141)
@@ -22,7 +22,6 @@
  * along with this program; if not, write to the Free Software 	 
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 	 
  */
-
 package org.commsuite.web.security;
 
 import org.apache.log4j.Logger;
@@ -31,6 +30,9 @@
 import org.jdom.Element;
 import org.jdom.Namespace;
 
+/**
+ * @author Szymon Kuzniak
+ */
 public class ClientAuthenticationHandler extends AbstractHandler {
 	
 	private static final Logger logger = Logger.getLogger(ClientAuthenticationHandler.class);
Modified: trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java	2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java	2006-09-21 20:46:12 UTC (rev 141)
@@ -1,3 +1,23 @@
+/* $Id $
+ * 
+ * Communications Suite.
+ * Copyright (C) 2006 Szymon Kuzniak, Rafal Malinowski, Marek Musielak, Pawel Walkiewicz,
+ * Agnieszka Wisniewska, Marcin Zduniak, Liliana Ziolek.
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program 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 General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
 package org.commsuite.aop;
 
 import java.util.ArrayList;
@@ -9,6 +29,9 @@
 import org.aopalliance.intercept.MethodInterceptor;
 import org.aopalliance.intercept.MethodInvocation;
 
+/**
+ * @author Marek Musielak
+ */
 public class CsMethodsDebuggerInterceptor implements MethodInterceptor {
 
 	private final static Logger logger = Logger
Modified: trunk/code/CSMiddleware/.classpath
===================================================================
--- trunk/code/CSMiddleware/.classpath	2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSMiddleware/.classpath	2006-09-21 20:46:12 UTC (rev 141)
@@ -33,6 +33,6 @@
 	<classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
-	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.2.1.jar"/>
+	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Modified: trunk/code/CSMiddleware/lib-notversioned/README.txt
===================================================================
--- trunk/code/CSMiddleware/lib-notversioned/README.txt	2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSMiddleware/lib-notversioned/README.txt	2006-09-21 20:46:12 UTC (rev 141)
@@ -1 +1 @@
-Please place "sapjco.jar" file here. You can obtain it from https://service.sap.com
\ No newline at end of file
+Please place "sapjco.jar" file here. You can obtain it from http://service.sap.com/connectors
\ No newline at end of file
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java	2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java	2006-09-21 20:46:12 UTC (rev 141)
@@ -23,7 +23,7 @@
 import java.io.UnsupportedEncodingException;
 import java.util.Date;
 
-import javolution.lang.TextBuilder;
+import javolution.text.TextBuilder;
 
 import org.apache.log4j.Logger;
 import org.commsuite.devices.Device;
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java	2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java	2006-09-21 20:46:12 UTC (rev 141)
@@ -24,7 +24,7 @@
 import java.util.Date;
 import java.util.Properties;
 
-import javolution.lang.TextBuilder;
+import javolution.text.TextBuilder;
 
 import org.apache.commons.lang.builder.ToStringBuilder;
 import org.apache.log4j.Logger;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <zd...@us...> - 2006-09-21 20:41:45
      
     | 
| Revision: 140
          http://svn.sourceforge.net/comsuite/?rev=140&view=rev
Author:   zduniak
Date:     2006-09-21 13:38:22 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
A few libraries upgraded to never versions.
Modified Paths:
--------------
    trunk/code/CSAdminPanel/.classpath
    trunk/code/CSCommon/.classpath
    trunk/code/CSCommon/lib/javolution.jar
    trunk/code/CSMiddleware/.classpath
    trunk/code/CSTests/.classpath
Added Paths:
-----------
    trunk/code/CSCommon/lib/xbean-2.2.0.jar
    trunk/code/CSCommon/lib/xbean-spring-2.5.jar
    trunk/code/CSMiddleware/lib/ehcache-1.2.3.jar
Removed Paths:
-------------
    trunk/code/CSCommon/lib/xbean-2.1.0.jar
    trunk/code/CSCommon/lib/xbean-spring-2.4.jar
    trunk/code/CSMiddleware/lib/ehcache-1.2.2.jar
Modified: trunk/code/CSAdminPanel/.classpath
===================================================================
--- trunk/code/CSAdminPanel/.classpath	2006-09-20 08:46:56 UTC (rev 139)
+++ trunk/code/CSAdminPanel/.classpath	2006-09-21 20:38:22 UTC (rev 140)
@@ -14,7 +14,6 @@
 	<classpathentry kind="lib" path="/CSCommon/lib/commons-logging-1.1.jar"/>
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tomahawk.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/jdom-1.0.jar"/>
-	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar"/>
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-digester-1.6.jar"/>
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-el-1.0.jar"/>
@@ -22,5 +21,6 @@
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-api-1.1.3.jar"/>
 	<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-impl-1.1.3.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
+	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.2.1.jar"/>
 	<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
 </classpath>
Modified: trunk/code/CSCommon/.classpath
===================================================================
--- trunk/code/CSCommon/.classpath	2006-09-20 08:46:56 UTC (rev 139)
+++ trunk/code/CSCommon/.classpath	2006-09-21 20:38:22 UTC (rev 140)
@@ -12,7 +12,6 @@
 	<classpathentry kind="lib" path="lib/stax-api-1.0.jar"/>
 	<classpathentry kind="lib" path="lib/velocity-1.4.jar"/>
 	<classpathentry kind="lib" path="lib/wsdl4j-1.5.2.jar"/>
-	<classpathentry kind="lib" path="lib/xbean-2.1.0.jar"/>
 	<classpathentry kind="lib" path="lib/javolution.jar"/>
 	<classpathentry kind="lib" path="lib/wstx-asl-2.9.3.jar"/>
 	<classpathentry kind="lib" path="lib/stax-utils-20060501.jar"/>
@@ -21,5 +20,6 @@
 	<classpathentry kind="lib" path="lib/commons-logging-1.1.jar"/>
 	<classpathentry kind="lib" path="lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
+	<classpathentry kind="lib" path="lib/xbean-2.2.0.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Modified: trunk/code/CSCommon/lib/javolution.jar
===================================================================
(Binary files differ)
Deleted: trunk/code/CSCommon/lib/xbean-2.1.0.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSCommon/lib/xbean-2.2.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSCommon/lib/xbean-2.2.0.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Deleted: trunk/code/CSCommon/lib/xbean-spring-2.4.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSCommon/lib/xbean-spring-2.5.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSCommon/lib/xbean-spring-2.5.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/code/CSMiddleware/.classpath
===================================================================
--- trunk/code/CSMiddleware/.classpath	2006-09-20 08:46:56 UTC (rev 139)
+++ trunk/code/CSMiddleware/.classpath	2006-09-21 20:38:22 UTC (rev 140)
@@ -26,7 +26,6 @@
 	<classpathentry kind="lib" path="/CSCommon/lib/acegi-security-1.0.0.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/acegi-security-catalina-1.0.0.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/jdom-1.0.jar"/>
-	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
 	<classpathentry kind="lib" path="lib/smsLib1.3.0-rxtx.jar"/>
 	<classpathentry kind="lib" path="lib/activemq-core-4.1-SNAPSHOT.jar"/>
 	<classpathentry kind="lib" path="lib/activeio-core-3.0-SNAPSHOT.jar"/>
@@ -34,5 +33,6 @@
 	<classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSCommon/lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
+	<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.2.1.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Deleted: trunk/code/CSMiddleware/lib/ehcache-1.2.2.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSMiddleware/lib/ehcache-1.2.3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/lib/ehcache-1.2.3.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/code/CSTests/.classpath
===================================================================
--- trunk/code/CSTests/.classpath	2006-09-20 08:46:56 UTC (rev 139)
+++ trunk/code/CSTests/.classpath	2006-09-21 20:38:22 UTC (rev 140)
@@ -29,7 +29,6 @@
 	<classpathentry kind="lib" path="/CSMiddleware/lib-notversioned/sapjco.jar"/>
 	<classpathentry kind="lib" path="/CSMiddleware/lib/backport-util-concurrent-2.1.jar"/>
 	<classpathentry kind="lib" path="/CSMiddleware/lib/activeio-core-3.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="/CSMiddleware/lib/ehcache-1.2.2.jar"/>
 	<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-j2ee-connector_1.5_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-j2ee-management_1.0_spec-1.0.1.jar"/>
 	<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-jms_1.1_spec-1.0.1.jar"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <mal...@us...> - 2006-09-20 08:47:01
      
     | 
| Revision: 139
          http://svn.sourceforge.net/comsuite/?rev=139&view=rev
Author:   malinowskirafal
Date:     2006-09-20 01:46:56 -0700 (Wed, 20 Sep 2006)
Log Message:
-----------
performance
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/org/commsuite/util/SpringMiddlewareContext.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/util/SpringMiddlewareContext.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/util/SpringMiddlewareContext.java	2006-09-20 08:45:59 UTC (rev 138)
+++ trunk/code/CSMiddleware/src/org/commsuite/util/SpringMiddlewareContext.java	2006-09-20 08:46:56 UTC (rev 139)
@@ -44,59 +44,124 @@
  */
 public final class SpringMiddlewareContext extends SpringContext {
 
-    private SpringMiddlewareContext() {
-        super();
-    }
+	private static ISAPCommManager sapCommManager = null;
 
-    public static ISAPCommManager getSAPCommManager() {
-        return (ISAPCommManager) getBean(SpringMiddlewareBeansConstants.SAP_COMM_MANAGER);
-    }
+	private static JMSMessageManager jmsMessageManager = null;
 
-    public static JMSMessageManager getJMSManager() {
-        return (JMSMessageManager) getBean(SpringMiddlewareBeansConstants.ACTIVEMQ_JMS_MESSAGES_MANAGER);
-    }
+	private static DeviceManager deviceManager = null;
 
-    public static DeviceManager getDeviceManager() {
-        return (DeviceManager) getBean(SpringMiddlewareBeansConstants.DEVICE_MANAGER);
-    }
+	private static UserManager userManager = null;
 
-    public static UserManager getUserManager() {
-        return (UserManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_USER_MANAGER);
-    }
+	private static MessageManager messageManager = null;
 
-    public static MessageManager getMessageManager() {
-        return (MessageManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_MESSAGE_MANAGER);
-    }
+	private static SAPInstanceDefManager sapInstanceDefManager = null;
 
-    public static SAPInstanceDefManager getSAPInstanceDefManager() {
-        return (SAPInstanceDefManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_SAP_INSTANCE_DEF_MANAGER);
-    }
+	private static ActionManager actionManager = null;
 
-    public static ActionManager getActionManager() {
-        return (ActionManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_ACTION_MANAGER);
-    }
+	private static RoleManager roleManager = null;
 
-    public static RoleManager getRoleManager() {
-        return (RoleManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_ROLE_MANAGER);
-    }
+	private static GroupManager groupManager = null;
 
-    public static GroupManager getGroupManager() {
-        return (GroupManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_GROUP_MANAGER);
-    }
+	private static ContentsManager contentsManager = null;
 
-    public static ContentsManager getContentsManager() {
-        return (ContentsManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_CONTENTS_MANAGER);
-    }
+	private static SentContentManager sentContentManager = null;
 
-    public static SentContentManager getSentContentManager() {
-        return (SentContentManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_SENT_CONTENT_MANAGER);
-    }
+	private static ExDevRegister exDevRegister = null;
 
-    public static ExDevRegister getExDevRegister() {
-        return (ExDevRegister) getBean(SpringMiddlewareBeansConstants.EX_DEV_REGISTER);
-    }
-    
-    public static FilterManager getFilterManager() {
-    		return (FilterManager) getBean(SpringMiddlewareBeansConstants.FILTER_MANAGER);
-    }
+	private static FilterManager filterManager = null;
+
+	public SpringMiddlewareContext() {
+		super();
+	}
+
+	public static ISAPCommManager getSAPCommManager() {
+		if (null == sapCommManager) {
+			sapCommManager = (ISAPCommManager) getBean(SpringMiddlewareBeansConstants.SAP_COMM_MANAGER);
+		}
+		return sapCommManager;
+	}
+
+	public static JMSMessageManager getJMSManager() {
+		if (null == jmsMessageManager) {
+			jmsMessageManager = (JMSMessageManager) getBean(SpringMiddlewareBeansConstants.ACTIVEMQ_JMS_MESSAGES_MANAGER);
+		}
+		return jmsMessageManager;
+	}
+
+	public static DeviceManager getDeviceManager() {
+		if (null == deviceManager) {
+			deviceManager = (DeviceManager) getBean(SpringMiddlewareBeansConstants.DEVICE_MANAGER);
+		}
+		return deviceManager;
+	}
+
+	public static UserManager getUserManager() {
+		if (null == userManager) {
+			userManager = (UserManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_USER_MANAGER);
+		}
+		return userManager;
+	}
+
+	public static MessageManager getMessageManager() {
+		if (null == messageManager) {
+			messageManager = (MessageManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_MESSAGE_MANAGER);
+		}
+		return messageManager;
+	}
+
+	public static SAPInstanceDefManager getSAPInstanceDefManager() {
+		if (null == sapInstanceDefManager) {
+			sapInstanceDefManager = (SAPInstanceDefManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_SAP_INSTANCE_DEF_MANAGER);
+		}
+		return sapInstanceDefManager;
+	}
+
+	public static ActionManager getActionManager() {
+		if (null == actionManager) {
+			actionManager = (ActionManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_ACTION_MANAGER);
+		}
+		return actionManager;
+	}
+
+	public static RoleManager getRoleManager() {
+		if (null == roleManager) {
+			roleManager = (RoleManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_ROLE_MANAGER);
+		}
+		return roleManager;
+	}
+
+	public static GroupManager getGroupManager() {
+		if (null == groupManager) {
+			groupManager = (GroupManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_GROUP_MANAGER);
+		}
+		return groupManager;
+	}
+
+	public static ContentsManager getContentsManager() {
+		if (null == contentsManager) {
+			contentsManager = (ContentsManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_CONTENTS_MANAGER);
+		}
+		return contentsManager;
+	}
+
+	public static SentContentManager getSentContentManager() {
+		if (null == sentContentManager) {
+			sentContentManager = (SentContentManager) getBean(SpringMiddlewareBeansConstants.HIBERNATE_SENT_CONTENT_MANAGER);
+		}
+		return sentContentManager;
+	}
+
+	public static ExDevRegister getExDevRegister() {
+		if (null == exDevRegister) {
+			exDevRegister = (ExDevRegister) getBean(SpringMiddlewareBeansConstants.EX_DEV_REGISTER);
+		}
+		return exDevRegister;
+	}
+
+	public static FilterManager getFilterManager() {
+		if (null == filterManager) {
+			filterManager = (FilterManager) getBean(SpringMiddlewareBeansConstants.FILTER_MANAGER);
+		}
+		return filterManager;
+	}
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <mal...@us...> - 2006-09-20 08:46:08
      
     | 
| Revision: 138
          http://svn.sourceforge.net/comsuite/?rev=138&view=rev
Author:   malinowskirafal
Date:     2006-09-20 01:45:59 -0700 (Wed, 20 Sep 2006)
Log Message:
-----------
logi przerobione
Modified Paths:
--------------
    trunk/code/CSAdminPanel/JavaSource/log4j.properties
    trunk/code/CSMiddleware/src/aopContext.xml
Modified: trunk/code/CSAdminPanel/JavaSource/log4j.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/log4j.properties	2006-09-19 18:21:14 UTC (rev 137)
+++ trunk/code/CSAdminPanel/JavaSource/log4j.properties	2006-09-20 08:45:59 UTC (rev 138)
@@ -12,11 +12,9 @@
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d %p [%c:%L] - %m%n
 
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-log4j.rootLogger=warn, stdout, file
 
 ### Communications Suite logger
-log4j.logger.org.commsuite=debug
+log4j.logger.org.commsuite=debug, stdout, file
 
 log4j.logger.org.apache.myfaces=warn
 
Modified: trunk/code/CSMiddleware/src/aopContext.xml
===================================================================
--- trunk/code/CSMiddleware/src/aopContext.xml	2006-09-19 18:21:14 UTC (rev 137)
+++ trunk/code/CSMiddleware/src/aopContext.xml	2006-09-20 08:45:59 UTC (rev 138)
@@ -13,7 +13,7 @@
 
 	<bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
 		<property name="beanNames">
-			<value>*Target,*Dao,converterBuilder,exDevRegister,mOutRouter,mSAPIn,filterManager,sapCommManager</value>
+			<value>*Target,converterBuilder,exDevRegister,mOutRouter,mSAPIn,filterManager,sapCommManager</value>
 		</property>
 		<property name="interceptorNames">
 			<list>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <mal...@us...> - 2006-09-19 18:21:25
      
     | 
| Revision: 137
          http://svn.sourceforge.net/comsuite/?rev=137&view=rev
Author:   malinowskirafal
Date:     2006-09-19 11:21:14 -0700 (Tue, 19 Sep 2006)
Log Message:
-----------
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java
    trunk/code/CSMiddleware/src/org/commsuite/messaging/JMSMessageManager.java
    trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java	2006-09-19 12:37:26 UTC (rev 136)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java	2006-09-19 18:21:14 UTC (rev 137)
@@ -113,6 +113,7 @@
 			
 			Throwable t = getConverter().getThrowable();
 			if (t != null) {
+				faxDevice.closeConnection(hylaFAXClient);
 				throw new OutboundMessageConversionFailedException(t);
 			}
 			
@@ -129,6 +130,7 @@
 			hylafaxJob.setKilltime("000159");
 			
 			hylaFAXClient.submit(hylafaxJob);
+			faxDevice.closeConnection(hylaFAXClient);
 		}
 		catch (IOException e) {
 			logger.error("cannot send, IOException", e);
Modified: trunk/code/CSMiddleware/src/org/commsuite/messaging/JMSMessageManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/messaging/JMSMessageManager.java	2006-09-19 12:37:26 UTC (rev 136)
+++ trunk/code/CSMiddleware/src/org/commsuite/messaging/JMSMessageManager.java	2006-09-19 18:21:14 UTC (rev 137)
@@ -56,7 +56,8 @@
         	return;
         }
 
-        final Queue queue = createQueue(queueName);
+//        final Queue queue = createQueue(queueName);
+        final Queue queue = getQueueByName(queueName);
         final JmsTemplate template = getTemplate();
         
         template.send(queue, new MessageCreator() {
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java	2006-09-19 12:37:26 UTC (rev 136)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java	2006-09-19 18:21:14 UTC (rev 137)
@@ -53,6 +53,10 @@
  * @author Agnieszka Wiśniewska
  */
 public class SAPComm implements ISAPComm {
+	
+	private MessageManager msgManager;
+	
+	private JMSMessageManager jmsManager;
 
     private long SX_OBJECT_RECEIVE_functionsNumber;
 
@@ -203,8 +207,13 @@
                 final Message[] messages = JCoFunctionTranslator.getMessagesFromJCOFunction(
                         function, charset);
 
-                final MessageManager msgManager = SpringMiddlewareContext.getMessageManager();
-                final JMSMessageManager jmsManager = SpringMiddlewareContext.getJMSManager();
+                if (null == msgManager) {
+                	msgManager = SpringMiddlewareContext.getMessageManager();
+                }
+                
+                if (null == jmsManager) {
+                	jmsManager = SpringMiddlewareContext.getJMSManager();
+                }
 
                 final Date currentDate = new Date();
                 for (Message msg : messages) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <zd...@us...> - 2006-09-19 12:37:34
      
     | 
| Revision: 136
          http://svn.sourceforge.net/comsuite/?rev=136&view=rev
Author:   zduniak
Date:     2006-09-19 05:37:26 -0700 (Tue, 19 Sep 2006)
Log Message:
-----------
Testing SAP Servers availability corrected
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java	2006-09-12 17:49:21 UTC (rev 135)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java	2006-09-19 12:37:26 UTC (rev 136)
@@ -512,16 +512,22 @@
         JCO.Client client = null;
         try {
             client = getJCOClient();
+            
             if (null == client) {
                 logger
                         .warn("Cannot obtain JCO.Client object from pool during testing SAP server's state.");
                 return false;
             }
+            
+            // Send a ping to the server
+            client.ping();
 
-            final JCO.Attributes attr = client.getAttributes();
-            final String partnerRelease = attr.getPartnerRelease();
-            logger.debug("Partner release: " + partnerRelease);
-            return (null != partnerRelease) && (partnerRelease.length() > 0);
+//            final JCO.Attributes attr = client.getAttributes();
+//            final String partnerRelease = attr.getPartnerRelease();
+//            logger.debug("Partner release: " + partnerRelease);
+//            return (null != partnerRelease) && (partnerRelease.length() > 0);
+            
+            return true;
         } catch (Throwable t) {
             logger.error("Exception during testing SAP server's state", t);
             return false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <sku...@us...> - 2006-09-12 17:49:36
      
     | 
| Revision: 135
          http://svn.sourceforge.net/comsuite/?rev=135&view=rev
Author:   skuzniak
Date:     2006-09-12 10:49:21 -0700 (Tue, 12 Sep 2006)
Log Message:
-----------
doc version of HOWTO-install pdf
Added Paths:
-----------
    trunk/docs/instalation/instal_devel.doc
Added: trunk/docs/instalation/instal_devel.doc
===================================================================
(Binary files differ)
Property changes on: trunk/docs/instalation/instal_devel.doc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-10 12:10:29
      
     | 
| Revision: 134
          http://svn.sourceforge.net/comsuite/?rev=134&view=rev
Author:   marasm
Date:     2006-09-10 05:10:15 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
property name changed
Modified Paths:
--------------
    trunk/code/CSCommon/src/aop.properties
    trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
Modified: trunk/code/CSCommon/src/aop.properties
===================================================================
--- trunk/code/CSCommon/src/aop.properties	2006-09-10 11:31:56 UTC (rev 133)
+++ trunk/code/CSCommon/src/aop.properties	2006-09-10 12:10:15 UTC (rev 134)
@@ -1,4 +1,4 @@
-dao.times.debug.interceptor.debug.daos.times = true
+dao.times.debug.interceptor.debug = true
 dao.times.debug.interceptor.debug.methods.parameters = true
 dao.times.debug.interceptor.debug.returned.values = true
 dao.times.debug.interceptor.omited.methods = 
Modified: trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java	2006-09-10 11:31:56 UTC (rev 133)
+++ trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java	2006-09-10 12:10:15 UTC (rev 134)
@@ -14,7 +14,7 @@
 	private final static Logger logger = Logger
 			.getLogger(CsMethodsDebuggerInterceptor.class);
 
-	private boolean debugDaosTimes;
+	private boolean debug;
 
 	private boolean debugMethodsParameters;
 
@@ -24,7 +24,7 @@
 
 	public Object invoke(MethodInvocation invocation) throws Throwable {
 
-		if (!debugDaosTimes) {
+		if (!debug) {
 			return invocation.proceed();
 		}
 
@@ -82,8 +82,8 @@
 	}
 
 	public void setDebugProperties(Properties debugProperties) {
-		this.debugDaosTimes = "true".equals(debugProperties
-				.getProperty("dao.times.debug.interceptor.debug.daos.times"));
+		this.debug = "true".equals(debugProperties
+				.getProperty("dao.times.debug.interceptor.debug"));
 		this.debugMethodsParameters = "true"
 				.equals(debugProperties
 						.getProperty("dao.times.debug.interceptor.debug.methods.parameters"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-10 11:32:06
      
     | 
| Revision: 133
          http://svn.sourceforge.net/comsuite/?rev=133&view=rev
Author:   marasm
Date:     2006-09-10 04:31:56 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
bug fix
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java	2006-09-10 11:12:58 UTC (rev 132)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java	2006-09-10 11:31:56 UTC (rev 133)
@@ -243,6 +243,7 @@
     }
 
 	public boolean isSapServerWorking(String name) {
-		return (null != getSAPCommByName(name).getServer());
+		ISAPComm SappCommByName = getSAPCommByName(name);
+		return (null != SappCommByName && null != SappCommByName.getServer());
 	}
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-10 11:13:07
      
     | 
| Revision: 132
          http://svn.sourceforge.net/comsuite/?rev=132&view=rev
Author:   marasm
Date:     2006-09-10 04:12:58 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
svn ignores added
Property Changed:
----------------
    trunk/code/CSRemoteClient/
Property changes on: trunk/code/CSRemoteClient
___________________________________________________________________
Name: svn:ignore
   - bin
   + bin
build
dist
predist
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-10 11:12:05
      
     | 
| Revision: 131
          http://svn.sourceforge.net/comsuite/?rev=131&view=rev
Author:   marasm
Date:     2006-09-10 04:11:45 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
bugfixed
Modified Paths:
--------------
    trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
Modified: trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java	2006-09-10 11:07:11 UTC (rev 130)
+++ trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java	2006-09-10 11:11:45 UTC (rev 131)
@@ -9,86 +9,88 @@
 import org.aopalliance.intercept.MethodInterceptor;
 import org.aopalliance.intercept.MethodInvocation;
 
-
 public class CsMethodsDebuggerInterceptor implements MethodInterceptor {
 
-	private final static Logger logger = Logger.getLogger(CsMethodsDebuggerInterceptor.class);
+	private final static Logger logger = Logger
+			.getLogger(CsMethodsDebuggerInterceptor.class);
 
-    private boolean debugDaosTimes;
+	private boolean debugDaosTimes;
 
-    private boolean debugMethodsParameters;
+	private boolean debugMethodsParameters;
 
-    private boolean debugReturnedValues;
+	private boolean debugReturnedValues;
 
-    private List<String> omitedMethods;
+	private List<String> omitedMethods;
 
-    public Object invoke(MethodInvocation invocation) throws Throwable {
+	public Object invoke(MethodInvocation invocation) throws Throwable {
 
-        if (!debugDaosTimes) {
-            return invocation.proceed();
-        }
+		if (!debugDaosTimes) {
+			return invocation.proceed();
+		}
 
-        String methodName = invocation.getMethod().getName();
+		String methodName = invocation.getMethod().getName();
 
-        if (omitedMethods.contains(methodName)) {
-            return invocation.proceed();
-        }
+		if (omitedMethods.contains(methodName)) {
+			return invocation.proceed();
+		}
 
-        Object[] arguments = invocation.getArguments();
+		Object[] arguments = invocation.getArguments();
 
-        StringBuilder sb = new StringBuilder( //
-                invocation.getThis().getClass().getCanonicalName() + "."
-                        + methodName + "(");
+		StringBuilder sb = new StringBuilder( //
+				invocation.getThis().getClass().getCanonicalName() + "."
+						+ methodName + "(");
 
-        if (debugMethodsParameters) {
-            for (int i = 0; i < arguments.length; i++) {
-                if (0 != i) {
-                    sb.append(", ");
-                }
-                sb.append(arguments[i]);
-            }
-        }
+		if (debugMethodsParameters) {
+			if (arguments != null) {
+				for (int i = 0; i < arguments.length; i++) {
+					if (0 != i) {
+						sb.append(", ");
+					}
+					sb.append(arguments[i]);
+				}
+			}
+		}
 
-        sb.append(")");
+		sb.append(")");
 
-        logger.debug("START " + sb.toString());
-        long time = System.currentTimeMillis();
-        Object rval = invocation.proceed();
-        time = System.currentTimeMillis() - time;
+		logger.debug("START " + sb.toString());
+		long time = System.currentTimeMillis();
+		Object rval = invocation.proceed();
+		time = System.currentTimeMillis() - time;
 
-        sb = new StringBuilder("END "
-                + invocation.getThis().getClass().getCanonicalName() + "."
-                + methodName + "()" + " ms" + time);
+		sb = new StringBuilder("END "
+				+ invocation.getThis().getClass().getCanonicalName() + "."
+				+ methodName + "()" + " ms" + time);
 
-        if (debugReturnedValues) {
-            sb.append(" " + rval);
-        }
+		if (debugReturnedValues) {
+			sb.append(" " + rval);
+		}
 
-        logger.debug(sb.toString());
+		logger.debug(sb.toString());
 
-        return rval;
-    }
+		return rval;
+	}
 
-    public void setOmitedMethods(String omitedMethodsString) {
-        List<String> methodsNames = new ArrayList<String>();
-        if (omitedMethodsString != null) {
-            for (String string : omitedMethodsString.split(";")) {
-                methodsNames.add(string);
-            }
-        }
-        this.omitedMethods = methodsNames;
-    }
+	public void setOmitedMethods(String omitedMethodsString) {
+		List<String> methodsNames = new ArrayList<String>();
+		if (omitedMethodsString != null) {
+			for (String string : omitedMethodsString.split(";")) {
+				methodsNames.add(string);
+			}
+		}
+		this.omitedMethods = methodsNames;
+	}
 
-    public void setDebugProperties(Properties debugProperties) {
-        this.debugDaosTimes = "true".equals(debugProperties
-                .getProperty("dao.times.debug.interceptor.debug.daos.times"));
-        this.debugMethodsParameters = "true"
-                .equals(debugProperties
-                        .getProperty("dao.times.debug.interceptor.debug.methods.parameters"));
-        this.debugReturnedValues = "true"
-                .equals(debugProperties
-                        .getProperty("dao.times.debug.interceptor.debug.returned.values"));
-        this.setOmitedMethods(debugProperties
-                .getProperty("dao.times.debug.interceptor.omited.methods"));
-    }
+	public void setDebugProperties(Properties debugProperties) {
+		this.debugDaosTimes = "true".equals(debugProperties
+				.getProperty("dao.times.debug.interceptor.debug.daos.times"));
+		this.debugMethodsParameters = "true"
+				.equals(debugProperties
+						.getProperty("dao.times.debug.interceptor.debug.methods.parameters"));
+		this.debugReturnedValues = "true"
+				.equals(debugProperties
+						.getProperty("dao.times.debug.interceptor.debug.returned.values"));
+		this.setOmitedMethods(debugProperties
+				.getProperty("dao.times.debug.interceptor.omited.methods"));
+	}
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-10 11:07:48
      
     | 
| Revision: 130
          http://svn.sourceforge.net/comsuite/?rev=130&view=rev
Author:   marasm
Date:     2006-09-10 04:07:11 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
SpringAOP added to project
Modified Paths:
--------------
    trunk/code/CSAdminPanel/JavaSource/log4j.properties
    trunk/code/CSMiddleware/.springBeans
    trunk/code/CSMiddleware/import.sql
    trunk/code/CSMiddleware/src/org/commsuite/messaging/ExDevRegister.java
    trunk/code/CSMiddleware/src/org/commsuite/messaging/MOutRouter.java
    trunk/code/CSMiddleware/war/WEB-INF/web.xml
Added Paths:
-----------
    trunk/code/CSCommon/src/aop.properties
    trunk/code/CSCommon/src/org/commsuite/aop/
    trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
    trunk/code/CSMiddleware/src/aopContext.xml
Modified: trunk/code/CSAdminPanel/JavaSource/log4j.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/log4j.properties	2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSAdminPanel/JavaSource/log4j.properties	2006-09-10 11:07:11 UTC (rev 130)
@@ -19,3 +19,5 @@
 log4j.logger.org.commsuite=debug
 
 log4j.logger.org.apache.myfaces=warn
+
+log4j.logger.org.commsuite.aop=DEBUG
Added: trunk/code/CSCommon/src/aop.properties
===================================================================
--- trunk/code/CSCommon/src/aop.properties	                        (rev 0)
+++ trunk/code/CSCommon/src/aop.properties	2006-09-10 11:07:11 UTC (rev 130)
@@ -0,0 +1,4 @@
+dao.times.debug.interceptor.debug.daos.times = true
+dao.times.debug.interceptor.debug.methods.parameters = true
+dao.times.debug.interceptor.debug.returned.values = true
+dao.times.debug.interceptor.omited.methods = 
Added: trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java	                        (rev 0)
+++ trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java	2006-09-10 11:07:11 UTC (rev 130)
@@ -0,0 +1,94 @@
+package org.commsuite.aop;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+
+import org.aopalliance.intercept.MethodInterceptor;
+import org.aopalliance.intercept.MethodInvocation;
+
+
+public class CsMethodsDebuggerInterceptor implements MethodInterceptor {
+
+	private final static Logger logger = Logger.getLogger(CsMethodsDebuggerInterceptor.class);
+
+    private boolean debugDaosTimes;
+
+    private boolean debugMethodsParameters;
+
+    private boolean debugReturnedValues;
+
+    private List<String> omitedMethods;
+
+    public Object invoke(MethodInvocation invocation) throws Throwable {
+
+        if (!debugDaosTimes) {
+            return invocation.proceed();
+        }
+
+        String methodName = invocation.getMethod().getName();
+
+        if (omitedMethods.contains(methodName)) {
+            return invocation.proceed();
+        }
+
+        Object[] arguments = invocation.getArguments();
+
+        StringBuilder sb = new StringBuilder( //
+                invocation.getThis().getClass().getCanonicalName() + "."
+                        + methodName + "(");
+
+        if (debugMethodsParameters) {
+            for (int i = 0; i < arguments.length; i++) {
+                if (0 != i) {
+                    sb.append(", ");
+                }
+                sb.append(arguments[i]);
+            }
+        }
+
+        sb.append(")");
+
+        logger.debug("START " + sb.toString());
+        long time = System.currentTimeMillis();
+        Object rval = invocation.proceed();
+        time = System.currentTimeMillis() - time;
+
+        sb = new StringBuilder("END "
+                + invocation.getThis().getClass().getCanonicalName() + "."
+                + methodName + "()" + " ms" + time);
+
+        if (debugReturnedValues) {
+            sb.append(" " + rval);
+        }
+
+        logger.debug(sb.toString());
+
+        return rval;
+    }
+
+    public void setOmitedMethods(String omitedMethodsString) {
+        List<String> methodsNames = new ArrayList<String>();
+        if (omitedMethodsString != null) {
+            for (String string : omitedMethodsString.split(";")) {
+                methodsNames.add(string);
+            }
+        }
+        this.omitedMethods = methodsNames;
+    }
+
+    public void setDebugProperties(Properties debugProperties) {
+        this.debugDaosTimes = "true".equals(debugProperties
+                .getProperty("dao.times.debug.interceptor.debug.daos.times"));
+        this.debugMethodsParameters = "true"
+                .equals(debugProperties
+                        .getProperty("dao.times.debug.interceptor.debug.methods.parameters"));
+        this.debugReturnedValues = "true"
+                .equals(debugProperties
+                        .getProperty("dao.times.debug.interceptor.debug.returned.values"));
+        this.setOmitedMethods(debugProperties
+                .getProperty("dao.times.debug.interceptor.omited.methods"));
+    }
+}
Modified: trunk/code/CSMiddleware/.springBeans
===================================================================
--- trunk/code/CSMiddleware/.springBeans	2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/.springBeans	2006-09-10 11:07:11 UTC (rev 130)
@@ -12,6 +12,7 @@
 		<config>src/filtersContext.xml</config>
 		<config>src/datasourceContext.xml</config>
 		<config>src/activeMQContext.xml</config>
+		<config>src/aopContext.xml</config>
 		<config>war/WEB-INF/ws-public-servlet.xml</config>
 	</configs>
 	<configSets>
@@ -21,6 +22,7 @@
 			<incomplete>true</incomplete>
 			<configs>
 				<config>src/activeMQContext.xml</config>
+				<config>src/aopContext.xml</config>
 				<config>src/applicationContext.xml</config>
 				<config>src/converterBuilderContext.xml</config>
 				<config>src/datasourceContext.xml</config>
Modified: trunk/code/CSMiddleware/import.sql
===================================================================
--- trunk/code/CSMiddleware/import.sql	2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/import.sql	2006-09-10 11:07:11 UTC (rev 130)
@@ -1,5 +1,5 @@
 --DO NOT ADD ROWS WITH ID GREATER THEN 99
-INSERT INTO cs_sap_servers (id, active_instance, adm_email, client, gw_host, gw_Serv, host, load_balancing, name, user_password, prog_id, system_number, unicode, user_name, default_instance, max_connections_in_pool, group_name, r3_name) VALUES (123456, 'true', 'mar...@bc...','100','bcz.bcc.com.pl','sapgw44','bcz.bcc.com.pl',FALSE,'BCC_BCZ_100_DB','changeme','ZTESTJCO','44',FALSE,'cstest',TRUE,5,'','');
+INSERT INTO cs_sap_servers (id, active_instance, adm_email, client, gw_host, gw_Serv, host, load_balancing, name, user_password, prog_id, system_number, unicode, user_name, default_instance, max_connections_in_pool, group_name, r3_name) VALUES (123456, 'true', 'zc...@bc...','100', 'bcz.bcc.com.pl','sapgw44','bcz.bcc.com.pl',FALSE, 'BCC_BCZ_100_DB','nowehaslo','ZTESTJCO', '44', FALSE, 'zcomm', TRUE,5,'','');
 
 INSERT INTO cs_actions (id, name, description) VALUES (1, 'Action_JMX_UseJmx', 'Using JMX');
 INSERT INTO cs_actions (id, name, description) VALUES (2, 'Action_RemoteClient_UseRemoteClient', 'Using RemoteClient');
Added: trunk/code/CSMiddleware/src/aopContext.xml
===================================================================
--- trunk/code/CSMiddleware/src/aopContext.xml	                        (rev 0)
+++ trunk/code/CSMiddleware/src/aopContext.xml	2006-09-10 11:07:11 UTC (rev 130)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+	<bean id="debugProperties"
+		class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+		<property name="location" value="classpath:aop.properties" />
+	</bean>
+
+	<bean id="csMethodsDebuggerInterceptor" class="org.commsuite.aop.CsMethodsDebuggerInterceptor">
+		<property name="debugProperties" ref="debugProperties" />
+	</bean>
+
+	<bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
+		<property name="beanNames">
+			<value>*Target,*Dao,converterBuilder,exDevRegister,mOutRouter,mSAPIn,filterManager,sapCommManager</value>
+		</property>
+		<property name="interceptorNames">
+			<list>
+				<value>csMethodsDebuggerInterceptor</value>
+			</list>
+		</property>
+	</bean>
+	
+</beans>
\ No newline at end of file
Modified: trunk/code/CSMiddleware/src/org/commsuite/messaging/ExDevRegister.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/messaging/ExDevRegister.java	2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/src/org/commsuite/messaging/ExDevRegister.java	2006-09-10 11:07:11 UTC (rev 130)
@@ -131,6 +131,7 @@
             if (deviceQueueName.contains(deviceName)) {
                 deviceQueuesList.remove(deviceQueueName);
                 deviceQueuesList.add(deviceQueueName);
+                logger.debug("FOUND QUEUE NAME " + deviceQueueName);
                 return deviceQueueName;
             }
         }
Modified: trunk/code/CSMiddleware/src/org/commsuite/messaging/MOutRouter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/messaging/MOutRouter.java	2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/src/org/commsuite/messaging/MOutRouter.java	2006-09-10 11:07:11 UTC (rev 130)
@@ -70,6 +70,7 @@
         final String destinationQueueName = deviceRegister.chooseQueue(msg.getFormatType());
 
         if (null == destinationQueueName) {
+        	logger.error("Couldn't find queue for serving " + msg.getFormatType() + " messages");
             throw new RuntimeException("Couldn't find queue for serving " + msg.getFormatType() + " messages");
         }
 
Modified: trunk/code/CSMiddleware/war/WEB-INF/web.xml
===================================================================
--- trunk/code/CSMiddleware/war/WEB-INF/web.xml	2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/war/WEB-INF/web.xml	2006-09-10 11:07:11 UTC (rev 130)
@@ -49,6 +49,7 @@
 			classpath:/applicationContext.xml,
 			classpath:/datasourceContext.xml,
 			classpath:/activeMQContext.xml,
+			classpath:/aopContext.xml,
 			classpath:/hibernateContext.xml, classpath:/sapContext.xml
 			classpath:/deviceContext.xml, classpath:/jmxContext.xml,
 			classpath:/converterBuilderContext.xml,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <mal...@us...> - 2006-09-04 23:20:07
      
     | 
| Revision: 129
          http://svn.sourceforge.net/comsuite/?rev=129&view=rev
Author:   malinowskirafal
Date:     2006-09-04 16:19:25 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
more javaDoc
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/org/commsuite/converter/CalcToPdfConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/Converter.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/ConverterBuilder.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/DrawToPdfConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/HtmlToPdfConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverter.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/ImpressToPdfConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/OpenOfficeToPdfConverter.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverter.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverter.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/WriterToPdfConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/OpenOfficeRunner.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/OutputStreamToXOutputStreamAdapter.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/DeviceManager.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/ReceiveListener.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/SendStateChangeListener.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxDevice.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxInboundMessage.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/ReceivePollingJob.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/SendStateChangedPollingJob.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/sms/ReceivePollingJob.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
    trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsService.java
    trunk/code/CSMiddleware/src/org/commsuite/messaging/Filter.java
    trunk/code/CSMiddleware/src/org/commsuite/messaging/filters/SpamFilter.java
    trunk/code/CSMiddleware/src/org/commsuite/notification/AbstractNotificationConsumer.java
    trunk/code/CSMiddleware/src/org/commsuite/notification/INotificationsManager.java
    trunk/code/CSMiddleware/src/org/commsuite/notification/JMSNotificationsManager.java
    trunk/code/CSMiddleware/src/org/commsuite/util/IOUtil.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/CalcToPdfConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/CalcToPdfConverterDescriptor.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/CalcToPdfConverterDescriptor.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -34,6 +34,9 @@
  */
 public class CalcToPdfConverterDescriptor extends SimpleConverterDescriptor {
 
+	/**
+	 * List of mime types accepted by this converter.
+	 */
 	private static List<String> inMimeTypes;
 	
 	static {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/Converter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/Converter.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/Converter.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -54,7 +54,14 @@
 public class Converter {
 	private static final Logger logger = Logger.getLogger(Converter.class);
 	
+	/**
+	 * Chain of converters used to perfom complicated (multi-step) conversions.
+	 */
 	private List<SimpleConverter> simpleConvertersChain;
+	
+	/**
+	 * Whole conversion quality.
+	 */
 	private double quality;
 	
 	/**
@@ -98,7 +105,7 @@
 	 * 
 	 * @param content content to convert
 	 * @return converted content
-	 * @throws ConversionFailedException when anything fails in piped streams or in output stream
+	 * @throws ConversionFailedException when anything fails in any simple converter in chains or in output stream
 	 */
 	public byte[] convert(byte[] content) throws ConversionFailedException {
 		if (simpleConvertersChain == null) {
@@ -150,7 +157,7 @@
 	 * any exception that conversion thrown. This function returns first found exception (it searchs for
 	 * exceptions from first element in chain to last).
 	 * 
-	 * @return Exception thorwn during conversion or null if everything was ok.
+	 * @return Throwable thorwn during conversion or null if everything was ok.
 	 */
 	public Throwable getThrowable() {
 		if (simpleConvertersChain == null) {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/ConverterBuilder.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/ConverterBuilder.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/ConverterBuilder.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -44,15 +44,28 @@
 	 * Node in graph of converters.
 	 */
 	private class ConvertersGraphNode {
-		// Converter descrived by node.
+		/**
+		 * Converter descrived by node.
+		 */
 		private SimpleConverterDescriptor converter;
-		// Quality of conversion from given mimetype to the node, 0 if none
+		/**
+		 * Quality of conversion from given mimetype to the node, 0 if none 
+		 */
 		private double quality;
-		// In search mode it pointers to previous node in best path from given mimetype to this node.
+		/**
+		 * In search mode it pointers to previous node in best path from given mimetype to this node.
+		 */
 		private ConvertersGraphNode prevNode;
-		// Used to prevent cycles: true, if node is in current path.
+		/**
+		 * Used to prevent cycles: true, if node is in current path.
+		 */
 		private boolean locked;
 		
+		/**
+		 * Creates node for converter. Node's parameters are reseted.
+		 * 
+		 * @param converter converted to made node from
+		 */
 		private ConvertersGraphNode(SimpleConverterDescriptor converter) {
 			this.converter = converter;
 			reset();
@@ -74,22 +87,40 @@
 	 * Wraper around chain of converters, contains also quality of conversion.
 	 */
 	private class ConverterInfo {
+		/**
+		 * Convertes chain.
+		 */
 		private List<SimpleConverterDescriptor> converterChain;
+		/**
+		 * Convertes quality.
+		 */
 		private double quality;
 		
+		/**
+		 * Creates ConverterInfo instance with chain and quality. 
+		 * 
+		 * @param converterChain converterChain described by ConvertedInfo
+		 * @param quality quality of converterChain
+		 */
 		private ConverterInfo(List<SimpleConverterDescriptor> converterChain, double quality) {
 			this.converterChain = converterChain;
 			this.quality = quality;
 		}
 	}
 
-	// List of available convertes joined into a directed graph.
+	/**
+	 * List of available convertes joined into a directed graph.
+	 */
 	private List<ConvertersGraphNode> converters;
 	
-	// for each node ancestor is a node which accepts output from given node
+	/**
+	 * For each node ancestor is a node which accepts output from given node
+	 */
 	private Map<ConvertersGraphNode, List<ConvertersGraphNode>> ancestors;
 
-	// cache: already computed ConvertedInfo's for given Conversions
+	/**
+	 * Cache: already computed ConvertedInfo's for given Conversions
+	 */
 	private Map<Conversion, ConverterInfo> cache;
 
 	/**
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/DrawToPdfConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/DrawToPdfConverterDescriptor.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/DrawToPdfConverterDescriptor.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -32,6 +32,10 @@
  * @author Rafał Malinowski
  */
 public class DrawToPdfConverterDescriptor extends SimpleConverterDescriptor {
+
+	/**
+	 * List of mime types accepted by this converter.
+	 */
 	private static List<String> inMimeTypes;
 	
 	static {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/HtmlToPdfConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/HtmlToPdfConverterDescriptor.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/HtmlToPdfConverterDescriptor.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -33,6 +33,9 @@
  */
 public class HtmlToPdfConverterDescriptor extends SimpleConverterDescriptor {
 
+	/**
+	 * List of mime types accepted by this converter.
+	 */
 	private static List<String> inMimeTypes;
 	
 	static {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverter.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverter.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -51,6 +51,8 @@
 	/**
 	 * Do the conversion. Conversion's input and output streams are set in SimpleConverter.setStreams.
 	 * If input image is transparent, then int output transparency is converted to white color. 
+	 * 
+	 * @throws Exception if any exception occurred during conversion
 	 */
 	public void convert() throws Exception {
 		BufferedImage image = ImageIO.read(getContentStream());
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverterDescriptor.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverterDescriptor.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -38,7 +38,15 @@
  * @author Rafał Malinowski
  */
 public class ImageToImageConverterDescriptor extends SimpleConverterDescriptor {
+
+	/**
+	 * List of mime types accepted by this converter.
+	 */
 	private static List<String> inMimeTypes;
+	
+	/**
+	 * Image type produced by this converer (BMP, PNG, JPEG - any accepted by ImageIO).
+	 */
 	private String outType;
 	
 	static {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/ImpressToPdfConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/ImpressToPdfConverterDescriptor.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/ImpressToPdfConverterDescriptor.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -32,6 +32,10 @@
  * @author Rafał Malinowski
  */
 public class ImpressToPdfConverterDescriptor extends SimpleConverterDescriptor {
+
+	/**
+	 * List of mime types accepted by this converter.
+	 */
 	private static List<String> inMimeTypes;
 	
 	static {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/OpenOfficeToPdfConverter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/OpenOfficeToPdfConverter.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/OpenOfficeToPdfConverter.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -38,7 +38,7 @@
 	private String filterName;
 	
 	/**
-	 * Creates converter for OpenOffice.org using filterName as filter name.
+	 * Creates converter for OpenOffice.org using filterName as OOo's filter name.
 	 * 
 	 * @param filterName filter name for OpenOffice.org
 	 */
@@ -49,6 +49,8 @@
 	/**
 	 * Converts document using OpenOfficeRunner.performConversion method. Content and result stream of conversion are
 	 * set in SimpleConverer:setStreams.
+	 * 
+	 * @throws Exception if any exception occured during conversion
 	 */
 	public void convert() throws Exception {
 		InputStream content = getContentStream();
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverter.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverter.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -35,10 +35,19 @@
 public abstract class SimpleConverter extends Thread {
 	private static final Logger logger = Logger.getLogger(SimpleConverter.class);
 
+	/**
+	 * Input data stream.
+	 */
 	private InputStream contentStream;
+	
+	/**
+	 * Output (converted) data stream.
+	 */
 	private OutputStream resultStream;
 	
-	// exception thorwn during conversion
+	/**
+	 * Exception thorwn during conversion
+	 */
 	private Throwable throwable;
 
 	/**
@@ -98,7 +107,9 @@
 	}
 	
 	/**
-	 * Perfrom actual conversion
+	 * Perfrom actual conversion.
+	 * 
+	 * @throws Excepton if any exception occured during conversion
 	 */
 	public abstract void convert() throws Exception;
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverterDescriptor.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverterDescriptor.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -33,8 +33,20 @@
  * @author Rafał Malinowski
  */
 public abstract class SimpleConverterDescriptor {
+
+	/**
+	 * List of mime types accepted by this converter.
+	 */
 	private List<String> inMimeTypes;
+
+	/**
+	 * Mime type produced by this converter.
+	 */
 	private String outMimeType;
+	
+	/**
+	 * Quality of converter. Quality is a real number in range [0.0, 1.0]. 0.0 means no conversion, 1.0 means conversion without loss of information.
+	 */
 	private double quality;
 	
 	/**
@@ -54,7 +66,7 @@
 	 * Empty init method. To override. Implementations should initialize all external object needed to perform
 	 * conversions.
 	 */
-	public  void init() {
+	public void init() {
 	}
 	
 	/**
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverter.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverter.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -90,7 +90,7 @@
 	/**
 	 * Initialization.
 	 * 
-	 * @throws IOException
+	 * @throws IOException when input stream of converter is invalid and cannot be decoded into valid tiff object
 	 */
 	private void prepareData() throws IOException {
 		inputStream = new MemoryCacheSeekableStream(getContentStream());
@@ -107,7 +107,7 @@
 	 * @param directory tiff directory
 	 * @param tags list of all tags
 	 * @param tag resolution tag
-	 * @return tag data
+	 * @return tag data with tag index within directory
 	 */
 	private String getStringTagFromTiff(TIFFDirectory directory, List<Integer> tags, int tag) {
 		if (tags.contains(tag)) {
@@ -118,12 +118,12 @@
 	}
 	
 	/**
-	 * Read resolution tag from Tiff directory.
+	 * Read resolution value from Tiff directory.
 	 * 
 	 * @param directory tiff directory
 	 * @param tags list of all tags
 	 * @param tag resolution tag
-	 * @return resolution
+	 * @return tiff resolution
 	 */
 	private double getResolutionTagFromTiff(TIFFDirectory directory, List<Integer> tags, int tag) {
 		if (tags.contains(tag)) {
@@ -140,9 +140,9 @@
 	}
 	
 	/**
-	 * Reads all needed tags - Tiff description and keywords (from hylafax it means: source of Tiff and keywords).
+	 * Reads all needed tags- Tiff description and keywords (from hylafax it means: source of Tiff and keywords).
 	 * 
-	 * @throws IOException when get tag from Tiff file fails.
+	 * @throws IOException when getting any of tags from Tiff file fails.
 	 */
 	private void readTags() throws IOException {
         TIFFDirectory directory = new TIFFDirectory(inputStream, 0);
@@ -180,8 +180,8 @@
 	 * Converts tiff subimage (page) to PDF page and joins it to PDF document.
 	 * 
 	 * @param image tiff subimage (page)
-	 * @throws FileNotFoundException
-	 * @throws IOException
+	 * @throws FileNotFoundException if error occured during JAI operations
+	 * @throws IOException if error occured during JAI operations
 	 */
 	private void convertPage(RenderedImage image) throws FileNotFoundException, IOException {
     	PDFPage page = new PDFPage();
@@ -214,6 +214,8 @@
 
 	/**
 	 * Converts tiff to pdf - uses streams set in setStreams.
+	 * 
+	 * @throws Exception if any exception occured during conversion
 	 */
 	public void convert() throws Exception {
 		prepareData();
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverterDescriptor.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverterDescriptor.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -30,6 +30,10 @@
  * @author Rafał Malinowski
  */
 public class TiffToPdfConverterDescriptor extends SimpleConverterDescriptor {
+
+	/**
+	 * List of mime types accepted by this converter.
+	 */
 	private static List<String> inMimeTypes;
 	
 	static {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/WriterToPdfConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/WriterToPdfConverterDescriptor.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/WriterToPdfConverterDescriptor.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -32,6 +32,10 @@
  * @author Rafał Malinowski
  */
 public class WriterToPdfConverterDescriptor extends SimpleConverterDescriptor {
+
+	/**
+	 * List of mime types accepted by this converter.
+	 */
 	private final static List<String> inMimeTypes;
 	
 	static {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/OpenOfficeRunner.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/OpenOfficeRunner.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/OpenOfficeRunner.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -50,9 +50,20 @@
  */
 public class OpenOfficeRunner {
 	private static final Logger logger = Logger.getLogger(OpenOfficeRunner.class);
+	
+	/**
+	 * Count of requests to use OOo instance.
+	 */
 	private static int count = 0;
 	
+	/**
+	 * UNO component context.
+	 */
 	private static XComponentContext xRemoteContext = null; 
+	
+	/**
+	 * UNO component loader.
+	 */
 	private static XComponentLoader xComponentLoader = null;
 
 	/**
@@ -74,6 +85,13 @@
 		}
 	}
 	
+	/**
+	 * Creates properties to use as input properties to UNO/OOo.
+	 * 
+	 * @param source input data stream
+	 * @return PropertyValue array of properties needed by UNO/OOo
+	 * @throws IOException when source input stream cannot be convert to byte array (it is needed becouse of unknow bug in UNO wrappers)
+	 */
 	private static PropertyValue[] makeInProperties(InputStream source) throws IOException {
 		PropertyValue inProperties[] = new PropertyValue[3];
 
@@ -92,7 +110,15 @@
 		
 		return inProperties;
 	}
-	
+
+	/**
+	 * Creates properties to use as output properties to UNO/OOo.
+	 * 
+	 * @param source output data stream
+	 * @param String filterName filterName to use by OOo (like Writer_pdf_filter or Calc_pdf_filter)
+	 * @return PropertyValue array of properties needed by UNO/OOo
+	 * @throws IOException when any IOException occured during writing/flushing or closing destination
+	 */
 	private static PropertyValue[] makeOutProperties(OutputStream destination, String filterName) {
 		PropertyValue outProperties[] = new PropertyValue[3];
 
@@ -109,6 +135,12 @@
 		return outProperties;
 	}
 	
+	/**
+	 * Creates XComponentLoader instance needed for UNO wrapper.
+	 * 
+	 * @return XComponentLoader instance
+	 * @throws Exception if any UNO exception occured during requesting XComponentLoader
+	 */
 	private static XComponentLoader getComponentLoader() throws Exception {
 		if (null != xComponentLoader) {
 			return xComponentLoader;
@@ -160,6 +192,11 @@
 		}
 	}
 	
+	/**
+	 * Returns XComponentContext instance needed by UNO wrapper. Use cached instance, so only one is used in whole system.
+	 * 
+	 * @return XComponentContext instance or null if none can be created.
+	 */
 	private synchronized static XComponentContext getXRemoteContext() {
 		if (null == xRemoteContext) {
 			try {
@@ -172,11 +209,17 @@
 		return xRemoteContext;
 	}
 	
+	/**
+	 * Resets xRemoteContext and xComponentLoader after each crach (Exception) so UNO/OOo will reinitialize these objects.
+	 */
 	private static void reset() {
 		xRemoteContext = null;
 		xComponentLoader = null;
 	}
 	
+	/**
+	 * Shutdowns OOo instance (if runned).
+	 */
 	private synchronized static void stop() {
 		logger.info("Terminate OORunner");
 		
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/OutputStreamToXOutputStreamAdapter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/OutputStreamToXOutputStreamAdapter.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/OutputStreamToXOutputStreamAdapter.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -50,6 +50,9 @@
 	 * Writes buffer's data to outputStream.
 	 * 
 	 * @param buffer data to write
+	 * @throws NotConnectedException when application is not connected to OOo server
+	 * @throws BufferSizeExceededException when buffer size was exceeded in output stream
+	 * @throws IOException when an error occured during writing to outputStream
 	 */
 	public void writeBytes(byte[] buffer) throws NotConnectedException, BufferSizeExceededException, IOException {
 		try {
@@ -61,6 +64,9 @@
 
 	/**
 	 * Flushes buffer's data to outputStream.
+	 * @throws NotConnectedException when application is not connected to OOo server
+	 * @throws BufferSizeExceededException when buffer size was exceeded in output stream
+	 * @throws IOException when an error occured during flushing outputStream
 	 */
 	public void flush() throws NotConnectedException, BufferSizeExceededException, IOException {
 		try {
@@ -72,6 +78,9 @@
 
 	/**
 	 * Closes output stream.
+	 * @throws NotConnectedException when application is not connected to OOo server
+	 * @throws BufferSizeExceededException when buffer size was exceeded in output stream
+	 * @throws IOException when an error occured during closing outputStream
 	 */
 	public void closeOutput() throws NotConnectedException, BufferSizeExceededException, IOException {
 		try {
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -107,11 +107,15 @@
 
 	/**
      * Initialize device. Returns true if operation succesed.
+     * 
+     * @throws DeviceInitializationFailedException if device initialization failed
      */
     public abstract void init() throws DeviceInitializationFailedException;
 
     /**
      * Shutdowns device. Returns true if operation succesed.
+     * 
+     * @throws DeviceShutdownFailedException if device shutdown failed
      */
     public abstract void shutdown() throws DeviceShutdownFailedException;
 
@@ -122,6 +126,13 @@
 
     /**
      * Sends message to receiver.
+     * 
+     * @throws DeviceInvalidOutboundMessageException if message was created by another device
+     * @throws OutboundMessageInvalidContentMimeTypeException if device cannot send messages with gived mime type
+     * @throws OutboundMessageInvalidContentException if device cannot send messages with given content
+     * @throws OutboundMessageInvalidDestinationAddressException if message cannot send messages to given destination
+     * @throws OutboundMessageSendException if any error occured during sending mesages
+     * @throws OutboundMessageConversionFailedException if any error occured dugins conversion of message content to acceptable format
      */
     public abstract void send(OutboundMessage message)
             throws DeviceInvalidOutboundMessageException,
@@ -135,6 +146,8 @@
      * REFACTOR: wydaje mi sie, ze zarowno ta metoda jak i nastepna powinny znaleźć się w jakiejś
      * klasie proxy między klasą Device a interfejsem SAP-CS. Po prostu nie wydaje mi się, aby to
      * była dobra enkapsulacja.
+     * 
+     * @param message message to send
      */
     public void send(Message message) {
         final List<SentContent> sentContents = message.getSentContents();
@@ -147,6 +160,12 @@
         }
     }
     
+    /**
+     * Sends simpel message to receiver. Saves send status into database.
+     * 
+     * @param sentContent sentContent to send
+     * @param receiver destination address
+     */
     private void sendSimpleMessage(SentContent sentContent, String receiver) {
 //        final SentContentManager sentContentManager = SpringMiddlewareContext
 //                .getSentContentManager();
@@ -289,8 +308,8 @@
      * Returns system-unique id of message with messageId. It consists of name of device, type of
      * message and message id.
      * 
-     * @param inbound
-     * @param messageId
+     * @param inbound true if message is inbound, false if it is outbound
+     * @param messageId messageId to convert
      * @return System unique message id.
      */
     public String getInternallId(boolean inbound, String messageId) {
@@ -326,6 +345,9 @@
     /**
      * If notifications says that message failed and it was send less that 3 times try to sent it one more time.
      * Else, notifies all listeners about SendStateChange event.
+     * 
+     * @param messageId messageId of message whose send state changes
+     * @param state current state of message
      */
     public void notifySendStateChange(String messageId, OutboundMessage.State state) {
         logger.debug("send state changed");
@@ -359,6 +381,8 @@
 
     /**
      * Notifies all listeners about Receive event.
+     * 
+     * @param message received message
      */
     public void notifyReceive(InboundMessage message) {
         logger.debug("message received from " + message.getSourceAddress() + " to " + message.getDestinationAddress());
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/DeviceManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/DeviceManager.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/DeviceManager.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -198,6 +198,8 @@
 
     /**
      * Adds new listener of receiving messages.
+     * 
+     * @param receiveListener listener to add
      */
     public void addReceiveListener(ReceiveListener receiveListener) {
     	synchronized (receiveListeners) {
@@ -207,6 +209,8 @@
 
     /**
      * Removes listener of receiving messages.
+     * 
+     * @param receiveListener listener to remove
      */
     public void removeReceiveListener(ReceiveListener receiveListener) {
     	synchronized (receiveListeners) {
@@ -216,6 +220,8 @@
 
     /**
      * Adds new listener of chaning outbound message state.
+     * 
+     * @param sendStateChangeListener listener to add
      */
     public void addSendStateChangeListener(SendStateChangeListener sendStateChangeListener) {
     	synchronized (sendStateChangeListeners) {
@@ -225,6 +231,8 @@
 
     /**
      * Removes listener of chaning outbound message state.
+     * 
+     * @param sendStateChangeListener listener to remove
      */
     public void removeSendStateChangeListener(SendStateChangeListener sendStateChangeListener) {
     	synchronized (sendStateChangeListeners) {
@@ -235,6 +243,8 @@
     /**
      * Function invoked when one of devices managed by this manager receives message.
      * This function calls all receive listeners onReceive functions.
+     * 
+     * @param document received message
      */
     public void onReceive(InboundMessage document) {
     	synchronized (receiveListeners) {
@@ -247,6 +257,9 @@
     /**
      * Function invoked when one of devices managed by this manager receives status changednotification.
      * This function calls all receive listeners onSendStateChange functions.
+     * 
+     * @param messageId messageId of message whose send state changed
+     * @param state current state of message
      */
     public void onSendStateChange(String messageId, State state) {
     	synchronized (sendStateChangeListeners) {
@@ -256,10 +269,21 @@
     	}
     }
 
+    /**
+     * Registers device in exDevRegister.
+     * 
+     * @param device device to register.
+     */
     private void registerDevice(Device device) {
         exDevRegister.registerNewDevice(device);
     }
 
+
+    /**
+     * Unegisters device from exDevRegister.
+     * 
+     * @param device device to unregister.
+     */
     private void unregisterDevice(Device device) {
         exDevRegister.unregisterDevice(device);
     }
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -115,6 +115,12 @@
 		return converter;
 	}
 
+	/**
+	 * Sets message mime type.
+	 * 
+	 * @param contentMimeType mime type to set
+	 * @return true if given mime type is supported
+	 */
     public boolean setContentMimeType(String contentMimeType) {
         this.contentMimeType = contentMimeType;
 
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/ReceiveListener.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/ReceiveListener.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/ReceiveListener.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -29,6 +29,8 @@
 public interface ReceiveListener {
 	/**
 	 * Called when device receives new message.
+	 * 
+	 * @param document received message
 	 */
 	void onReceive(InboundMessage document);
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/SendStateChangeListener.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/SendStateChangeListener.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/SendStateChangeListener.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -29,6 +29,9 @@
 public interface SendStateChangeListener {
 	/**
 	 * Called when outgoind message state changes. 
+	 * 
+	 * @param messageId messageId of message whose state changed
+	 * @param state current state of message
 	 */
 	void onSendStateChange(String messageId, OutboundMessage.State state);
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxDevice.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxDevice.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxDevice.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -125,6 +125,12 @@
 		return new HylaFAXClient();
 	}
 	
+	/**
+	 * Create new connection to HylaFAX server.
+	 * 
+	 * @return new connection to HylaFAX server.
+	 * @throws DeviceInitializationFailedException when new connection cannot be created
+	 */
 	public HylaFAXClient getConnection() throws DeviceInitializationFailedException {
 		HylaFAXClient faxClient = getNewHylaFAXClient();
 		
@@ -155,6 +161,13 @@
 		return faxClient; 
 	}
 	
+	/**
+	 * Closes connection to HylaFAX server.
+	 * 
+	 * @param faxClient conenction to HylaFAX server to close
+	 * @throws IOException when closing fails
+	 * @throws ServerResponseException when closing fails
+	 */
 	public void closeConnection(HylaFAXClient faxClient) throws IOException, ServerResponseException {
 		faxClient.quit();
 	}
@@ -163,7 +176,7 @@
 	 * Connects hylafax server and login as 'root'.
 	 * Throws DeviceInitializationFailedException when start of hylafax failed or when logging failed. 
 	 * 
-	 * @throws DeviceInitializationFailedException
+	 * @throws DeviceInitializationFailedException when device is already initialized, is initializing or when connection with HylaFAX server failed
 	 */
 	public void init() throws DeviceInitializationFailedException {
 		logger.info("Fax device: " + getName() + " initializing");
@@ -211,6 +224,8 @@
 	
 	/**
 	 * Closes fax connections.
+	 * 
+	 * @throws DeviceShutdownFailedException when device is not initialized or closing connection fails
 	 */
 	public void shutdown() throws DeviceShutdownFailedException {
 		// not initialized - cannot shutdown
@@ -244,7 +259,7 @@
 	/**
 	 * Inits receive and send-state-changes notifications. Overrided in polling and clientserver subpackages.
 	 * 
-	 * @throws DeviceInitializationFailedException
+	 * @throws DeviceInitializationFailedException never
 	 */
 	protected void initNotification() throws DeviceInitializationFailedException {
         // Empty implementation
@@ -253,7 +268,7 @@
 	/**
 	 * Finalizes receive and send-state-changes notifications. Overrided in polling and clientserver subpackages.
 	 * 
-	 * @throws DeviceShutdownFailedException
+	 * @throws DeviceShutdownFailedException never
 	 */
 	protected void shutdownNotification() throws DeviceShutdownFailedException {
         // Empty implementation
@@ -268,7 +283,8 @@
 	
 	/**
 	 * Returns FaxOutboundMessage for use with this device.
-	 * Throws OutboundMessageCreateException when creating message failed.
+	 * 
+	 * @throws OutboundMessageCreateException when creating message failed.
 	 */
 	public OutboundMessage createOutboundMessage() {
 		return new FaxOutboundMessage(this);
@@ -277,16 +293,11 @@
 	/**
 	 * Sends message.
 	 * 
-	 * Throws DeviceInvalidOutboundMessageException when message was created in other Device.
-	 * Throws OutboundMessageInvalidContentMimeTypeException when device cannot send message of this type.
-	 * Throws OutboundMessageInvalidContentException when message has no content.
-	 * Throws OutboundMessageInvalidDestinationAddressException when message has no destination address.
-	 * 
 	 * @arg message message to send 
-	 * @throws DeviceInvalidOutboundMessageException
-	 * @throws OutboundMessageInvalidContentMimeTypeException
-	 * @throws OutboundMessageInvalidContentException
-	 * @throws OutboundMessageInvalidDestinationAddressException
+	 * @throws DeviceInvalidOutboundMessageException when message was created in other Device.
+	 * @throws OutboundMessageInvalidContentMimeTypeException when device cannot send message of this type.
+	 * @throws OutboundMessageInvalidContentException when message has no content.
+	 * @throws OutboundMessageInvalidDestinationAddressException when message has no destination address.
 	 */
 	public void send(OutboundMessage message) throws
 		DeviceInvalidOutboundMessageException, OutboundMessageInvalidContentMimeTypeException, 
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxInboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxInboundMessage.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxInboundMessage.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -48,7 +48,8 @@
 	
 	/**
 	 * FaxDevice creates it after notification of new received Fax.
-	 * @throws FaxInboundMessageCreateException 
+	 * 
+	 * @throws FaxInboundMessageCreateException when inbound message is invalid, fax server's response is invalid, or fax server's response cannot be convered to pdf 
 	 */
 	public FaxInboundMessage(FaxDevice device, HylaFAXClient hylaFaxClient, String messageId, String sourceAddress, String destinationAddress, String contentMimeType,
 			String fileName) throws FaxInboundMessageCreateException {
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -62,9 +62,7 @@
 	 * Creates new fax outbound message for device faxDevice.
 	 * It creates new HylaFAX job on server and assigns it unique id.
 	 * 
-	 * @param faxDevice
-	 * @throws ServerResponseException
-	 * @throws IOException
+	 * @param faxDevice device that own this message
 	 */
 	public FaxOutboundMessage(FaxDevice device)
 	{
@@ -74,10 +72,10 @@
 	/**
 	 * Sends message using faxDevice set in constructor.
 	 * 
-	 * @throws OutboundMessageInvalidContentMimeTypeException
-	 * @throws OutboundMessageInvalidContentException
-	 * @throws OutboundMessageInvalidDestinationAddressException
-	 * @throws OutboundMessageConversionFailedException 
+	 * @throws OutboundMessageInvalidContentMimeTypeException when message's content type cannot be used with fax device
+	 * @throws OutboundMessageInvalidContentException when message content is null
+	 * @throws OutboundMessageInvalidDestinationAddressException when destination address is null
+	 * @throws OutboundMessageConversionFailedException  when message's content's conversion failed
 	 */
 	public void send() throws
 		OutboundMessageInvalidContentMimeTypeException, OutboundMessageInvalidContentException,
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/ReceivePollingJob.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/ReceivePollingJob.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/ReceivePollingJob.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -73,6 +73,7 @@
      * so it won't be downloaded again in next iteration of job.
      * 
      * @see FaxDevice.notifyReceive
+     * @param context job context, contains FaxDevice
      */
     public void execute(JobExecutionContext context) {
         final FaxDevice faxDevice = (FaxDevice) (context.getJobDetail().getJobDataMap().get("FaxDevice"));
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/SendStateChangedPollingJob.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/SendStateChangedPollingJob.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/SendStateChangedPollingJob.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -71,6 +71,9 @@
      * so Device won't be notified again in next iteration of job.
      * 
      * @see FaxDevice.notifyReceive
+     * 
+     * @param context jobContext, containt FaxDevice object
+     * @throws JobExecutionException never
      */
 	public void execute(JobExecutionContext context) throws JobExecutionException {
 		final FaxDevicePolling faxDevice = (FaxDevicePolling)(context.getJobDetail().getJobDataMap().get("FaxDevice"));
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/ReceivePollingJob.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/ReceivePollingJob.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/ReceivePollingJob.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -3,14 +3,27 @@
 import java.util.LinkedList;
 
 import org.apache.log4j.Logger;
+import org.commsuite.devices.fax.FaxDevice;
 import org.quartz.JobExecutionContext;
 import org.quartz.StatefulJob;
 import org.smslib.CIncomingMessage;
 
+/**
+ * Quarts job to check for new received messages.
+ * 
+ * @since 1.0
+ * @author Rafał Malinowski
+ */
 public class ReceivePollingJob implements StatefulJob {
 
 	private static final Logger logger = Logger.getLogger(ReceivePollingJob.class);
-	
+
+    /**
+     * Executes job instance. This checks device buffer for new sms message. For each SMS message SmsDevice is informed about.
+     * 
+     * @see FaxDevice.notifyReceive
+     * @param context job context, contains SmsDevice
+     */
     public void execute(JobExecutionContext context) {
 //    	logger.info("execute");
     	
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -153,7 +153,7 @@
 
 
     /**
-     * Disconnects to GSM modem.
+     * Disconnects from GSM modem.
      * 
      * @throws DeviceShutdownFailedException when disconnection failed
      */
@@ -248,6 +248,8 @@
      * Set interval in seconds.
      * 
      * By default 30 minutes.
+     * 
+     * @int warningsInterval warnings interval in seconds
      */
     public void setWarningsInterval(int warningsInterval) {
         this.warningsInterval = warningsInterval;
@@ -255,7 +257,8 @@
 
     /**
      * Get interval in seconds.
-     * @return
+     * 
+     * @return warnings interval in seconds
      */
     public int getWarningsInterval() {
         return warningsInterval;
@@ -368,6 +371,14 @@
         }
     }
 
+    /**
+     * Removes polish UTF character and replaces it with latin1 characters.
+     * 
+     * @param text string with UTF characters
+     * @return text without UTF characters
+     * 
+     * @throws UnsupportedEncodingException never
+     */
     private static String removeUTFCharacters(String text) throws UnsupportedEncodingException {
         logger.debug("Converting :" + text);
 
@@ -386,8 +397,13 @@
     }
 
     /**
+     * Send SMS message.
+     * 
+     * @param text sms message to send
+     * @param phone phone address of receiver
      * @return unique message-id of sent SMS
-     * @throws OutboundMessageSendException
+     * 
+     * @throws OutboundMessageSendException when sms device failed to send message
      */
     private String sendSMSMessage(String text, String phone) throws OutboundMessageSendException {
 
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsService.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsService.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -40,6 +40,15 @@
 
 	private SmsDevice device;
 
+	/**
+	 * Creates new SmsService
+	 * 
+	 * @param device SMSDevice to inform about new incoming messages
+	 * @param port device port
+	 * @param baud device boud rate
+	 * @param gsmDeviceManufacturer device gsm manufacturer
+	 * @param gsmDeviceModel device gsm moel
+	 */
 	public SmsService(SmsDevice device, String port, int baud,
 			String gsmDeviceManufacturer, String gsmDeviceModel) {
 		super(port, baud, gsmDeviceManufacturer, gsmDeviceModel);
@@ -53,6 +62,8 @@
 	 * {@link SmsDevice#notifyReceive(org.commsuite.devices.InboundMessage)} or
 	 * {@link SmsDevice#notifySendStateChange(String, org.commsuite.devices.OutboundMessage.State)}
 	 * appropriately.
+	 * 
+	 * @return true
 	 */
 	public boolean received(IIncomingMessage message) {
 		logger.debug("Received SMS");
Modified: trunk/code/CSMiddleware/src/org/commsuite/messaging/Filter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/messaging/Filter.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/messaging/Filter.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -34,7 +34,7 @@
 	 * Process message, return true if message can be processes, false if should be canceled.
 	 * 
 	 * @param message message to chceck
-	 * @return true if message can be processes
+	 * @return true if message can be processed
 	 */
 	public abstract boolean processMessage(Message message);
 
Modified: trunk/code/CSMiddleware/src/org/commsuite/messaging/filters/SpamFilter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/messaging/filters/SpamFilter.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/messaging/filters/SpamFilter.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -24,6 +24,8 @@
 
 	/**
 	 * If message sender is on our spamers list - drop message.
+	 * 
+	 * @return true if message send is not on out spamers list
 	 */
 	public boolean processMessage(Message message) {
 		if (spamers.indexOf(message.getSender()) == -1)
Modified: trunk/code/CSMiddleware/src/org/commsuite/notification/AbstractNotificationConsumer.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/notification/AbstractNotificationConsumer.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/notification/AbstractNotificationConsumer.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -49,6 +49,8 @@
 
     /**
      * Consumes Object obj (this object is Notification) from queue and runs consumeNotification method on it.
+     * 
+     * @param obj object to consume
      */
     public boolean consumeQueueMessage(Object obj) {
         // AbstractQueueMessageConsumer:47 - checking for object type
Modified: trunk/code/CSMiddleware/src/org/commsuite/notification/INotificationsManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/notification/INotificationsManager.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/notification/INotificationsManager.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -32,6 +32,9 @@
     
     /**
      * Sens notification to queue assigned to SAP server.
+     * 
+     * @param sapName sap name to notify
+     * @param notification notification to send
      */
     public abstract void sendNotification(String sapName, Notification notification);
 
Modified: trunk/code/CSMiddleware/src/org/commsuite/notification/JMSNotificationsManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/notification/JMSNotificationsManager.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/notification/JMSNotificationsManager.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -36,6 +36,12 @@
 
     private final static Logger logger = Logger.getLogger(JMSNotificationsManager.class);
 
+    /**
+     * Returns queue name for gives sap instance name.
+     * 
+     * @param sapName sap instance name
+     * @return queue name for gives sap instance name
+     */
     private String queueNameFromSapName(String sapName) {
         return sapName;
     }
Modified: trunk/code/CSMiddleware/src/org/commsuite/util/IOUtil.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/util/IOUtil.java	2006-09-04 22:34:12 UTC (rev 128)
+++ trunk/code/CSMiddleware/src/org/commsuite/util/IOUtil.java	2006-09-04 23:19:25 UTC (rev 129)
@@ -40,6 +40,13 @@
         super();
     }
 
+    /**
+     * Reads all data from input stream and returns byte[].
+     * 
+     * @param is inpu stream to read data from
+     * @return byte[] of data from stream
+     * @throws IOException when reading data fails
+     */
     public static byte[] convertIS2Bytes(InputStream is) throws IOException {
         final ByteArrayOutputStream baos = new ByteArrayOutputStream();
         final byte[] buffer = new byte[1024 * 10];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <sku...@us...> - 2006-09-04 22:34:25
      
     | 
| Revision: 128
          http://svn.sourceforge.net/comsuite/?rev=128&view=rev
Author:   skuzniak
Date:     2006-09-04 15:34:12 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
description of how to install development environment
Added Paths:
-----------
    trunk/docs/instalation/instal_devel.pdf
Added: trunk/docs/instalation/instal_devel.pdf
===================================================================
(Binary files differ)
Property changes on: trunk/docs/instalation/instal_devel.pdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <sku...@us...> - 2006-09-04 22:33:46
      
     | 
| Revision: 127
          http://svn.sourceforge.net/comsuite/?rev=127&view=rev
Author:   skuzniak
Date:     2006-09-04 15:33:07 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
javadocs added, active instance images provided
Modified Paths:
--------------
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerExtended.java
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
    trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp
    trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerSearch.jsp
    trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
    trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java
    trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java
    trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
    trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
Added Paths:
-----------
    trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-loading.png
    trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-missing.png
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -184,4 +184,8 @@
 
 	public static final String MESSAGE_SERVER_ERROR_PASSWORD = "MESSAGE_SERVER_ERROR_PASSWORD";
 
+	public static final String LABEL_ACTIVE = "/pages/files/gif/image-loading.png";
+
+	public static final String LABEL_INACTIVE = "/pages/files/gif/image-missing.png";
+
 }
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -137,6 +137,11 @@
         } else {
         	instance.setLoadBalancing(false);
         }
+        if (1 == this.getActiveSearchIndex()) {
+        	instance.setActiveInstance(true);
+        } else {
+        	instance.setActiveInstance(false);
+        }
 
         return instance;
     }
@@ -152,6 +157,7 @@
                 boolean def = false;
                 boolean load = false;
                 boolean unicode = false;
+                boolean active = false;
                 if (this.getUnicodeSearchIndex() < 10) {
                 	unicode = true;
                 }
@@ -161,9 +167,12 @@
                 if (this.getLoadSearchIndex() < 10) {
                 	load = true;
                 }
-                serversList = this.getServers(instance, def, load, unicode, ws);
+                if (this.getActiveSearchIndex() < 10) {
+                	active = true;
+                }
+                serversList = this.getServers(instance, def, load, unicode, active, ws);
             } else {
-                serversList = this.getServers(null, false, false, false, ws);
+                serversList = this.getServers(null, false, false, false, false, ws);
             }
             this.servers = new FastTable<ServerExtended>();
 
@@ -180,15 +189,21 @@
                 		workingIcon = START_ICON_PATH;
                 		label = BeansUtils.LABEL_START;
                 	}
+                	String active;
+                	if (def.isActiveInstance()) {
+                		active = BeansUtils.LABEL_ACTIVE;
+                	} else {
+                		active = BeansUtils.LABEL_INACTIVE;
+                	}
 //                	try {
 //                		this.serverStates.set(i, this.serverStates.get(i));
 //                	} catch(IndexOutOfBoundsException ioobe) {
                 		this.serverStates.add(i, UNKNOWN_ICON_PATH);
 //                	} 
                     this.servers.add(i, new ServerExtended(def, this.serverStates.get(i), 
-                    		workingIcon, label));
+                    		workingIcon, label, active));
                 } else if (null != this.serverId && def.getId().toString().equals(this.serverId)) {
-                    final boolean testResult = ws.testServer(def.getName());
+                    final boolean testResult = ws.serverTest(def.getName());
                     logger.debug("Result of SAP server testing: " + testResult);
                     if (testResult) {
                     	this.serverStates.set(i, TEST_OK_ICON_PATH);
@@ -204,8 +219,14 @@
                 		workingIcon = START_ICON_PATH;
                 		label = BeansUtils.LABEL_START;
                 	}
+                	String active;
+                	if (def.isActiveInstance()) {
+                		active = BeansUtils.LABEL_ACTIVE;
+                	} else {
+                		active = BeansUtils.LABEL_INACTIVE;
+                	}
                 	this.servers.add(i, new ServerExtended(def, this.serverStates.get(i),
-                    		workingIcon, label));
+                    		workingIcon, label, active));
                 }
                 i++;
             }
@@ -253,7 +274,7 @@
             for (ServerExtended server : this.servers) {
                 if (this.serverId.equals(String.valueOf(server.getInstance().getId()))) {
                 //    index = this.servers.indexOf(server);
-                    testResult = ws.testServer(server.getInstance().getName());
+                    testResult = ws.serverTest(server.getInstance().getName());
                     logger.debug("Result of SAP server testing: " + testResult);
                 }
             }
@@ -327,9 +348,9 @@
     }
     
     private List<WSSAPInstanceDef> getServers(WSSAPInstanceDef model,
-    		boolean def, boolean load, boolean unicode, ICommunicateWS ws)
+    		boolean def, boolean load, boolean unicode, boolean active, ICommunicateWS ws)
     		throws WebServiceException{
-    	this.totalServers = ws.getInstancesSize(model, def, load, unicode);
+    	this.totalServers = ws.getInstancesSize(model, def, load, unicode, active);
         this.totalPages = ((this.totalServers - 1) / ROWS_ON_PAGE) + 1;
         
         int begin = (this.actualPage - 1) * ROWS_ON_PAGE;
@@ -340,7 +361,7 @@
         if (null == model) {
         	return (List<WSSAPInstanceDef>)ws.getInstancesSubset(begin, end);
         } else {
-        	return (List<WSSAPInstanceDef>)ws.getSelectedInstancesSubset(model, def, load, unicode, begin, end);
+        	return (List<WSSAPInstanceDef>)ws.getSelectedInstancesSubset(model, def, load, unicode, active, begin, end);
         }
     }
     
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -79,8 +79,18 @@
     private int loadSearchIndex;
     
     private int unicodeSearchIndex;
+    
+    private int activeSearchIndex;
 
-    public boolean isActiveInstance() {
+    public int getActiveSearchIndex() {
+		return activeSearchIndex;
+	}
+
+	public void setActiveSearchIndex(int activeSearchIndex) {
+		this.activeSearchIndex = activeSearchIndex;
+	}
+
+	public boolean isActiveInstance() {
 		return activeInstance;
 	}
 
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerExtended.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerExtended.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerExtended.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -35,8 +35,18 @@
     private String subtitle ;
     
     private String working;
+    
+    private String active;
 
-    public String getSubtitle() {
+    public String getActive() {
+		return active;
+	}
+
+	public void setActive(String active) {
+		this.active = active;
+	}
+
+	public String getSubtitle() {
 		return subtitle;
 	}
 
@@ -87,11 +97,12 @@
      * @param state
      */
     public ServerExtended(WSSAPInstanceDef instance, String state, 
-    		String working, String subtitle) {
+    		String working, String subtitle, String active) {
         this.instance = instance;
         this.state = state;
         this.working = working;
         this.subtitle = subtitle;
+        this.active = active;
     }
 
 }
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties	2006-09-04 22:33:07 UTC (rev 127)
@@ -128,6 +128,7 @@
 SERVER_PROG_ID=Prog id
 SERVER_UNICODE=Unicode
 SERVER_ACTIVE_INSTANCE=Uaktywnij
+SERVER_ACTIVE=Instancja aktywna
 SERVER_GWHOST=GWHost
 SERVER_GWSERVER=GWServer
 SERVER_MANDANT=Klient(mandant)
@@ -287,6 +288,7 @@
 LABEL_DETAILS=Szczeg\u00f3\u0142y
 LABEL_BACK=Powr\u00f3t do listy
 LABEL_SEARCH=Szukaj
+LABEL_ACTIVE=Instancja aktywna
 COMMON_LEGEND=Legenda
 COMMON_LEGEND_MANDATORY=Pola obowi\u0105zkowe
 COMMON_LEGEND_WITH_LOAD_BALANCING=Pole obowi\u0105zkowe, gdy wybrano opcje 'R\u00f3wnowa\u017cenie obci\u0105\u017ce\u0144'
Added: trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-loading.png
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-loading.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-missing.png
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-missing.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp	2006-09-04 22:33:07 UTC (rev 127)
@@ -30,7 +30,7 @@
 								styleClass="listView" rowClasses="listView-header-odd,listView-header-even">
 								<h:column>
 									<h:panelGrid columns="1">
-										<h:panelGrid columns="7">
+										<h:panelGrid columns="8">
 											<h:panelGrid columns="2">
 												<h:outputText value="#{Locale.SERVER_NAME}" styleClass="listView-header-title"/>
 												<h:outputText value="#{inst.instance.name}" styleClass="listView-header-value"/>
@@ -65,6 +65,10 @@
 													<h:outputText value="#{Locale.LABEL_DELETE}"  styleClass="header-command"/>
 												</h:panelGrid>
 											</h:commandLink>
+											<h:panelGrid columns="1">
+												<h:graphicImage value="#{pageContext.request.contextPath}#{inst.active}"  styleClass="header-icon"/>
+												<h:outputText value="#{Locale.LABEL_ACTIVE}"  styleClass="header-command"/>
+											</h:panelGrid>
 										</h:panelGrid>
 									</h:panelGrid>
 								</h:column>
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerSearch.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerSearch.jsp	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerSearch.jsp	2006-09-04 22:33:07 UTC (rev 127)
@@ -68,6 +68,11 @@
 									<f:selectItems value="#{searchServerBean.booleanSearchList}"/>
 								</h:selectOneMenu>
 								
+								<h:outputText value="#{Locale.SERVER_ACTIVE}" styleClass="listView-header-title"/>
+								<h:selectOneMenu value="#{searchServerBean.activeSearchIndex}">
+									<f:selectItems value="#{searchServerBean.booleanSearchList}"/>
+								</h:selectOneMenu>
+								
 							</h:panelGrid>
 							
 							<h:panelGrid columns="2" styleClass="listView-entity">
Modified: trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -42,148 +42,556 @@
 public interface ICommunicateWS {
 
     /**
-     * This method returns set of messages stored in database
+     * This method returns set of messages stored in database.
      * 
-     * @return
-     * @throws WebServiceException
+     * @return collection of maessages
+     * @throws WebServiceException on any error
      */
     public Collection<WSMessage> getAllMessages() throws WebServiceException;
     
+    /**
+     * this method returns number of masseagess stored in database.
+     * if wsMessage argument is null, method returns size of all 
+     * messages, else method returns size of collection of messages
+     * matching pattern.
+     * 
+     * @param wsMessage pattern to match messages
+     * @return number of all/matching messages
+     * @throws WebServiceException on any error
+     */
     public int getMessagesSize(SearchMessageModel wsMessage) throws WebServiceException ;
 
+    /**
+     * returns subset of messages from <code>begin</code> index
+     * to <code>end</code> index.
+     * 
+     * @param begin first index in subset
+     * @param end last index in subset
+     * @return subset of messages
+     * @throws WebServiceException on any error
+     */
     public Collection<WSMessage> getMessagesSubset(int begin, int end) throws WebServiceException;
     
+    /**
+     * returns subset of messages matching given pattern.
+     * 
+     * @param wsMessage pattern to match
+     * @return subset of messages
+     * @throws WebServiceException on any error
+     */
     public Collection<WSMessage> getSelectedMessages(SearchMessageModel wsMessage) throws WebServiceException;
     
+    /**
+     * returns subset of messages matching given pattern, from
+     * <code>begin</code> index to <code>end</code> index.
+     * 
+     * @param wsMessage pattern to match
+     * @param begin first index in subset
+     * @param end last index in subset
+     * @return subset ofmessages matching give criteria
+     * @throws WebServiceException on any error
+     */
     public Collection<WSMessage> getSelectedMessagesSubset(SearchMessageModel wsMessage, int begin, int end) throws WebServiceException;
 
+    /**
+     * returns message by its id.
+     * 
+     * @param id id of requested message
+     * @return WSMessage object with given id
+     * @throws WebServiceException on any error
+     */
     public WSMessage getMessageById(String id) throws WebServiceException;
 
+    /**
+     * returns content by its id
+     * @param id id of requested content
+     * @return WSContents object with given id
+     * @throws WebServiceException in any error
+     */
     public WSContents getContentsById(String id) throws WebServiceException;
 
+    /**
+     * returns list of sent contents, of message with <code>id</code>
+     * 
+     * @param id id of message
+     * @return list of <code>SentContent</code> objects
+     * @throws WebServiceException on any error
+     */
     public Collection<WSSentContent> getSentContentsByMessage(String id) throws WebServiceException;
 
+    /**
+     * returns collection of <code>WSContents</code> belonging to
+     * <code>SentContent</code> with given <code>id</code>.
+     * 
+     * @param id id of SentContent
+     * @return list of contents
+     * @throws WebServiceException on any error
+     */
     public Collection<WSContents> getContentsBySentContent(String id) throws WebServiceException;
 
     /**
-     * This method returns set of SAP R/3 servers available
+     * this method returns size of instances collection. the instances must match pattern
+     * in <code>def</code> object. Boolean flags enables searching by corresponding
+     * boolean arguments, ie if defaultSearch is set to true, and def.isDefaultInstance()
+     * method returns true, then only default instances will be returned. But if
+     * defaultSearch is set to false any method def.isDefalutInstance() will not
+     * be considered in searching.
      * 
-     * @return
-     * @throws WebServiceException
+     * @param def pattern to match
+     * @param defaultSearch enables searching by defaultInstance property
+     * @param loadSearch enables searching by loadBalancing property
+     * @param unicodeSearch enables searching by unicode property
+     * @param activeSearch enables searching by activeInstance property
+     * @return size of instances matching pattern
+     * @throws WebServiceException on any error
      */
-    public int getInstancesSize(WSSAPInstanceDef def, boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) 
+    public int getInstancesSize(WSSAPInstanceDef def, boolean defaultSearch, boolean loadSearch, boolean unicodeSearch,boolean activeSearch) 
     		throws WebServiceException ;
     
+    /**
+     * returns collection of all instances in database
+     * 
+     * @return collection of instances
+     * @throws WebServiceException on any error
+     */
     public Collection<WSSAPInstanceDef> getAllInstances() throws WebServiceException;
     
+    /**
+     * returns subset of instances from <code>begin</code> index,
+     * to <code>end</code> index.
+     * 
+     * @param begin first index of subset
+     * @param end last index of subset
+     * @return collection of instances
+     * @throws WebServiceException on any error
+     */
     public Collection<WSSAPInstanceDef> getInstancesSubset(int begin, int end) throws WebServiceException;
 
-    public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,boolean defaultSearch, boolean loadSearch, boolean unicodeSearch)
+    /**
+     * returns collection of messages matches pattern in <code>def</code> object. For
+     * example of use boolean flags see getInstancesSize comment.
+     * 
+     * @param def pattern to match
+     * @param defaultSearch enables searching by defaultInstance property
+     * @param loadSearch enables searching by loadBalancing property
+     * @param unicodeSearch enables searching by unicode property
+     * @param activeSearch enables searching by activeInstance property
+     * @return collection of instances matching pattern
+     * @throws WebServiceException on any error
+     * @return
+     * @throws WebServiceException
+     */
+    public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch)
             throws WebServiceException;
 
+    /**
+     * the same method as getSelectedInstances, except it returns subset of
+     * all messages from <code>begin</code> index, to <code>end</code> index.
+     * 
+     * @param def pattern to match
+     * @param defaultSearch enables searching by defaultInstance property
+     * @param loadSearch enables searching by loadBalancing property
+     * @param unicodeSearch enables searching by unicode property
+     * @param activeSearch enables searching by activeInstance property
+     * @param begin first index of subset
+     * @param end last index of subset
+     * @return collection of messages
+     * @throws WebServiceException on any error
+     */
     public Collection<WSSAPInstanceDef> getSelectedInstancesSubset(WSSAPInstanceDef def,
-    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, int begin, int end)
+    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch, int begin, int end)
             throws WebServiceException;
     
+    /**
+     * returns instance with given <code>id</code>
+     * 
+     * @param id id of instance to select
+     * @return instance with goven id
+     * @throws WebServiceException on any error
+     */
     public WSSAPInstanceDef getInstanceById(String id) throws WebServiceException ;
     
+    /**
+     * tests if instance with given name is working. this method performs
+     * set of tests on selected instance to see if it is able to properly
+     * communicate with sap server.
+     * 
+     * @param serverName name of server to test
+     * @return true if server is working, false otherwise
+     * @throws WebServiceException on any error
+     */
     public boolean isSapServerWorking(String serverName) throws WebServiceException ;
     
+    /**
+     * starts instance with given name
+     * 
+     * @param serverName name of server to start
+     * @throws WebServiceException on any error
+     */
     public void startSapServer(String serverName) throws WebServiceException ;
     
+    /**
+     * stops instance with given name
+     * 
+     * @param serverName name of instance to stop
+     * @throws WebServiceException on any error
+     */
     public void stopSapServer(String serverName) throws WebServiceException ;
     
+    /**
+     * deletes instance with <code>id</code> from database.
+     * 
+     * @param id id of instance to delete
+     * @throws WebServiceException on any error
+     */
     public void deleteServer(String id) throws WebServiceException ;
 
     /**
-     * This method provides adding new SAP R/3 instance to database
+     * This method provides adding new SAP R/3 instance to database.
+     * it is also invoked when existing instance is modified.
      * 
-     * @param instance
-     * @return
-     * @throws WebServiceException
+     * @param instance instance to add/modify
+     * @return added instance
+     * @throws WebServiceException on any error
      */
     public WSSAPInstanceDef saveNewInstance(WSSAPInstanceDef instance) throws WebServiceException;
 
-    /* Users methods */
-    
+    /**
+     * returns number of users matching <code>user</code> pattern.
+     * when enabledSearch flag is set this method is sensitive
+     * on enabled property, else this property is not considered.
+     * 
+     * @param user pattern to match
+     * @param enabledSearch enables searching by enabled property
+     * @return number of users matching given criteria
+     * @throws WebServiceException on any error
+     */
     public int getUsersSize(WSUser user, boolean enabledSearch) throws WebServiceException ;
 
+    /**
+     * adds new user to database. this method is also invoked
+     * when editing existing user.
+     * 
+     * @param user user object to add/modify
+     * @return modified user object
+     * @throws WebServiceException on any error
+     */
     public WSUser addUserToDatabase(WSUser user) throws WebServiceException;
 
+    /**
+     * returns collection of all users in database
+     * 
+     * @return collection of users
+     * @throws WebServiceException on any error
+     */
     public Collection<WSUser> getAllUsers() throws WebServiceException;
 
+    /**
+     * returns users subset from <code>begin</code> index, to <code>end</code>
+     * index.
+     * 
+     * @param begin first index in subset
+     * @param end last index in subset
+     * @return collection of users
+     * @throws WebServiceException on any error
+     */
     public Collection<WSUser> getUsersSubset(int begin, int end) throws WebServiceException;
 
+    /**
+     * returns subset of users matching <code>user</user> pattern. collection is
+     * restricted from <code>begin</code> index to <code>end</code> index.
+     * 
+     * @param user pattern to match
+     * @param enabledSearch enables searching by enabled property
+     * @param begin first index in subset
+     * @param end last index in subset
+     * @return collection of users
+     * @throws WebServiceException on any error
+     */
     public Collection<WSUser> getSelectedUsersSubset(WSUser user, boolean enabledSearch, int begin, int end) throws WebServiceException;
 
+    /**
+     * deletes user with <code>id</code> from database.
+     * 
+     * @param id id of user to be deleted
+     * @throws WebServiceException on any error
+     */
     public void deleteUserFromDatabase(String id) throws WebServiceException;
 
+    /**
+     * returns user with given <code>id</code>.
+     * 
+     * @param id id of user to select
+     * @return user with given id
+     * @throws WebServiceException on any error
+     */
     public WSUser getUserById(String id) throws WebServiceException;
 
+    /**
+     * returns user with given <code>name</code>.
+     * 
+     * @param name name of user to select
+     * @return user with given <code>name</code>
+     * @throws WebServiceException on any error
+     */
     public WSUser getUserByName(String name) throws WebServiceException;
 
+    /**
+     * returns collection of users matching <code>user</code> pattern.
+     * 
+     * @param user pattern to match
+     * @param enabledSearch enables searching by enabled proerty
+     * @return collection of users
+     * @throws WebServiceException on any error
+     */
     public Collection<WSUser> getUsersByFields(WSUser user, boolean enabledSearch) throws WebServiceException;
 
-    /* actions methods */
-
+    /**
+     * returns all available actions from database.
+     * 
+     * @return collection of actions
+     * @throws WebServiceException onany error
+     */
     public Collection<WSAction> getActionsAvailable() throws WebServiceException;
 
+    /**
+     * Adds new action to database. Also invoked when action is modified.
+     * 
+     * @param action action to add/modify
+     * @return added action
+     * @throws WebServiceException on any error
+     */
     public WSAction addActionToDatabase(WSAction action) throws WebServiceException;
 
+    /**
+     * Returns action with given <code>id</code>
+     * @param id id of action to select
+     * @return action with given <code>id</code>
+     * @throws WebServiceException on any exception
+     */
     public WSAction getWSActionById(String id) throws WebServiceException;
 
+    /**
+     * deletes selected action from database.
+     * 
+     * @param id id of action to be deleted
+     * @throws WebServiceException on any error
+     */
     public void deleteActionFromDatabase(String id) throws WebServiceException;
 
+    /**
+     * returns collection of action that matches given <code>name</code>.
+     * Complete name is not neccessary, ie. if name is 'add' method could
+     * return 'addServer' and 'addUser', but also 'fooaddBar', by if name 
+     * is 'addS' in the same database method will return 'addServer' only.
+     * 
+     * @param name partial or complete name of action to select
+     * @return collection of actions
+     * @throws WebServiceException on any exception
+     */
     public Collection<WSAction> getActionsByName(String name) throws WebServiceException;
 
-    /* roles methods */
-
-    // public WSRole addRoleToDatabase(WSRole role, String[] ids, String option) throws
-    // WebServiceException ;
+    /**
+     * adds role to database, but also updates existing role.
+     * 
+     * @param role role to add/modify
+     * @return added/modified role
+     * @throws WebServiceException on any exception
+     */
     public WSRole updateRole(WSRole role) throws WebServiceException;
-
+    
+	/**
+	 * updates list of actions for <code>role</code>
+	 * @param role role to update
+	 * @param ids array of ids of actions to be assigned to <code>role</code>
+	 * @return updated role
+	 * @throws WebServiceException on any error
+	 */
     public WSRole updateActionsForRole(WSRole role, String[] ids) throws WebServiceException;
 
+    /**
+     * updates list of users for <code>role</code>
+     * 
+     * @param wsRole role tobe updated
+     * @param idsToAdd array of user ids to be added
+     * @param idsToDelete array of user ids to be deleted
+     * @return updated role
+     * @throws WebServiceException on any error
+     */
     public WSRole updateUsersForRole(WSRole wsRole, String[] idsToAdd, String[] idsToDelete) throws WebServiceException;
 
+    /**
+     * deletes role with <code>id</code> from database
+     * 
+     * @param id id of role to be deleted
+     * @throws WebServiceException on any exception
+     */
     public void deleteRoleFromDatabase(String id) throws WebServiceException;
 
+    /**
+     * returns all roles from database
+     * 
+     * @return collection of roles
+     * @throws WebServiceException on any error
+     */
     public Collection<WSRole> getAllRoles() throws WebServiceException;
 
+    /**
+     * returns role with <code>id</code>
+     * @param id id of role
+     * @return role with given <code>id</code>
+     * @throws WebServiceException on any error
+     */
     public WSRole getRoleById(String id) throws WebServiceException;
 
+    /**
+     * returns collection of roles that matches given <code>name</code>.
+     * Complete name is not neccessary, ie. if name is 'add' method could
+     * return 'addServer' and 'addUser', but also 'fooaddBar', by if name 
+     * is 'addS' in the same database method will return 'addServer' only.
+     * 
+     * @param name pattern to match
+     * @return collection of roles that matches given pattern
+     * @throws WebServiceException on any error
+     */
     public Collection<WSRole> getRolesByName(String name) throws WebServiceException;
 
+    /**
+     * returns set of action by role id, they are asigned.
+     * 
+     * @param id id of role
+     * @return collection of actions
+     * @throws WebServiceException on any errorz
+     */
     public Collection<WSAction> getActionsByRole(String id) throws WebServiceException;
 
+    /**
+     * returns set of users by role id, they are assigned
+     * 
+     * @param id id of role
+     * @return collection of users
+     * @throws WebServiceException on any error
+     */
     public Collection<WSUser> getUsersByRole(String id) throws WebServiceException;
 
+    /**
+     * returns collection of roles assigned to user with <code>id</code>
+     * 
+     * @param id id of user
+     * @return collection of roles
+     * @throws WebServiceException on any error
+     */
     public Collection<WSRole> getRolesByUser(String id) throws WebServiceException;
 
+    /**
+     * returns collection of roles, the action with given <code>id</code> 
+     * is assigned to.
+     * 
+     * @param id id of action
+     * @return collection of roles
+     * @throws WebServiceException on any error
+     */
     public Collection<WSRole> getRoleByActionId(String id) throws WebServiceException;
 
-    /* groups methods */
-
+    /**
+     * returns collection of all groups from database.
+     * 
+     * @return collection of groups
+     * @throws WebServiceException on any exception
+     */
     public Collection<WSGroup> getAllGroups() throws WebServiceException;
 
+    /**
+     * updates or adds group to database.
+     * 
+     * @param wsGroup group object to add/modify
+     * @return added/modified object
+     * @throws WebServiceException on any error
+     */
     public WSGroup updateGroup(WSGroup wsGroup) throws WebServiceException;
 
+    /**
+     * updates roles assigned to <code>group</code>.
+     * 
+     * @param wsGroup group to be updated
+     * @param ids array of role ids
+     * @return updated grouop object
+     * @throws WebServiceException on any error
+     */
     public WSGroup updateRolesForGroup(WSGroup wsGroup, String[] ids) throws WebServiceException;
 
+    /**
+     * updates users assigned to <code>group</code>.
+     * 
+     * @param wsGroup group to be updated
+     * @param idsToAdd array of user ids to be added
+     * @param idsToDelete array of user ids to be deleted
+     * @return updated group
+     * @throws WebServiceException on any error
+     */
     public WSGroup updateUsersForGroup(WSGroup wsGroup, String[] idsToAdd, String[] idsToDelete) throws WebServiceException;
 
+    /**
+     * deletes group with <code>id</code> from database.
+     * 
+     * @param id id of group to be deleted
+     * @throws WebServiceException onany exception
+     */
     public void deleteGroupFromDatabase(String id) throws WebServiceException;
 
+    /**
+     * returns group with given <code>id</code>.
+     * 
+     * @param id id of requested group
+     * @return group with <code>id</code>
+     * @throws WebServiceException on any error
+     */
     public WSGroup getGroupById(String id) throws WebServiceException;
 
+    /**
+     * returns groups with name that matches <code>name</code> pattern.
+     * 
+     * @param name pattern to match
+     * @return collection of groups
+     * @throws WebServiceException on any error
+     */
     public Collection<WSGroup> getGroupsByName(String name) throws WebServiceException;
 
+    /**
+     * returns users assigned to group with <code>id</code>.
+     * 
+     * @param id id of group
+     * @return collection of users
+     * @throws WebServiceException on any error
+     */
     public Collection<WSUser> getUsersForGroup(String id) throws WebServiceException;
 
+    /**
+     * returns roles assigned to group with <code>id</code>
+     * 
+     * @param id id of grouop
+     * @return collection of roles
+     * @throws WebServiceException on any error
+     */
     public Collection<WSRole> getRolesForGroup(String id) throws WebServiceException;
 
+    /**
+     * returns all groups, the user with <code>id</code> is assigned to.
+     * 
+     * @param name name of user
+     * @return collection of groups.
+     * @throws WebServiceException on any exception
+     */
     public Collection<WSGroup> getGroupsByUser(String name) throws WebServiceException;
     
+    /**
+     * deactivates(or activates, depending on <code>mode</code>) server instance
+     * with <code>id</code>.
+     * 
+     * @param id id ofinstance to be activated/deactivated
+     * @param mode determines if instance should be activated or deactivated
+     * @throws WebServiceException on any error
+     */
     public void deactivateServer(String id, boolean mode) throws WebServiceException ;
 
     /**
@@ -195,8 +603,14 @@
      * @return
      * @throws WebServiceException
      */
-    public boolean testServer(String serverName) throws WebServiceException;
+    public boolean serverTest(String serverName) throws WebServiceException;
 
+    /**
+     * resubmits message, to be sent once again.
+     * 
+     * @param messageId id of message to be resubmitted
+     * @throws WebServiceException on any exception
+     */
     public void resubmitMessageWithId(String messageId) throws WebServiceException;
 
 }
\ No newline at end of file
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -34,7 +34,7 @@
 	public List<SAPInstanceDef> getSAPInstances();
 	
 	public List<SAPInstanceDef> getSelectedSAPInstances(SAPInstanceDef instance, 
-			boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) ;
+			boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) ;
 
 	public SAPInstanceDef getSAPInstanceDef(String id);
 
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -46,7 +46,7 @@
 	 * Lists selected SAPInstanceDef's
 	 */
 	public List<SAPInstanceDef> getSelectedSAPInstances(SAPInstanceDef instance, 
-			boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) {
+			boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) {
 		return dao.getMatchingServers(instance, defaultSearch, loadSearch, unicodeSearch);
 	}
 
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -161,11 +161,11 @@
         }
     }
     
-    public int getInstancesSize(WSSAPInstanceDef def, boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) 
+    public int getInstancesSize(WSSAPInstanceDef def, boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) 
     		throws WebServiceException {
     	try {
     		ServersService service = ServersService.getInstance();
-    		return service.getInstancesSize(def, defaultSearch, loadSearch, unicodeSearch);
+    		return service.getInstancesSize(def, defaultSearch, loadSearch, unicodeSearch, activeSearch);
     	} catch(Throwable t) {
             logger.fatal("error in getInstancesSize method", t);
             throw new WebServiceException(t);
@@ -206,11 +206,11 @@
     }
 
     public Collection<WSSAPInstanceDef> getSelectedInstancesSubset(WSSAPInstanceDef def,
-    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, int begin, int end)
+    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch, int begin, int end)
             throws WebServiceException {
         try {
             ServersService service = ServersService.getInstance();
-            return service.getSelectedInstancesSubset(def, defaultSearch, loadSearch, unicodeSearch, begin, end);
+            return service.getSelectedInstancesSubset(def, defaultSearch, loadSearch, unicodeSearch, activeSearch, begin, end);
         } catch (Throwable t) {
             logger.fatal("error in getAllInstances method", t);
             throw new WebServiceException(t);
@@ -218,11 +218,11 @@
     }
 
     public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,
-    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch)
+    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch)
             throws WebServiceException {
         try {
             ServersService service = ServersService.getInstance();
-            return service.getSelectedInstances(def, defaultSearch, loadSearch, unicodeSearch);
+            return service.getSelectedInstances(def, defaultSearch, loadSearch, unicodeSearch, activeSearch);
         } catch (Throwable t) {
             logger.fatal("error in getAllInstances method", t);
             throw new WebServiceException(t);
@@ -458,7 +458,7 @@
         }
     }
 
-    public boolean testServer(String serverName) throws WebServiceException {
+    public boolean serverTest(String serverName) throws WebServiceException {
         try {
             ServersService service = ServersService.getInstance();
             ;
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java	2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java	2006-09-04 22:33:07 UTC (rev 127)
@@ -73,14 +73,14 @@
      * @throws WebServiceException when something goes wrong
      */
     public int getInstancesSize(WSSAPInstanceDef def, 
-    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) throws WebServiceException {
+    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) throws WebServiceException {
     	try {
     		final SAPInstanceDefManager instManager = (SAPInstanceDefManager) SpringMiddlewareContext
             		.getSAPInstanceDefManager();
     		if (null == def) {
     			return instManager.getSAPInstances().size();
     		} else {
-    			return instManager.getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch).size();
+    			return instManager.getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch, activeSearch).size();
     		}
     	} catch(Throwable t) {
             logger.fatal("error in getInstancesSize method", t);
@@ -145,13 +145,13 @@
      * @throws WebServiceException when something goes wrong
      */
     public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,
-    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) throws WebServiceException {
+    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) throws WebServiceException {
         try {
             final SAPInstanceDefManager instManager = (SAPInstanceDefManager) SpringMiddlewareContext
                     .getSAPInstanceDefManager();
 
             final Collection<SAPInstanceDef> saps = instManager
-                    .getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch);
+                    .getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch, activeSearch);
             final Collection<WSSAPInstanceDef> result = new FastTable<WSSAPInstanceDef>();
             for (final SAPInstanceDef sap : saps) {
                 result.add(sap);
@@ -177,14 +177,14 @@
      * @throws WebServiceException when something goes wrong
      */
     public Collection<WSSAPInstanceDef> getSelectedInstancesSubset(WSSAPInstanceDef def,
-    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, int begin, int end)
+    		boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch, int begin, int end)
             throws WebServiceException {
         try {
             final SAPInstanceDefManager instManager = (SAPInstanceDefManager) SpringMiddlewareContext
                     .getSAPInstanceDefManager();
 
             final List<SAPInstanceDef> saps = instManager
-                    .getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch);
+                    .getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch, activeSearch);
             final Collection<WSSAPInstanceDef> result = new FastTable<WSSAPInstanceDef>();
             for (int i = begin; i <= end; i++) {
                 result.add(saps.get(i));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-03 14:59:51
      
     | 
| Revision: 126
          http://svn.sourceforge.net/comsuite/?rev=126&view=rev
Author:   marasm
Date:     2006-09-03 07:59:02 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
javadocs added
Modified Paths:
--------------
    trunk/code/CSRemoteClient/src/org/commsuite/client/GUI.java
    trunk/code/CSRemoteClient/src/org/commsuite/client/MessageFrame.java
    trunk/code/CSRemoteClient/src/org/commsuite/client/MessageLabel.java
    trunk/code/CSRemoteClient/src/org/commsuite/client/MessagePanel.java
    trunk/code/CSRemoteClient/src/org/commsuite/client/RemoteClient.java
    trunk/code/CSRemoteClient/src/org/commsuite/client/RemoteClientAppContext.java
    trunk/code/CSRemoteClient/src/org/commsuite/model/CSTupleBinding.java
    trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessage.java
    trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessageDao.java
    trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessageDaoImpl.java
    trunk/code/CSRemoteClient/src/org/commsuite/utils/CommunicateUtil.java
    trunk/code/CSRemoteClient/src/org/commsuite/utils/MessageSavingUtil.java
Modified: trunk/code/CSRemoteClient/src/org/commsuite/client/GUI.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/client/GUI.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/client/GUI.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -394,6 +394,12 @@
 		configure();
 	}
 
+	/**
+	 * Displayes message box with appriopriate message
+	 * 
+	 * @param t
+	 *            exception that is to be showed
+	 */
 	public void showException(Throwable t) {
 		String message = "Unknown error";
 		if (t instanceof AxisFault) {
@@ -659,7 +665,7 @@
 
 				mimeType = RemoteClientAppContext.getMimetypesMap()
 						.getContentType(fc.getSelectedFile());
-				
+
 				if (mimeType.equals("application/octet-stream")) {
 					showException(new Exception("RC:Format of file \""
 							+ tempFileName + "\" is not supported"));
@@ -806,6 +812,10 @@
 		return isRunning;
 	}
 
+	/**
+	 * Create or refresh frame with messages
+	 *
+	 */
 	public void reloadMessagesFrame() {
 		try {
 			messages = MessageSavingUtil.loadMessages();
Modified: trunk/code/CSRemoteClient/src/org/commsuite/client/MessageFrame.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/client/MessageFrame.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/client/MessageFrame.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -38,57 +38,74 @@
 
 /**
  * Frame for viewing sent messages
+ * 
  * @since 1.0
  * @author Agnieszka Wi�niewska
  * @author Marek Musielak
  */
-public class MessageFrame extends JFrame implements WindowListener{
+public class MessageFrame extends JFrame implements WindowListener {
 
 	private static final long serialVersionUID = -3589020867401107576L;
 
 	protected GUI framework = null;
-	
-	public MessageFrame(GUI controller, List messagesList){
+
+	public MessageFrame(GUI controller, List messagesList) {
 		super("Messages");
 		framework = controller;
 		setDefaultCloseOperation(DISPOSE_ON_CLOSE);
 		this.reloadFrame(messagesList);
 	}
 
+	/**
+	 * Refresh view of messages frame
+	 * 
+	 * @param messagesList
+	 *            messages to be displayed on frame
+	 */
 	public void reloadFrame(List messagesList) {
-		setSize(new Dimension(925, Math.min(39 + Math.max(50,messagesList.size()*58), 500)));
+		setSize(new Dimension(925, Math.min(39 + Math.max(50, messagesList
+				.size() * 58), 500)));
 		JPanel mainPanel = new JPanel();
 		mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
 		mainPanel.setBackground(Color.BLACK);
 		JScrollPane scroll = new JScrollPane(mainPanel);
-		scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
-		scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
-		
+		scroll
+				.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
+		scroll
+				.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+
 		Iterator messageIterator = messagesList.iterator();
-		
-		while (messageIterator.hasNext()){
-			mainPanel.add(Box.createRigidArea(new Dimension(0,3)));
-			RemoteClientMessage rcMessage = (RemoteClientMessage)messageIterator.next();
+
+		while (messageIterator.hasNext()) {
+			mainPanel.add(Box.createRigidArea(new Dimension(0, 3)));
+			RemoteClientMessage rcMessage = (RemoteClientMessage) messageIterator
+					.next();
 			JPanel messagePanel = new MessagePanel(rcMessage, framework);
 			mainPanel.add(messagePanel);
 		}
 		this.setContentPane(scroll);
 	}
-	
-	public void windowOpened(WindowEvent e) {}
 
-	public void windowClosing(WindowEvent e) {}
+	public void windowOpened(WindowEvent e) {
+	}
 
+	public void windowClosing(WindowEvent e) {
+	}
+
 	public void windowClosed(WindowEvent e) {
 		framework.messagesFrame = null;
 	}
 
-	public void windowIconified(WindowEvent e) {}
+	public void windowIconified(WindowEvent e) {
+	}
 
-	public void windowDeiconified(WindowEvent e) {}
+	public void windowDeiconified(WindowEvent e) {
+	}
 
-	public void windowActivated(WindowEvent e) {}
+	public void windowActivated(WindowEvent e) {
+	}
 
-	public void windowDeactivated(WindowEvent e) {}
-	
+	public void windowDeactivated(WindowEvent e) {
+	}
+
 }
Modified: trunk/code/CSRemoteClient/src/org/commsuite/client/MessageLabel.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/client/MessageLabel.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/client/MessageLabel.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -29,6 +29,8 @@
 import javax.swing.JLabel;
 
 /**
+ * class extending JLabel with special formatting
+ * 
  * @since 1.0
  * @author Marek Musielak
  */
Modified: trunk/code/CSRemoteClient/src/org/commsuite/client/MessagePanel.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/client/MessagePanel.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/client/MessagePanel.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -41,6 +41,7 @@
 
 /**
  * New panel for each message
+ * 
  * @since 1.0
  * @author Agnieszka Wisniewska
  * @author Marek Musielak
Modified: trunk/code/CSRemoteClient/src/org/commsuite/client/RemoteClient.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/client/RemoteClient.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/client/RemoteClient.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -36,6 +36,8 @@
 import com.sleepycat.je.DatabaseException;
 
 /**
+ * Remote Client main class
+ * 
  * @since 1.0
  * @author Agnieszka Wisniewska
  * @author Marek Musielak
@@ -43,54 +45,58 @@
 public class RemoteClient extends JPanel implements WindowListener {
 
 	private static final long serialVersionUID = -1546309280862711828L;
-	
+
 	private DatagramSocket socket;
 
 	public RemoteClient() {
-		
+
 		/**
-		 * trying to bind port 2013
-		 * we are checking if there is any other instance of our application running simultaneously
-		 * if there is one - we can not bind and exception will be thrown 
+		 * trying to bind port 2013 we are checking if there is any other
+		 * instance of our application running simultaneously if there is one -
+		 * we can not bind and exception will be thrown
 		 */
-        try {
-        	socket = new DatagramSocket(2013);
-        } catch (SocketException e){
-			JOptionPane.showMessageDialog(null, "Your application is already running", "Info", JOptionPane.INFORMATION_MESSAGE);
+		try {
+			socket = new DatagramSocket(2013);
+		} catch (SocketException e) {
+			JOptionPane.showMessageDialog(null,
+					"Your application is already running", "Info",
+					JOptionPane.INFORMATION_MESSAGE);
 			return;
 		}
-		
-        final JFrame f = new JFrame("Remote Client");
 
-        final GUI g = new GUI(f);
-        g.setOpaque(true);
+		final JFrame f = new JFrame("Remote Client");
 
-        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-        f.addWindowListener(new WindowAdapter() {
-            public void windowClosing(WindowEvent event) {
-            	try {
-        			RemoteClientAppContext.getMessageDao().close();
-        		} catch (DatabaseException e) {
-        			g.showException(e);
-        		}
-                // try{ g.onExit(); }
-                // catch( Exception e ) { e.printStackTrace(); }
-            }
-        });
+		final GUI g = new GUI(f);
+		g.setOpaque(true);
 
-        f.getContentPane().add(g);
+		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+		f.addWindowListener(new WindowAdapter() {
+			public void windowClosing(WindowEvent event) {
+				try {
+					RemoteClientAppContext.getMessageDao().close();
+				} catch (DatabaseException e) {
+					g.showException(e);
+				}
+				// try{ g.onExit(); }
+				// catch( Exception e ) { e.printStackTrace(); }
+			}
+		});
 
-        f.pack();
-        f.setVisible(true);
-    }
+		f.getContentPane().add(g);
 
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-    	try {
-    		// REVIEW [AW] to nie dzialalo Rafalowi pod linuxem a klient ma byc przeznaczony dla dowolnej platformy
-                UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+		f.pack();
+		f.setVisible(true);
+	}
+
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		try {
+			// REVIEW [AW] to nie dzialalo Rafalowi pod linuxem a klient ma byc
+			// przeznaczony dla dowolnej platformy
+			UIManager
+					.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
 		} catch (ClassNotFoundException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
@@ -104,30 +110,36 @@
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
-        JFrame.setDefaultLookAndFeelDecorated(true);
-        JDialog.setDefaultLookAndFeelDecorated(true);
-        javax.swing.SwingUtilities.invokeLater(new Runnable() {
-            public void run() {
-                new RemoteClient();
-            }
-        });
+		JFrame.setDefaultLookAndFeelDecorated(true);
+		JDialog.setDefaultLookAndFeelDecorated(true);
+		javax.swing.SwingUtilities.invokeLater(new Runnable() {
+			public void run() {
+				new RemoteClient();
+			}
+		});
 
-    }
+	}
 
-	public void windowOpened(WindowEvent e) {}
+	public void windowOpened(WindowEvent e) {
+	}
 
-	public void windowClosing(WindowEvent e) {}
+	public void windowClosing(WindowEvent e) {
+	}
 
 	public void windowClosed(WindowEvent e) {
 		socket.close();
 	}
 
-	public void windowIconified(WindowEvent e) {}
+	public void windowIconified(WindowEvent e) {
+	}
 
-	public void windowDeiconified(WindowEvent e) {}
+	public void windowDeiconified(WindowEvent e) {
+	}
 
-	public void windowActivated(WindowEvent e) {}
+	public void windowActivated(WindowEvent e) {
+	}
 
-	public void windowDeactivated(WindowEvent e) {}
+	public void windowDeactivated(WindowEvent e) {
+	}
 
 }
Modified: trunk/code/CSRemoteClient/src/org/commsuite/client/RemoteClientAppContext.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/client/RemoteClientAppContext.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/client/RemoteClientAppContext.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -27,31 +27,33 @@
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
+ * Application context for Remote Client
+ * 
  * @since 1.0
  * @author Agnieszka Wisniewska
  * @author Marek Musielak
  */
 public class RemoteClientAppContext {
 
-    private static ClassPathXmlApplicationContext appCtx;
+	private static ClassPathXmlApplicationContext appCtx;
 
-    static {
-        appCtx = new ClassPathXmlApplicationContext("remoteClientContext.xml");
-    }
+	static {
+		appCtx = new ClassPathXmlApplicationContext("remoteClientContext.xml");
+	}
 
-    protected RemoteClientAppContext() {
-    }
+	protected RemoteClientAppContext() {
+	}
 
-    public static IMessagingWSLocator getMessagingWS() {
-        return (IMessagingWSLocator) appCtx.getBean("messaging");
-    }
+	public static IMessagingWSLocator getMessagingWS() {
+		return (IMessagingWSLocator) appCtx.getBean("messaging");
+	}
 
-    public static RemoteClientMessageDao getMessageDao() {
-        return (RemoteClientMessageDao) appCtx.getBean("messageDao");
-    }
-    
-    public static MimetypesFileTypeMap getMimetypesMap() {
-    	return (MimetypesFileTypeMap) appCtx.getBean("mimetypeMap");
-    }
+	public static RemoteClientMessageDao getMessageDao() {
+		return (RemoteClientMessageDao) appCtx.getBean("messageDao");
+	}
 
+	public static MimetypesFileTypeMap getMimetypesMap() {
+		return (MimetypesFileTypeMap) appCtx.getBean("mimetypeMap");
+	}
+
 }
Modified: trunk/code/CSRemoteClient/src/org/commsuite/model/CSTupleBinding.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/model/CSTupleBinding.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/model/CSTupleBinding.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -27,24 +27,28 @@
 import com.sleepycat.bind.tuple.TupleOutput;
 
 /**
+ * Tuple Binding for Remote Client
+ * 
  * @since 1.0
  * @author Marek Musielak
  */
 public class CSTupleBinding extends TupleBinding {
-	
-	//	 Write a RemoteClientMessage object to a TupleOutput
+
+	/**
+	 * Write a RemoteClientMessage object to a TupleOutput
+	 */
 	public void objectToEntry(Object object, TupleOutput to) {
-        final RemoteClientMessage message = (RemoteClientMessage)object;
-		//	 Write the data to the TupleOutput (a DatabaseEntry).
-		//	 Order is important. The first data written will be
-		//	 the first bytes used by the default comparison routines.
+		final RemoteClientMessage message = (RemoteClientMessage) object;
+		// Write the data to the TupleOutput (a DatabaseEntry).
+		// Order is important. The first data written will be
+		// the first bytes used by the default comparison routines.
 		to.writeLong(message.getId());
 		to.writeLong(message.getSendDate());
 		to.writeInt(message.getMessageContent().length);
 		try {
 			to.write(message.getMessageContent());
 		} catch (IOException e) {
-            // REVIEW: [MM] is this correct exception handling ?
+			// REVIEW: [MM] is this correct exception handling ?
 			e.printStackTrace();
 		}
 		to.writeString(message.getMimeType());
@@ -56,19 +60,21 @@
 		to.writeString(message.getMessageServerId());
 		to.writeString(message.getFileName());
 	}
-	
-	//	 Convert a TupleInput to a RemoteClientMessage object
+
+	/**
+	 * Convert a TupleInput to a RemoteClientMessage object
+	 */
 	public Object entryToObject(TupleInput ti) {
-		//		 Data must be read in the same order that it was
-		//		 originally written.
+		// Data must be read in the same order that it was
+		// originally written.
 		final RemoteClientMessage message = new RemoteClientMessage();
 		message.setId(ti.readLong());
 		message.setSendDate(ti.readLong());
-        final byte [] file = new byte[ti.readInt()];
+		final byte[] file = new byte[ti.readInt()];
 		try {
 			ti.read(file);
 		} catch (IOException e) {
-            // REVIEW: [MM] is this correct exception handling ?
+			// REVIEW: [MM] is this correct exception handling ?
 			e.printStackTrace();
 		}
 		message.setMessageContent(file);
Modified: trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessage.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessage.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessage.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -28,6 +28,8 @@
 import org.apache.commons.lang.builder.ToStringBuilder;
 
 /**
+ * Format of RemoteClient message
+ * 
  * @since 1.0
  * @author Marek Musielak
  * @author Marcin Zduniak
Modified: trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessageDao.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessageDao.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessageDao.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -27,6 +27,8 @@
 import com.sleepycat.je.OperationStatus;
 
 /**
+ * Interface of dao to retreive RC messages from database
+ * 
  * @since 1.0
  * @author Marek Musielak
  */
Modified: trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessageDaoImpl.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessageDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/model/RemoteClientMessageDaoImpl.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -37,67 +37,92 @@
 import com.sleepycat.je.OperationStatus;
 
 /**
+ * maintenance communication with database containing RemoteClientMessages
+ * 
  * @since 1.0
  * @author Marek Musielak
  */
 public class RemoteClientMessageDaoImpl implements RemoteClientMessageDao {
 
-    private final Environment csDBEnvironment;
+	private final Environment csDBEnvironment;
 
-    private final DatabaseConfig dbConfig;
+	private final DatabaseConfig dbConfig;
 
-    private final Database csDB;
+	private final Database csDB;
 
-    private final TupleBinding csTupleBinding;
+	private final TupleBinding csTupleBinding;
 
-    public RemoteClientMessageDaoImpl() throws DatabaseException {
-        final EnvironmentConfig envConfig = new EnvironmentConfig();
-        envConfig.setAllowCreate(true);
-        // REVIEW: [MM] a co w przypadkach gdy takie property nic nie zwroci?
-        // Nie wiem czy to wogole mozliwe, ale na pewno warte zastanowienia
-        final File dbFile = new File(System.getProperty("user.home") + File.separator + "RemoteClientDB");
-        dbFile.mkdir();
-        csDBEnvironment = new Environment(dbFile, envConfig);
-        dbConfig = new DatabaseConfig();
-        dbConfig.setAllowCreate(true);
-        csDB = csDBEnvironment.openDatabase(null, System.getProperty("user.name"), dbConfig);
-        csTupleBinding = new CSTupleBinding();
-    }
+	public RemoteClientMessageDaoImpl() throws DatabaseException {
+		final EnvironmentConfig envConfig = new EnvironmentConfig();
+		envConfig.setAllowCreate(true);
+		// REVIEW: [MM] a co w przypadkach gdy takie property nic nie zwroci?
+		// Nie wiem czy to wogole mozliwe, ale na pewno warte zastanowienia
+		final File dbFile = new File(System.getProperty("user.home")
+				+ File.separator + "RemoteClientDB");
+		dbFile.mkdir();
+		csDBEnvironment = new Environment(dbFile, envConfig);
+		dbConfig = new DatabaseConfig();
+		dbConfig.setAllowCreate(true);
+		csDB = csDBEnvironment.openDatabase(null, System
+				.getProperty("user.name"), dbConfig);
+		csTupleBinding = new CSTupleBinding();
+	}
 
-    public void close() throws DatabaseException {
-        if (csDBEnvironment != null) {
-            csDBEnvironment.sync();
-            if (csDB != null) {
-                csDB.close();
-            }
-            csDBEnvironment.cleanLog();
-            csDBEnvironment.close();
-        }
-    }
+	public void close() throws DatabaseException {
+		if (csDBEnvironment != null) {
+			csDBEnvironment.sync();
+			if (csDB != null) {
+				csDB.close();
+			}
+			csDBEnvironment.cleanLog();
+			csDBEnvironment.close();
+		}
+	}
 
-    public List getRemoteClientMessages() throws DatabaseException, UnsupportedEncodingException {
-        Cursor csCursor = null;
-        final List resultList = new ArrayList();
-        try {
-            csCursor = csDB.openCursor(null, null);
-            final DatabaseEntry foundKey = new DatabaseEntry();
-            final DatabaseEntry foundData = new DatabaseEntry();
-            while (csCursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS) {
-                resultList.add((RemoteClientMessage) csTupleBinding.entryToObject(foundData));
-            }
-        } finally {
-            if (null != csCursor) {
-                csCursor.close();
-            }
-            csDBEnvironment.cleanLog();
-        }
-        return resultList;
-    }
+	/**
+	 * Lists all RemoteClientMessages
+	 * 
+	 * @throws DatabaseException
+	 *             when there is a problem while retreiving data from database
+	 * @throws UnsupportedEncodingException
+	 *             when data has unsupported encoding
+	 */
+	public List getRemoteClientMessages() throws DatabaseException,
+			UnsupportedEncodingException {
+		Cursor csCursor = null;
+		final List resultList = new ArrayList();
+		try {
+			csCursor = csDB.openCursor(null, null);
+			final DatabaseEntry foundKey = new DatabaseEntry();
+			final DatabaseEntry foundData = new DatabaseEntry();
+			while (csCursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS) {
+				resultList.add((RemoteClientMessage) csTupleBinding
+						.entryToObject(foundData));
+			}
+		} finally {
+			if (null != csCursor) {
+				csCursor.close();
+			}
+			csDBEnvironment.cleanLog();
+		}
+		return resultList;
+	}
 
-    public RemoteClientMessage saveOrUpdateRemoteClientMessage(RemoteClientMessage message)
-            throws DatabaseException, UnsupportedEncodingException {
-    	
-        Cursor csCursor = null;
+	/**
+	 * Saves or updates RemoteClientMessage
+	 * 
+	 * @param message
+	 *            message to be saved
+	 * @throws DatabaseException
+	 *             when occurs a problem while saving message
+	 * @throws UnsupportedEncodingException
+	 *             when data has unsupported encoding
+	 */
+	public RemoteClientMessage saveOrUpdateRemoteClientMessage(
+			RemoteClientMessage message) throws DatabaseException,
+			UnsupportedEncodingException {
+
+		Cursor csCursor = null;
 		try {
 			csCursor = csDB.openCursor(null, null);
 			final DatabaseEntry csValue = new DatabaseEntry();
@@ -121,17 +146,29 @@
 			if (null != csCursor) {
 				csCursor.close();
 			}
-            csDBEnvironment.cleanLog();
+			csDBEnvironment.cleanLog();
 		}
 		return message;
 	}
 
-    public OperationStatus deleteRemoteClientMessage(RemoteClientMessage message)
+	/**
+	 * deletes message from database
+	 * 
+	 * @param message
+	 *            to be deleted
+	 * @return OperationStatus of delete operation
+	 * 
+	 * @throws DatabaseException
+	 *             when there is a problem while deleting data
+	 * @throws UnsupportedEncodingException
+	 *             when data has unsupported encoding
+	 */
+	public OperationStatus deleteRemoteClientMessage(RemoteClientMessage message)
 			throws DatabaseException, UnsupportedEncodingException {
-    	
+
 		OperationStatus status;
 		Cursor csCursor = null;
-		
+
 		try {
 			csCursor = csDB.openCursor(null, null);
 			final DatabaseEntry key = new DatabaseEntry(Long.valueOf(
@@ -141,70 +178,132 @@
 			if (null != csCursor) {
 				csCursor.close();
 			}
-            csDBEnvironment.cleanLog();
+			csDBEnvironment.cleanLog();
 		}
 		return status;
 	}
 
-    public List getRemoteClientMessagesByUserLogin(String login)
-            throws UnsupportedEncodingException, DatabaseException {
-        final List result = new ArrayList();
-        final List list = this.getRemoteClientMessages();
-        for (int i = 0; i < list.size(); i++) {
-            if (login.equalsIgnoreCase(((RemoteClientMessage) list.get(i)).getUserLogin())) {
-                result.add(list.get(i));
-            }
-        }
-        return result;
-    }
+	/**
+	 * Lists all messages for user with given id
+	 * 
+	 * @param login
+	 *            login of user
+	 * @return list of messages for given user
+	 * 
+	 * @throws DatabaseException
+	 *             when there is a problem while retreiving data from database
+	 * @throws UnsupportedEncodingException
+	 *             when data has unsupported encoding
+	 */
+	public List getRemoteClientMessagesByUserLogin(String login)
+			throws UnsupportedEncodingException, DatabaseException {
+		final List result = new ArrayList();
+		final List list = this.getRemoteClientMessages();
+		for (int i = 0; i < list.size(); i++) {
+			if (login.equalsIgnoreCase(((RemoteClientMessage) list.get(i))
+					.getUserLogin())) {
+				result.add(list.get(i));
+			}
+		}
+		return result;
+	}
 
-    public List getRemoteClientMessagesByServerAddress(String serverAddress)
-            throws UnsupportedEncodingException, DatabaseException {
-        final List result = new ArrayList();
-        final List list = this.getRemoteClientMessages();
-        for (int i = 0; i < list.size(); i++) {
-            if (serverAddress.equalsIgnoreCase(((RemoteClientMessage) list.get(i))
-                    .getServerAddress())) {
-                result.add(list.get(i));
-            }
-        }
-        return result;
-    }
+	/**
+	 * Lists all messages for server with given address
+	 * 
+	 * @param serverAddress
+	 *            adress of server
+	 * @return list of messages for given server
+	 * 
+	 * @throws DatabaseException
+	 *             when there is a problem while retreiving data from database
+	 * @throws UnsupportedEncodingException
+	 *             when data has unsupported encoding
+	 */
+	public List getRemoteClientMessagesByServerAddress(String serverAddress)
+			throws UnsupportedEncodingException, DatabaseException {
+		final List result = new ArrayList();
+		final List list = this.getRemoteClientMessages();
+		for (int i = 0; i < list.size(); i++) {
+			if (serverAddress.equalsIgnoreCase(((RemoteClientMessage) list
+					.get(i)).getServerAddress())) {
+				result.add(list.get(i));
+			}
+		}
+		return result;
+	}
 
-    public List getRemoteClientMessagesByReceiverAddress(String receiverAddress)
-            throws UnsupportedEncodingException, DatabaseException {
-        final List result = new ArrayList();
-        final List list = this.getRemoteClientMessages();
-        for (int i = 0; i < list.size(); i++) {
-            if (receiverAddress.equalsIgnoreCase(((RemoteClientMessage) list.get(i))
-                    .getReceiverAddress())) {
-                result.add(list.get(i));
-            }
-        }
-        return result;
-    }
+	/**
+	 * Lists all messages for receiver with given address
+	 * 
+	 * @param receiverAddress
+	 *            address of recevier
+	 * @return list of messages for given receiver
+	 * 
+	 * @throws DatabaseException
+	 *             when there is a problem while retreiving data from database
+	 * @throws UnsupportedEncodingException
+	 *             when data has unsupported encoding
+	 */
+	public List getRemoteClientMessagesByReceiverAddress(String receiverAddress)
+			throws UnsupportedEncodingException, DatabaseException {
+		final List result = new ArrayList();
+		final List list = this.getRemoteClientMessages();
+		for (int i = 0; i < list.size(); i++) {
+			if (receiverAddress.equalsIgnoreCase(((RemoteClientMessage) list
+					.get(i)).getReceiverAddress())) {
+				result.add(list.get(i));
+			}
+		}
+		return result;
+	}
 
-    public List getRemoteClientMessagesByMimeType(String mimeType)
-            throws UnsupportedEncodingException, DatabaseException {
-        final List result = new ArrayList();
-        final List list = this.getRemoteClientMessages();
-        for (int i = 0; i < list.size(); i++) {
-            if (mimeType.equalsIgnoreCase(((RemoteClientMessage) list.get(i)).getMimeType())) {
-                result.add(list.get(i));
-            }
-        }
-        return result;
-    }
+	/**
+	 * Lists all messages for user with given mimetype
+	 * 
+	 * @param mimeType
+	 *            mimetype of messages
+	 * @return list of messages with given mimetype
+	 * 
+	 * @throws DatabaseException
+	 *             when there is a problem while retreiving data from database
+	 * @throws UnsupportedEncodingException
+	 *             when data has unsupported encoding
+	 */
+	public List getRemoteClientMessagesByMimeType(String mimeType)
+			throws UnsupportedEncodingException, DatabaseException {
+		final List result = new ArrayList();
+		final List list = this.getRemoteClientMessages();
+		for (int i = 0; i < list.size(); i++) {
+			if (mimeType.equalsIgnoreCase(((RemoteClientMessage) list.get(i))
+					.getMimeType())) {
+				result.add(list.get(i));
+			}
+		}
+		return result;
+	}
 
-    public List getRemoteClientMessagesByState(int state) throws UnsupportedEncodingException,
-            DatabaseException {
-        final List result = new ArrayList();
-        final List list = this.getRemoteClientMessages();
-        for (int i = 0; i < list.size(); i++) {
-            if (state == ((RemoteClientMessage) list.get(i)).getState()) {
-                result.add(list.get(i));
-            }
-        }
-        return result;
-    }
+	/**
+	 * Lists all messages for with given state
+	 * 
+	 * @param state
+	 *            state of messages
+	 * @return list of messages with given state
+	 * 
+	 * @throws DatabaseException
+	 *             when there is a problem while retreiving data from database
+	 * @throws UnsupportedEncodingException
+	 *             when data has unsupported encoding
+	 */
+	public List getRemoteClientMessagesByState(int state)
+			throws UnsupportedEncodingException, DatabaseException {
+		final List result = new ArrayList();
+		final List list = this.getRemoteClientMessages();
+		for (int i = 0; i < list.size(); i++) {
+			if (state == ((RemoteClientMessage) list.get(i)).getState()) {
+				result.add(list.get(i));
+			}
+		}
+		return result;
+	}
 }
Modified: trunk/code/CSRemoteClient/src/org/commsuite/utils/CommunicateUtil.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/utils/CommunicateUtil.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/utils/CommunicateUtil.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -43,6 +43,18 @@
 	private static final Logger logger = Logger
 			.getLogger(CommunicateUtil.class);
 
+	/**
+	 * Sends message to webservice
+	 * 
+	 * @param rcMessage
+	 *            message to be sent
+	 * @param format
+	 *            format of the message
+	 * @return status of sending message
+	 * 
+	 * @throws Throwable
+	 *             when problem occurs while sending message
+	 */
 	public static String sendMessage(RemoteClientMessage rcMessage,
 			FormatType format) throws Throwable {
 
@@ -70,8 +82,18 @@
 		}
 	}
 
-	public static RemoteClientMessage getMessageStatus(RemoteClientMessage rcMessage)
-			throws Throwable {
+	/**
+	 * Check status of given message
+	 * 
+	 * @param rcMessage
+	 *            message to be checked
+	 * @return checked message
+	 * 
+	 * @throws Throwable
+	 *             when problem while checking state happened
+	 */
+	public static RemoteClientMessage getMessageStatus(
+			RemoteClientMessage rcMessage) throws Throwable {
 		final IMessagingWSLocator locator = RemoteClientAppContext
 				.getMessagingWS();
 		int lastState = rcMessage.getState();
@@ -92,14 +114,24 @@
 				rcMessage.setState(RemoteClientMessage.RCM_SENT);
 			}
 			if (lastState != rcMessage.getState()) {
-				RemoteClientAppContext.getMessageDao().saveOrUpdateRemoteClientMessage(rcMessage);
+				RemoteClientAppContext.getMessageDao()
+						.saveOrUpdateRemoteClientMessage(rcMessage);
 			}
 			return rcMessage;
 		}
 	}
 
-	public static List getMessagesStatus(List messages)
-			throws Throwable {
+	/**
+	 * Check status of all messages from the list. Deprecated. Use
+	 * getMessageStatus( RemoteClientMessage rcMessage) instead
+	 * 
+	 * @param messages
+	 *            message to be checked
+	 * @return list of updated messages
+	 * @throws Throwable
+	 *             when problem while checking state happened
+	 */
+	public static List getMessagesStatus(List messages) throws Throwable {
 
 		if (messages == null)
 			return new ArrayList();
@@ -133,11 +165,13 @@
 					}
 				}
 				if (lastState != message.getState()) {
-					RemoteClientAppContext.getMessageDao().saveOrUpdateRemoteClientMessage(message);
+					RemoteClientAppContext.getMessageDao()
+							.saveOrUpdateRemoteClientMessage(message);
 				}
 			} catch (Throwable t) {
 				message.setState(RemoteClientMessage.RCM_UNKNOWN_STATE);
-				logger.info("error while checking state of message: " + message + "\r\n" + t);
+				logger.info("error while checking state of message: " + message
+						+ "\r\n" + t);
 			}
 
 		}
Modified: trunk/code/CSRemoteClient/src/org/commsuite/utils/MessageSavingUtil.java
===================================================================
--- trunk/code/CSRemoteClient/src/org/commsuite/utils/MessageSavingUtil.java	2006-09-03 09:38:59 UTC (rev 125)
+++ trunk/code/CSRemoteClient/src/org/commsuite/utils/MessageSavingUtil.java	2006-09-03 14:59:02 UTC (rev 126)
@@ -26,6 +26,8 @@
 import org.commsuite.model.RemoteClientMessage;
 
 /**
+ * util class to communcation with database
+ * 
  * @since 1.0
  * @author Marek Musielak
  */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-03 09:40:04
      
     | 
| Revision: 125
          http://svn.sourceforge.net/comsuite/?rev=125&view=rev
Author:   marasm
Date:     2006-09-03 02:38:59 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
javadocs added
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/ActionDaoImpl.java
    trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/ContentsDaoImpl.java
    trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/GroupDaoImpl.java
    trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/MessageDaoImpl.java
    trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/RoleDaoImpl.java
    trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java
    trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SentContentDaoImpl.java
    trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/UserDaoImpl.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/ActionDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/ActionDaoImpl.java	2006-09-03 09:38:37 UTC (rev 124)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/ActionDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
@@ -27,88 +27,111 @@
 import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
 
 /**
- * Class to communicate with database - gets and saves actions. Uses hibernate
+ * Class to communicate with database - gets and saves Actions. Uses hibernate
  * 
  * @since 1.0
  * @author Marek Musielak
  */
 public class ActionDaoImpl extends HibernateDaoSupport implements ActionDao {
-	
+
 	public ActionDaoImpl() {
 		super();
 	}
 
 	/**
+	 * Lists all Actions
+	 * 
 	 * @return list of all actions
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Action> getActions() {
-		final List<Action> actionsList = getHibernateTemplate().loadAll(Action.class);
+		final List<Action> actionsList = getHibernateTemplate().loadAll(
+				Action.class);
 		return actionsList;
 	}
 
 	/**
 	 * Saves or updates action in database
 	 * 
-	 * @param action - action to save in db
+	 * @param action -
+	 *            action to save in db
 	 * @return saved action
 	 */
 	public Action saveAction(Action action) {
 		getHibernateTemplate().saveOrUpdate(action);
 		return action;
 	}
-	
+
 	/**
-	 * @param id of action
-	 * @return action with specified id
+	 * return Action with specified id
+	 * 
+	 * @param id
+	 *            of action
+	 * @return action with specified id or null if action with given id does not
+	 *         exist
 	 */
 	public Action getAction(Long id) {
-		final List list = getHibernateTemplate().find("from Action a where a.id = ?", id);
+		final List list = getHibernateTemplate().find(
+				"from Action a where a.id = ?", id);
 		return (Action) (list.size() > 0 ? list.get(0) : null);
 	}
 
 	/**
 	 * Deletes action with specified id from database.
-	 * @param id of action
+	 * 
+	 * @param id
+	 *            of action
 	 */
 	public void deleteAction(Long id) {
-		final List list = getHibernateTemplate().find("from Action a where a.id = ?", id);
-		if (list.size() > 0){
-			Object action = (Action)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from Action a where a.id = ?", id);
+		if (list.size() > 0) {
+			Object action = (Action) list.get(0);
 			getHibernateTemplate().delete(action);
 		}
 	}
 
 	/**
 	 * deletes specified action
-	 * @param action to delete
+	 * 
+	 * @param action
+	 *            to delete
 	 */
 	public void deleteAction(Action action) {
-		final List list = getHibernateTemplate().find("from Action a where a.id = ?", action.getId());
-		if (list.size() > 0){
-			Object actionToDelete = (Action)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from Action a where a.id = ?", action.getId());
+		if (list.size() > 0) {
+			Object actionToDelete = (Action) list.get(0);
 			getHibernateTemplate().delete(actionToDelete);
 		}
 	}
 
 	/**
-	 * @param id - id of Role
+	 * lists all Actions for Role with given id
+	 * 
+	 * @param id -
+	 *            id of Role
 	 * @return list of actions for Role with given id
 	 */
 	@SuppressWarnings("unchecked")
-	public List<Action> getActionsByRole(String id){
+	public List<Action> getActionsByRole(String id) {
 		String query = "select action from Action action join action.roles role where role.id = ?";
-		List<Action> result = getHibernateTemplate().find(query, Long.valueOf(id));
+		List<Action> result = getHibernateTemplate().find(query,
+				Long.valueOf(id));
 		return result;
 	}
 
 	/**
-	 * @param name - name of actions
+	 * lists Actions with given name
+	 * 
+	 * @param name -
+	 *            name of actions
 	 * @return list of actions with specified name
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Action> getActions(String name) {
-		final List list = getHibernateTemplate().find("select a from Action a where a.name like '%"+ name+ "%'");
+		final List list = getHibernateTemplate().find(
+				"select a from Action a where a.name like '%" + name + "%'");
 		return list;
 	}
 
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/ContentsDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/ContentsDaoImpl.java	2006-09-03 09:38:37 UTC (rev 124)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/ContentsDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
@@ -27,7 +27,7 @@
 import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
 
 /**
- * Class to communicate with database - gets and saves actions. Uses hibernate
+ * Class to communicate with database - gets and saves Contents. Uses hibernate
  * 
  * @since 1.0
  * @author Marek Musielak
@@ -39,18 +39,22 @@
 	}
 
 	/**
+	 * lists all Contents
+	 * 
 	 * @return list of all contents
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Contents> getContentsList() {
-		final List<Contents> contentsList = getHibernateTemplate().loadAll(Contents.class);
+		final List<Contents> contentsList = getHibernateTemplate().loadAll(
+				Contents.class);
 		return contentsList;
 	}
 
 	/**
 	 * Saves or updates contents in database
 	 * 
-	 * @param contents - contents to save in db
+	 * @param contents -
+	 *            contents to save in db
 	 * @return saved contents
 	 */
 	public Contents saveContents(Contents contents) {
@@ -59,56 +63,73 @@
 	}
 
 	/**
-	 * @param id of Contents
-	 * @return Contents with specified id
+	 * get Contents with specified id from database
+	 * 
+	 * @param id
+	 *            of Contents
+	 * @return Contents with specified id or null if Contents with given id does
+	 *         not exist
 	 */
 	public Contents getContents(Long id) {
-		final List list = getHibernateTemplate().find("from Contents c where c.id = ?", id);
+		final List list = getHibernateTemplate().find(
+				"from Contents c where c.id = ?", id);
 		return (Contents) (list.size() > 0 ? list.get(0) : null);
 	}
 
 	/**
 	 * Deletes contents with specified id from database.
-	 * @param id of contents
+	 * 
+	 * @param id
+	 *            of contents
 	 */
 	public void deleteContents(Long id) {
-		final List list = getHibernateTemplate().find("from Contents c where c.id = ?", id);
-		if (list.size() > 0){
-			Object contents = (Contents)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from Contents c where c.id = ?", id);
+		if (list.size() > 0) {
+			Object contents = (Contents) list.get(0);
 			getHibernateTemplate().delete(contents);
 		}
 	}
 
 	/**
 	 * deletes specified contents
-	 * @param contents to delete
+	 * 
+	 * @param contents
+	 *            to delete
 	 */
 	public void deleteContents(Contents contents) {
-		final List list = getHibernateTemplate().find("from Contents c where c.id = ?", contents.getId());
-		if (list.size() > 0){
-			Object contentsToDelete = (Contents)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from Contents c where c.id = ?", contents.getId());
+		if (list.size() > 0) {
+			Object contentsToDelete = (Contents) list.get(0);
 			getHibernateTemplate().delete(contentsToDelete);
 		}
 	}
-    
+
 	/**
-	 * @param id - id of message
+	 * lists Contents for Message with given id
+	 * 
+	 * @param id -
+	 *            id of message
 	 * @return list of contents for Message with given id
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Contents> getContentsByMessage(String id) {
-    	String query = "select s.content from SentContent s where s.message.id = ? order by s.id";
-    	return getHibernateTemplate().find(query, Long.valueOf(id));
-    }
-    
+		String query = "select s.content from SentContent s where s.message.id = ? order by s.id";
+		return getHibernateTemplate().find(query, Long.valueOf(id));
+	}
+
 	/**
-	 * @param id - id of SentContent
+	 * lists all Contents for SentContent with given id
+	 * 
+	 * @param id -
+	 *            id of SentContent
 	 * @return list of contents for SentContent with given id
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Contents> getContentsBySentContent(String id) {
-    	String query = "select s.content from SentContent s where s.id = ? order by s.id";
-    	return getHibernateTemplate().find(query, Long.valueOf(id));
-    }
-    
+		String query = "select s.content from SentContent s where s.id = ? order by s.id";
+		return getHibernateTemplate().find(query, Long.valueOf(id));
+	}
+
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/GroupDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/GroupDaoImpl.java	2006-09-03 09:38:37 UTC (rev 124)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/GroupDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
@@ -1,23 +1,23 @@
- /* $Id$ 	 
-  * 	 
-  * Communications Suite. 	 
-  * Copyright (C) 2006 Szymon Kuzniak, Rafal Malinowski, Marek Musielak, Pawel Walkiewicz, 	 
-  * Agnieszka Wisniewska, Marcin Zduniak, Liliana Ziolek. 	 
-  * 	 
-  * This program is free software; you can redistribute it and/or 	 
-  * modify it under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> 	 
-  * as published by the Free Software Foundation; either version 2 	 
-  * of the License, or (at your option) any later version. 	 
-  * 	 
-  * This program 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 General Public License for more details. 	 
-  * 	 
-  * You should have received a copy of the GNU General Public License 	 
-  * along with this program; if not, write to the Free Software 	 
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 	 
-  */
+/* $Id$ 	 
+ * 	 
+ * Communications Suite. 	 
+ * Copyright (C) 2006 Szymon Kuzniak, Rafal Malinowski, Marek Musielak, Pawel Walkiewicz, 	 
+ * Agnieszka Wisniewska, Marcin Zduniak, Liliana Ziolek. 	 
+ * 	 
+ * This program is free software; you can redistribute it and/or 	 
+ * modify it under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> 	 
+ * as published by the Free Software Foundation; either version 2 	 
+ * of the License, or (at your option) any later version. 	 
+ * 	 
+ * This program 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 General Public License for more details. 	 
+ * 	 
+ * You should have received a copy of the GNU General Public License 	 
+ * along with this program; if not, write to the Free Software 	 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 	 
+ */
 package org.commsuite.dao.hibernate;
 
 import java.util.List;
@@ -36,7 +36,7 @@
  * @author Szymon Kuzniak
  */
 public class GroupDaoImpl extends HibernateDaoSupport implements GroupDao {
-	
+
 	private static final Logger logger = Logger.getLogger(GroupDaoImpl.class);
 
 	public GroupDaoImpl() {
@@ -44,77 +44,98 @@
 	}
 
 	/**
+	 * lists all Groups from database
+	 * 
 	 * @return list of all groups
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Group> getGroups() {
-		final List<Group> groupsList = getHibernateTemplate().loadAll(Group.class);
+		final List<Group> groupsList = getHibernateTemplate().loadAll(
+				Group.class);
 		return groupsList;
 	}
 
 	/**
 	 * Saves or updates group in database
 	 * 
-	 * @param group - group to save in db
+	 * @param group -
+	 *            group to save in db
 	 * @return saved group
 	 */
 	public Group saveGroup(Group group) {
-		logger.debug("ROLES BEFORE SAVE: "+ group.getRoles());
+		logger.debug("ROLES BEFORE SAVE: " + group.getRoles());
 		getHibernateTemplate().saveOrUpdate(group);
-		logger.debug("ROLES AFTER SAVE: "+ group.getRoles());
+		logger.debug("ROLES AFTER SAVE: " + group.getRoles());
 		return group;
 	}
 
 	/**
-	 * @param id of group
-	 * @return group with specified id
+	 * @param id
+	 *            of group
+	 * @return group with specified id or null if Group with given id does not
+	 *         exist
 	 */
 	public Group getGroup(Long id) {
-		final List list = getHibernateTemplate().find("from Group g where g.id = ?", id);
+		final List list = getHibernateTemplate().find(
+				"from Group g where g.id = ?", id);
 		return (Group) (list.size() > 0 ? list.get(0) : null);
 	}
 
 	/**
 	 * Deletes group with specified id from database.
-	 * @param id of group
+	 * 
+	 * @param id
+	 *            of group
 	 */
 	public void deleteGroup(Long id) {
-		final List list = getHibernateTemplate().find("from Group g where g.id = ?", id);
-		if (list.size() > 0){
-			Object group = (Group)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from Group g where g.id = ?", id);
+		if (list.size() > 0) {
+			Object group = (Group) list.get(0);
 			getHibernateTemplate().delete(group);
 		}
 	}
 
 	/**
 	 * deletes specified group
-	 * @param group to delete
+	 * 
+	 * @param group
+	 *            to delete
 	 */
 	public void deleteGroup(Group group) {
-		final List list = getHibernateTemplate().find("from Group g where g.id = ?", group.getId());
-		if (list.size() > 0){
-			Object groupToDelete = (Group)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from Group g where g.id = ?", group.getId());
+		if (list.size() > 0) {
+			Object groupToDelete = (Group) list.get(0);
 			getHibernateTemplate().delete(groupToDelete);
 		}
 	}
 
 	/**
-	 * @param name - name of groups
+	 * lists all Groups with given name
+	 * 
+	 * @param name -
+	 *            name of groups
 	 * @return list of groups with specified name
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Group> getGroups(String name) {
-		final List list = getHibernateTemplate().find("select g from Group g where g.name like '%"+ name+ "%'");
+		final List list = getHibernateTemplate().find(
+				"select g from Group g where g.name like '%" + name + "%'");
 		return list;
 	}
-    
+
 	/**
-	 * @param id - id of group
-	 * @return list of roles directly attached to group with given id
+	 * lists all Groups directly attached to given user
+	 * 
+	 * @param id -
+	 *            id of group
+	 * @return list of groups directly attached to user with given id
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Group> getGroupsDirectlyAttachedToUser(Long userId) {
-		return (List<Group>)getHibernateTemplate().find("select g from User u join u.groups g where u.id = ?", userId);
+		return (List<Group>) getHibernateTemplate().find(
+				"select g from User u join u.groups g where u.id = ?", userId);
 	}
-    
+
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/MessageDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/MessageDaoImpl.java	2006-09-03 09:38:37 UTC (rev 124)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/MessageDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
@@ -41,160 +41,197 @@
  */
 public class MessageDaoImpl extends HibernateDaoSupport implements MessageDao {
 
-    private final static Logger logger = Logger.getLogger(MessageDaoImpl.class);
+	private final static Logger logger = Logger.getLogger(MessageDaoImpl.class);
 
-    public MessageDaoImpl() {
-        super();
-    }
+	public MessageDaoImpl() {
+		super();
+	}
 
 	/**
+	 * lists all Messages from database
+	 * 
 	 * @return list of all messages
 	 */
-    @SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked")
 	public List<Message> getMessages() {
-        final List<Message> messagesList = getHibernateTemplate().loadAll(Message.class);
+		final List<Message> messagesList = getHibernateTemplate().loadAll(
+				Message.class);
 		return messagesList;
-    }
+	}
 
 	/**
 	 * Saves or updates message in database
 	 * 
-	 * @param message - message to save in db
+	 * @param message -
+	 *            message to save in db
 	 * @return saved message
 	 */
-    public Message saveMessage(Message message) {
- 		for (SentContent sc : message.getSentContents()) {
+	public Message saveMessage(Message message) {
+		for (SentContent sc : message.getSentContents()) {
 			getHibernateTemplate().saveOrUpdate(sc.getContent());
 			getHibernateTemplate().saveOrUpdate(sc.getMessage());
 			getHibernateTemplate().saveOrUpdate(sc);
 		}
 
-        return message;
-    }
+		return message;
+	}
 
 	/**
-	 * @param id of message
-	 * @return message with specifies id
+	 * get message with specified id
+	 * 
+	 * @param id
+	 *            of message
+	 * @return message with specifies id or null if Message with given id does
+	 *         not exist
 	 */
-    @SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked")
 	public Message getMessage(Long id) {
-        final List<Message> list = getHibernateTemplate().find("from Message m where m.id = ?", id);
-        return (list.size() > 0 ? list.get(0) : (Message) null);
-    }
+		final List<Message> list = getHibernateTemplate().find(
+				"from Message m where m.id = ?", id);
+		return (list.size() > 0 ? list.get(0) : (Message) null);
+	}
 
 	/**
-	 * Deletes message with specified id from database. It deletes also all sentContents of this message 
-	 * and Contents (if there are not used anymore)
+	 * Deletes message with specified id from database. It deletes also all
+	 * sentContents of this message and Contents (if there are not used anymore)
 	 * 
-	 * @param id of message
+	 * @param id
+	 *            of message
 	 */
-   @SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked")
 	public void deleteMessage(Long id) {
-        final List<Message> list = getHibernateTemplate().find("from Message m where m.id = ?", id);
-        for (Message message : list) {
-        	final List<Contents> contentsList = message.listContents();
-        	
-        	for (SentContent sentContent : message.getSentContents()) {
-        		sentContent.getContent().removeSentContentByInternalId(sentContent.getInternalId());
+		final List<Message> list = getHibernateTemplate().find(
+				"from Message m where m.id = ?", id);
+		for (Message message : list) {
+			final List<Contents> contentsList = message.listContents();
+
+			for (SentContent sentContent : message.getSentContents()) {
+				sentContent.getContent().removeSentContentByInternalId(
+						sentContent.getInternalId());
 				getHibernateTemplate().delete(sentContent);
 			}
-        	
-            for (Contents contents : contentsList) {
-				if (0 == contents.getSentContents().size()){
+
+			for (Contents contents : contentsList) {
+				if (0 == contents.getSentContents().size()) {
 					getHibernateTemplate().delete(contents);
 				}
 			}
-            
-        	getHibernateTemplate().delete(message);
+
+			getHibernateTemplate().delete(message);
 		}
-    }
+	}
 
 	/**
 	 * deletes specified message
-	 * @param message to delete
+	 * 
+	 * @param message
+	 *            to delete
 	 */
-    public void deleteMessage(Message message) {
-        deleteMessage(message.getId());
-    }
+	public void deleteMessage(Message message) {
+		deleteMessage(message.getId());
+	}
 
 	/**
-	 * @param sapID - id given to message by sap server
-	 * @param sapInstanceDef - sap server (owner of message)
-	 * @return message with specified sapID and specified sapInstaceDef
+	 * get Message with specified sapId and sapInstanceDef
+	 * 
+	 * @param sapID -
+	 *            id given to message by sap server
+	 * @param sapInstanceDef -
+	 *            sap server (owner of message)
+	 * @return message with specified sapID and specified sapInstaceDef or null
+	 *         if there is not appropriate Message in database
 	 */
-    @SuppressWarnings("unchecked")
-	public Message getMessageBySapIdAndSAPInstanceDef(String sapID, SAPInstanceDef sapInstanceDef) {
-        final List<Message> messages = getHibernateTemplate().find(
-                "from Message m where m.sapID = ? and m.sapInstanceDefOwner = ?",
-                new Object[] { sapID, sapInstanceDef });
-        if (messages.size() == 1) {
-            return messages.get(0);
-        }
-        if (messages.size() > 1) {
-            // REVIEW: strange situation, we have more than one message with identical sapID
-            // associated with thesame SAP server instance.
-            logger.warn("More than one message with identical sapID (" + sapID
-                    + ") associated with thesame SAP server instance: " + sapInstanceDef);
-            return messages.get(0);
-        } else {
-            return null;
-        }
-    } 
+	@SuppressWarnings("unchecked")
+	public Message getMessageBySapIdAndSAPInstanceDef(String sapID,
+			SAPInstanceDef sapInstanceDef) {
+		final List<Message> messages = getHibernateTemplate()
+				.find(
+						"from Message m where m.sapID = ? and m.sapInstanceDefOwner = ?",
+						new Object[] { sapID, sapInstanceDef });
+		if (messages.size() == 1) {
+			return messages.get(0);
+		}
+		if (messages.size() > 1) {
+			// REVIEW: strange situation, we have more than one message with
+			// identical sapID
+			// associated with thesame SAP server instance.
+			logger.warn("More than one message with identical sapID (" + sapID
+					+ ") associated with thesame SAP server instance: "
+					+ sapInstanceDef);
+			return messages.get(0);
+		} else {
+			return null;
+		}
+	}
 
 	/**
-	 * @param id - id of SentContent
+	 * get Message - owner of specified SentContent
+	 * 
+	 * @param id -
+	 *            id of SentContent
 	 * @return message - owner of specified sentContent
 	 */
 	@SuppressWarnings("unchecked")
 	public Message getMessageBySentContentId(Long scId) {
-		return (Message)getHibernateTemplate().find("select m from SentContent s join s.message m where s.id = ?", scId).get(0);
+		return (Message) getHibernateTemplate().find(
+				"select m from SentContent s join s.message m where s.id = ?",
+				scId).get(0);
 	}
-	
+
 	@SuppressWarnings("unchecked")
 	public List<Message> getSelectedMessges(SearchMessageModel message) {
-		logger.debug("MESSAGE: "+ message);
-		String query = "select m from Message m" +
-			" where m.description like '%" +message.getDescription()+ "%'"+
-			(message.getReceiver().trim().length() != 0 ? " and m.receiver like '%" +message.getReceiver()+ "%'" : "")+
-			(message.getSapID().trim().length() != 0 ? " and m.sapId like '%" +message.getSapID()+ "%'" : "")+
-			(message.getSender().trim().length() != 0 ? " and m.sender like '%" +message.getSender()+ "%'" : "")+
-		//	this.createDateConstraints(message)+
-			this.createComboConstraints(message);
-		logger.debug("QUERY: "+ query);
+		logger.debug("MESSAGE: " + message);
+		String query = "select m from Message m"
+				+ " where m.description like '%"
+				+ message.getDescription()
+				+ "%'"
+				+ (message.getReceiver().trim().length() != 0 ? " and m.receiver like '%"
+						+ message.getReceiver() + "%'"
+						: "")
+				+ (message.getSapID().trim().length() != 0 ? " and m.sapId like '%"
+						+ message.getSapID() + "%'"
+						: "")
+				+ (message.getSender().trim().length() != 0 ? " and m.sender like '%"
+						+ message.getSender() + "%'"
+						: "") +
+				// this.createDateConstraints(message)+
+				this.createComboConstraints(message);
+		logger.debug("QUERY: " + query);
 		final List list = getHibernateTemplate().find(query);
 		return list;
 	}
-	
+
 	private String createComboConstraints(SearchMessageModel message) {
 		StringBuffer str = new StringBuffer();
 		if (null != message.getDirection()) {
-			str.append(" and m.direction = "+ message.getDirection().ordinal());
+			str
+					.append(" and m.direction = "
+							+ message.getDirection().ordinal());
 		}
 		if (null != message.getFormatType()) {
-			str.append(" and m.formatType = "+ message.getFormatType().ordinal());
+			str.append(" and m.formatType = "
+					+ message.getFormatType().ordinal());
 		}
 		if (null != message.getPriority()) {
-			str.append(" and m.priority = "+ message.getPriority().ordinal());
+			str.append(" and m.priority = " + message.getPriority().ordinal());
 		}
 		if (null != message.getStatus()) {
-			str.append(" and m.status = "+ message.getStatus().ordinal());
+			str.append(" and m.status = " + message.getStatus().ordinal());
 		}
-		
+
 		return str.toString();
 	}
-	
-/*	private String createDateConstraints(SearchMessageModel message) {
-		
-		StringBuffer str = new StringBuffer();
-		if (null != message.getSendDateFrom()){
-		//	logger.debug("DATE FROM: "+ new Timestamp(message.getSendDateFrom().getTime()));
-			str.append(" and m.sendDate >= "+ message.getSendDateFrom()); 
-		}
-		if (null != message.getSendDateTo()) {
-		//	logger.debug("DATE TO: "+ new Timestamp(message.getSendDateTo().getTime()));
-			str.append(" and m.sendDate <= "+ message.getSendDateTo());
-		}
-		return str.toString();
-	}*/
 
+	/*
+	 * private String createDateConstraints(SearchMessageModel message) {
+	 * 
+	 * StringBuffer str = new StringBuffer(); if (null !=
+	 * message.getSendDateFrom()){ // logger.debug("DATE FROM: "+ new
+	 * Timestamp(message.getSendDateFrom().getTime())); str.append(" and
+	 * m.sendDate >= "+ message.getSendDateFrom()); } if (null !=
+	 * message.getSendDateTo()) { // logger.debug("DATE TO: "+ new
+	 * Timestamp(message.getSendDateTo().getTime())); str.append(" and
+	 * m.sendDate <= "+ message.getSendDateTo()); } return str.toString(); }
+	 */
+
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/RoleDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/RoleDaoImpl.java	2006-09-03 09:38:37 UTC (rev 124)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/RoleDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
@@ -1,23 +1,23 @@
- /* $Id$ 	 
-  * 	 
-  * Communications Suite. 	 
-  * Copyright (C) 2006 Szymon Kuzniak, Rafal Malinowski, Marek Musielak, Pawel Walkiewicz, 	 
-  * Agnieszka Wisniewska, Marcin Zduniak, Liliana Ziolek. 	 
-  * 	 
-  * This program is free software; you can redistribute it and/or 	 
-  * modify it under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> 	 
-  * as published by the Free Software Foundation; either version 2 	 
-  * of the License, or (at your option) any later version. 	 
-  * 	 
-  * This program 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 General Public License for more details. 	 
-  * 	 
-  * You should have received a copy of the GNU General Public License 	 
-  * along with this program; if not, write to the Free Software 	 
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 	 
-  */
+/* $Id$ 	 
+ * 	 
+ * Communications Suite. 	 
+ * Copyright (C) 2006 Szymon Kuzniak, Rafal Malinowski, Marek Musielak, Pawel Walkiewicz, 	 
+ * Agnieszka Wisniewska, Marcin Zduniak, Liliana Ziolek. 	 
+ * 	 
+ * This program is free software; you can redistribute it and/or 	 
+ * modify it under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> 	 
+ * as published by the Free Software Foundation; either version 2 	 
+ * of the License, or (at your option) any later version. 	 
+ * 	 
+ * This program 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 General Public License for more details. 	 
+ * 	 
+ * You should have received a copy of the GNU General Public License 	 
+ * along with this program; if not, write to the Free Software 	 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 	 
+ */
 package org.commsuite.dao.hibernate;
 
 import java.util.List;
@@ -42,6 +42,8 @@
 	}
 
 	/**
+	 * lists all Roles from database
+	 * 
 	 * @return list of all roles
 	 */
 	@SuppressWarnings("unchecked")
@@ -53,7 +55,8 @@
 	/**
 	 * Saves or updates role in database
 	 * 
-	 * @param role - role to save in db
+	 * @param role -
+	 *            role to save in db
 	 * @return saved role
 	 */
 	public Role saveRole(Role role) {
@@ -63,64 +66,87 @@
 	}
 
 	/**
-	 * @param id of role
-	 * @return role with specified id
+	 * get Role with specified id
+	 * 
+	 * @param id
+	 *            of role
+	 * @return role with specified id or null if Role with given id does not
+	 *         exist
 	 */
 	public Role getRole(Long id) {
-		final List list = getHibernateTemplate().find("from Role r where r.id = ?", id);
+		final List list = getHibernateTemplate().find(
+				"from Role r where r.id = ?", id);
 		return (Role) (list.size() > 0 ? list.get(0) : null);
 	}
 
 	/**
 	 * Deletes role with specified id from database.
-	 * @param id of role
+	 * 
+	 * @param id
+	 *            of role
 	 */
 	public void deleteRole(Long id) {
-		final List list = getHibernateTemplate().find("from Role r where r.id = ?", id);
-		if (list.size() > 0){
-			Object role = (Role)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from Role r where r.id = ?", id);
+		if (list.size() > 0) {
+			Object role = (Role) list.get(0);
 			getHibernateTemplate().delete(role);
 		}
 	}
 
 	/**
 	 * deletes specified role
-	 * @param role to delete
+	 * 
+	 * @param role
+	 *            to delete
 	 */
 	public void deleteRole(Role role) {
-		final List list = getHibernateTemplate().find("from Role r where r.id = ?", role.getId());
-		if (list.size() > 0){
-			Object roleToDelete = (Role)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from Role r where r.id = ?", role.getId());
+		if (list.size() > 0) {
+			Object roleToDelete = (Role) list.get(0);
 			getHibernateTemplate().delete(roleToDelete);
 		}
 	}
 
 	/**
-	 * @param name - name of roles
+	 * lists all Roles with given name
+	 * 
+	 * @param name -
+	 *            name of roles
 	 * @return list of roles with specified name
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Role> getRoles(String name) {
-		final List list = getHibernateTemplate().find("select r from Role r where r.name like '%"+ name+ "%'");
+		final List list = getHibernateTemplate().find(
+				"select r from Role r where r.name like '%" + name + "%'");
 		return list;
 	}
-    
+
 	/**
-	 * @param id - id of group
+	 * lists all Roles directly attached to group with given id
+	 * 
+	 * @param id -
+	 *            id of group
 	 * @return list of roles directly attached to group with given id
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Role> getRolesDirectlyAttachedToGroup(Long groupId) {
-		return (List<Role>)getHibernateTemplate().find("select r from Group g join g.roles r where g.id = ?", groupId);
+		return (List<Role>) getHibernateTemplate().find(
+				"select r from Group g join g.roles r where g.id = ?", groupId);
 	}
-    
+
 	/**
-	 * @param id - id of group
-	 * @return list of roles directly attached to group with given id
+	 * lists all Roles directly attached to user with given id
+	 * 
+	 * @param id -
+	 *            id of user
+	 * @return list of roles directly attached to user with given id
 	 */
 	@SuppressWarnings("unchecked")
 	public List<Role> getRolesDirectlyAttachedToUser(Long userId) {
-		return (List<Role>)getHibernateTemplate().find("select r from User u join u.roles r where u.id = ?", userId);
+		return (List<Role>) getHibernateTemplate().find(
+				"select r from User u join u.roles r where u.id = ?", userId);
 	}
 
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java	2006-09-03 09:38:37 UTC (rev 124)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
@@ -28,7 +28,8 @@
 import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
 
 /**
- * Class to communicate with database - gets and saves sap instances. Uses hibernate
+ * Class to communicate with database - gets and saves sap instances. Uses
+ * hibernate
  * 
  * @since 1.0
  * @author Marek Musielak
@@ -36,26 +37,31 @@
  */
 public class SAPInstanceDefDaoImpl extends HibernateDaoSupport implements
 		SAPInstanceDefDao {
-	
-	private static final Logger logger = Logger.getLogger(SAPInstanceDefDaoImpl.class);
 
+	private static final Logger logger = Logger
+			.getLogger(SAPInstanceDefDaoImpl.class);
+
 	public SAPInstanceDefDaoImpl() {
 		super();
 	}
 
 	/**
+	 * lists all sap instances
+	 * 
 	 * @return list of all sap instances
 	 */
 	@SuppressWarnings("unchecked")
 	public List<SAPInstanceDef> getSAPInstances() {
-		final List<SAPInstanceDef> sapInstancesList = getHibernateTemplate().loadAll(SAPInstanceDef.class);
+		final List<SAPInstanceDef> sapInstancesList = getHibernateTemplate()
+				.loadAll(SAPInstanceDef.class);
 		return sapInstancesList;
 	}
 
 	/**
 	 * Saves or updates sap instance in database
 	 * 
-	 * @param sapInstanceDef - sap instance to save in db
+	 * @param sapInstanceDef -
+	 *            sap instance to save in db
 	 * @return saved sap instance
 	 */
 	public void saveSAPInstanceDef(SAPInstanceDef sapInstanceDef) {
@@ -63,84 +69,133 @@
 	}
 
 	/**
-	 * @param id of sap instance
-	 * @return sap instance with specified id
+	 * get SapInstanceDef with given id
+	 * 
+	 * @param id
+	 *            of sap instance
+	 * @return sap instance with specified id or null if SapInstanceDef with
+	 *         given id does not exist
 	 */
 	public SAPInstanceDef getSAPInstanceDef(Long id) {
-		final List list = getHibernateTemplate().find("from SAPInstanceDef s where s.id = ?", id);
+		final List list = getHibernateTemplate().find(
+				"from SAPInstanceDef s where s.id = ?", id);
 		return (SAPInstanceDef) (list.size() > 0 ? list.get(0) : null);
 	}
 
 	/**
 	 * Deletes sap instance with specified id from database.
-	 * @param id of sap instance
+	 * 
+	 * @param id
+	 *            of sap instance
 	 */
 	public void deleteSAPInstanceDef(Long id) {
-		final List list = getHibernateTemplate().find("from SAPInstanceDef s where s.id = ?", id);
-		if (list.size() > 0){
-			Object sapInstanceDef = (SAPInstanceDef)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from SAPInstanceDef s where s.id = ?", id);
+		if (list.size() > 0) {
+			Object sapInstanceDef = (SAPInstanceDef) list.get(0);
 			getHibernateTemplate().delete(sapInstanceDef);
 		}
 	}
 
 	/**
 	 * deletes specified sap instance
-	 * @param sap instance to delete
+	 * 
+	 * @param sap
+	 *            instance to delete
 	 */
 	public void deleteSAPInstanceDef(SAPInstanceDef sapInstanceDef) {
-		final List list = getHibernateTemplate().find("from SAPInstanceDef s where s.id = ?", sapInstanceDef.getId());
-		if (list.size() > 0){
-			Object sapToDelete = (SAPInstanceDef)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from SAPInstanceDef s where s.id = ?", sapInstanceDef.getId());
+		if (list.size() > 0) {
+			Object sapToDelete = (SAPInstanceDef) list.get(0);
 			getHibernateTemplate().delete(sapToDelete);
 		}
 	}
-    
+
 	/**
-	 * @param messageId - id of message
+	 * get SapInstanceDef - owner of Message with specified id
+	 * 
+	 * @param messageId -
+	 *            id of message
 	 * @return sapInstanceDef (owner of specified message)
 	 */
 	public SAPInstanceDef getSAPInstanceDefByMessageId(Long messageId) {
-		final List sapList = getHibernateTemplate().find("select s from Message m join m.SAPInstanceDefOwner s where m.id = ?", messageId);
-		
+		final List sapList = getHibernateTemplate()
+				.find(
+						"select s from Message m join m.SAPInstanceDefOwner s where m.id = ?",
+						messageId);
+
 		if (sapList.size() == 0)
 			return null;
 		else
-			return (SAPInstanceDef)sapList.get(0);
+			return (SAPInstanceDef) sapList.get(0);
 	}
-	
+
 	/**
-	 * @param instance - instance with some fields filled
+	 * @param instance -
+	 *            instance with some fields filled
 	 * @return list of sap instances with fields matching to given instance
 	 */
 	@SuppressWarnings("unchecked")
 	public List<SAPInstanceDef> getMatchingServers(SAPInstanceDef instance,
 			boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) {
-		logger.debug("INSTANCE: "+ instance);
-		String query = "select s from SAPInstanceDef s where" +
-			" s.name like '%" +instance.getName()+ "%'"+
-			(defaultSearch ? " and s.defaultInstance = "+ instance.isDefaultInstance() : "")+
-			(0 != instance.getMaxConnectionsInPool() ? "  and s.maxConnectionsInPool = "+ instance.getMaxConnectionsInPool() : "")+
-			(instance.getUser().trim().length() != 0 ? " and s.user like '%" +instance.getUser()+ "%'" : "")+
-			(instance.getPassword().trim().length() != 0 ? " and s.password like '%" +instance.getPassword()+ "%'" : "")+
-			(instance.getClient().trim().length() != 0 ? " and s.client like '%" +instance.getClient()+ "%'" : "")+
-			(instance.getHost().trim().length() != 0 ? " and s.host like '%" +instance.getHost()+ "%'" : "")+
-			(instance.getR3name().trim().length() != 0 ? " and s.r3name like '%" +instance.getR3name()+ "%'" : "")+
-			(instance.getGroup().trim().length() != 0 ? " and s.group like '%" +instance.getGroup()+ "%'" : "")+
-			(instance.getSystemNumber().trim().length() != 0 ? " and s.systemNumber like '%" +instance.getSystemNumber()+ "%'" : "")+
-			(loadSearch ? " and s.loadBalancing = "+ instance.isLoadBalancing() : "")+
-			(instance.getGwhost().trim().length() != 0 ? " and s.gwhost like '%" +instance.getGwhost()+ "%'" : "")+
-			(instance.getGwserv().trim().length() != 0 ? " and s.gwserv like '%" +instance.getGwserv()+ "%'" : "")+
-			(instance.getProgid().trim().length() != 0 ? " and s.progid like '%" +instance.getProgid()+ "%'" : "")+
-			(unicodeSearch ? " and s.unicode = "+ instance.isUnicode() : "")+
-			(instance.getAdminEmail().trim().length() != 0 ? " and s.name like '%" +instance.getAdminEmail()+ "%'" : "");
-		logger.debug("QUERY: "+ query);
+		logger.debug("INSTANCE: " + instance);
+		String query = "select s from SAPInstanceDef s where"
+				+ " s.name like '%"
+				+ instance.getName()
+				+ "%'"
+				+ (defaultSearch ? " and s.defaultInstance = "
+						+ instance.isDefaultInstance() : "")
+				+ (0 != instance.getMaxConnectionsInPool() ? "  and s.maxConnectionsInPool = "
+						+ instance.getMaxConnectionsInPool()
+						: "")
+				+ (instance.getUser().trim().length() != 0 ? " and s.user like '%"
+						+ instance.getUser() + "%'"
+						: "")
+				+ (instance.getPassword().trim().length() != 0 ? " and s.password like '%"
+						+ instance.getPassword() + "%'"
+						: "")
+				+ (instance.getClient().trim().length() != 0 ? " and s.client like '%"
+						+ instance.getClient() + "%'"
+						: "")
+				+ (instance.getHost().trim().length() != 0 ? " and s.host like '%"
+						+ instance.getHost() + "%'"
+						: "")
+				+ (instance.getR3name().trim().length() != 0 ? " and s.r3name like '%"
+						+ instance.getR3name() + "%'"
+						: "")
+				+ (instance.getGroup().trim().length() != 0 ? " and s.group like '%"
+						+ instance.getGroup() + "%'"
+						: "")
+				+ (instance.getSystemNumber().trim().length() != 0 ? " and s.systemNumber like '%"
+						+ instance.getSystemNumber() + "%'"
+						: "")
+				+ (loadSearch ? " and s.loadBalancing = "
+						+ instance.isLoadBalancing() : "")
+				+ (instance.getGwhost().trim().length() != 0 ? " and s.gwhost like '%"
+						+ instance.getGwhost() + "%'"
+						: "")
+				+ (instance.getGwserv().trim().length() != 0 ? " and s.gwserv like '%"
+						+ instance.getGwserv() + "%'"
+						: "")
+				+ (instance.getProgid().trim().length() != 0 ? " and s.progid like '%"
+						+ instance.getProgid() + "%'"
+						: "")
+				+ (unicodeSearch ? " and s.unicode = " + instance.isUnicode()
+						: "")
+				+ (instance.getAdminEmail().trim().length() != 0 ? " and s.name like '%"
+						+ instance.getAdminEmail() + "%'"
+						: "");
+		logger.debug("QUERY: " + query);
 		final List list = getHibernateTemplate().find(query);
-		logger.debug("SIZE OF INSTANCES MATCHING TO GIVES PATTERN: " + list.size());
+		logger.debug("SIZE OF INSTANCES MATCHING TO GIVES PATTERN: "
+				+ list.size());
 		return list;
 	}
-	
+
 	public void deactivateInstance(String id, boolean mode) {
-		SAPInstanceDef instance = getSAPInstanceDef(Long.getLong(id).longValue());
+		SAPInstanceDef instance = getSAPInstanceDef(Long.getLong(id)
+				.longValue());
 		instance.setActiveInstance(mode);
 		getHibernateTemplate().saveOrUpdate(id, instance);
 	}
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SentContentDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SentContentDaoImpl.java	2006-09-03 09:38:37 UTC (rev 124)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SentContentDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
@@ -27,31 +27,37 @@
 import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
 
 /**
- * Class to communicate with database - gets and saves sent contents. Uses hibernate
+ * Class to communicate with database - gets and saves sent contents. Uses
+ * hibernate
  * 
  * @since 1.0
  * @author Marek Musielak
  * @author Rafał Malinowski
  */
-public class SentContentDaoImpl extends HibernateDaoSupport implements SentContentDao {
+public class SentContentDaoImpl extends HibernateDaoSupport implements
+		SentContentDao {
 
 	public SentContentDaoImpl() {
 		super();
 	}
 
 	/**
+	 * lists all SentContents
+	 * 
 	 * @return list of all sent contents
 	 */
 	@SuppressWarnings("unchecked")
 	public List<SentContent> getSentContentsList() {
-		final List<SentContent> sentContentsList = getHibernateTemplate().loadAll(SentContent.class);
+		final List<SentContent> sentContentsList = getHibernateTemplate()
+				.loadAll(SentContent.class);
 		return sentContentsList;
 	}
 
 	/**
 	 * Saves or updates sentContent in database
 	 * 
-	 * @param sentContent - SentContent to save in db
+	 * @param sentContent -
+	 *            SentContent to save in db
 	 * @return saved sentContent
 	 */
 	public SentContent saveSentContent(SentContent sentContent) {
@@ -62,35 +68,47 @@
 	}
 
 	/**
-	 * @param internalId - internalId of sentContent
-	 * @return SentContent with specified id
+	 * get SentContent with specified id
+	 * 
+	 * @param internalId -
+	 *            internalId of sentContent
+	 * @return SentContent with specified id or null if SentContent with given
+	 *         id does not exist
 	 */
 	public SentContent getSentContentByInternalId(String internalId) {
-		final List list = getHibernateTemplate().find("from SentContent sc where sc.internalId = ?", internalId);
+		final List list = getHibernateTemplate().find(
+				"from SentContent sc where sc.internalId = ?", internalId);
 		return (SentContent) (list.size() > 0 ? list.get(0) : null);
 	}
 
 	/**
 	 * deletes specified sentContent
-	 * @param sentContent to delete
+	 * 
+	 * @param sentContent
+	 *            to delete
 	 */
 	public void deleteSentContent(SentContent sentContent) {
-		final List list = getHibernateTemplate().find("from SentContent c where c.id = ?", sentContent.getId());
-		if (list.size() > 0){
-			Object sentContentToDelete = (SentContent)list.get(0);
+		final List list = getHibernateTemplate().find(
+				"from SentContent c where c.id = ?", sentContent.getId());
+		if (list.size() > 0) {
+			Object sentContentToDelete = (SentContent) list.get(0);
 			getHibernateTemplate().delete(sentContentToDelete);
 		}
 	}
-    
+
 	/**
-	 * @param id - id of Message
+	 * lists all SentContent for message with given id
+	 * 
+	 * @param id -
+	 *            id of Message
 	 * @return list of SentContent for Message with given id
 	 */
-   @SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked")
 	public List<SentContent> getSentContentsByMessage(String id) {
-    	String query = "select s from SentContent s where s.message.id = ? order by s.id";
-        List<SentContent> result = getHibernateTemplate().find(query, Long.valueOf(id));
-        return result;
-    }
-    
+		String query = "select s from SentContent s where s.message.id = ? order by s.id";
+		List<SentContent> result = getHibernateTemplate().find(query,
+				Long.valueOf(id));
+		return result;
+	}
+
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/UserDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/UserDaoImpl.java	2006-09-03 09:38:37 UTC (rev 124)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/UserDaoImpl.java	2006-09-03 09:38:59 UTC (rev 125)
@@ -43,278 +43,346 @@
  */
 public class UserDaoImpl extends HibernateDaoSupport implements UserDao {
 
-    public UserDaoImpl() {
-        super();
-    }
+	public UserDaoImpl() {
+		super();
+	}
 
 	/**
+	 * lists all Users
+	 * 
 	 * @return list of all users
 	 */
-    @SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked")
 	public List<User> getUsers() {
-        final List<User> usersList = getHibernateTemplate().loadAll(User.class);
-        return usersList;
-    }
+		final List<User> usersList = getHibernateTemplate().loadAll(User.class);
+		return usersList;
+	}
 
 	/**
 	 * Saves or updates user in database
 	 * 
-	 * @param user - user to save in db
+	 * @param user -
+	 *            user to save in db
 	 * @return saved user
 	 */
-    public User saveUser(User user) {
-   		getHibernateTemplate().saveOrUpdate(user);
-        return user;
-    }
+	public User saveUser(User user) {
+		getHibernateTemplate().saveOrUpdate(user);
+		return user;
+	}
 
 	/**
-	 * @param id of user
-	 * @return user with specified id
+	 * get User with specified id
+	 * 
+	 * @param id
+	 *            of user
+	 * @return user with specified id or null if User with given id does not
+	 *         exist
 	 */
-    public User getUser(Long id) {
-        final List list = getHibernateTemplate().find("from User u where u.id = ?", id);
-        return (User) (list.size() > 0 ? list.get(0) : null);
-    }
+	public User getUser(Long id) {
+		final List list = getHibernateTemplate().find(
+				"from User u where u.id = ?", id);
+		return (User) (list.size() > 0 ? list.get(0) : null);
+	}
 
 	/**
 	 * Deletes user with specified id from database.
-	 * @param id of user
+	 * 
+	 * @param id
+	 *            of user
 	 */
-    public void deleteUser(Long id) {
-        final List list = getHibernateTemplate().find("from User u where u.id = ?", id);
-        if (list.size() > 0) {
-            User user = (User) list.get(0);
-            getHibernateTemplate().delete(user);
-        }
-    }
+	public void deleteUser(Long id) {
+		final List list = getHibernateTemplate().find(
+				"from User u where u.id = ?", id);
+		if (list.size() > 0) {
+			User user = (User) list.get(0);
+			getHibernateTemplate().delete(user);
+		}
+	}
 
 	/**
 	 * deletes specified user
-	 * @param user to delete
+	 * 
+	 * @param user
+	 *            to delete
 	 */
-    public void deleteUser(User user) {
-        final List list = getHibernateTemplate().find("from User u where u.id = ?", user.getId());
-        if (list.size() > 0) {
-            User userToDelete = (User) list.get(0);
-            getHibernateTemplate().delete(userToDelete);
-        }
-    }
+	public void deleteUser(User user) {
+		final List list = getHibernateTemplate().find(
+				"from User u where u.id = ?", user.getId());
+		if (list.size() > 0) {
+			User userToDelete = (User) list.get(0);
+			getHibernateTemplate().delete(userToDelete);
+		}
+	}
 
-    /**
-     * Check if user has assigned role
-     * @param role - role to check
-     * @param user - user to check
-     * 
-     * @return if user has specified role
-     */
-    public boolean hasRole(User user, Role role) {
-        for (Role roleToCheck : user.getRoles()) {
+	/**
+	 * Check if user has assigned role
+	 * 
+	 * @param role -
+	 *            role to check
+	 * @param user -
+	 *            user to check
+	 * 
+	 * @return if user has specified role
+	 */
+	public boolean hasRole(User user, Role role) {
+		for (Role roleToCheck : user.getRoles()) {
 			if (role.equals(roleToCheck)) {
 				return true;
 			}
 		}
 
-        List<Group> checkedGroups = new ArrayList<Group>();
-        List<Group> groupsToCheck = new ArrayList<Group>();
-        
-        groupsToCheck = addUserGroupsToList(user, groupsToCheck);
+		List<Group> checkedGroups = new ArrayList<Group>();
+		List<Group> groupsToCheck = new ArrayList<Group>();
 
-        while (groupsToCheck.size() != 0) {
-            Group group = groupsToCheck.get(0);
-            groupsToCheck.remove(0);
-            checkedGroups.add(group);
+		groupsToCheck = addUserGroupsToList(user, groupsToCheck);
 
-            for (Role roleToCheck : group.getRoles()) {
-    			if (role.equals(roleToCheck)) {
-    				return true;
-    			}
-    		}
+		while (groupsToCheck.size() != 0) {
+			Group group = groupsToCheck.get(0);
+			groupsToCheck.remove(0);
+			checkedGroups.add(group);
 
-            groupsToCheck = addSubGroupsToList(group, groupsToCheck, checkedGroups);
-        }
+			for (Role roleToCheck : group.getRoles()) {
+				if (role.equals(roleToCheck)) {
+					return true;
+				}
+			}
 
-        return false;
-    }
-    
-    private List<Group> addUserGroupsToList(User user, List<Group> groupsList) {
-        for (Group group : user.getGroups()) {
-            if (-1 == groupsList.indexOf(group)) {
-                groupsList.add(group);
-            }
-        }
-        return groupsList;
-    }
-    
-    private List<Group> addSubGroupsToList(Group supGroup, List<Group> groupsList, List<Group> alreadyCheckedGroups) {
-        for (Group g : supGroup.getSupGroups()) {
-            if (-1 == groupsList.indexOf(g) && -1 == alreadyCheckedGroups.indexOf(g))
-                groupsList.add(g);
-        }
-        return groupsList;
-    }
+			groupsToCheck = addSubGroupsToList(group, groupsToCheck,
+					checkedGroups);
+		}
 
-    private List<Role> addRolesToListWithoutDuplicates(List<Role> roles, List<Role> rolesToAdd) {
-        for (Role r : rolesToAdd) {
-            if (-1 == roles.indexOf(r))
-                roles.add(r);
-        }
-        
-        return roles;
-    }
-    
-    private List<Role> addRolesToListWithoutDuplicates(List<Role> roles, Set<Role> rolesToAdd) {
-        for (Role r : rolesToAdd) {
-            if (-1 == roles.indexOf(r))
-                roles.add(r);
-        }
-        
-        return roles;
-    }
-    
-    private List<Group> addGroupsToListWithoutDuplicates(List<Group> groups, List<Group> groupsToAdd) {
-        for (Group g : groupsToAdd) {
-            if (-1 == groups.indexOf(g))
-                groups.add(g);
-        }
-        
-        return groups;
-    }
-    
-    /**
-     * Return all actions for user
-     * @param user - for this user we search actions
-     * 
-     * @return list of actions for specifies user
-     */
-    @SuppressWarnings("unchecked")
+		return false;
+	}
+
+	private List<Group> addUserGroupsToList(User user, List<Group> groupsList) {
+		for (Group group : user.getGroups()) {
+			if (-1 == groupsList.indexOf(group)) {
+				groupsList.add(group);
+			}
+		}
+		return groupsList;
+	}
+
+	private List<Group> addSubGroupsToList(Group supGroup,
+			List<Group> groupsList, List<Group> alreadyCheckedGroups) {
+		for (Group g : supGroup.getSupGroups()) {
+			if (-1 == groupsList.indexOf(g)
+					&& -1 == alreadyCheckedGroups.indexOf(g))
+				groupsList.add(g);
+		}
+		return groupsList;
+	}
+
+	private List<Role> addRolesToListWithoutDuplicates(List<Role> roles,
+			List<Role> rolesToAdd) {
+		for (Role r : rolesToAdd) {
+			if (-1 == roles.indexOf(r))
+				roles.add(r);
+		}
+
+		return roles;
+	}
+
+	private List<Role> addRolesToListWithoutDuplicates(List<Role> roles,
+			Set<Role> rolesToAdd) {
+		for (Role r : rolesToAdd) {
+			if (-1 == roles.indexOf(r))
+				roles.add(r);
+		}
+
+		return roles;
+	}
+
+	private List<Group> addGroupsToListWithoutDuplicates(List<Group> groups,
+			List<Group> groupsToAdd) {
+		for (Group g : groupsToAdd) {
+			if (-1 == groups.indexOf(g))
+				groups.add(g);
+		}
+
+		return groups;
+	}
+
+	/**
+	 * Return all actions for user
+	 * 
+	 * @param user -
+	 *            for this user we search actions
+	 * 
+	 * @return list of actions for specifies user
+	 */
+	@SuppressWarnings("unchecked")
 	public Set<Action> getActions(User user) {
 
-        List<Role> userRoles = getHibernateTemplate().find("select u.roles from User u where u.id = ?", Long.valueOf(user.getId()));
-        List<Group> userGroups = getHibernateTemplate().find("select u.groups from User u where u.id = ?", Long.valueOf(user.getId()));
-        
-        List<Role> roles = new ArrayList<Role>();
+		List<Role> userRoles = getHibernateTemplate().find(
+				"select u.roles from User u where u.id = ?",
+				Long.valueOf(user.getId()));
+		List<Group> userGroups = getHibernateTemplate().find(
+				"select u.groups from User u where u.id = ?",
+				Long.valueOf(user.getId()));
 
-        roles = addRolesToListWithoutDuplicates(roles, userRoles);
+		List<Role> roles = new ArrayList<Role>();
 
-        List<Group> checkedGroups = new ArrayList<Group>();
-        List<Group> groupsToCheck = new ArrayList<Group>();
+		roles = addRolesToListWithoutDuplicates(roles, userRoles);
 
-        groupsToCheck = addGroupsToListWithoutDuplicates(groupsToCheck, userGroups);
+		List<Group> checkedGroups = new ArrayList<Group>();
+		List<Group> groupsToCheck = new ArrayList<Group>();
 
-        while (groupsToCheck.size() != 0) {
-            Group group = groupsToCheck.get(0);
-            groupsToCheck.remove(0);
-            checkedGroups.add(group);
+		groupsToCheck = addGroupsToListWithoutDuplicates(groupsToCheck,
+				userGroups);
 
-            roles = addRolesToListWithoutDuplicates(roles, group.getRoles());
+		while (groupsToCheck.size() != 0) {
+			Group group = groupsToCheck.get(0);
+			groupsToCheck.remove(0);
+			checkedGroups.add(group);
 
-            groupsToCheck = addSubGroupsToList(group, groupsToCheck, checkedGroups);
-        }
-        
-        return getActionsFromRoles(roles);
+			roles = addRolesToListWithoutDuplicates(roles, group.getRoles());
 
-    }
-    
-    private Set<Action> getActionsFromRoles(List<Role> roles) {
-        Set<Action> actions = new HashSet<Action>();
-        for (Role r : roles) {
-            for (Action a : (Set<Action>) r.getActions()) {
-                if (!actions.contains(a))
-                    actions.add(a);
-            }
-        }
+			groupsToCheck = addSubGroupsToList(group, groupsToCheck,
+					checkedGroups);
+		}
 
-        return actions;
+		return getActionsFromRoles(roles);
 
-    }
+	}
 
-    /**
-     * @param login - login of user
-     * @param password - password of user
-     * 
-     * @return user with specified login and password
-     */
-    public User getUserByLoginAndPassword(String login, String password) {
-        final List list = getHibernateTemplate().find(
-                "from User u where u.login = ? and u.password = ?",
-                new Object[] { login, password });
-        if (list.size() > 0) {
-            final User user = (User) list.get(0);
-            return user;
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * @param name - name of user
-     * 
-     * @return user with specified name
-     */
-    public User getUserByName(String name) {
-    	final List list = getHibernateTemplate().find(
-    			"from User u where u.login = ?", name);
-        if (list.size() > 0) {
-            final User user = (User) list.get(0);
-            return user;
-        } else {
-            return null;
-        }
-    }
+	private Set<Action> getActionsFromRoles(List<Role> roles) {
+		Set<Action> actions = new HashSet<Action>();
+		for (Role r : roles) {
+			for (Action a : (Set<Action>) r.getActions()) {
+				if (!actions.contains(a))
+					actions.add(a);
+			}
+		}
 
+		return actions;
+
+	}
+
 	/**
-	 * @param user - user with some fields filled
+	 * @param login -
+	 *            login of user
+	 * @param password -
+	 *            password of user
+	 * 
+	 * @return user with specified login and password
+	 */
+	public User getUserByLoginAndPassword(String login, String password) {
+		final List list = getHibernateTemplate().find(
+				"from User u where u.login = ? and u.password = ?",
+				new Object[] { login, password });
+		if (list.size() > 0) {
+			final User user = (User) list.get(0);
+			return user;
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * @param name -
+	 *            name of user
+	 * 
+	 * @return user with specified name
+	 */
+	public User getUserByName(String name) {
+		final List list = getHibernateTemplate().find(
+				"from User u where u.login = ?", name);
+		if (list.size() > 0) {
+			final User user = (User) list.get(0);
+			return user;
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * @param user -
+	 *            user with some fields filled
 	 * @return list of users with fields matching to given user
 	 */
 	@SuppressWarnings("unchecked")
 	public List<User> getMatchingUsers(User user, boolean enabledSearch) {
-        // REVIEW: [SK] a co w przypadku gdy jakichs z ponizszych atrybutow bedzie nullem ?
-		// REVIEW: [MZ] jesli atrybut == null wowczas zapytanie bedzie << like '%%' >> zatem zwroci wszystkie 
+		// REVIEW: [SK] a co w przypadku gdy jakichs z ponizszych atrybutow
+		// bedzie nullem ?
+		// REVIEW: [MZ] jesli atrybut == null wowczas zapytanie bedzie << like
+		// '%%' >> zatem zwroci wszystkie
 		// komentarze do usuniecia
-		String query = "select u from User u" +
-			" where u.login like '%"+ user.getLogin() +"%'"+
-			(user.getFirstName().trim().length() != 0 ? " and u.firstName like '%" +user.getFirstName()+ "%'" : "")+
-			(user.getLastName().trim().length() != 0 ? " and u.lastName like '%"+ user.getLastName()+ "%'" : "")+
-			(user.getEmail().trim().length() != 0 ? " and u.email like '%"+ user.getEmail()+  "%'" : "")+
-			(user.getTelephone().trim().length() != 0 ? " and u.telephone like '%"+ user.getTelephone()+  "%'" : "")+
-			(user.getFax().trim().length() != 0 ? " and u.fax like '%"+ user.getFax()+ "%'" : "")+
-			(user.getMobile().trim().length() != 0 ? " and u.mobile like '%"+ user.getMobile()+ "%'" : "")+
-			(user.getStreet().trim().length() != 0 ? " and u.street like '%"+ user.getStreet()+ "%'" : "")+
-			(user.getCity().trim().length() != 0 ? " and u.city like '%"+ user.getCity()+ "%'" : "")+
-			(user.getState().trim().length() != 0 ? " and u.state like '%"+ user.getState()+ "%'" : "")+
-			(user.getPostalCode().trim().length() != 0 ? " and u.postalCode like '%"+ user.getPostalCode()+ "%'" : "")+
-			(user.getCountry() != null ? " and u.country = "+ user.getCountry().ordinal() : "")+
-			(user.getLanguage() != null ? " and u.language = "+ user.getLanguage().ordinal() : "")+
-			(user.getTimeZone() != null ? " and u.timeZone = "+ user.getTimeZo...
 
[truncated message content] | 
| 
      
      
      From: <ma...@us...> - 2006-09-03 09:39:37
      
     | 
| Revision: 124
          http://svn.sourceforge.net/comsuite/?rev=124&view=rev
Author:   marasm
Date:     2006-09-03 02:38:37 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
imports organized
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/org/commsuite/converter/CalcToPdfConverterDescriptor.java
    trunk/code/CSMiddleware/src/org/commsuite/converter/HtmlToPdfConverterDescriptor.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/CalcToPdfConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/CalcToPdfConverterDescriptor.java	2006-09-03 09:35:54 UTC (rev 123)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/CalcToPdfConverterDescriptor.java	2006-09-03 09:38:37 UTC (rev 124)
@@ -23,7 +23,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.log4j.Logger;
 import org.commsuite.converter.utils.openoffice.OpenOfficeRunner;
 
 /**
@@ -34,7 +33,7 @@
  * @author Rafał Malinowski
  */
 public class CalcToPdfConverterDescriptor extends SimpleConverterDescriptor {
-	private static final Logger logger = Logger.getLogger(CalcToPdfConverterDescriptor.class);
+
 	private static List<String> inMimeTypes;
 	
 	static {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/HtmlToPdfConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/HtmlToPdfConverterDescriptor.java	2006-09-03 09:35:54 UTC (rev 123)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/HtmlToPdfConverterDescriptor.java	2006-09-03 09:38:37 UTC (rev 124)
@@ -23,7 +23,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.log4j.Logger;
 import org.commsuite.converter.utils.openoffice.OpenOfficeRunner;
 
 /**
@@ -33,7 +32,7 @@
  * @author Rafał Malinowski
  */
 public class HtmlToPdfConverterDescriptor extends SimpleConverterDescriptor {
-	private static final Logger logger = Logger.getLogger(HtmlToPdfConverterDescriptor.class);
+
 	private static List<String> inMimeTypes;
 	
 	static {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-03 09:36:19
      
     | 
| Revision: 123
          http://svn.sourceforge.net/comsuite/?rev=123&view=rev
Author:   marasm
Date:     2006-09-03 02:35:54 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
cleanup
Modified Paths:
--------------
    trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
    trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
    trunk/code/CSMiddleware/src/sapContext.xml
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java	2006-09-03 09:34:45 UTC (rev 122)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java	2006-09-03 09:35:54 UTC (rev 123)
@@ -35,7 +35,6 @@
 import org.commsuite.notification.Notification;
 import org.commsuite.util.SpringMiddlewareBeansConstants;
 import org.commsuite.util.SpringMiddlewareContext;
-import org.hibernate.hql.ast.tree.UnaryOperatorNode;
 
 import com.sap.mw.jco.IRepository;
 import com.sap.mw.jco.JCO;
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java	2006-09-03 09:34:45 UTC (rev 122)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java	2006-09-03 09:35:54 UTC (rev 123)
@@ -29,7 +29,6 @@
 import javolution.util.FastTable;
 
 import org.apache.log4j.Logger;
-import org.commsuite.managers.MessageManager;
 import org.commsuite.model.Message;
 import org.commsuite.model.SAPInstanceDef;
 import org.commsuite.notification.INotificationsManager;
@@ -60,12 +59,6 @@
 
     private INotificationsManager notificationsManager;
     
-    private MessageManager messageMgr;
-    
-    public void setMessageMgr(MessageManager messageMgr) {
-        this.messageMgr = messageMgr;
-    }
-
     /**
      * @param enabled
      *            The enabled to set.
Modified: trunk/code/CSMiddleware/src/sapContext.xml
===================================================================
--- trunk/code/CSMiddleware/src/sapContext.xml	2006-09-03 09:34:45 UTC (rev 122)
+++ trunk/code/CSMiddleware/src/sapContext.xml	2006-09-03 09:35:54 UTC (rev 123)
@@ -5,9 +5,6 @@
 
 	<bean id="sapCommManager" class="org.commsuite.sap.SAPCommManager"
 		init-method="init" destroy-method="destroy">
-		<property name="messageMgr">
-			<ref bean="messageManager" />
-		</property>
 		<property name="notificationsManager">
 			<ref bean="notificationsManager" />
 		</property>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ma...@us...> - 2006-09-03 09:34:54
      
     | 
| Revision: 122
          http://svn.sourceforge.net/comsuite/?rev=122&view=rev
Author:   marasm
Date:     2006-09-03 02:34:45 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
null parameters added to tests (just to allow them compile)
Modified Paths:
--------------
    trunk/code/CSTests/src/org/commsuite/devices/fax/FaxInboundMessageTest.java
Modified: trunk/code/CSTests/src/org/commsuite/devices/fax/FaxInboundMessageTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/fax/FaxInboundMessageTest.java	2006-09-02 14:15:46 UTC (rev 121)
+++ trunk/code/CSTests/src/org/commsuite/devices/fax/FaxInboundMessageTest.java	2006-09-03 09:34:45 UTC (rev 122)
@@ -56,7 +56,7 @@
 		replay(hylafax);
 		replay(faxDevice);
 		
-		FaxInboundMessage message = new FaxInboundMessage(faxDevice, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
+		FaxInboundMessage message = new FaxInboundMessage(faxDevice, null, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
 		message.getContent();
 		
 		verify(hylafax);
@@ -77,7 +77,7 @@
 		replay(faxDevice);
 		
 		try {
-			new FaxInboundMessage(faxDevice, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
+			new FaxInboundMessage(faxDevice, null, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
 			fail("InboundMessageGetContentException expected");
 		} catch (FaxInboundMessageCreateException e) {
 		}
@@ -98,7 +98,7 @@
 		replay(faxDevice);
 		
 		try {
-			new FaxInboundMessage(faxDevice, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
+			new FaxInboundMessage(faxDevice, null, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
 			fail("InboundMessageGetContentException expected");
 		} catch (FaxInboundMessageCreateException e) {
 		}
@@ -112,31 +112,31 @@
 		replay(faxDevice);
 		
 		try {
-			new FaxInboundMessage(null, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
+			new FaxInboundMessage(null, null, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
 			fail("FaxInboundMessage with null device should thrown an exception");
 		} catch (FaxInboundMessageCreateException e) {
 		}
 		
 		try {
-			new FaxInboundMessage(faxDevice, "", "", "", "image/tiff", "recvq/fax00000001.tif");
+			new FaxInboundMessage(faxDevice, null, "", "", "", "image/tiff", "recvq/fax00000001.tif");
 			fail("FaxInboundMessage with empty message id should thrown an exception");
 		} catch (FaxInboundMessageCreateException e) {
 		}
 		
 		try {
-			new FaxInboundMessage(faxDevice, "1", "", "", null, "recvq/fax00000001.tif");
+			new FaxInboundMessage(faxDevice, null, "1", "", "", null, "recvq/fax00000001.tif");
 			fail("FaxInboundMessage with empty mime type should thrown an exception");
 		} catch (FaxInboundMessageCreateException e) {
 		}
 		
 		try {
-			new FaxInboundMessage(faxDevice, "1", "", "", "application/x-javascript", "recvq/fax00000001.tif");
+			new FaxInboundMessage(faxDevice, null, "1", "", "", "application/x-javascript", "recvq/fax00000001.tif");
 			fail("FaxInboundMessage with wrong mime type should thrown an exception");
 		} catch (FaxInboundMessageCreateException e) {
 		}
 		
 		try {
-			new FaxInboundMessage(faxDevice, "1", "", "", "", null);
+			new FaxInboundMessage(faxDevice, null, "1", "", "", "", null);
 			fail("FaxInboundMessage with null file name should thrown an exception");
 		} catch (FaxInboundMessageCreateException e) {
 		}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <sku...@us...> - 2006-09-02 14:16:23
      
     | 
| Revision: 121
          http://svn.sourceforge.net/comsuite/?rev=121&view=rev
Author:   skuzniak
Date:     2006-09-02 07:15:46 -0700 (Sat, 02 Sep 2006)
Log Message:
-----------
activeInstance field handling added
Modified Paths:
--------------
    trunk/code/CSAdminPanel/.exadelproject
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
    trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
    trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp
    trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp
    trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java
    trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java
    trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
    trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
Modified: trunk/code/CSAdminPanel/.exadelproject
===================================================================
--- trunk/code/CSAdminPanel/.exadelproject	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/.exadelproject	2006-09-02 14:15:46 UTC (rev 121)
@@ -14,9 +14,19 @@
  <FILESYSTEM ENTITY="FileSystemFolder"
   LOCATION="%exadel.eclipse.project%" NAME="CSAdminPanel"/>
  <FILESYSTEM ENTITY="FileSystemJar"
-  LOCATION="%exadel.workspace%/lib/myfaces-impl.jar" NAME="lib-myfaces-impl.jar"/>
+  LOCATION="%exadel.workspace%/lib/tomahawk.jar" NAME="lib-tomahawk.jar"/>
  <FILESYSTEM ENTITY="FileSystemJar"
-  LOCATION="%exadel.workspace%/lib/tomahawk.jar" NAME="lib-tomahawk.jar"/>
+  LOCATION="%exadel.workspace%/lib/commons-beanutils-1.7.0.jar" NAME="lib-commons-beanutils-1.7.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+  LOCATION="%exadel.workspace%/lib/commons-digester-1.6.jar" NAME="lib-commons-digester-1.6.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+  LOCATION="%exadel.workspace%/lib/commons-el-1.0.jar" NAME="lib-commons-el-1.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+  LOCATION="%exadel.workspace%/lib/jstl-1.1.0.jar" NAME="lib-jstl-1.1.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+  LOCATION="%exadel.workspace%/lib/myfaces-api-1.1.3.jar" NAME="lib-myfaces-api-1.1.3.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+  LOCATION="%exadel.workspace%/lib/myfaces-impl-1.1.3.jar" NAME="lib-myfaces-impl-1.1.3.jar"/>
  <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
   <MODULE ENTITY="WebJSFModule" MODEL_PATH="/faces-config.xml"
    ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java	2006-09-02 14:15:46 UTC (rev 121)
@@ -77,7 +77,8 @@
         instance.setSystemNumber(this.systemNumber);
         instance.setUnicode(this.unicode);
         instance.setUser(this.user);
-        
+        instance.setActiveInstance(this.activeInstance);
+        logger.debug("Instance is active: "+ this.activeInstance);
         if (null == this.password) {
         	if (!this.confPassword.equals(this.password)) throw new IllegalArgumentException(PASSWORD_ERROR_CODE);
         }
@@ -118,6 +119,7 @@
         instance.setSystemNumber(this.systemNumber);
         instance.setUnicode(this.unicode);
         instance.setUser(this.user);
+        instance.setActiveInstance(this.activeInstance);
         
         if (null == this.password) {
         	if (!this.confPassword.equals(this.password)) throw new IllegalArgumentException(PASSWORD_ERROR_CODE);
@@ -155,7 +157,7 @@
             	this.createInstanceFromFields(instance);
             }
 
-        	
+        	logger.debug("instance is active: "+ instance.isActiveInstance());
             if (null != instance) {
                 ws.saveNewInstance(instance);
                 LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_SERVER_SUCCESSFULL,
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java	2006-09-02 14:15:46 UTC (rev 121)
@@ -34,6 +34,8 @@
     protected int maxConnectionsInPool;
 
     protected boolean defaultInstance;
+    
+    protected boolean activeInstance;
 
     protected String name;
 
@@ -78,7 +80,15 @@
     
     private int unicodeSearchIndex;
 
-    public int getDefaultSearchIndex() {
+    public boolean isActiveInstance() {
+		return activeInstance;
+	}
+
+	public void setActiveInstance(boolean activeInstance) {
+		this.activeInstance = activeInstance;
+	}
+
+	public int getDefaultSearchIndex() {
 		return defaultSearchIndex;
 	}
 
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties	2006-09-02 14:15:46 UTC (rev 121)
@@ -127,6 +127,7 @@
 SERVER_LOAD_BALANCING_DISABLED=R\u00f3wnowa\u017cenie obci\u0105\u017ce\u0144: wy\u0142\u0105czone
 SERVER_PROG_ID=Prog id
 SERVER_UNICODE=Unicode
+SERVER_ACTIVE_INSTANCE=Uaktywnij
 SERVER_GWHOST=GWHost
 SERVER_GWSERVER=GWServer
 SERVER_MANDANT=Klient(mandant)
@@ -293,4 +294,6 @@
 COMMON_LEGEND_EMAIL=To pole jest obowi\u0105zkowe i musi zawierac unikatowy i istniej\u0105cy w systemie SAP R/3 adres e-mail u\u017cytkownika.
 COMMON_LEGEND_MAX_CONNECTIONS=To pole jest obowi\u0105zkowe i musi byc liczb\u0105 ca\u0142kowit\u0105 z przedzia\u0142u <1 - 100>.
 COMMON_LEGEND_POSTAL=Kod pocztowy w formacie: dd-ddd
-COMMON_LEGEND_PHONE=Numer telefonu
\ No newline at end of file
+COMMON_LEGEND_PHONE=Numer telefonu
+COMMON_LEGEND_ACTIVATE=Uaktywnia wybran\u0105 instancj\u0119. Tylko instancje aktywne mog\u0105 byc nast\u0119pnie uruchamiane lub zatrzymywane, \
+			r\u00f3wnie\u017c tylko instancje aktywne s\u0105 uruchamiane podczas startu serwera.
\ No newline at end of file
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp	2006-09-02 14:15:46 UTC (rev 121)
@@ -109,6 +109,12 @@
 								<h:outputText value="#{Locale.SERVER_UNICODE}" styleClass="listView-header-title"/>
 								<h:selectBooleanCheckbox value="#{addSapServerBean.unicode}" />
 								
+								<h:panelGrid columns="2">
+									<h:outputText value="#{Locale.SERVER_ACTIVE_INSTANCE}" styleClass="listView-header-title"/>
+									<h:outputText value="#" styleClass="legend"/>
+								</h:panelGrid>
+								<h:selectBooleanCheckbox value="#{addSapServerBean.activeInstance}" />
+								
 							</h:panelGrid>
 							
 							<h:panelGrid columns="2" styleClass="listView-entity">
@@ -238,6 +244,7 @@
 						<h:outputText value="***)   #{Locale.COMMON_LEGEND_WITHOUT_LOAD_BALANCING}" />
 						<h:outputText value="****)  #{Locale.COMMON_LEGEND_EMAIL}" />
 						<h:outputText value="*****) #{Locale.COMMON_LEGEND_MAX_CONNECTIONS}" />
+						<h:outputText value="#		#{Locale.COMMON_LEGEND_ACTIVATE}" />
 					</h:panelGrid>
 				</h:form>
 			</h:panelGrid>
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp	2006-09-02 14:15:46 UTC (rev 121)
@@ -109,6 +109,12 @@
 								<h:outputText value="#{Locale.SERVER_UNICODE}" styleClass="listView-header-title"/>
 								<h:selectBooleanCheckbox value="#{addSapServerBean.unicode}" />
 								
+								<h:panelGrid columns="2">
+									<h:outputText value="#{Locale.SERVER_ACTIVE_INSTANCE}" styleClass="listView-header-title"/>
+									<h:outputText value="#" styleClass="legend"/>
+								</h:panelGrid>
+								<h:selectBooleanCheckbox value="#{addSapServerBean.activeInstance}" />
+								
 							</h:panelGrid>
 							
 							<h:panelGrid columns="2" styleClass="listView-entity">
Modified: trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java	2006-09-02 14:15:46 UTC (rev 121)
@@ -45,6 +45,7 @@
 	private String client;
 	private String adminEmail;
 	private Long id;
+	private boolean activeInstance;
 
 	public Long getId() {
 		return this.id;
@@ -178,4 +179,12 @@
 		this.maxConnectionsInPool = maxConnectionsInPool;
 	}
 
+	public void setActiveInstance(boolean active) {
+		this.activeInstance = active;
+	}
+	
+	public boolean isActiveInstance() {
+		return this.activeInstance;
+	}
+
 }
Modified: trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java	2006-09-02 14:15:46 UTC (rev 121)
@@ -91,5 +91,9 @@
     public int getMaxConnectionsInPool();
 
     public void setMaxConnectionsInPool(int maxConnectionsInPool);
+    
+    public void setActiveInstance(boolean active);
 
+	public boolean isActiveInstance();
+
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java	2006-09-02 14:15:46 UTC (rev 121)
@@ -181,6 +181,7 @@
 		this.systemNumber = wsInstance.getSystemNumber();
 		this.unicode = wsInstance.isUnicode();
 		this.user = wsInstance.getUser();
+		this.activeInstance = wsInstance.isActiveInstance();
     }
 
     /**
@@ -400,6 +401,7 @@
             .append("systemNumber", this.systemNumber)
             .append("unicode", this.unicode)
             .append("user", this.user)
+            .append("activeInstance", this.activeInstance)
             .toString();
     }
 
@@ -430,6 +432,7 @@
             .append(this.systemNumber, rhs.systemNumber)
             .append(this.unicode, rhs.unicode)
             .append(this.user, rhs.user)
+            .append(this.activeInstance, rhs.activeInstance)
             .isEquals();
     }
 
@@ -453,6 +456,7 @@
         	.append(this.systemNumber)
         	.append(this.unicode)
         	.append(this.user)
+        	.append(this.activeInstance)
         	.toHashCode();
     }
 }
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java	2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java	2006-09-02 14:15:46 UTC (rev 121)
@@ -166,6 +166,7 @@
         logger.info("SAPCommManager destroyed");
     }
 
+    // TODO: should this method be sensitive on active field??
     public void setSapInstances(Collection<SAPInstanceDef> sapInstances) {
         // TODO: init sapComms collection with values from DB
 
@@ -185,7 +186,8 @@
             sapComms.put(sapComm.getName(), sapComm);
         }
     }
-    
+
+    // TODO: should this method be sensitive on active field??
     public void setSapInstance(SAPInstanceDef instance) {
     	if (!isEnabled()) {
     		return;
@@ -216,8 +218,13 @@
         logger.info("Starting instance: " + instanceName);
         checkExistenceOfSAPInstance(instanceName);
         final ISAPComm instance = sapComms.get(instanceName);
-        instance.startServer();
-        logger.info("Instance started: " + instanceName);
+        if (instance.isActiveInstance()) {
+		    instance.startServer();
+		    logger.info("Instance started: " + instanceName);
+        } else {
+        	logger.warn("Instance is not active");
+        	throw new RuntimeException("Unable to start inactive instance");
+        }
     }
 
     public void stopInstance(String instanceName) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |