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 boolean isHideReturnLink();
 78  
 
 79  
     public void setHideReturnLink(boolean hideReturnLink);
 80  
 
 81  
     public void setSuppressActions(boolean suppressActions);
 82  
 
 83  
     public boolean isSuppressActions();
 84  
 
 85  
     public void setShowMaintenanceLinks(boolean showMaintenanceLinks);
 86  
 
 87  
            public boolean isShowMaintenanceLinks();
 88  
 
 89  
     public String getReturnLocation();
 90  
 
 91  
         public String getReturnFormKey();
 92  
 
 93  
         public boolean isAtLeastOneRowReturnable();
 94  
 
 95  
         public boolean isAtLeastOneRowHasActions();
 96  
 
 97  
     /**
 98  
      * 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 
 99  
      * 
 100  
      * @param generatedField - the field that will be used to display the String text
 101  
      * @return String representing both the url and the HTML text required for the page
 102  
      */
 103  
     public String getCreateNewUrl(GeneratedField generatedField);
 104  
 
 105  
         /**
 106  
          * 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
 107  
          * maintenance actions the user is allowed to perform.
 108  
          * 
 109  
          * @param generatedField
 110  
          *            - the field that will be used to display the String text
 111  
          * @return String representing the HTML text required for any maintenance actions the user is allowed to perform
 112  
          */
 113  
         public String getActionUrlsFromField(GeneratedField generatedField);
 114  
 
 115  
         /**
 116  
          * 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.
 117  
          * 
 118  
          * @param generatedField
 119  
          * @return
 120  
          */
 121  
         public String getReturnUrlForResults(GeneratedField generatedField);
 122  
 
 123  
         /**
 124  
          * @return Set of property names that should be set as read only based on the current search
 125  
          *         contents
 126  
          */
 127  
     public Set<String> getConditionallyReadOnlyPropertyNames();
 128  
 
 129  
         /**
 130  
          * @return Set of property names that should be set as required based on the current search
 131  
          *         contents
 132  
          */
 133  
         public Set<String> getConditionallyRequiredPropertyNames();
 134  
 
 135  
         /**
 136  
          * @return Set of property names that should be set as hidden based on the current search
 137  
          *         contents
 138  
          */
 139  
         public Set<String> getConditionallyHiddenPropertyNames();
 140  
 
 141  
 /*************************************************************************************************/
 142  
 
 143  
 //    /**
 144  
 //     * Determines if there should be more search fields rendered based on already entered search criteria.
 145  
 //     *
 146  
 //     * @param fieldValues - Map of property/value pairs
 147  
 //     * @return boolean
 148  
 //     */
 149  
 //    public boolean checkForAdditionalFields(Map fieldValues);
 150  
 //
 151  
 //    /**
 152  
 //     * Returns whether this search was performed using the values of the primary keys only
 153  
 //     *
 154  
 //     * @return
 155  
 //     */
 156  
 //    public boolean isSearchUsingOnlyPrimaryKeyValues();
 157  
 //
 158  
 //    /**
 159  
 //     * Returns a comma delimited list of primary key field labels, as defined in the DD
 160  
 //     *
 161  
 //     * @return
 162  
 //     */
 163  
 //    public String getPrimaryKeyFieldLabels();
 164  
 //
 165  
 //    /**
 166  
 //     *
 167  
 //     * This method checks whether the header non maint actions should be shown
 168  
 //     *
 169  
 //     */
 170  
 //    public boolean shouldDisplayHeaderNonMaintActions();
 171  
 //
 172  
 //    /**
 173  
 //     *
 174  
 //     * This method checks whether the criteria should be shown
 175  
 //     *
 176  
 //     */
 177  
 //    public boolean shouldDisplayLookupCriteria();
 178  
 //
 179  
 //    /**
 180  
 //     *
 181  
 //     * This method is called from a custom action button or script
 182  
 //     *
 183  
 //     */
 184  
 //    // TODO delyea - should be on custom Controller?
 185  
 //    public boolean performCustomAction(boolean ignoreErrors);
 186  
 //
 187  
 //    public void applyFieldAuthorizationsFromNestedLookups(Field field);
 188  
 
 189  
 }