You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2012/01/24 19:31:07 UTC
svn commit: r1235400 [28/30] - in
/incubator/openmeetings/trunk/singlewebapp: WebContent/WEB-INF/
WebContent/WEB-INF/red5-services/ src/META-INF/
src/app/org/openmeetings/app/batik/beans/
src/app/org/openmeetings/app/conference/whiteboard/ src/app/org/...
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/ReadKeyCodesTest.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/ReadKeyCodesTest.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/ReadKeyCodesTest.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/ReadKeyCodesTest.java Tue Jan 24 18:30:48 2012
@@ -1,97 +1,115 @@
-package org.openmeetings.test.rdc;
-
-import java.awt.*;
-import java.awt.event.*;
-
-public class ReadKeyCodesTest extends Frame implements KeyListener {
- private static final long serialVersionUID = -1722917067803656922L;
- String msg1 = "";
- String msg2 = "";
-
- public static void main(String[] args) {
- new ReadKeyCodesTest();
- }
-
- public ReadKeyCodesTest() {
- super("TestKeyCodes");
- addKeyListener(this);
- addWindowListener(new WindowClosingAdapter());
- setBackground(Color.lightGray);
- setSize(300, 200);
- setLocation(200, 100);
- setVisible(true);
- }
-
- public void paint(Graphics g) {
- if (msg1.length() > 0) {
- draw3DRect(g, 20, 50, 250, 30);
- g.setColor(Color.black);
- g.drawString(msg1, 30, 70);
- }
- if (msg2.length() > 0) {
- draw3DRect(g, 20, 100, 250, 30);
- g.setColor(Color.black);
- g.drawString(msg2, 30, 120);
- }
- }
-
- void draw3DRect(Graphics g, int x, int y, int width, int height) {
- g.setColor(Color.darkGray);
- g.drawLine(x, y, x, y + height);
- g.drawLine(x, y, x + width, y);
- g.setColor(Color.white);
- g.drawLine(x + width, y + height, x, y + height);
- g.drawLine(x + width, y + height, x + width, y);
- }
-
- public void keyPressed(KeyEvent event) {
- msg1 = "";
- System.out.println("keyPressed "+event.getKeyCode());
- if (event.getKeyChar() == KeyEvent.CHAR_UNDEFINED) {
- int key = event.getKeyCode();
- // Funktionstaste abfragen
- if (key == KeyEvent.VK_F1) {
- msg1 = "F1";
- } else if (key == KeyEvent.VK_F2) {
- msg1 = "F2";
- } else if (key == KeyEvent.VK_F3) {
- msg1 = "F3";
- }
- // Modifier abfragen
- if (msg1.length() > 0) {
- if (event.isAltDown()) {
- msg1 = "ALT + " + msg1;
- }
- if (event.isControlDown()) {
- msg1 = "STRG + " + msg1;
- }
- if (event.isShiftDown()) {
- msg1 = "UMSCHALT + " + msg1;
- }
- }
- }
- repaint();
- }
-
- public void keyReleased(KeyEvent event) {
- msg1 = "";
- repaint();
- }
-
- public void keyTyped(KeyEvent event) {
- char key = event.getKeyChar();
-
- System.out.println("keyTyped "+event.getKeyCode());
-
- if (key == KeyEvent.VK_BACK_SPACE) {
- if (msg2.length() > 0) {
- msg2 = msg2.substring(0, msg2.length() - 1);
- }
- } else if (key >= KeyEvent.VK_SPACE) {
- if (msg2.length() < 40) {
- msg2 += event.getKeyChar();
- }
- }
- repaint();
- }
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.rdc;
+
+import java.awt.*;
+import java.awt.event.*;
+
+public class ReadKeyCodesTest extends Frame implements KeyListener {
+ private static final long serialVersionUID = -1722917067803656922L;
+ String msg1 = "";
+ String msg2 = "";
+
+ public static void main(String[] args) {
+ new ReadKeyCodesTest();
+ }
+
+ public ReadKeyCodesTest() {
+ super("TestKeyCodes");
+ addKeyListener(this);
+ addWindowListener(new WindowClosingAdapter());
+ setBackground(Color.lightGray);
+ setSize(300, 200);
+ setLocation(200, 100);
+ setVisible(true);
+ }
+
+ public void paint(Graphics g) {
+ if (msg1.length() > 0) {
+ draw3DRect(g, 20, 50, 250, 30);
+ g.setColor(Color.black);
+ g.drawString(msg1, 30, 70);
+ }
+ if (msg2.length() > 0) {
+ draw3DRect(g, 20, 100, 250, 30);
+ g.setColor(Color.black);
+ g.drawString(msg2, 30, 120);
+ }
+ }
+
+ void draw3DRect(Graphics g, int x, int y, int width, int height) {
+ g.setColor(Color.darkGray);
+ g.drawLine(x, y, x, y + height);
+ g.drawLine(x, y, x + width, y);
+ g.setColor(Color.white);
+ g.drawLine(x + width, y + height, x, y + height);
+ g.drawLine(x + width, y + height, x + width, y);
+ }
+
+ public void keyPressed(KeyEvent event) {
+ msg1 = "";
+ System.out.println("keyPressed "+event.getKeyCode());
+ if (event.getKeyChar() == KeyEvent.CHAR_UNDEFINED) {
+ int key = event.getKeyCode();
+ // Funktionstaste abfragen
+ if (key == KeyEvent.VK_F1) {
+ msg1 = "F1";
+ } else if (key == KeyEvent.VK_F2) {
+ msg1 = "F2";
+ } else if (key == KeyEvent.VK_F3) {
+ msg1 = "F3";
+ }
+ // Modifier abfragen
+ if (msg1.length() > 0) {
+ if (event.isAltDown()) {
+ msg1 = "ALT + " + msg1;
+ }
+ if (event.isControlDown()) {
+ msg1 = "STRG + " + msg1;
+ }
+ if (event.isShiftDown()) {
+ msg1 = "UMSCHALT + " + msg1;
+ }
+ }
+ }
+ repaint();
+ }
+
+ public void keyReleased(KeyEvent event) {
+ msg1 = "";
+ repaint();
+ }
+
+ public void keyTyped(KeyEvent event) {
+ char key = event.getKeyChar();
+
+ System.out.println("keyTyped "+event.getKeyCode());
+
+ if (key == KeyEvent.VK_BACK_SPACE) {
+ if (msg2.length() > 0) {
+ msg2 = msg2.substring(0, msg2.length() - 1);
+ }
+ } else if (key >= KeyEvent.VK_SPACE) {
+ if (msg2.length() < 40) {
+ msg2 += event.getKeyChar();
+ }
+ }
+ repaint();
+ }
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/TestKeyCodesNumber.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/TestKeyCodesNumber.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/TestKeyCodesNumber.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/TestKeyCodesNumber.java Tue Jan 24 18:30:48 2012
@@ -1,32 +1,50 @@
-package org.openmeetings.test.rdc;
-
-import java.awt.event.KeyEvent;
-
-import junit.framework.TestCase;
-
-import org.apache.log4j.Logger;
-import org.junit.Test;
-
-public class TestKeyCodesNumber extends TestCase {
-
- private static final Logger log = Logger.getLogger(TestKeyCodesNumber.class);
-
- @Test
- public void testKeyCodes() {
- try {
-
- for (int i = 1; i < 600; i++) {
-
- String charText = KeyEvent.getKeyText(i);
-
- log.debug("ERROR " + i + " " + charText);
-
- }
-
- } catch (Exception err) {
- log.error("[testKeyCodes]", err);
- }
-
- }
-
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.rdc;
+
+import java.awt.event.KeyEvent;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+public class TestKeyCodesNumber extends TestCase {
+
+ private static final Logger log = Logger.getLogger(TestKeyCodesNumber.class);
+
+ @Test
+ public void testKeyCodes() {
+ try {
+
+ for (int i = 1; i < 600; i++) {
+
+ String charText = KeyEvent.getKeyText(i);
+
+ log.debug("ERROR " + i + " " + charText);
+
+ }
+
+ } catch (Exception err) {
+ log.error("[testKeyCodes]", err);
+ }
+
+ }
+
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/TestReadKeyCodesNumber.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/TestReadKeyCodesNumber.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/TestReadKeyCodesNumber.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rdc/TestReadKeyCodesNumber.java Tue Jan 24 18:30:48 2012
@@ -1,34 +1,52 @@
-package org.openmeetings.test.rdc;
-
-import junit.framework.TestCase;
-
-import org.apache.log4j.Logger;
-import org.junit.Test;
-
-public class TestReadKeyCodesNumber extends TestCase {
-
- private static final Logger log = Logger
- .getLogger(TestReadKeyCodesNumber.class);
-
- @Test
- public void testTestKeyCodesNumber() {
- try {
-
- this.testKeyCodes();
-
- } catch (Exception er) {
- log.debug("ERROR ", er);
- }
- }
-
- @Test
- public void testKeyCodes() {
- try {
-
- } catch (Exception err) {
- log.error("[testKeyCodes]", err);
- }
-
- }
-
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.rdc;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+public class TestReadKeyCodesNumber extends TestCase {
+
+ private static final Logger log = Logger
+ .getLogger(TestReadKeyCodesNumber.class);
+
+ @Test
+ public void testTestKeyCodesNumber() {
+ try {
+
+ this.testKeyCodes();
+
+ } catch (Exception er) {
+ log.debug("ERROR ", er);
+ }
+ }
+
+ @Test
+ public void testKeyCodes() {
+ try {
+
+ } catch (Exception err) {
+ log.error("[testKeyCodes]", err);
+ }
+
+ }
+
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rss/TestRssLoader.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rss/TestRssLoader.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rss/TestRssLoader.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/rss/TestRssLoader.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.rss;
import org.apache.log4j.Logger;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestGZipDeltaPackage.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestGZipDeltaPackage.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestGZipDeltaPackage.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestGZipDeltaPackage.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
import static org.openmeetings.client.beans.ClientConnectionBean.imgQuality;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestGZipPackage.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestGZipPackage.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestGZipPackage.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestGZipPackage.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
import static org.openmeetings.client.beans.ClientConnectionBean.imgQuality;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestJPEGZipPackage.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestJPEGZipPackage.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestJPEGZipPackage.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestJPEGZipPackage.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
import static org.openmeetings.client.beans.ClientConnectionBean.imgQuality;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestPNGZipPackage.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestPNGZipPackage.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestPNGZipPackage.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestPNGZipPackage.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
import static org.openmeetings.client.beans.ClientConnectionBean.imgQuality;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestScrollbar.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestScrollbar.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestScrollbar.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestScrollbar.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
import junit.framework.TestCase;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestSender.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestSender.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestSender.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestSender.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
import java.net.DatagramPacket;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestSocket.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestSocket.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestSocket.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestSocket.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
import junit.framework.TestCase;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestWebStartGui.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestWebStartGui.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestWebStartGui.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestWebStartGui.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
import junit.framework.TestCase;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestWebStartViewerGui.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestWebStartViewerGui.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestWebStartViewerGui.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/server/TestWebStartViewerGui.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.server;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestConnection.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestConnection.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestConnection.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestConnection.java Tue Jan 24 18:30:48 2012
@@ -1,46 +1,64 @@
-package org.openmeetings.test.sip;
-
-import org.junit.Test;
-
-public class TestConnection {
-
- @Test
- public void main() {
- try {
-
-// System.out.println("Test Connection");
-//
-// // Get target URL
-// String strURL = "http:///manager/xml_rpc_server.php";
-// // Get file to be posted
-// String fileToPost = "createUser.xml";
-//
-// File f = new File(fileToPost);
-//
-// // Prepare HTTP post
-// PostMethod post = new PostMethod(strURL);
-// // Request content will be retrieved directly
-// // from the input stream
-// RequestEntity entity = new FileRequestEntity(f, "text/xml; charset=UTF-8");
-// post.setRequestEntity(entity);
-//
-//
-// // Get HTTP client
-// HttpClient httpclient = new HttpClient();
-//
-// // Execute request
-// int result = httpclient.executeMethod(post);
-// // Display status code
-// System.out.println("Response status code: " + result);
-// // Display response
-// System.out.println("Response body: ");
-// System.out.println(post.getResponseBodyAsString());
-
-
-
- } catch (Exception err) {
- err.printStackTrace();
- }
-
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.sip;
+
+import org.junit.Test;
+
+public class TestConnection {
+
+ @Test
+ public void main() {
+ try {
+
+// System.out.println("Test Connection");
+//
+// // Get target URL
+// String strURL = "http:///manager/xml_rpc_server.php";
+// // Get file to be posted
+// String fileToPost = "createUser.xml";
+//
+// File f = new File(fileToPost);
+//
+// // Prepare HTTP post
+// PostMethod post = new PostMethod(strURL);
+// // Request content will be retrieved directly
+// // from the input stream
+// RequestEntity entity = new FileRequestEntity(f, "text/xml; charset=UTF-8");
+// post.setRequestEntity(entity);
+//
+//
+// // Get HTTP client
+// HttpClient httpclient = new HttpClient();
+//
+// // Execute request
+// int result = httpclient.executeMethod(post);
+// // Display status code
+// System.out.println("Response status code: " + result);
+// // Display response
+// System.out.println("Response body: ");
+// System.out.println(post.getResponseBodyAsString());
+
+
+
+ } catch (Exception err) {
+ err.printStackTrace();
+ }
+
+ }
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestDebugConnection.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestDebugConnection.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestDebugConnection.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestDebugConnection.java Tue Jan 24 18:30:48 2012
@@ -1,254 +1,272 @@
-package org.openmeetings.test.sip;
-
-import java.net.URL;
-import java.security.cert.X509Certificate;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-import junit.framework.TestCase;
-
-import org.apache.log4j.Logger;
-import org.apache.xmlrpc.client.XmlRpcClient;
-import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
-import org.junit.Test;
-import org.openmeetings.utils.crypt.MD5;
-
-public class TestDebugConnection extends TestCase {
-
- private static Logger log = Logger.getLogger(TestDebugConnection.class);
-
- @Test
- public void testTestSocket(){
- // TODO Auto-generated method stub
- try {
- log.debug("Test Connection");
-
- // Create a trust manager that does not validate certificate chains
- TrustManager[] trustAllCerts = new TrustManager[] {
- new X509TrustManager() {
- public X509Certificate[] getAcceptedIssuers() {
- return null;
- }
-
- public void checkClientTrusted(X509Certificate[] certs, String authType) {
- // Trust always
- }
-
- public void checkServerTrusted(X509Certificate[] certs, String authType) {
- // Trust always
- }
- }
- };
-
- // Install the all-trusting trust manager
- SSLContext sc = SSLContext.getInstance("SSL");
- // Create empty HostnameVerifier
- HostnameVerifier hv = new HostnameVerifier() {
- public boolean verify(String arg0, SSLSession arg1) {
- return true;
- }
- };
-
- sc.init(null, trustAllCerts, new java.security.SecureRandom());
- HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
- HttpsURLConnection.setDefaultHostnameVerifier(hv);
-
- XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
-
- log.debug("config User Agent "+config.getUserAgent());
-
- config.setServerURL(new URL("https://85.134.48.179/manager/xml_rpc_server.php"));
- XmlRpcClient client = new XmlRpcClient();
-
- client.setConfig(config);
-
- String client_id = "user_admin";
- String client_secret = "******";
-
-
- String userid = "067201101";
- String domain = "voipt3.multi.fi";
- String first_name = "Matti";
- String middle_i = "X";
- String last_name = "Virtanen";
- String password = "password";
- String community_code = "999";
- String language_code = "fi";
- String email = "matti@.com";
- String adminid = "matti";
-
- String digest = digest_calculate(new Object[]{client_id, userid, domain,
- first_name, middle_i, last_name,
- password, community_code,
- language_code, email, adminid,
- client_secret});
-
- // $digest = digest_calculate($client_id, $userid, $domain,
- // $adminid, $client_secret);
- // $params = array(client_id=>$client_id, digest=>$digest, userid=>$userid,
- // domain=>$domain, adminid=>$adminid);
-
-
- log.debug(digest);
-
- //function user_info($userid, $domain, $adminid, &$error)
- Object[] params = new Object[]{client_id, digest, userid,
- domain, first_name,
- middle_i, last_name,
- password, community_code,
- language_code, email,
- adminid};
-
-
- Object result = client.execute("OpenSIPg.UserCreate", params);
-
- if (result != null) {
- log.debug(result.getClass().getName());
-
- if (result instanceof Map) {
-
- Map<?, ?> mapResults = (Map<?, ?>) result;
-
- for (Iterator<?> iter = mapResults.keySet().iterator();iter.hasNext();) {
-
- Object key = iter.next();
- log.debug("-- key "+key+" value "+mapResults.get(key));
-
- }
-
- }
- }
-
- } catch (Exception err) {
- log.error("[testConnection]",err);
- }
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- try {
- log.debug("Test Connection");
-
- // Create a trust manager that does not validate certificate chains
- TrustManager[] trustAllCerts = new TrustManager[] {
- new X509TrustManager() {
- public X509Certificate[] getAcceptedIssuers() {
- return null;
- }
-
- public void checkClientTrusted(X509Certificate[] certs, String authType) {
- // Trust always
- }
-
- public void checkServerTrusted(X509Certificate[] certs, String authType) {
- // Trust always
- }
- }
- };
-
- // Install the all-trusting trust manager
- SSLContext sc = SSLContext.getInstance("SSL");
- // Create empty HostnameVerifier
- HostnameVerifier hv = new HostnameVerifier() {
- public boolean verify(String arg0, SSLSession arg1) {
- return true;
- }
- };
-
- sc.init(null, trustAllCerts, new java.security.SecureRandom());
- HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
- HttpsURLConnection.setDefaultHostnameVerifier(hv);
-
- XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
-
- log.debug("config User Agent "+config.getUserAgent());
-
- config.setServerURL(new URL("https://85.134.48.179/manager/xml_rpc_server.php"));
- XmlRpcClient client = new XmlRpcClient();
-
- client.setConfig(config);
-
- String client_id = "user_admin";
- String client_secret = "fMXCHeeS6JM9";
-
-
- String userid = "067201101";
- String domain = "voipt3.multi.fi";
- String first_name = "Matti";
- String middle_i = "X";
- String last_name = "Virtanen";
- String password = "password";
- String community_code = "999";
- String language_code = "fi";
- String email = "matti@sucks.com";
- String adminid = "matti";
-
- String digest = digest_calculate(new Object[]{client_id, userid, domain,
- first_name, middle_i, last_name,
- password, community_code,
- language_code, email, adminid,
- client_secret});
-
- // $digest = digest_calculate($client_id, $userid, $domain,
- // $adminid, $client_secret);
- // $params = array(client_id=>$client_id, digest=>$digest, userid=>$userid,
- // domain=>$domain, adminid=>$adminid);
-
-
- log.debug(digest);
-
- //function user_info($userid, $domain, $adminid, &$error)
- Object[] params = new Object[]{client_id, digest, userid,
- domain, first_name,
- middle_i, last_name,
- password, community_code,
- language_code, email,
- adminid};
-
-
- Object result = client.execute("OpenSIPg.UserCreate", params);
-
- if (result != null) {
- log.debug(result.getClass().getName());
-
- if (result instanceof Map) {
-
- Map<?, ?> mapResults = (Map<?, ?>) result;
-
- for (Iterator<?> iter = mapResults.keySet().iterator();iter.hasNext();) {
-
- Object key = iter.next();
- log.debug("-- key "+key+" value "+mapResults.get(key));
-
- }
-
- }
- }
-
- } catch (Exception err) {
- log.error("[testConnection]",err);
- }
- }
-
- public static String digest_calculate(Object[] params) throws Exception {
- String stringToMd5 = "";
-
- for (int i=0;i<params.length;i++) {
- stringToMd5 += params[i];
- }
-
- return MD5.do_checksum(stringToMd5);
-
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.sip;
+
+import java.net.URL;
+import java.security.cert.X509Certificate;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
+import org.junit.Test;
+import org.openmeetings.utils.crypt.MD5;
+
+public class TestDebugConnection extends TestCase {
+
+ private static Logger log = Logger.getLogger(TestDebugConnection.class);
+
+ @Test
+ public void testTestSocket(){
+ // TODO Auto-generated method stub
+ try {
+ log.debug("Test Connection");
+
+ // Create a trust manager that does not validate certificate chains
+ TrustManager[] trustAllCerts = new TrustManager[] {
+ new X509TrustManager() {
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+
+ public void checkClientTrusted(X509Certificate[] certs, String authType) {
+ // Trust always
+ }
+
+ public void checkServerTrusted(X509Certificate[] certs, String authType) {
+ // Trust always
+ }
+ }
+ };
+
+ // Install the all-trusting trust manager
+ SSLContext sc = SSLContext.getInstance("SSL");
+ // Create empty HostnameVerifier
+ HostnameVerifier hv = new HostnameVerifier() {
+ public boolean verify(String arg0, SSLSession arg1) {
+ return true;
+ }
+ };
+
+ sc.init(null, trustAllCerts, new java.security.SecureRandom());
+ HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ HttpsURLConnection.setDefaultHostnameVerifier(hv);
+
+ XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
+
+ log.debug("config User Agent "+config.getUserAgent());
+
+ config.setServerURL(new URL("https://85.134.48.179/manager/xml_rpc_server.php"));
+ XmlRpcClient client = new XmlRpcClient();
+
+ client.setConfig(config);
+
+ String client_id = "user_admin";
+ String client_secret = "******";
+
+
+ String userid = "067201101";
+ String domain = "voipt3.multi.fi";
+ String first_name = "Matti";
+ String middle_i = "X";
+ String last_name = "Virtanen";
+ String password = "password";
+ String community_code = "999";
+ String language_code = "fi";
+ String email = "matti@.com";
+ String adminid = "matti";
+
+ String digest = digest_calculate(new Object[]{client_id, userid, domain,
+ first_name, middle_i, last_name,
+ password, community_code,
+ language_code, email, adminid,
+ client_secret});
+
+ // $digest = digest_calculate($client_id, $userid, $domain,
+ // $adminid, $client_secret);
+ // $params = array(client_id=>$client_id, digest=>$digest, userid=>$userid,
+ // domain=>$domain, adminid=>$adminid);
+
+
+ log.debug(digest);
+
+ //function user_info($userid, $domain, $adminid, &$error)
+ Object[] params = new Object[]{client_id, digest, userid,
+ domain, first_name,
+ middle_i, last_name,
+ password, community_code,
+ language_code, email,
+ adminid};
+
+
+ Object result = client.execute("OpenSIPg.UserCreate", params);
+
+ if (result != null) {
+ log.debug(result.getClass().getName());
+
+ if (result instanceof Map) {
+
+ Map<?, ?> mapResults = (Map<?, ?>) result;
+
+ for (Iterator<?> iter = mapResults.keySet().iterator();iter.hasNext();) {
+
+ Object key = iter.next();
+ log.debug("-- key "+key+" value "+mapResults.get(key));
+
+ }
+
+ }
+ }
+
+ } catch (Exception err) {
+ log.error("[testConnection]",err);
+ }
+ }
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ try {
+ log.debug("Test Connection");
+
+ // Create a trust manager that does not validate certificate chains
+ TrustManager[] trustAllCerts = new TrustManager[] {
+ new X509TrustManager() {
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+
+ public void checkClientTrusted(X509Certificate[] certs, String authType) {
+ // Trust always
+ }
+
+ public void checkServerTrusted(X509Certificate[] certs, String authType) {
+ // Trust always
+ }
+ }
+ };
+
+ // Install the all-trusting trust manager
+ SSLContext sc = SSLContext.getInstance("SSL");
+ // Create empty HostnameVerifier
+ HostnameVerifier hv = new HostnameVerifier() {
+ public boolean verify(String arg0, SSLSession arg1) {
+ return true;
+ }
+ };
+
+ sc.init(null, trustAllCerts, new java.security.SecureRandom());
+ HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ HttpsURLConnection.setDefaultHostnameVerifier(hv);
+
+ XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
+
+ log.debug("config User Agent "+config.getUserAgent());
+
+ config.setServerURL(new URL("https://85.134.48.179/manager/xml_rpc_server.php"));
+ XmlRpcClient client = new XmlRpcClient();
+
+ client.setConfig(config);
+
+ String client_id = "user_admin";
+ String client_secret = "fMXCHeeS6JM9";
+
+
+ String userid = "067201101";
+ String domain = "voipt3.multi.fi";
+ String first_name = "Matti";
+ String middle_i = "X";
+ String last_name = "Virtanen";
+ String password = "password";
+ String community_code = "999";
+ String language_code = "fi";
+ String email = "matti@sucks.com";
+ String adminid = "matti";
+
+ String digest = digest_calculate(new Object[]{client_id, userid, domain,
+ first_name, middle_i, last_name,
+ password, community_code,
+ language_code, email, adminid,
+ client_secret});
+
+ // $digest = digest_calculate($client_id, $userid, $domain,
+ // $adminid, $client_secret);
+ // $params = array(client_id=>$client_id, digest=>$digest, userid=>$userid,
+ // domain=>$domain, adminid=>$adminid);
+
+
+ log.debug(digest);
+
+ //function user_info($userid, $domain, $adminid, &$error)
+ Object[] params = new Object[]{client_id, digest, userid,
+ domain, first_name,
+ middle_i, last_name,
+ password, community_code,
+ language_code, email,
+ adminid};
+
+
+ Object result = client.execute("OpenSIPg.UserCreate", params);
+
+ if (result != null) {
+ log.debug(result.getClass().getName());
+
+ if (result instanceof Map) {
+
+ Map<?, ?> mapResults = (Map<?, ?>) result;
+
+ for (Iterator<?> iter = mapResults.keySet().iterator();iter.hasNext();) {
+
+ Object key = iter.next();
+ log.debug("-- key "+key+" value "+mapResults.get(key));
+
+ }
+
+ }
+ }
+
+ } catch (Exception err) {
+ log.error("[testConnection]",err);
+ }
+ }
+
+ public static String digest_calculate(Object[] params) throws Exception {
+ String stringToMd5 = "";
+
+ for (int i=0;i<params.length;i++) {
+ stringToMd5 += params[i];
+ }
+
+ return MD5.do_checksum(stringToMd5);
+
+ }
+
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestRPCGateway.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestRPCGateway.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestRPCGateway.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/sip/TestRPCGateway.java Tue Jan 24 18:30:48 2012
@@ -1,24 +1,42 @@
-package org.openmeetings.test.sip;
-
-//import org.apache.log4j.Logger;
-import junit.framework.TestCase;
-
-import org.junit.Test;
-import org.openmeetings.app.sip.xmlrpc.test.OpenXGClient;
-
-public class TestRPCGateway extends TestCase {
-
- //private static final Logger log = Logger.getLogger(TestRPCGateway.class);
-
- @Test
- public void testTestSocket(){
- try {
-
- OpenXGClient.getInstance().testConnection();
-
- } catch (Exception err) {
- err.printStackTrace();
- //log.error("[TestSocket] ",err);
- }
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.sip;
+
+//import org.apache.log4j.Logger;
+import junit.framework.TestCase;
+
+import org.junit.Test;
+import org.openmeetings.app.sip.xmlrpc.test.OpenXGClient;
+
+public class TestRPCGateway extends TestCase {
+
+ //private static final Logger log = Logger.getLogger(TestRPCGateway.class);
+
+ @Test
+ public void testTestSocket(){
+ try {
+
+ OpenXGClient.getInstance().testConnection();
+
+ } catch (Exception err) {
+ err.printStackTrace();
+ //log.error("[TestSocket] ",err);
+ }
+ }
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/smoke/TestSmokeBasic.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/smoke/TestSmokeBasic.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/smoke/TestSmokeBasic.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/smoke/TestSmokeBasic.java Tue Jan 24 18:30:48 2012
@@ -1,18 +1,36 @@
-package org.openmeetings.test.smoke;
-
-import static junit.framework.Assert.assertNotNull;
-
-import org.junit.Test;
-import org.openmeetings.app.data.user.Usermanagement;
-import org.openmeetings.test.AbstractOpenmeetingsSpringTest;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class TestSmokeBasic extends AbstractOpenmeetingsSpringTest {
- @Autowired
- private Usermanagement userManagement;
-
- @Test
- public void createErrorValueAndTest() {
- assertNotNull(userManagement.getUserById(1L));
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.smoke;
+
+import static junit.framework.Assert.assertNotNull;
+
+import org.junit.Test;
+import org.openmeetings.app.data.user.Usermanagement;
+import org.openmeetings.test.AbstractOpenmeetingsSpringTest;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class TestSmokeBasic extends AbstractOpenmeetingsSpringTest {
+ @Autowired
+ private Usermanagement userManagement;
+
+ @Test
+ public void createErrorValueAndTest() {
+ assertNotNull(userManagement.getUserById(1L));
+ }
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestGetIds.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestGetIds.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestGetIds.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestGetIds.java Tue Jan 24 18:30:48 2012
@@ -1,37 +1,55 @@
-package org.openmeetings.test.timezone;
-
-import java.util.Calendar;
-import java.util.TimeZone;
-
-import junit.framework.TestCase;
-
-import org.junit.Test;
-
-public class TestGetIds extends TestCase {
-
- @Test
- public void testGetIds() {
- try {
-
- String[] ids = TimeZone.getAvailableIDs();
- for (String id : ids) {
-
- TimeZone timeZone = TimeZone.getTimeZone(id);
- //TimeZone timeZone = timeRegistry.getTimeZone(id);
-
- Calendar cal = Calendar.getInstance();
- cal.setTimeZone(timeZone);
- // + cal.get(Calendar.DST_OFFSET)
- int offset = cal.get(Calendar.ZONE_OFFSET);
-
- int offsetInHours = offset/1000/60;
-
- System.out.println("<name>" + id + "</name><offset>"+offsetInHours+"</offset>");
- }
-
- } catch (Exception err) {
- err.printStackTrace();
- }
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.timezone;
+
+import java.util.Calendar;
+import java.util.TimeZone;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+
+public class TestGetIds extends TestCase {
+
+ @Test
+ public void testGetIds() {
+ try {
+
+ String[] ids = TimeZone.getAvailableIDs();
+ for (String id : ids) {
+
+ TimeZone timeZone = TimeZone.getTimeZone(id);
+ //TimeZone timeZone = timeRegistry.getTimeZone(id);
+
+ Calendar cal = Calendar.getInstance();
+ cal.setTimeZone(timeZone);
+ // + cal.get(Calendar.DST_OFFSET)
+ int offset = cal.get(Calendar.ZONE_OFFSET);
+
+ int offsetInHours = offset/1000/60;
+
+ System.out.println("<name>" + id + "</name><offset>"+offsetInHours+"</offset>");
+ }
+
+ } catch (Exception err) {
+ err.printStackTrace();
+ }
+ }
+
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestGetOffset.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestGetOffset.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestGetOffset.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestGetOffset.java Tue Jan 24 18:30:48 2012
@@ -1,29 +1,47 @@
-package org.openmeetings.test.timezone;
-
-import java.util.Calendar;
-import java.util.TimeZone;
-
-import org.junit.Test;
-
-import junit.framework.TestCase;
-
-public class TestGetOffset extends TestCase {
-
- @Test
- public void testGetIds() {
- try {
-
- TimeZone timeZone = TimeZone.getTimeZone("Etc/GMT+1");
-
- Calendar cal = Calendar.getInstance();
- cal.setTimeZone(timeZone);
- int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
-
- System.out.println("CalendarServlet offset "+offset );
-
- } catch (Exception err) {
- err.printStackTrace();
- }
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.timezone;
+
+import java.util.Calendar;
+import java.util.TimeZone;
+
+import org.junit.Test;
+
+import junit.framework.TestCase;
+
+public class TestGetOffset extends TestCase {
+
+ @Test
+ public void testGetIds() {
+ try {
+
+ TimeZone timeZone = TimeZone.getTimeZone("Etc/GMT+1");
+
+ Calendar cal = Calendar.getInstance();
+ cal.setTimeZone(timeZone);
+ int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
+
+ System.out.println("CalendarServlet offset "+offset );
+
+ } catch (Exception err) {
+ err.printStackTrace();
+ }
+ }
+
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestIds.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestIds.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestIds.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/timezone/TestIds.java Tue Jan 24 18:30:48 2012
@@ -1,27 +1,45 @@
-package org.openmeetings.test.timezone;
-
-import java.util.Calendar;
-
-import junit.framework.TestCase;
-
-import org.junit.Test;
-
-public class TestIds extends TestCase {
-
- @Test
- public void testGetIds() {
- try {
-
- Calendar cal = Calendar.getInstance();
- int offset = cal.get(Calendar.ZONE_OFFSET);
-
- offset = offset/1000/60/60;
-
- System.out.println("offset :: "+offset);
-
- } catch (Exception err) {
- err.printStackTrace();
- }
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.timezone;
+
+import java.util.Calendar;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+
+public class TestIds extends TestCase {
+
+ @Test
+ public void testGetIds() {
+ try {
+
+ Calendar cal = Calendar.getInstance();
+ int offset = cal.get(Calendar.ZONE_OFFSET);
+
+ offset = offset/1000/60/60;
+
+ System.out.println("offset :: "+offset);
+
+ } catch (Exception err) {
+ err.printStackTrace();
+ }
+ }
+
+}
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/user/TestUserOrganisation.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/user/TestUserOrganisation.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/user/TestUserOrganisation.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/user/TestUserOrganisation.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.user;
import static org.junit.Assert.assertNotNull;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestAuth.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestAuth.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestAuth.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestAuth.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.userdata;
import org.junit.Test;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestLogin.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestLogin.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestLogin.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestLogin.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.userdata;
import org.openmeetings.app.persistence.beans.basic.Sessiondata;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestMD5.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestMD5.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestMD5.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/userdata/TestMD5.java Tue Jan 24 18:30:48 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.openmeetings.test.userdata;
import junit.framework.TestCase;
Modified: incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/whiteboard/TestWhiteboardLoad.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/whiteboard/TestWhiteboardLoad.java?rev=1235400&r1=1235399&r2=1235400&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/whiteboard/TestWhiteboardLoad.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/test/org/openmeetings/test/whiteboard/TestWhiteboardLoad.java Tue Jan 24 18:30:48 2012
@@ -1,53 +1,71 @@
-package org.openmeetings.test.whiteboard;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.apache.commons.collections.ComparatorUtils;
-import org.junit.Test;
-
-public class TestWhiteboardLoad {
-
- @Test
- public void test() {
-
- try {
-
- File dir = new File(
- "C:/Users/swagner/workspaces/indigo_red6/ROOT/dist/red5/webapps/openmeetings/public/cliparts/math");
-
- FilenameFilter getFilesOnly = new FilenameFilter() {
- public boolean accept(File b, String name) {
- String absPath = b.getAbsolutePath() + File.separatorChar
- + name;
- File f = new File(absPath);
- return !f.isDirectory();
- }
- };
-
- String[] files = dir.list(getFilesOnly);
-
- @SuppressWarnings("unchecked")
- Comparator<String> comparator = ComparatorUtils.naturalComparator();
- Arrays.sort(files, comparator);
-
- String row = "";
- for (int i = 0; i < files.length; i++) {
-
- float tModulo20 = i % 20;
- if (tModulo20 == 0) {
- System.out.println(row);
- row = "";
- }
-
- row += "[" + i + "] " + files[i] + " | ";
- }
-
- } catch (Exception err) {
- err.printStackTrace();
- }
-
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") + you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openmeetings.test.whiteboard;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Arrays;
+import java.util.Comparator;
+
+import org.apache.commons.collections.ComparatorUtils;
+import org.junit.Test;
+
+public class TestWhiteboardLoad {
+
+ @Test
+ public void test() {
+
+ try {
+
+ File dir = new File(
+ "C:/Users/swagner/workspaces/indigo_red6/ROOT/dist/red5/webapps/openmeetings/public/cliparts/math");
+
+ FilenameFilter getFilesOnly = new FilenameFilter() {
+ public boolean accept(File b, String name) {
+ String absPath = b.getAbsolutePath() + File.separatorChar
+ + name;
+ File f = new File(absPath);
+ return !f.isDirectory();
+ }
+ };
+
+ String[] files = dir.list(getFilesOnly);
+
+ @SuppressWarnings("unchecked")
+ Comparator<String> comparator = ComparatorUtils.naturalComparator();
+ Arrays.sort(files, comparator);
+
+ String row = "";
+ for (int i = 0; i < files.length; i++) {
+
+ float tModulo20 = i % 20;
+ if (tModulo20 == 0) {
+ System.out.println(row);
+ row = "";
+ }
+
+ row += "[" + i + "] " + files[i] + " | ";
+ }
+
+ } catch (Exception err) {
+ err.printStackTrace();
+ }
+
+ }
+}