| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| InquiryForm |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 1.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/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, | |
| 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.web.form; | |
| 17 | ||
| 18 | ||
| 19 | import org.apache.log4j.Logger; | |
| 20 | import org.kuali.rice.krad.inquiry.Inquirable; | |
| 21 | import org.kuali.rice.krad.uif.UifConstants.ViewType; | |
| 22 | ||
| 23 | /** | |
| 24 | * Form class for <code>InquiryView</code> screens | |
| 25 | * | |
| 26 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 27 | */ | |
| 28 | public class InquiryForm extends UifFormBase { | |
| 29 | private static final long serialVersionUID = 4733144086378429410L; | |
| 30 | 0 | private static final Logger LOG = Logger.getLogger(InquiryForm.class); |
| 31 | ||
| 32 | private String dataObjectClassName; | |
| 33 | private Object dataObject; | |
| 34 | ||
| 35 | 0 | public InquiryForm() { |
| 36 | 0 | setViewTypeName(ViewType.INQUIRY); |
| 37 | 0 | } |
| 38 | ||
| 39 | /** | |
| 40 | * Class name of the data object the inquiry will display | |
| 41 | * | |
| 42 | * <p> | |
| 43 | * Used to set the data object class for the <code>Inquirable</code> which | |
| 44 | * is then used to perform the inquiry query | |
| 45 | * </p> | |
| 46 | * | |
| 47 | * @return String class name | |
| 48 | */ | |
| 49 | public String getDataObjectClassName() { | |
| 50 | 0 | return this.dataObjectClassName; |
| 51 | } | |
| 52 | ||
| 53 | /** | |
| 54 | * Setter for the inquiry data object class name | |
| 55 | * | |
| 56 | * @param dataObjectClassName | |
| 57 | */ | |
| 58 | public void setDataObjectClassName(String dataObjectClassName) { | |
| 59 | 0 | this.dataObjectClassName = dataObjectClassName; |
| 60 | 0 | } |
| 61 | ||
| 62 | /** | |
| 63 | * Result data object for inquiry that will be display with the view | |
| 64 | * | |
| 65 | * @return Object object instance containing the inquiry data | |
| 66 | */ | |
| 67 | public Object getDataObject() { | |
| 68 | 0 | return this.dataObject; |
| 69 | } | |
| 70 | ||
| 71 | /** | |
| 72 | * Setter for the inquiry data object | |
| 73 | * | |
| 74 | * @param dataObject | |
| 75 | */ | |
| 76 | public void setDataObject(Object dataObject) { | |
| 77 | 0 | this.dataObject = dataObject; |
| 78 | 0 | } |
| 79 | ||
| 80 | /** | |
| 81 | * <code>Inquirable</code> instance that will be used to perform | |
| 82 | * the inquiry | |
| 83 | * | |
| 84 | * @return Inquirable instance | |
| 85 | */ | |
| 86 | public Inquirable getInquirable() { | |
| 87 | 0 | return (Inquirable) getView().getViewHelperService(); |
| 88 | } | |
| 89 | ||
| 90 | } |