You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2013/03/01 10:29:26 UTC
[8/8] git commit: fixed refactoring error
Updated Branches:
refs/heads/master f76727444 -> e9b2c0fd2
fixed refactoring error
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/e9b2c0fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/e9b2c0fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/e9b2c0fd
Branch: refs/heads/master
Commit: e9b2c0fd2cae06accb5629b6e9636fc60fb43dda
Parents: a043d29
Author: Sergio Fernández <wi...@apache.org>
Authored: Fri Mar 1 10:24:28 2013 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Fri Mar 1 10:24:28 2013 +0100
----------------------------------------------------------------------
.../apache/marmotta/splash/ProgressListener.java | 20 ++++++---------
1 files changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/e9b2c0fd/launchers/marmotta-splash/src/main/java/org/apache/marmotta/splash/ProgressListener.java
----------------------------------------------------------------------
diff --git a/launchers/marmotta-splash/src/main/java/org/apache/marmotta/splash/ProgressListener.java b/launchers/marmotta-splash/src/main/java/org/apache/marmotta/splash/ProgressListener.java
index 0c619c2..6206d88 100644
--- a/launchers/marmotta-splash/src/main/java/org/apache/marmotta/splash/ProgressListener.java
+++ b/launchers/marmotta-splash/src/main/java/org/apache/marmotta/splash/ProgressListener.java
@@ -17,6 +17,8 @@
*/
package org.apache.marmotta.splash;
+import java.io.File;
+
import org.apache.catalina.Container;
import org.apache.catalina.ContainerEvent;
import org.apache.catalina.ContainerListener;
@@ -27,21 +29,18 @@ import org.apache.catalina.LifecycleListener;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.core.StandardHost;
import org.apache.catalina.startup.HostConfig;
-
-import java.io.File;
+import org.apache.marmotta.splash.common.MarmottaContext;
/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
+ * Splash screen progress listener
+ *
+ * @author Sebastian Schaffert
*/
public class ProgressListener extends SplashScreenUpdaterBase implements LifecycleListener, ContainerListener {
int cur_progress = 0;
int max_progress = 0;
-
-
private StandardHost host;
/**
@@ -58,11 +57,10 @@ public class ProgressListener extends SplashScreenUpdaterBase implements Lifecyc
for(LifecycleListener listener : host.findLifecycleListeners()) {
if(listener instanceof HostConfig) {
- ((HostConfig)listener).setContextClass("at.newmedialab.lmf.common.LMFContext");
+ ((HostConfig)listener).setContextClass(MarmottaContext.class.getCanonicalName());
}
}
-
} else if(event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
if(event.getLifecycle() instanceof Host) {
// register a container listener to indicate when a component has started
@@ -87,10 +85,8 @@ public class ProgressListener extends SplashScreenUpdaterBase implements Lifecyc
public void containerEvent(ContainerEvent event) {
if(event.getType().equals(Container.ADD_CHILD_EVENT)) {
if(event.getData() instanceof StandardContext) {
- StandardContext context = (StandardContext)event.getData();
-
+ //StandardContext context = (StandardContext)event.getData();
cur_progress++;
-
if(max_progress > 0) {
showProgress(cur_progress * 100 / max_progress);
}