org.kuali.rice.kns.lookup
Class KualiLookupableHelperServiceImpl

java.lang.Object
  extended by org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
      extended by org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl
All Implemented Interfaces:
java.io.Serializable, LookupableHelperService
Direct Known Subclasses:
DocSearchCriteriaDTOLookupableHelperServiceImpl, DocumentRouteHeaderValueLookupableHelperServiceImpl, DocumentTypeLookupableHelperServiceImpl, EDocLiteLookupableHelperServiceImpl, KimDocumentRoleMemberLookupableHelperServiceImpl, KimLookupableHelperServiceImpl, KimTypeLookupableHelperServiceImpl, ParameterDetailTypeLookupableHelperServiceImpl, ParameterLookupableHelperServiceImpl, RuleBaseValuesLookupableHelperServiceImpl, RuleDelegationLookupableHelperServiceImpl

@Transactional
public class KualiLookupableHelperServiceImpl
extends AbstractLookupableHelperServiceImpl

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger LOG
           
protected  boolean searchUsingOnlyPrimaryKeyValues
           
 
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, 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
KualiLookupableHelperServiceImpl()
           
 
Method Summary
protected  java.lang.String getExternalBusinessObjectProperty(java.lang.Object sampleBo, java.lang.String propertyName)
          Get the name of the property which represents the ExternalizableBusinessObject for the given property.
protected  java.lang.Class<? extends org.kuali.rice.kns.bo.ExternalizableBusinessObject> getExternalizableBusinessObjectClass(java.lang.Class boClass, java.lang.String propertyName)
          Given an property on the main BO class, return the defined type of the ExternalizableBusinessObject.
protected  java.util.Map<java.lang.String,java.lang.String> getExternalizableBusinessObjectFieldValues(java.lang.String eboPropertyName, java.util.Map<java.lang.String,java.lang.String> fieldValues)
          Return the EBO fieldValue entries explicitly for the given eboPropertyName.
protected  java.util.List<java.lang.String> getExternalizableBusinessObjectProperties(java.lang.Class boClass, java.util.Map<java.lang.String,java.lang.String> fieldValues)
          Get the complete list of all properties referenced in the fieldValues that are ExternalizableBusinessObjects.
 java.lang.String getPrimaryKeyFieldLabels()
          Returns a comma delimited list of primary key field labels, to be used on the UI to tell the user which fields were used to search These labels are generated from the DD definitions for the lookup fields
 java.util.List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResults(java.util.Map<java.lang.String,java.lang.String> fieldValues)
          Uses Lookup Service to provide a basic search.
protected  java.util.List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResultsHelper(java.util.Map<java.lang.String,java.lang.String> fieldValues, boolean unbounded)
          This method does the actual search, with the parameters specified, and returns the result.
 java.util.List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResultsUnbounded(java.util.Map<java.lang.String,java.lang.String> fieldValues)
          Uses Lookup Service to provide a basic unbounded search.
protected  boolean hasExternalBusinessObjectProperty(java.lang.Class boClass, java.util.Map<java.lang.String,java.lang.String> fieldValues)
          Checks whether any of the fieldValues being passed refer to a property within an ExternalizableBusinessObject.
protected  boolean isExternalBusinessObjectProperty(java.lang.Object sampleBo, java.lang.String propertyName)
          Check whether the given property represents a property within an EBO starting with the sampleBo object given.
 boolean isSearchUsingOnlyPrimaryKeyValues()
          This method returns whether the previously executed getSearchResults used the primary key values to search, ignoring all non key values
protected  java.util.Map<java.lang.String,java.lang.String> removeExternalizableBusinessObjectFieldValues(java.lang.Class boClass, java.util.Map<java.lang.String,java.lang.String> fieldValues)
          Returns a map stripped of any properties which refer to ExternalizableBusinessObjects.
 
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, getPropertyClass, getReadOnlyFieldsList, getReferencesToRefresh, getReturnAnchorHtmlData, getReturnHref, getReturnHref, getReturnInputHtmlData, getReturnKeys, getReturnLocation, getReturnUrl, getReturnUrl, getRows, getSequenceAccessorService, getSupplementalMenuBar, getTitle, getUrlData, getUrlData, isResultReturnable, 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, validateSearchParameters, validateSearchParameterWildcardAndOperators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG

searchUsingOnlyPrimaryKeyValues

protected boolean searchUsingOnlyPrimaryKeyValues
Constructor Detail

KualiLookupableHelperServiceImpl

public KualiLookupableHelperServiceImpl()
Method Detail

getSearchResults

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

Specified by:
getSearchResults in interface LookupableHelperService
Specified by:
getSearchResults in class 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 java.util.List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResultsUnbounded(java.util.Map<java.lang.String,java.lang.String> fieldValues)
Uses Lookup Service to provide a basic unbounded search.

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

isExternalBusinessObjectProperty

protected boolean isExternalBusinessObjectProperty(java.lang.Object sampleBo,
                                                   java.lang.String propertyName)
Check whether the given property represents a property within an EBO starting with the sampleBo object given. This is used to determine if a criteria needs to be applied to the EBO first, before sending to the normal lookup DAO.


getExternalBusinessObjectProperty

protected java.lang.String getExternalBusinessObjectProperty(java.lang.Object sampleBo,
                                                             java.lang.String propertyName)
Get the name of the property which represents the ExternalizableBusinessObject for the given property. This method can not handle nested properties within the EBO. Returns null if the property is not a nested property or is part of an add line.


hasExternalBusinessObjectProperty

protected boolean hasExternalBusinessObjectProperty(java.lang.Class boClass,
                                                    java.util.Map<java.lang.String,java.lang.String> fieldValues)
Checks whether any of the fieldValues being passed refer to a property within an ExternalizableBusinessObject.


removeExternalizableBusinessObjectFieldValues

protected java.util.Map<java.lang.String,java.lang.String> removeExternalizableBusinessObjectFieldValues(java.lang.Class boClass,
                                                                                                         java.util.Map<java.lang.String,java.lang.String> fieldValues)
Returns a map stripped of any properties which refer to ExternalizableBusinessObjects. These values may not be passed into the lookup service, since the objects they refer to are not in the local database.


getExternalizableBusinessObjectFieldValues

protected java.util.Map<java.lang.String,java.lang.String> getExternalizableBusinessObjectFieldValues(java.lang.String eboPropertyName,
                                                                                                      java.util.Map<java.lang.String,java.lang.String> fieldValues)
Return the EBO fieldValue entries explicitly for the given eboPropertyName. (I.e., any properties with the given property name as a prefix.


getExternalizableBusinessObjectProperties

protected java.util.List<java.lang.String> getExternalizableBusinessObjectProperties(java.lang.Class boClass,
                                                                                     java.util.Map<java.lang.String,java.lang.String> fieldValues)
Get the complete list of all properties referenced in the fieldValues that are ExternalizableBusinessObjects. This is a list of the EBO object references themselves, not of the properties within them.


getExternalizableBusinessObjectClass

protected java.lang.Class<? extends org.kuali.rice.kns.bo.ExternalizableBusinessObject> getExternalizableBusinessObjectClass(java.lang.Class boClass,
                                                                                                                             java.lang.String propertyName)
Given an property on the main BO class, return the defined type of the ExternalizableBusinessObject. This will be used by other code to determine the correct module service to call for the lookup.

Parameters:
boClass -
propertyName -
Returns:

getSearchResultsHelper

protected java.util.List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResultsHelper(java.util.Map<java.lang.String,java.lang.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.

isSearchUsingOnlyPrimaryKeyValues

public boolean isSearchUsingOnlyPrimaryKeyValues()
Description copied from interface: LookupableHelperService
This method returns whether the previously executed getSearchResults used the primary key values to search, ignoring all non key values

Specified by:
isSearchUsingOnlyPrimaryKeyValues in interface LookupableHelperService
Overrides:
isSearchUsingOnlyPrimaryKeyValues in class AbstractLookupableHelperServiceImpl
Returns:
false always, subclasses should override to do something smarter
See Also:
LookupableHelperService.isSearchUsingOnlyPrimaryKeyValues()

getPrimaryKeyFieldLabels

public java.lang.String getPrimaryKeyFieldLabels()
Returns a comma delimited list of primary key field labels, to be used on the UI to tell the user which fields were used to search These labels are generated from the DD definitions for the lookup fields

Specified by:
getPrimaryKeyFieldLabels in interface LookupableHelperService
Overrides:
getPrimaryKeyFieldLabels in class AbstractLookupableHelperServiceImpl
Returns:
a comma separated list of field attribute names. If no fields found, returns "N/A"
See Also:
LookupableHelperService.isSearchUsingOnlyPrimaryKeyValues(), LookupableHelperService.getPrimaryKeyFieldLabels()


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.