001    /*
002     * Copyright 2006-2008 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     */
016    package org.kuali.rice.kns.datadictionary;
017    
018    import java.io.Serializable;
019    
020    /**
021                The headerNavigation element defines a set of additional
022                tabs which will appear on the document.
023     *
024     *                The headerNavigationTab defines an additional tab which
025                    will appear on the document.
026    
027     */
028    public class HeaderNavigation extends DataDictionaryDefinitionBase implements Serializable {
029        private static final long serialVersionUID = 4317341111287854436L;
030        
031            protected String headerTabMethodToCall;
032        protected String headerTabNavigateTo;
033        protected String headerTabDisplayName;
034        protected HelpDefinition helpDefinition;
035        protected boolean disabled = false;
036        
037        public HeaderNavigation() {}
038    
039        public HeaderNavigation(String headerTabNavigateTo, String headerTabDisplayName) {
040            this.headerTabNavigateTo = headerTabNavigateTo;
041            this.headerTabDisplayName = headerTabDisplayName;
042        }
043    
044        /**
045         * Gets the navigationKey attribute.
046         * 
047         * @return Returns the navigationKey.
048         */
049        public String getHeaderTabMethodToCall() {
050            return headerTabMethodToCall;
051        }
052    
053        /**
054         * Sets the navigationKey attribute value.
055         * 
056         * @param navigationKey The navigationKey to set.
057         */
058        public void setHeaderTabMethodToCall(String navigationKey) {
059            this.headerTabMethodToCall = navigationKey;
060        }
061    
062        /**
063         * Gets the navigationStyle attribute.
064         * 
065         * @return Returns the navigationStyle.
066         */
067        public String getHeaderTabDisplayName() {
068            return headerTabDisplayName;
069        }
070    
071        /**
072         * The displayName element is the name of the additional tab.
073         */
074        public void setHeaderTabDisplayName(String headerTabDisplayName) {
075            this.headerTabDisplayName = headerTabDisplayName;
076        }
077    
078        /**
079         * Gets the suffix attribute.
080         * 
081         * @return Returns the suffix.
082         */
083        public String getHeaderTabNavigateTo() {
084            return headerTabNavigateTo;
085        }
086        
087        public HelpDefinition getHelpDefinition() {
088            return helpDefinition;
089        }
090    
091        /**
092         * The pageHelp element provides the keys to
093                        obtain a help description from the database.
094    
095                        On document JSP pages, a help icon may be rendered.  If this tag is specified, then
096                        the filename of this page will be located in the value of the parameter specified by the namespace, detail type, and name.
097    
098                        The value of the parameter is relative to the value of the "externalizable.help.url" property in KualiConfigurationService (see KualiHelpAction).
099                        parameterNamespace: namespace of the parameter that has the path to the help page
100                        parameterName: name of the parameter that has the path to the help page
101                        parameterDetailType: detail type of the parameter that has the path to the help page
102         */
103        public void setHelpDefinition(HelpDefinition helpDefinition) {
104            this.helpDefinition = helpDefinition;
105        }
106    
107        /**
108         * The navigateTo element is the forward name in the struts-config file.
109         */
110        public void setHeaderTabNavigateTo(String suffix) {
111            this.headerTabNavigateTo = suffix;
112        }
113    
114        public boolean isDisabled() {
115            return disabled;
116        }
117    
118        public void setDisabled(boolean disabled) {
119            this.disabled = disabled;
120        }
121        
122        /**
123         * @see org.kuali.rice.kns.datadictionary.DataDictionaryDefinition#completeValidation(java.lang.Class, java.lang.Class)
124         */
125        public void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass) {
126            // No real validation to be done here other than perhaps checking to be
127            // sure that the security workgroup is a valid workgroup.
128        }
129    }