1 /**
2 * Copyright 2005-2014 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.datadictionary.parse.BeanTag;
19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
20 import org.kuali.rice.krad.datadictionary.parse.BeanTags;
21 import org.kuali.rice.krad.uif.component.Component;
22 import org.kuali.rice.krad.uif.element.Action;
23
24 import java.util.HashSet;
25 import java.util.Set;
26
27 /**
28 * Special <code>Group</code> that renders a navigation section
29 *
30 * <p>
31 * Only supports <code>Action</code> instances within the container. These
32 * are used to provide the items (or individual links) within the navigation.
33 * The navigationType determines how the navigation will be rendered (menu,
34 * tabs, dropdown, ...)
35 * </p>
36 *
37 * @author Kuali Rice Team (rice.collab@kuali.org)
38 */
39 @BeanTags({@BeanTag(name = "navigationGroup-bean", parent = "Uif-NavigationGroupBase"),
40 @BeanTag(name = "menuNavigationGroup-bean", parent = "Uif-MenuNavigationGroup"),
41 @BeanTag(name = "tabNavigationGroup-bean", parent = "Uif-TabNavigationGroup")})
42 public class NavigationGroup extends GroupBase {
43 private static final long serialVersionUID = -7263923392768546340L;
44
45 private String navigationType;
46
47 public NavigationGroup() {
48 super();
49 }
50
51 /**
52 * {@inheritDoc}
53 */
54 @Override
55 public Set<Class<? extends Component>> getSupportedComponents() {
56 Set<Class<? extends Component>> supportedComponents = new HashSet<Class<? extends Component>>();
57 supportedComponents.add(Action.class);
58
59 return supportedComponents;
60 }
61
62 /**
63 * Type of navigation that should be rendered. For example a menu or tab
64 * navigation. Used by the rendering script to choose an appropriate plug-in
65 *
66 * @return navigation type
67 * @see org.kuali.rice.krad.uif.UifConstants.NavigationType
68 */
69 @BeanTagAttribute(name = "navigationType")
70 public String getNavigationType() {
71 return this.navigationType;
72 }
73
74 /**
75 * Setter for the navigation type
76 *
77 * @param navigationType
78 */
79 public void setNavigationType(String navigationType) {
80 this.navigationType = navigationType;
81 }
82 }