Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CommandDesc |
|
| 0.0;0 |
1 | /* | |
2 | * Copyright 2004-2008 the Seasar Foundation and the Others. | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | |
13 | * either express or implied. See the License for the specific language | |
14 | * governing permissions and limitations under the License. | |
15 | */ | |
16 | package org.seasar.uruma.rcp.binding; | |
17 | ||
18 | import org.seasar.uruma.util.AssertionUtil; | |
19 | ||
20 | /** | |
21 | * コマンドの定義情報を保持するためのクラスです。<br /> | |
22 | * | |
23 | * @author y-komori | |
24 | */ | |
25 | public class CommandDesc { | |
26 | private String commandId; | |
27 | ||
28 | private String urumaId; | |
29 | ||
30 | /** | |
31 | * {@link CommandDesc} を構築します。<br /> | |
32 | * | |
33 | * @param commandId | |
34 | * コマンド ID | |
35 | */ | |
36 | 0 | public CommandDesc(final String commandId) { |
37 | 0 | AssertionUtil.assertNotEmpty("commandId", commandId); |
38 | 0 | this.commandId = commandId; |
39 | 0 | } |
40 | ||
41 | /** | |
42 | * {@link CommandDesc} を構築します。<br /> | |
43 | * | |
44 | * @param commandId | |
45 | * コマンド ID | |
46 | * @param urumaId | |
47 | * 対応する Uruma 画面コンポーネントの ID | |
48 | */ | |
49 | public CommandDesc(final String commandId, final String urumaId) { | |
50 | 0 | this(commandId); |
51 | 0 | AssertionUtil.assertNotEmpty("urumaId", urumaId); |
52 | 0 | this.urumaId = urumaId; |
53 | 0 | } |
54 | ||
55 | /** | |
56 | * コマンドID を返します。<br /> | |
57 | * | |
58 | * @return コマンドID | |
59 | */ | |
60 | public String getCommandId() { | |
61 | 0 | return this.commandId; |
62 | } | |
63 | ||
64 | /** | |
65 | * コマンドに対応する Uruma 画面コンポーネントの ID を返します。<br /> | |
66 | * | |
67 | * @return 画面コンポーネントの ID | |
68 | */ | |
69 | public String getUrumaId() { | |
70 | 0 | return this.urumaId; |
71 | } | |
72 | ||
73 | /** | |
74 | * コマンドに対応する Uruma 画面コンポーネントの ID を設定します。<br /> | |
75 | * | |
76 | * @param urumaId | |
77 | * 画面コンポーネントの ID | |
78 | */ | |
79 | public void setUrumaId(final String urumaId) { | |
80 | 0 | this.urumaId = urumaId; |
81 | 0 | } |
82 | ||
83 | /* | |
84 | * @see java.lang.Object#toString() | |
85 | */ | |
86 | @Override | |
87 | public String toString() { | |
88 | 0 | return this.commandId; |
89 | } | |
90 | } |