1 /**
2 * Copyright 2005-2011 The Kuali Foundation
3 *
4 * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.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.component.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 *
27 * <p>
28 * Only supports <code>ActionField</code> instances within the container. These
29 * are used to provide the items (or individual links) within the navigation.
30 * The navigationType determines how the navigation will be rendered (menu,
31 * tabs, dropdown, ...)
32 * </p>
33 *
34 * @author Kuali Rice Team (rice.collab@kuali.org)
35 */
36 public class NavigationGroup extends Group {
37 private static final long serialVersionUID = -7263923392768546340L;
38
39 private String navigationType;
40
41 public NavigationGroup() {
42 super();
43 }
44
45 /**
46 * @see org.kuali.rice.krad.web.view.container.ContainerBase#getSupportedComponents()
47 */
48 @Override
49 public Set<Class<? extends Component>> getSupportedComponents() {
50 Set<Class<? extends Component>> supportedComponents = new HashSet<Class<? extends Component>>();
51 supportedComponents.add(ActionField.class);
52
53 return supportedComponents;
54 }
55
56 /**
57 * Type of navigation that should be rendered. For example a menu or tab
58 * navigation. Used by the rendering script to choose an appropriate plug-in
59 *
60 * @return String navigation type
61 * @see org.kuali.rice.krad.uif.UifConstants.NavigationType
62 */
63 public String getNavigationType() {
64 return this.navigationType;
65 }
66
67 /**
68 * Setter for the navigation type
69 *
70 * @param navigationType
71 */
72 public void setNavigationType(String navigationType) {
73 this.navigationType = navigationType;
74 }
75
76 }