001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krad.uif.container;
017
018import org.kuali.rice.krad.uif.component.Component;
019import org.kuali.rice.krad.uif.field.ActionField;
020
021import java.util.HashSet;
022import java.util.Set;
023
024/**
025 * Special <code>Group</code> that renders a navigation section
026 *
027 * <p>
028 * Only supports <code>ActionField</code> instances within the container. These
029 * are used to provide the items (or individual links) within the navigation.
030 * The navigationType determines how the navigation will be rendered (menu,
031 * tabs, dropdown, ...)
032 * </p>
033 * 
034 * @author Kuali Rice Team (rice.collab@kuali.org)
035 */
036public class NavigationGroup extends Group {
037        private static final long serialVersionUID = -7263923392768546340L;
038
039        private String navigationType;
040
041        public NavigationGroup() {
042                super();
043        }
044
045        /**
046         * @see org.kuali.rice.krad.web.view.container.ContainerBase#getSupportedComponents()
047         */
048        @Override
049        public Set<Class<? extends Component>> getSupportedComponents() {
050                Set<Class<? extends Component>> supportedComponents = new HashSet<Class<? extends Component>>();
051                supportedComponents.add(ActionField.class);
052
053                return supportedComponents;
054        }
055
056        /**
057         * Type of navigation that should be rendered. For example a menu or tab
058         * navigation. Used by the rendering script to choose an appropriate plug-in
059         * 
060         * @return String navigation type
061         * @see org.kuali.rice.krad.uif.UifConstants.NavigationType
062         */
063        public String getNavigationType() {
064                return this.navigationType;
065        }
066
067        /**
068         * Setter for the navigation type
069         * 
070         * @param navigationType
071         */
072        public void setNavigationType(String navigationType) {
073                this.navigationType = navigationType;
074        }
075
076}