summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/terminal/ParameterHandler.java
blob: fb8c86ec72bb0079ff7633f8b2ce1c8fec2c0469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* 
@ITMillApache2LicenseForJavaFiles@
 */

package com.itmill.toolkit.terminal;

import java.util.Map;

/**
 * Interface implemented by all the classes capable of handling external
 * parameters.
 * 
 * <p>
 * Some terminals can provide external parameters for application. For example
 * GET and POST parameters are passed to application as external parameters on
 * Web Adapter. The parameters can be received at any time during the
 * application lifecycle. All the parameter handlers implementing this interface
 * and registered to {@link com.itmill.toolkit.ui.Window} receive all the
 * parameters got from the terminal in the given window.
 * </p>
 * 
 * @author IT Mill Ltd.
 * @version
 * @VERSION@
 * @since 3.0
 */
public interface ParameterHandler {

    /**
     * <p>
     * Handles the given parameters. The parameters are given as inmodifieable
     * name to value map. All parameters names are of type:
     * {@link java.lang.String}. All the parameter values are arrays of
     * strings.
     * </p>
     * 
     * @param parameters
     *                the Inmodifiable name to value[] mapping.
     * 
     */
    public void handleParameters(Map parameters);

    /**
     * ParameterHandler error event.
     */
    public interface ErrorEvent extends Terminal.ErrorEvent {

        /**
         * Gets the source ParameterHandler.
         * 
         * @return the source Parameter Handler.
         */
        public ParameterHandler getParameterHandler();

    }

}