org.kuali.kfs.module.purap.businessobject.lookup
Class ThresholdLookupableHelperService

java.lang.Object
  extended by org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
      extended by org.kuali.kfs.module.purap.businessobject.lookup.ThresholdLookupableHelperService
All Implemented Interfaces:
Serializable, org.kuali.rice.kns.lookup.LookupableHelperService

public class ThresholdLookupableHelperService
extends org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl

This lookupable helper service is used to support lookups on the Threshold BO because it deals with the vendor number, which isn't really a field, but rather a combination of 2 fields. This code mostly copies KualiLookupableHelperServiceImpl, but differs in that this class will not remove search criteria containing values corresponding to hidden fields.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
ACTION_URLS_CHILDREN_END, ACTION_URLS_CHILDREN_SEPARATOR, ACTION_URLS_CHILDREN_STARTER, ACTION_URLS_EMPTY, ACTION_URLS_SEPARATOR, backLocation, businessObjectAuthorizationService, businessObjectClass, businessObjectDictionaryService, businessObjectMetaDataService, businessObjectService, configurationService, dataDictionaryService, docFormKey, docNum, encryptionService, fieldConversions, forceLookupResultFieldInquiryCache, inquirableClassCache, kualiInquirable, LOG, lookupResultsService, lookupService, maintenanceDocumentDictionaryService, noLookupResultFieldInquiryCache, parameters, parameterService, persistenceStructureService, readOnlyFieldsList, referencesToRefresh, resultColumns, RESULTS_DEFAULT_MAX_COLUMN_LENGTH, rows, sequenceAccessorService, TITLE_ACTION_URL_PREPENDTEXT_PROPERTY, TITLE_RETURN_URL_PREPENDTEXT_PROPERTY
 
Constructor Summary
ThresholdLookupableHelperService()
           
 
Method Summary
protected  void extractVendorNumberToVendorIds(Map fieldValues, String vendorNumber)
          Parses the vendorNumber string into vendorHeaderGeneratedIdentifier and vendorDetailAssignedIdentifier, validates that both fields would be able to be converted into integers, if so it will add both fields into the search criterias map in the fieldValues and remove the vendorNumber from the fieldValues.
 List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResults(Map<String,String> fieldValues)
          Uses Lookup Service to provide a basic search.
protected  List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResultsHelper(Map<String,String> fieldValues, boolean unbounded)
          This method does the actual search, with the parameters specified, and returns the result.
 List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResultsUnbounded(Map<String,String> fieldValues)
          Uses Lookup Service to provide a basic unbounded search.
 void validateSearchParameters(Map fieldValues)
           
protected  void validateVendorNumber(Map fieldValues)
          Validates that the Vendor Number has no more than one dash in it, and does not consist solely of one dash.
 
Methods inherited from class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
addToReturnHref, allowsMaintenanceDeleteAction, allowsMaintenanceEditAction, allowsMaintenanceNewOrCopyAction, allowsNewOrCopyAction, applyConditionalLogicForFieldDisplay, applyFieldAuthorizationsFromNestedLookups, checkForAdditionalFields, getActionUrlHref, getActionUrls, getActionUrlTitleText, getBackLocation, getBusinessObjectAuthorizationService, getBusinessObjectClass, getBusinessObjectDictionaryService, getBusinessObjectMetaDataService, getBusinessObjectService, getColumnMaxLength, getColumns, getConditionallyHiddenPropertyNames, getConditionallyReadOnlyPropertyNames, getConditionallyRequiredPropertyNames, getCurrentSearchFieldValue, getCustomActionUrls, getDataDictionaryService, getDefaultSortColumns, getDocFormKey, getDocNum, getEmptyActionUrls, getEmptyAnchorHtmlData, getEncryptionService, getExtraField, getInquiryUrl, getKualiConfigurationService, getKualiInquirable, getLookupResultsService, getLookupService, getMaintenanceDocumentDictionaryService, getMaintenanceDocumentTypeName, getMaintenanceUrl, getParameters, getParameters, getParameterService, getParametersFromPrimaryKey, getPersistenceStructureService, getPrimaryKeyFieldLabels, getPropertyClass, getReadOnlyFieldsList, getReferencesToRefresh, getReturnAnchorHtmlData, getReturnHref, getReturnHref, getReturnInputHtmlData, getReturnKeys, getReturnLocation, getReturnUrl, getReturnUrl, getRows, getSequenceAccessorService, getSupplementalMenuBar, getTitle, getUrlData, getUrlData, isResultReturnable, isSearchUsingOnlyPrimaryKeyValues, maskValueIfNecessary, performClear, performCustomAction, performLookup, preprocessDateFields, setBackLocation, setBusinessObjectClass, setBusinessObjectDictionaryService, setBusinessObjectMetaDataService, setBusinessObjectService, setDataDictionaryService, setDocFormKey, setDocNum, setEncryptionService, setFieldConversions, setKualiInquirable, setLookupResultsService, setLookupService, setMaintenanceDocumentDictionaryService, setParameters, setParameterService, setParameterService, setPersistenceStructureService, setReadOnlyFieldsList, setReferencesToRefresh, setRows, setSequenceAccessorService, shouldDisplayHeaderNonMaintActions, shouldDisplayLookupCriteria, validateSearchParameterWildcardAndOperators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThresholdLookupableHelperService

public ThresholdLookupableHelperService()
Method Detail

validateSearchParameters

public void validateSearchParameters(Map fieldValues)
Specified by:
validateSearchParameters in interface org.kuali.rice.kns.lookup.LookupableHelperService
Overrides:
validateSearchParameters in class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl

validateVendorNumber

protected void validateVendorNumber(Map fieldValues)
Validates that the Vendor Number has no more than one dash in it, and does not consist solely of one dash. Then it calls extractVendorNumberToVendorIds to obtain vendorHeaderGeneratedId and vendorDetailAssignedId and if either one of the ids cannot be converted to integers, it will add error that the vendor number must be numerics or numerics separated by a dash.

Parameters:
fieldValues - a Map containing only those key-value pairs that have been filled in on the lookup

extractVendorNumberToVendorIds

protected void extractVendorNumberToVendorIds(Map fieldValues,
                                              String vendorNumber)
Parses the vendorNumber string into vendorHeaderGeneratedIdentifier and vendorDetailAssignedIdentifier, validates that both fields would be able to be converted into integers, if so it will add both fields into the search criterias map in the fieldValues and remove the vendorNumber from the fieldValues. If the two fields cannot be converted into integers, this method will add error message to the errorMap in GlobalVariables that the vendor number must be numeric or numerics separated by a dash.

Parameters:
fieldValues - a Map containing only those key-value pairs that have been filled in on the lookup
vendorNumber - venodr number String

getSearchResults

public List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResults(Map<String,String> fieldValues)
Uses Lookup Service to provide a basic search.

Specified by:
getSearchResults in interface org.kuali.rice.kns.lookup.LookupableHelperService
Specified by:
getSearchResults in class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
Parameters:
fieldValues - - Map containing prop name keys and search values
Returns:
List found business objects
See Also:
LookupableHelperService.getSearchResults(java.util.Map)

getSearchResultsUnbounded

public List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResultsUnbounded(Map<String,String> fieldValues)
Uses Lookup Service to provide a basic unbounded search.

Specified by:
getSearchResultsUnbounded in interface org.kuali.rice.kns.lookup.LookupableHelperService
Overrides:
getSearchResultsUnbounded in class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
Parameters:
fieldValues - - Map containing prop name keys and search values
Returns:
List found business objects
See Also:
LookupableHelperService.getSearchResultsUnbounded(java.util.Map)

getSearchResultsHelper

protected List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResultsHelper(Map<String,String> fieldValues,
                                                                                      boolean unbounded)
This method does the actual search, with the parameters specified, and returns the result. NOTE that it will not do any upper-casing based on the DD forceUppercase. That is handled through an external call to LookupUtils.forceUppercase().

Parameters:
fieldValues - A Map of the fieldNames and fieldValues to be searched on.
unbounded - Whether the results should be bounded or not to a certain max size.
Returns:
A List of search results.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.