View Javadoc

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