View Javadoc

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