| 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 | } |
| 50 | ||
| 51 | /** | |
| 52 | * <p> | |
| 53 | * The following initialization is performed: | |
| 54 | * <ul> | |
| 55 | * <li>Set the abstractTypeClasses map for the inquiry object path</li> | |
| 56 | * </ul> | |
| 57 | * </p> | |
| 58 | * | |
| 59 | * @see org.kuali.rice.kns.uif.container.ContainerBase#performInitialization(org.kuali.rice.kns.uif.container.View) | |
| 60 | */ | |
| 61 | @Override | |
| 62 | public void performInitialization(View view) { | |
| 63 | 0 | super.performInitialization(view); |
| 64 | ||
| 65 | 0 | getAbstractTypeClasses().put(getDefaultBindingObjectPath(), dataObjectClassName); |
| 66 | 0 | } |
| 67 | ||
| 68 | /** | |
| 69 | * Class name for the object the inquiry applies to | |
| 70 | * | |
| 71 | * <p> | |
| 72 | * The object class name is used to pick up a dictionary entry which will | |
| 73 | * feed the attribute field definitions and other configuration. In addition | |
| 74 | * it is used to configure the <code>Inquirable</code> which will carry out | |
| 75 | * the inquiry action | |
| 76 | * </p> | |
| 77 | * | |
| 78 | * @return Class<?> inquiry object class | |
| 79 | */ | |
| 80 | public Class<?> getDataObjectClassName() { | |
| 81 | 0 | return this.dataObjectClassName; |
| 82 | } | |
| 83 | ||
| 84 | /** | |
| 85 | * Setter for the object class name | |
| 86 | * | |
| 87 | * @param dataObjectClassName | |
| 88 | */ | |
| 89 | public void setDataObjectClassName(Class<?> dataObjectClassName) { | |
| 90 | 0 | this.dataObjectClassName = dataObjectClassName; |
| 91 | 0 | } |
| 92 | ||
| 93 | } |