01: /*
02: * Copyright (C) 2004 TiongHiang Lee
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: *
18: * Email: thlee@onemindsoft.org
19: */
20:
21: package org.onemind.swingweb.mapinput.peerdelegate;
22:
23: import java.util.Map;
24: import java.util.logging.Level;
25: import java.util.logging.Logger;
26: import org.onemind.awtbridge.input.*;
27: import org.onemind.awtbridge.peer.BridgePeer;
28:
29: /**
30: * The map input delegate
31: * @author TiongHiang Lee (thlee@onemindsoft.org)
32: *
33: */
34: public abstract class MapInputDelegate implements InputDelegate {
35:
36: /** the logger * */
37: private static final Logger _logger = Logger
38: .getLogger(MapInputDelegate.class.getName());
39:
40: /**
41: * Constructor
42: */
43: protected MapInputDelegate() {
44: }
45:
46: /**
47: * {@inheritDoc}
48: */
49: public final void processInput(BridgePeer peer,
50: BridgeInputContext context, Object inputObject)
51: throws InputException {
52: if (_logger.isLoggable(Level.FINEST)) {
53: _logger.finest(this + " process input "
54: + peer.getComponentObject());
55: }
56: processInput(peer, context, (Map) inputObject);
57: }
58:
59: /**
60: * Process the peer input delegate
61: * @param peer the peer
62: * @param context the context
63: * @param inputForm the input form
64: * @throws InputException if there's input problem
65: */
66: public abstract void processInput(BridgePeer peer,
67: BridgeInputContext context, Map inputForm)
68: throws InputException;
69: }
|