Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
NavigationGroup |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 1.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.opensource.org/licenses/ecl1.php | |
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, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.krad.uif.container; | |
17 | ||
18 | import org.kuali.rice.krad.uif.core.Component; | |
19 | import org.kuali.rice.krad.uif.field.ActionField; | |
20 | ||
21 | import java.util.HashSet; | |
22 | import java.util.Set; | |
23 | ||
24 | /** | |
25 | * Special <code>Group</code> that renders a navigation section | |
26 | * <p> | |
27 | * Only supports <code>ActionField</code> instances within the container. These | |
28 | * are used to provide the items (or individual links) within the navigation. | |
29 | * The navigationType determines how the navigation will be rendered (menu, | |
30 | * tabs, dropdown, ...) | |
31 | * </p> | |
32 | * | |
33 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
34 | */ | |
35 | public class NavigationGroup extends Group { | |
36 | private static final long serialVersionUID = -7263923392768546340L; | |
37 | ||
38 | private String navigationType; | |
39 | ||
40 | public NavigationGroup() { | |
41 | 0 | super(); |
42 | 0 | } |
43 | ||
44 | /** | |
45 | * @see org.kuali.rice.krad.web.view.container.ContainerBase#getSupportedComponents() | |
46 | */ | |
47 | @Override | |
48 | public Set<Class<? extends Component>> getSupportedComponents() { | |
49 | 0 | Set<Class<? extends Component>> supportedComponents = new HashSet<Class<? extends Component>>(); |
50 | 0 | supportedComponents.add(ActionField.class); |
51 | ||
52 | 0 | return supportedComponents; |
53 | } | |
54 | ||
55 | /** | |
56 | * Type of navigation that should be rendered. For example a menu or tab | |
57 | * navigation. Used by the rendering script to choose an appropriate plug-in | |
58 | * | |
59 | * @return String navigation type | |
60 | * @see org.kuali.rice.krad.uif.UifConstants.NavigationType | |
61 | */ | |
62 | public String getNavigationType() { | |
63 | 0 | return this.navigationType; |
64 | } | |
65 | ||
66 | /** | |
67 | * Setter for the navigation type | |
68 | * | |
69 | * @param navigationType | |
70 | */ | |
71 | public void setNavigationType(String navigationType) { | |
72 | 0 | this.navigationType = navigationType; |
73 | 0 | } |
74 | ||
75 | } |