Author: solomax
Date: Wed May 16 05:47:50 2012
New Revision: 1339018
URL: http://svn.apache.org/viewvc?rev=1339018&view=rev
Log:
OPENMEETINGS-70 implemented
Added:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/quartz/scheduler/TestSetupCleanupJob.java
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml?rev=1339018&r1=1339017&r2=1339018&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
Wed May 16 05:47:50 2012
@@ -131,11 +131,33 @@
<value>100000</value>
</property>
</bean>
+ <bean id="testSetupCleanupJob"
class="org.openmeetings.app.quartz.scheduler.TestSetupCleanupJob"/>
+ <bean id="testSetupCleanup"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
+ <property name="targetObject">
+ <ref bean="testSetupCleanupJob" />
+ </property>
+ <property name="targetMethod">
+ <value>doIt</value>
+ </property>
+ <property name="concurrent" value="false" />
+ </bean>
+ <bean id="triggerTestSetupCleanup"
class="org.springframework.scheduling.quartz.SimpleTriggerBean">
+ <property name="jobDetail">
+ <ref bean="testSetupCleanup" />
+ </property>
+ <property name="startDelay">
+ <value>1800000</value> <!-- 30 minutes -->
+ </property>
+ <property name="repeatInterval">
+ <value>1800000</value> <!-- 30 minutes -->
+ </property>
+ </bean>
<bean
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="triggerSessionClear" />
<ref local="triggerMeetingReminder" />
+ <ref local="triggerTestSetupCleanup" />
</list>
</property>
</bean>
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx?rev=1339018&r1=1339017&r2=1339018&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx
Wed May 16 05:47:50 2012
@@ -65,38 +65,9 @@ Test the setup values before you enter a
<handler name="oninit">
<![CDATA[
-
- var g = canvas.getUserData();
- var save = g["showAudioVideoTest"];
-
-
this.startConference();
-
+ //The pre-test is disabled as its integrated into the choose
device settings now
return;
-
- //The pre-test is disabled as its integrated into the choose device
settings now
- if (!canvas.showAudioVideoTest) {
- this.startConference();
- } else if (!this.forceTest && save){
- this.startConference();
- } else {
-
- if (this.isDirectLink) {
- this._enterMeeting.setAttribute("x",this.width-165);
- this._cancel.setAttribute("visibility","hidden");
- }
-
- var t = this;
- canvas.videoComp_lc.closeInitTestingApplicationConfirm
= function() {
- if ($debug) Debug.write("LC
closeInitTestingApplicationConfirm");
- t.closeInitTestingApplicationConfirm();
- }
-
- canvas._loadingAll.hideContentOnly();
- if ($debug) Debug.write("canvas.rtmp_lc_name",
canvas.rtmp_lc_name, "initTestingApplication", this.x, this.y);
- canvas.sendViaLocalConnection(canvas.rtmp_lc_name,
"doInitTestingApplication", [this.x, this.y, canvas.thishib.src]);
- }
-
]]>
</handler>
Added:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/quartz/scheduler/TestSetupCleanupJob.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/quartz/scheduler/TestSetupCleanupJob.java?rev=1339018&view=auto
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/quartz/scheduler/TestSetupCleanupJob.java
(added)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/quartz/scheduler/TestSetupCleanupJob.java
Wed May 16 05:47:50 2012
@@ -0,0 +1,57 @@
+/*
+ * 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.app.quartz.scheduler;
+
+import java.io.File;
+import java.io.FileFilter;
+
+import org.openmeetings.app.OpenmeetingsVariables;
+import org.openmeetings.app.remote.red5.ScopeApplicationAdapter;
+import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
+
+public class TestSetupCleanupJob {
+ private static Logger log =
Red5LoggerFactory.getLogger(TestSetupCleanupJob.class,
OpenmeetingsVariables.webAppRootKey);
+
+ public void doIt() {
+ log.debug("TestSetupClearJob.execute");
+ try {
+ //FIXME need to move all these staff to helper
+ File streams = new
File(ScopeApplicationAdapter.batchFileFir);
+ for (File folder : streams.listFiles()) {
+ if (folder.isDirectory()) {
+ //TODO need to rework this and remove
hardcodings
+ for (File file : folder.listFiles(new
FileFilter() {
+ public boolean accept(File
file) {
+ return
file.getName().startsWith("TEST_SETUP_");
+ }
+ }))
+ {
+ if (file.isFile()) {
+ log.debug("TEST SETUP
found: " + file.getAbsolutePath());
+ file.delete(); //deleted
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ log.error("Unexpected exception while processing tests
setup videous.", e);
+ }
+ }
+}