View Javadoc
1   /**
2    * Copyright 2005-2016 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.kns.datadictionary;
17  
18  /**
19   * @author Kuali Rice Team (rice.collab@kuali.org)
20   *
21   * @deprecated Use {@link org.kuali.rice.krad.datadictionary.BusinessObjectEntry}.
22   */
23  @Deprecated
24  public class BusinessObjectEntry extends org.kuali.rice.krad.datadictionary.BusinessObjectEntry {
25  
26      protected InquiryDefinition inquiryDefinition;
27      protected LookupDefinition lookupDefinition;
28  
29      @Override
30      public void completeValidation() {
31  
32          super.completeValidation();
33  
34          if (hasInquiryDefinition()) {
35              inquiryDefinition.completeValidation(getDataObjectClass(), null);
36          }
37  
38          if (hasLookupDefinition()) {
39              lookupDefinition.completeValidation(getDataObjectClass(), null);
40          }
41      }
42  
43      /**
44       * @return true if this instance has an inquiryDefinition
45       */
46      public boolean hasInquiryDefinition() {
47          return (inquiryDefinition != null);
48      }
49  
50      /**
51       * @return current inquiryDefinition for this BusinessObjectEntry, or null if there is none
52       */
53      public InquiryDefinition getInquiryDefinition() {
54          return inquiryDefinition;
55      }
56  
57      /**
58       * The inquiry element is used to specify the fields that will be displayed on the
59       * inquiry screen for this business object and the order in which they will appear.
60       *
61       * DD: See InquiryDefinition.java
62       *
63       * JSTL: The inquiry element is a Map which is accessed using
64       * a key of "inquiry".  This map contains the following keys:
65       * title (String)
66       * inquiryFields (Map)
67       *
68       * See InquiryMapBuilder.java
69       */
70      public void setInquiryDefinition(InquiryDefinition inquiryDefinition) {
71          this.inquiryDefinition = inquiryDefinition;
72      }
73  
74      /**
75       * @return true if this instance has a lookupDefinition
76       */
77      public boolean hasLookupDefinition() {
78          return (lookupDefinition != null);
79      }
80  
81      /**
82       * @return current lookupDefinition for this BusinessObjectEntry, or null if there is none
83       */
84      public LookupDefinition getLookupDefinition() {
85          return lookupDefinition;
86      }
87  
88      /**
89       * The lookup element is used to specify the rules for "looking up"
90       * a business object.  These specifications define the following:
91       * How to specify the search criteria used to locate a set of business objects
92       * How to display the search results
93       *
94       * DD: See LookupDefinition.java
95       *
96       * JSTL: The lookup element is a Map which is accessed using
97       * a key of "lookup".  This map contains the following keys:
98       * lookupableID (String, optional)
99       * title (String)
100      * menubar (String, optional)
101      * defaultSort (Map, optional)
102      * lookupFields (Map)
103      * resultFields (Map)
104      * resultSetLimit (String, optional)
105      *
106      * See LookupMapBuilder.java
107      */
108     public void setLookupDefinition(LookupDefinition lookupDefinition) {
109         this.lookupDefinition = lookupDefinition;
110     }
111 }