Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
InquiryView |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 1.0 (the | |
5 | * "License"); 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/ecl1.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, WITHOUT | |
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
13 | * License for the specific language governing permissions and limitations under | |
14 | * the License. | |
15 | */ | |
16 | package org.kuali.rice.kns.uif.container; | |
17 | ||
18 | import org.kuali.rice.kns.uif.UifConstants.ViewType; | |
19 | ||
20 | /** | |
21 | * Type of <code>View</code> that provides a read-only display of a record of | |
22 | * data (object instance) | |
23 | * | |
24 | * <p> | |
25 | * The <code>InquiryView</code> provides the interface for the Inquiry | |
26 | * framework. It works with the <code>Inquirable</code> service and inquiry | |
27 | * controller. The view does render a form to support the configuration of | |
28 | * actions to perform operations on the data. | |
29 | * </p> | |
30 | * | |
31 | * <p> | |
32 | * Inquiry views are primarily configured by the object class they are | |
33 | * associated with. This provides the default dictionary information for the | |
34 | * fields. If more than one inquiry view is needed for the same object class, | |
35 | * the view name can be used to further identify an unique view | |
36 | * </p> | |
37 | * | |
38 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
39 | */ | |
40 | public class InquiryView extends FormView { | |
41 | private static final long serialVersionUID = 716926008488403616L; | |
42 | ||
43 | private Class<?> dataObjectClassName; | |
44 | ||
45 | public InquiryView() { | |
46 | 0 | super(); |
47 | ||
48 | 0 | setViewTypeName(ViewType.INQUIRY); |
49 | 0 | setValidateDirty(false); |
50 | 0 | } |
51 | ||
52 | /** | |
53 | * <p> | |
54 | * The following initialization is performed: | |
55 | * <ul> | |
56 | * <li>Set the abstractTypeClasses map for the inquiry object path</li> | |
57 | * </ul> | |
58 | * </p> | |
59 | * | |
60 | * @see org.kuali.rice.kns.uif.container.ContainerBase#performInitialization(org.kuali.rice.kns.uif.container.View) | |
61 | */ | |
62 | @Override | |
63 | public void performInitialization(View view) { | |
64 | 0 | super.performInitialization(view); |
65 | ||
66 | 0 | getAbstractTypeClasses().put(getDefaultBindingObjectPath(), getDataObjectClassName()); |
67 | 0 | } |
68 | ||
69 | /** | |
70 | * Class name for the object the inquiry applies to | |
71 | * | |
72 | * <p> | |
73 | * The object class name is used to pick up a dictionary entry which will | |
74 | * feed the attribute field definitions and other configuration. In addition | |
75 | * it is used to configure the <code>Inquirable</code> which will carry out | |
76 | * the inquiry action | |
77 | * </p> | |
78 | * | |
79 | * @return Class<?> inquiry object class | |
80 | */ | |
81 | public Class<?> getDataObjectClassName() { | |
82 | 0 | return this.dataObjectClassName; |
83 | } | |
84 | ||
85 | /** | |
86 | * Setter for the object class name | |
87 | * | |
88 | * @param dataObjectClassName | |
89 | */ | |
90 | public void setDataObjectClassName(Class<?> dataObjectClassName) { | |
91 | 0 | this.dataObjectClassName = dataObjectClassName; |
92 | 0 | } |
93 | ||
94 | } |