aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/ParameterHandler.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2011-12-09 09:40:51 +0200
committerLeif Åstrand <leif@vaadin.com>2011-12-09 09:40:51 +0200
commit0e08e671f9fd85d8396abafcbd14dc6803823987 (patch)
tree55bd62bd03d148e759c74bfe05d3a2472f7d87f8 /src/com/vaadin/terminal/ParameterHandler.java
parentc6b6e3f972bf6a25f94be11c7dcc0b0a57943523 (diff)
parentccdef3ddfd79938215cadc947b08a73faf5d0788 (diff)
downloadvaadin-framework-0e08e671f9fd85d8396abafcbd14dc6803823987.tar.gz
vaadin-framework-0e08e671f9fd85d8396abafcbd14dc6803823987.zip
Merge remote branch 'origin/6.8'
Conflicts: src/com/vaadin/Application.java src/com/vaadin/data/Property.java src/com/vaadin/data/util/PropertyFormatter.java src/com/vaadin/terminal/ParameterHandler.java src/com/vaadin/terminal/URIHandler.java src/com/vaadin/terminal/gwt/client/HistoryImplIEVaadin.java src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java src/com/vaadin/terminal/gwt/server/ApplicationPortlet.java src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java src/com/vaadin/ui/Field.java src/com/vaadin/ui/LoginForm.java src/com/vaadin/ui/UriFragmentUtility.java
Diffstat (limited to 'src/com/vaadin/terminal/ParameterHandler.java')
-rw-r--r--src/com/vaadin/terminal/ParameterHandler.java59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/ParameterHandler.java b/src/com/vaadin/terminal/ParameterHandler.java
new file mode 100644
index 0000000000..ef8a952e0e
--- /dev/null
+++ b/src/com/vaadin/terminal/ParameterHandler.java
@@ -0,0 +1,59 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.terminal;
+
+import java.io.Serializable;
+import java.util.Map;
+
+import com.vaadin.ui.Window;
+
+/**
+ * {@code ParameterHandler} is implemented by classes capable of handling
+ * external parameters.
+ *
+ * <p>
+ * What parameters are provided depend on what the {@link Terminal} provides and
+ * if the application is deployed as a servlet or portlet. URL GET parameters
+ * are typically provided to the {@link #handleParameters(Map)} method.
+ * </p>
+ * <p>
+ * A {@code ParameterHandler} must be registered to a {@code Window} using
+ * {@link Window#addParameterHandler(ParameterHandler)} to be called when
+ * parameters are available.
+ * </p>
+ *
+ * @author Vaadin Ltd.
+ * @version
+ * @VERSION@
+ * @since 3.0
+ */
+public interface ParameterHandler extends Serializable {
+
+ /**
+ * Handles the given parameters. All parameters names are of type
+ * {@link String} and the values are {@link String} arrays.
+ *
+ * @param parameters
+ * an unmodifiable map which contains the parameter names and
+ * values
+ *
+ */
+ public void handleParameters(Map<String, String[]> parameters);
+
+ /**
+ * An ErrorEvent implementation for ParameterHandler.
+ */
+ public interface ErrorEvent extends Terminal.ErrorEvent {
+
+ /**
+ * Gets the ParameterHandler that caused the error.
+ *
+ * @return the ParameterHandler that caused the error
+ */
+ public ParameterHandler getParameterHandler();
+
+ }
+
+}