Coverage Report - org.kuali.rice.kns.uif.service.LookupViewHelperService
 
Classes in this File Line Coverage Branch Coverage Complexity
LookupViewHelperService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2011 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.kns.uif.service;
 17  
 
 18  
 import java.util.Collection;
 19  
 import java.util.List;
 20  
 import java.util.Map;
 21  
 import java.util.Set;
 22  
 
 23  
 import org.kuali.rice.kns.uif.core.Component;
 24  
 import org.kuali.rice.kns.uif.field.GeneratedField;
 25  
 
 26  
 /**
 27  
  * A ViewHelperService that is specifically used for Lookups
 28  
  * 
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  */
 31  
 public interface LookupViewHelperService extends ViewHelperService {
 32  
 
 33  
         /**
 34  
          * This method ...
 35  
          * 
 36  
          * @param criteriaFieldsForLookup
 37  
          * @param bounded
 38  
          * @return the list of result BOs, possibly bounded
 39  
          */
 40  
         public Collection<?> performSearch(Map<String, String> criteriaFieldsForLookup, boolean bounded);
 41  
 
 42  
         /**
 43  
          * 
 44  
          * This method allows for customization of the lookup clear
 45  
          * 
 46  
          */
 47  
         public Map<String, String> performClear(Map<String, String> fieldsForLookup);
 48  
 
 49  
         /**
 50  
          * Validates the values filled in as search criteria, also checks for required field values.
 51  
          * 
 52  
          * @param criteriaComponents - Components that are a part of the criteria for the lookup
 53  
          * @param fieldValues - Map of property/value pairs
 54  
          */
 55  
         public void validateSearchParameters(List<? extends Component> criteriaComponents, Map<String, String> fieldValues);
 56  
 
 57  
         /**
 58  
          * Gets the readOnlyFieldsList attribute.
 59  
          * 
 60  
          * @return Returns the readOnlyFieldsList.
 61  
          */
 62  
         public List<String> getReadOnlyFieldsList();
 63  
 
 64  
         /**
 65  
          * Sets the readOnlyFieldsList attribute value.
 66  
          * 
 67  
          * @param readOnlyFieldsList The readOnlyFieldsList to set.
 68  
          */
 69  
         public void setReadOnlyFieldsList(List<String> readOnlyFieldsList);
 70  
 
 71  
         public void setDataObjectClass(Class<?> dataObjectClass);
 72  
 
 73  
         public void setFieldConversions(Map<String, String> fieldConversions);
 74  
 
 75  
         public void setDocNum(String docNum);
 76  
 
 77  
     public String getReturnLocation();
 78  
 
 79  
         public String getReturnFormKey();
 80  
 
 81  
         public boolean isAtLeastOneRowReturnable();
 82  
 
 83  
         public boolean isAtLeastOneRowHasActions();
 84  
 
 85  
     /**
 86  
      * Builds the HTML string text needed to create a new document for the class represented by this lookup view. By default this includes verifying that the current user has permission to 
 87  
      * 
 88  
      * @param generatedField - the field that will be used to display the String text
 89  
      * @return String representing both the url and the HTML text required for the page
 90  
      */
 91  
     public String getCreateNewUrl(GeneratedField generatedField);
 92  
 
 93  
         /**
 94  
          * Builds the HTML string text needed to perform maintenance actions for the data object represented by the current row in the list. By default this includes checking permissions for which
 95  
          * maintenance actions the user is allowed to perform.
 96  
          * 
 97  
          * @param generatedField
 98  
          *            - the field that will be used to display the String text
 99  
          * @return String representing the HTML text required for any maintenance actions the user is allowed to perform
 100  
          */
 101  
         public String getActionUrlsFromField(GeneratedField generatedField);
 102  
 
 103  
         /**
 104  
          * Build the HTML string text needed to return the object represented by the current row in the list to the source object that called the Lookup.
 105  
          * 
 106  
          * @param generatedField
 107  
          * @return
 108  
          */
 109  
         public String getReturnUrlForResults(GeneratedField generatedField);
 110  
 
 111  
         /**
 112  
          * @return Set of property names that should be set as read only based on the current search
 113  
          *         contents
 114  
          */
 115  
     public Set<String> getConditionallyReadOnlyPropertyNames();
 116  
 
 117  
         /**
 118  
          * @return Set of property names that should be set as required based on the current search
 119  
          *         contents
 120  
          */
 121  
         public Set<String> getConditionallyRequiredPropertyNames();
 122  
 
 123  
         /**
 124  
          * @return Set of property names that should be set as hidden based on the current search
 125  
          *         contents
 126  
          */
 127  
         public Set<String> getConditionallyHiddenPropertyNames();
 128  
 
 129  
 /*************************************************************************************************/
 130  
 
 131  
 //    /**
 132  
 //     * Determines if there should be more search fields rendered based on already entered search criteria.
 133  
 //     *
 134  
 //     * @param fieldValues - Map of property/value pairs
 135  
 //     * @return boolean
 136  
 //     */
 137  
 //    public boolean checkForAdditionalFields(Map fieldValues);
 138  
 //
 139  
 //    /**
 140  
 //     * Returns whether this search was performed using the values of the primary keys only
 141  
 //     *
 142  
 //     * @return
 143  
 //     */
 144  
 //    public boolean isSearchUsingOnlyPrimaryKeyValues();
 145  
 //
 146  
 //    /**
 147  
 //     * Returns a comma delimited list of primary key field labels, as defined in the DD
 148  
 //     *
 149  
 //     * @return
 150  
 //     */
 151  
 //    public String getPrimaryKeyFieldLabels();
 152  
 //
 153  
 //    /**
 154  
 //     *
 155  
 //     * This method checks whether the header non maint actions should be shown
 156  
 //     *
 157  
 //     */
 158  
 //    public boolean shouldDisplayHeaderNonMaintActions();
 159  
 //
 160  
 //    /**
 161  
 //     *
 162  
 //     * This method checks whether the criteria should be shown
 163  
 //     *
 164  
 //     */
 165  
 //    public boolean shouldDisplayLookupCriteria();
 166  
 //
 167  
 //    /**
 168  
 //     *
 169  
 //     * This method is called from a custom action button or script
 170  
 //     *
 171  
 //     */
 172  
 //    // TODO delyea - should be on custom Controller?
 173  
 //    public boolean performCustomAction(boolean ignoreErrors);
 174  
 //
 175  
 //    public void applyFieldAuthorizationsFromNestedLookups(Field field);
 176  
 
 177  
 }