Coverage Report - org.kuali.rice.kns.inquiry.Inquirable
 
Classes in this File Line Coverage Branch Coverage Complexity
Inquirable
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2005-2008 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.inquiry;
 17  
 
 18  
 import java.util.List;
 19  
 import java.util.Map;
 20  
 
 21  
 import org.kuali.rice.kns.bo.BusinessObject;
 22  
 import org.kuali.rice.kns.lookup.HtmlData;
 23  
 import org.kuali.rice.kns.uif.widget.Inquiry;
 24  
 
 25  
 /**
 26  
  * Defines business logic methods that support the Inquiry framework
 27  
  */
 28  
 public interface Inquirable {
 29  
 
 30  
         /**
 31  
          * Responsible for retrieving the data object from its data source
 32  
          * (database, service call, etc).
 33  
          * 
 34  
          * @param fieldValues
 35  
          *            a map of string field names and values
 36  
          * @return the data object or null if not found
 37  
          */
 38  
         public Object getDataObject(Map<String, String> fieldValues);
 39  
 
 40  
         /**
 41  
          * This method will be called before getDataObject(Map). This is useful for
 42  
          * implementing inquirables that can handle multiple data object types.
 43  
          * 
 44  
          * @param dataObjectClass
 45  
          *            the class of the dataObject that this inquirable should
 46  
          *            retrieve
 47  
          */
 48  
         public void setDataObjectClass(Class<?> dataObjectClass);
 49  
 
 50  
         /**
 51  
          * Invoked by the <code>ViewHelperService</code> to build a link to the
 52  
          * inquiry
 53  
          * 
 54  
          * <p>
 55  
          * Note this is used primarily for custom <code>Inquirable</code>
 56  
          * implementations to customize the inquiry class or parameters for an
 57  
          * inquiry. Instead of building the full inquiry link, implementations can
 58  
          * make a callback to
 59  
          * org.kuali.rice.kns.uif.widget.Inquiry.buildInquiryLink(Object, String,
 60  
          * Class<?>, Map<String, String>) given an inquiry class and parameters to
 61  
          * build the link field.
 62  
          * </p>
 63  
          * 
 64  
          * @param dataObject
 65  
          *            - parent object for the inquiry property
 66  
          * @param propertyName
 67  
          *            - name of the property the inquiry is being built for
 68  
          * @param inquiry
 69  
          *            - instance of the inquiry widget being built for the property
 70  
          */
 71  
         public void buildInquirableLink(Object dataObject, String propertyName,
 72  
                         Inquiry inquiry);
 73  
 
 74  
         @Deprecated
 75  
         public void setBusinessObjectClass(Class businessObjectClass);
 76  
 
 77  
         @Deprecated
 78  
         public BusinessObject getBusinessObject(Map fieldValues);
 79  
 
 80  
         @Deprecated
 81  
         public HtmlData getInquiryUrl(BusinessObject businessObject,
 82  
                         String attributeName, boolean forceInquiry);
 83  
 
 84  
         @Deprecated
 85  
         public String getHtmlMenuBar();
 86  
 
 87  
         @Deprecated
 88  
         public String getTitle();
 89  
 
 90  
         @Deprecated
 91  
         public List getSections(BusinessObject bo);
 92  
 
 93  
         @Deprecated
 94  
         public void addAdditionalSections(List columns, BusinessObject bo);
 95  
 
 96  
         /**
 97  
          * Indicates whether inactive records for the given collection should be
 98  
          * display.
 99  
          * 
 100  
          * @param collectionName
 101  
          *            - name of the collection (or sub-collection) to check inactive
 102  
          *            record display setting
 103  
          * @return true if inactive records should be displayed, false otherwise
 104  
          */
 105  
         @Deprecated
 106  
         public boolean getShowInactiveRecords(String collectionName);
 107  
 
 108  
         /**
 109  
          * Returns the Map used to control the state of inactive record collection
 110  
          * display. Exposed for setting from the maintenance jsp.
 111  
          */
 112  
         @Deprecated
 113  
         public Map<String, Boolean> getInactiveRecordDisplay();
 114  
 
 115  
         /**
 116  
          * Indicates to maintainble whether or not inactive records should be
 117  
          * displayed for the given collection name.
 118  
          * 
 119  
          * @param collectionName
 120  
          *            - name of the collection (or sub-collection) to set inactive
 121  
          *            record display setting
 122  
          * @param showInactive
 123  
          *            - true to display inactive, false to not display inactive
 124  
          *            records
 125  
          */
 126  
         @Deprecated
 127  
         public void setShowInactiveRecords(String collectionName,
 128  
                         boolean showInactive);
 129  
 }