| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| HelpDefinition | 
  | 
  | 1.75;1.75 | 
| 1 |  /* | |
| 2 |   * Copyright 2006-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 | ||
| 17 |  package org.kuali.rice.kns.datadictionary; | |
| 18 | ||
| 19 |  import org.apache.commons.lang.StringUtils; | |
| 20 | ||
| 21 |  import java.io.Serializable; | |
| 22 | ||
| 23 |  /** | |
| 24 |              The help element provides the keys to obtain a | |
| 25 |              help description from the database. | |
| 26 | ||
| 27 |              On document JSP pages, a help icon may be rendered.  If this tag is specified, then | |
| 28 |              the filename of this page will be located in the value of the parameter specified by the namespace, detail type, and name. | |
| 29 | ||
| 30 |              The value of the parameter is relative to the value of the "externalizable.help.url" property in ConfigurationService (see KualiHelpAction). | |
| 31 |              parameterNamespace: namespace of the parameter that has the path to the help page | |
| 32 |              parameterName: name of the parameter that has the path to the help page | |
| 33 |              parameterDetailType: detail type of the parameter that has the path to the help page | |
| 34 |   */ | |
| 35 | public class HelpDefinition extends DataDictionaryDefinitionBase implements Serializable {  | |
| 36 | private static final long serialVersionUID = -6869646654597012863L;  | |
| 37 | ||
| 38 |          protected String parameterNamespace; | |
| 39 |      protected String parameterDetailType; | |
| 40 |      protected String parameterName; | |
| 41 | ||
| 42 |      /** | |
| 43 |       * Constructs a HelpDefinition. | |
| 44 |       */ | |
| 45 | 0 |      public HelpDefinition() {} | 
| 46 | ||
| 47 |      /** | |
| 48 |       * @see org.kuali.rice.kns.datadictionary.DataDictionaryDefinition#completeValidation(java.lang.Class, java.lang.Class) | |
| 49 |       */ | |
| 50 | public void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass) {  | |
| 51 |          // No real validation to be done here other than perhaps checking to be | |
| 52 |          // sure that the security workgroup is a valid workgroup. | |
| 53 | 0 |      } | 
| 54 | ||
| 55 |      /** | |
| 56 |       * @return | |
| 57 |       */ | |
| 58 |      public String getParameterName() { | |
| 59 | 0 |          return parameterName; | 
| 60 | }  | |
| 61 | ||
| 62 |      /** | |
| 63 |       * parameterName: name of the parameter that has the path to the help page | |
| 64 |       */ | |
| 65 | public void setParameterName(String parameterName) {  | |
| 66 | 0 |          if (StringUtils.isBlank(parameterName)) { | 
| 67 | 0 |              throw new IllegalArgumentException("invalid (blank) parameterName"); | 
| 68 | }  | |
| 69 | 0 |          this.parameterName = parameterName; | 
| 70 | 0 |      } | 
| 71 | ||
| 72 |      /** | |
| 73 |       * @return | |
| 74 |       */ | |
| 75 |      public String getParameterNamespace() { | |
| 76 | 0 |          return parameterNamespace; | 
| 77 | }  | |
| 78 | ||
| 79 |      /** | |
| 80 |       * parameterNamespace: namespace of the parameter that has the path to the help page | |
| 81 |       */ | |
| 82 | public void setParameterNamespace(String parameterNamespace) {  | |
| 83 | 0 |          if (StringUtils.isBlank(parameterNamespace)) { | 
| 84 | 0 |              throw new IllegalArgumentException("invalid (blank) parameterNamespace"); | 
| 85 | }  | |
| 86 | 0 |          this.parameterNamespace = parameterNamespace; | 
| 87 | 0 |      } | 
| 88 | ||
| 89 |          public String getParameterDetailType() { | |
| 90 | 0 |                  return this.parameterDetailType; | 
| 91 | }  | |
| 92 | ||
| 93 |          /** | |
| 94 |           * parameterDetailType: detail type of the parameter that has the path to the help page | |
| 95 |           */ | |
| 96 | public void setParameterDetailType(String parameterDetailType) {  | |
| 97 | 0 |          if (StringUtils.isBlank(parameterDetailType)) { | 
| 98 | 0 |              throw new IllegalArgumentException("invalid (blank) parameterDetailType"); | 
| 99 | }  | |
| 100 | 0 |                  this.parameterDetailType = parameterDetailType; | 
| 101 | 0 |          } | 
| 102 | ||
| 103 | }  |