1 | public class CopyAliasCommand implements ICommand↵ | | 1 | public class ModifyDriverCommand implements ICommand↵
|
2 | {↵ | | 2 | {↵
|
3 | /** Application API. */↵ | | 3 | /** Application API. */↵
|
4 | private final IApplication _app;↵ | | 4 | private final IApplication _app;↵
|
|
5 | /** <TT>ISQLAlias</TT> to be copied. */↵ | | 5 | /** <TT>ISQLDriver</TT> to be modified. */↵
|
6 | private final SQLAlias _sqlAlias;↵ | | 6 | private ↵
|
|
7 | ↵ | | 7 | ISQLDriver _driver;↵
|
|
8 | /**↵ | | 8 | /**↵
|
9 | * Ctor.↵ | | 9 | * Ctor.↵
|
10 | *↵ | | |
|
11 | ↵ | | 10 | *↵
|
12 | * @param app Application API.↵ | | 11 | * @param app Application API.↵
|
13 | * @param sqlAlias <TT>ISQLAlias</TT> to be copied.↵ | | 12 | * @param sqlDriver <TT>ISQLDriver</TT> to be ↵
|
14 | *↵ | | |
|
15 | ↵ | | 13 | modified.↵
|
| | | 14 | *↵
|
16 | * @throws IllegalArgumentException↵ | | 15 | * @throws IllegalArgumentException↵
|
17 | * Thrown if a <TT>null</TT> <TT>ISQLAlias</TT> or↵ | | 16 | * Thrown if a <TT>null</TT> <IApplication</tt> or↵
|
18 | * <tt>IApplication</tt> passed.↵ | | 17 | * <TT>ISQLDriver</TT> passed.↵
|
19 | */↵ | | 18 | */↵
|
20 | public CopyAliasCommand(IApplication app, SQLAlias sqlAlias)↵ | | 19 | public ModifyDriverCommand(IApplication app, ISQL↵
|
21 | {↵ | | |
|
22 | ↵ | | 20 | Driver driver)↵
|
| | | 21 | {↵
|
23 | super();↵ | | 22 | super();↵
|
24 | if (app == null)↵ | | 23 | if (app == null)↵
|
25 | {↵ | | |
|
26 | ↵ | | 24 | {↵
|
27 | throw new IllegalArgumentException("IApplication == null");↵ | | 25 | throw new IllegalArgumentException("IApplication == null");↵
|
28 | }↵ | | |
|
29 | if (sqlAlias == null)↵ | | |
|
30 | {↵ | | |
|
31 | ↵ | | 26 | }↵
|
| | | 27 | if (driver == null)↵
|
| | | 28 | {↵
|
32 | throw new IllegalArgumentException("Null ISQLAlias passed");↵ | | 29 | throw new IllegalArgumentException("↵
|
33 | }↵ | | |
|
|
34 | _app = app;↵ | | |
|
35 | _sqlAlias = sqlAlias;↵ | | |
|
36 | }↵ | | |
|
|
37 | ↵ | | 30 | ISQLDriver == null");↵
|
| | | 31 | }↵
|
|
| | | 32 | _app = app;↵
|
| | | 33 | _driver = driver;↵
|
| | | 34 | }↵
|
|
| | | 35 | /**↵
|
| | | 36 | * Display a dialog allowing user to maintain the <TT>ISQLDriver</TT>.↵
|
| | | 37 | */↵
|
38 | public void execute()↵ | | 38 | public void execute()↵
|
39 | {↵ | | |
|
40 | ↵ | | 39 | {↵
|
41 | _app.getWindowManager().showCopyAliasInternalFrame(_sqlAlias) | | 40 | _app.getWindowManager().showModifyDriverInternalFrame(_driver)
|