01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18: package org.apache.lenya.cms.usecase.gui.impl;
19:
20: import java.util.HashMap;
21: import java.util.Map;
22: import java.util.Set;
23:
24: import org.apache.lenya.cms.usecase.gui.Tab;
25:
26: /**
27: * Tab implementation.
28: */
29: public class TabImpl implements Tab {
30:
31: /**
32: * Ctor.
33: * @param group The name of the usecase group.
34: * @param name The name of the tab.
35: * @param usecase The usecase to be displayed.
36: * @param label The label to be displayed on the tab.
37: */
38: public TabImpl(String group, String name, String usecase,
39: String label) {
40: this .name = name;
41: this .group = group;
42: this .usecase = usecase;
43: this .label = label;
44: }
45:
46: private Map parameters = new HashMap();
47:
48: private String name;
49:
50: void setParameter(String name, String value) {
51: this .parameters.put(name, value);
52: }
53:
54: public String getName() {
55: return this .name;
56: }
57:
58: private String usecase;
59:
60: private String label;
61:
62: public String getLabel() {
63: return label;
64: }
65:
66: public String getUsecase() {
67: return usecase;
68: }
69:
70: private String group;
71:
72: public String getGroup() {
73: return this .group;
74: }
75:
76: public String[] getParameterNames() {
77: Set keys = this .parameters.keySet();
78: return (String[]) keys.toArray(new String[keys.size()]);
79: }
80:
81: public String getParameter(String key) {
82: return (String) this.parameters.get(key);
83: }
84:
85: }
|