summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-08-13 15:26:17 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-13 15:26:17 +0300
commit2e6313e12b7c11706d154befd0cdf3a665f46365 (patch)
tree22033c132a5cfc0668e9e4a11462dc65bc3b61fe /src/com
parent5dfec038cd191101a9e918f8f886b3a9b45e0179 (diff)
downloadvaadin-framework-2e6313e12b7c11706d154befd0cdf3a665f46365.tar.gz
vaadin-framework-2e6313e12b7c11706d154befd0cdf3a665f46365.zip
Rename VaadinContext -> AddonContext (#9273)
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/terminal/DeploymentConfiguration.java10
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java8
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java8
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractDeploymentConfiguration.java16
-rw-r--r--src/com/vaadin/terminal/gwt/server/AddonContext.java (renamed from src/com/vaadin/terminal/gwt/server/VaadinContext.java)22
-rw-r--r--src/com/vaadin/terminal/gwt/server/AddonContextEvent.java19
-rw-r--r--src/com/vaadin/terminal/gwt/server/AddonContextListener.java13
-rw-r--r--src/com/vaadin/terminal/gwt/server/ApplicationStartedEvent.java6
-rw-r--r--src/com/vaadin/terminal/gwt/server/VaadinContextEvent.java19
-rw-r--r--src/com/vaadin/terminal/gwt/server/VaadinContextListener.java13
10 files changed, 67 insertions, 67 deletions
diff --git a/src/com/vaadin/terminal/DeploymentConfiguration.java b/src/com/vaadin/terminal/DeploymentConfiguration.java
index 160350ca24..ae96dcaec5 100644
--- a/src/com/vaadin/terminal/DeploymentConfiguration.java
+++ b/src/com/vaadin/terminal/DeploymentConfiguration.java
@@ -11,8 +11,8 @@ import java.util.Properties;
import javax.portlet.PortletContext;
import javax.servlet.ServletContext;
-import com.vaadin.terminal.gwt.server.VaadinContext;
-import com.vaadin.terminal.gwt.server.VaadinContextListener;
+import com.vaadin.terminal.gwt.server.AddonContext;
+import com.vaadin.terminal.gwt.server.AddonContextListener;
/**
* Provide deployment specific settings that are required outside terminal
@@ -115,9 +115,9 @@ public interface DeploymentConfiguration extends Serializable {
*/
public Properties getInitParameters();
- public Iterator<VaadinContextListener> getContextListeners();
+ public Iterator<AddonContextListener> getAddonContextListeners();
- public VaadinContext getVaadinContext();
+ public AddonContext getAddonContext();
- public void setVaadinContext(VaadinContext vaadinContext);
+ public void setAddonContext(AddonContext vaadinContext);
}
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
index e5fb6afad2..40958e2868 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
@@ -290,7 +290,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
}
};
- private final VaadinContext vaadinContext = new VaadinContext(
+ private final AddonContext addonContext = new AddonContext(
getDeploymentConfiguration());
@Override
@@ -319,14 +319,14 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
checkProductionMode();
checkCrossSiteProtection();
- vaadinContext.init();
+ addonContext.init();
}
@Override
public void destroy() {
super.destroy();
- vaadinContext.destroy();
+ addonContext.destroy();
}
private void checkCrossSiteProtection() {
@@ -801,7 +801,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
application.start(new ApplicationStartEvent(null,
getDeploymentConfiguration().getInitParameters(), context,
isProductionMode()));
- vaadinContext.applicationStarted(application);
+ addonContext.applicationStarted(application);
}
}
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
index b8aba5c4b4..603bc74a21 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
@@ -128,7 +128,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
}
};
- private final VaadinContext vaadinContext = new VaadinContext(
+ private final AddonContext addonContext = new AddonContext(
getDeploymentConfiguration());
/**
@@ -170,14 +170,14 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
checkCrossSiteProtection();
checkResourceCacheTime();
- vaadinContext.init();
+ addonContext.init();
}
@Override
public void destroy() {
super.destroy();
- vaadinContext.destroy();
+ addonContext.destroy();
}
private void checkCrossSiteProtection() {
@@ -901,7 +901,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
application.start(new ApplicationStartEvent(applicationUrl,
getDeploymentConfiguration().getInitParameters(),
webApplicationContext, isProductionMode()));
- vaadinContext.applicationStarted(application);
+ addonContext.applicationStarted(application);
}
}
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractDeploymentConfiguration.java b/src/com/vaadin/terminal/gwt/server/AbstractDeploymentConfiguration.java
index 47bf5ecc60..f731cbbdd0 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractDeploymentConfiguration.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractDeploymentConfiguration.java
@@ -16,7 +16,7 @@ public abstract class AbstractDeploymentConfiguration implements
private final Class<?> systemPropertyBaseClass;
private final Properties applicationProperties = new Properties();
- private VaadinContext vaadinContext;
+ private AddonContext addonContext;
public AbstractDeploymentConfiguration(Class<?> systemPropertyBaseClass) {
this.systemPropertyBaseClass = systemPropertyBaseClass;
@@ -123,21 +123,21 @@ public abstract class AbstractDeploymentConfiguration implements
}
@Override
- public Iterator<VaadinContextListener> getContextListeners() {
+ public Iterator<AddonContextListener> getAddonContextListeners() {
// Called once for init and once for destroy, so it's probably not worth
// the effort caching the ServiceLoader instance
- ServiceLoader<VaadinContextListener> contextListenerLoader = ServiceLoader
- .load(VaadinContextListener.class, getClassLoader());
+ ServiceLoader<AddonContextListener> contextListenerLoader = ServiceLoader
+ .load(AddonContextListener.class, getClassLoader());
return contextListenerLoader.iterator();
}
@Override
- public void setVaadinContext(VaadinContext vaadinContext) {
- this.vaadinContext = vaadinContext;
+ public void setAddonContext(AddonContext addonContext) {
+ this.addonContext = addonContext;
}
@Override
- public VaadinContext getVaadinContext() {
- return vaadinContext;
+ public AddonContext getAddonContext() {
+ return addonContext;
}
}
diff --git a/src/com/vaadin/terminal/gwt/server/VaadinContext.java b/src/com/vaadin/terminal/gwt/server/AddonContext.java
index 081f25bbfb..0f887b0fbd 100644
--- a/src/com/vaadin/terminal/gwt/server/VaadinContext.java
+++ b/src/com/vaadin/terminal/gwt/server/AddonContext.java
@@ -14,7 +14,7 @@ import com.vaadin.event.EventRouter;
import com.vaadin.terminal.DeploymentConfiguration;
import com.vaadin.tools.ReflectTools;
-public class VaadinContext {
+public class AddonContext {
private static final Method APPLICATION_STARTED_METHOD = ReflectTools
.findMethod(ApplicationStartedListener.class, "applicationStarted",
ApplicationStartedEvent.class);
@@ -25,9 +25,9 @@ public class VaadinContext {
private List<BootstrapListener> bootstrapListeners = new ArrayList<BootstrapListener>();
- public VaadinContext(DeploymentConfiguration deploymentConfiguration) {
+ public AddonContext(DeploymentConfiguration deploymentConfiguration) {
this.deploymentConfiguration = deploymentConfiguration;
- deploymentConfiguration.setVaadinContext(this);
+ deploymentConfiguration.setAddonContext(this);
}
public DeploymentConfiguration getDeploymentConfiguration() {
@@ -35,21 +35,21 @@ public class VaadinContext {
}
public void init() {
- VaadinContextEvent event = new VaadinContextEvent(this);
- Iterator<VaadinContextListener> listeners = deploymentConfiguration
- .getContextListeners();
+ AddonContextEvent event = new AddonContextEvent(this);
+ Iterator<AddonContextListener> listeners = deploymentConfiguration
+ .getAddonContextListeners();
while (listeners.hasNext()) {
- VaadinContextListener listener = listeners.next();
+ AddonContextListener listener = listeners.next();
listener.contextCreated(event);
}
}
public void destroy() {
- VaadinContextEvent event = new VaadinContextEvent(this);
- Iterator<VaadinContextListener> listeners = deploymentConfiguration
- .getContextListeners();
+ AddonContextEvent event = new AddonContextEvent(this);
+ Iterator<AddonContextListener> listeners = deploymentConfiguration
+ .getAddonContextListeners();
while (listeners.hasNext()) {
- VaadinContextListener listener = listeners.next();
+ AddonContextListener listener = listeners.next();
listener.contextDestoryed(event);
}
}
diff --git a/src/com/vaadin/terminal/gwt/server/AddonContextEvent.java b/src/com/vaadin/terminal/gwt/server/AddonContextEvent.java
new file mode 100644
index 0000000000..33f681499f
--- /dev/null
+++ b/src/com/vaadin/terminal/gwt/server/AddonContextEvent.java
@@ -0,0 +1,19 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.terminal.gwt.server;
+
+import java.util.EventObject;
+
+public class AddonContextEvent extends EventObject {
+
+ public AddonContextEvent(AddonContext source) {
+ super(source);
+ }
+
+ public AddonContext getAddonContext() {
+ return (AddonContext) getSource();
+ }
+
+}
diff --git a/src/com/vaadin/terminal/gwt/server/AddonContextListener.java b/src/com/vaadin/terminal/gwt/server/AddonContextListener.java
new file mode 100644
index 0000000000..93e7df4ede
--- /dev/null
+++ b/src/com/vaadin/terminal/gwt/server/AddonContextListener.java
@@ -0,0 +1,13 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.terminal.gwt.server;
+
+import java.util.EventListener;
+
+public interface AddonContextListener extends EventListener {
+ public void contextCreated(AddonContextEvent event);
+
+ public void contextDestoryed(AddonContextEvent event);
+}
diff --git a/src/com/vaadin/terminal/gwt/server/ApplicationStartedEvent.java b/src/com/vaadin/terminal/gwt/server/ApplicationStartedEvent.java
index 33859f5605..339b88222e 100644
--- a/src/com/vaadin/terminal/gwt/server/ApplicationStartedEvent.java
+++ b/src/com/vaadin/terminal/gwt/server/ApplicationStartedEvent.java
@@ -11,14 +11,14 @@ import com.vaadin.Application;
public class ApplicationStartedEvent extends EventObject {
private final Application application;
- public ApplicationStartedEvent(VaadinContext context,
+ public ApplicationStartedEvent(AddonContext context,
Application application) {
super(context);
this.application = application;
}
- public VaadinContext getContext() {
- return (VaadinContext) getSource();
+ public AddonContext getContext() {
+ return (AddonContext) getSource();
}
public Application getApplication() {
diff --git a/src/com/vaadin/terminal/gwt/server/VaadinContextEvent.java b/src/com/vaadin/terminal/gwt/server/VaadinContextEvent.java
deleted file mode 100644
index 239490433c..0000000000
--- a/src/com/vaadin/terminal/gwt/server/VaadinContextEvent.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-@VaadinApache2LicenseForJavaFiles@
- */
-
-package com.vaadin.terminal.gwt.server;
-
-import java.util.EventObject;
-
-public class VaadinContextEvent extends EventObject {
-
- public VaadinContextEvent(VaadinContext source) {
- super(source);
- }
-
- public VaadinContext getVaadinContext() {
- return (VaadinContext) getSource();
- }
-
-}
diff --git a/src/com/vaadin/terminal/gwt/server/VaadinContextListener.java b/src/com/vaadin/terminal/gwt/server/VaadinContextListener.java
deleted file mode 100644
index 5e379d9b91..0000000000
--- a/src/com/vaadin/terminal/gwt/server/VaadinContextListener.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-@VaadinApache2LicenseForJavaFiles@
- */
-
-package com.vaadin.terminal.gwt.server;
-
-import java.util.EventListener;
-
-public interface VaadinContextListener extends EventListener {
- public void contextCreated(VaadinContextEvent event);
-
- public void contextDestoryed(VaadinContextEvent event);
-}