org.kuali.rice.kns.lookup
Interface LookupableHelperService

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractLookupableHelperServiceImpl, ComponentLookupableHelperServiceImpl, DocumentSearchCriteriaBoLookupableHelperService, DocumentTypeLookupableHelperServiceImpl, EDocLiteLookupableHelperServiceImpl, GroupLookupableHelperServiceImpl, KimDocumentRoleMemberLookupableHelperServiceImpl, KimLookupableHelperServiceImpl, KimTypeLookupableHelperServiceImpl, KualiLookupableHelperServiceImpl, ParameterLookupableHelperServiceImpl, PermissionLookupableHelperServiceImpl, PersonLookupableHelperServiceImpl, PessimisticLockLookupableHelperServiceImpl, ResponsibilityLookupableHelperServiceImpl, RoleLookupableHelperServiceImpl, RoleMemberImplLookupableHelperServiceImpl, RoleMemberLookupableHelperServiceImpl, RuleBaseValuesLookupableHelperServiceImpl, RuleDelegationLookupableHelperServiceImpl

public interface LookupableHelperService
extends Serializable


Method Summary
 boolean allowsMaintenanceNewOrCopyAction()
          Determines if underlying lookup bo has associated maintenance document that allows new or copy maintenance actions.
 boolean allowsNewOrCopyAction(String documentTypeName)
          Determines if underlying lookup bo has associated document that allows new or copy maintenance actions.
 void applyConditionalLogicForFieldDisplay()
          Performs conditional logic (based on current search values or other parameters) to override field hidden, read-only, and required attributes previously set.
 void applyFieldAuthorizationsFromNestedLookups(Field field)
           
 boolean checkForAdditionalFields(Map<String,String> fieldValues)
          Determines if there should be more search fields rendered based on already entered search criteria.
 String getActionUrls(BusinessObject businessObject, List pkNames, BusinessObjectRestrictions businessObjectRestrictions)
          Builds string of action urls that can take place for a result row
 String getBackLocation()
           
 Class getBusinessObjectClass()
           
 BusinessObjectDictionaryService getBusinessObjectDictionaryService()
          This method returns the BusinessObjectDictionaryService used to initialize this helper service and is used by Lookupable implementations to retrieve the proper service.
 List<Column> getColumns()
           
 List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames)
          This method is a template method that allows child classes to return their own custom action html data.
 DataDictionaryService getDataDictionaryService()
          This method returns the DataDictionaryService used to initialize this helper service and is used by Lookupable implementations to retrieve the proper service.
 List<String> getDefaultSortColumns()
          This method returns a list of the default columns used to sort the result set.
 String getDocFormKey()
           
 String getDocNum()
           
 Field getExtraField()
          get an extra field
 HtmlData getInquiryUrl(BusinessObject businessObject, String propertyName)
          Builds string an inquiry url for drill down on a result field
 String getMaintenanceUrl(BusinessObject businessObject, HtmlData htmlData, List pkNames, BusinessObjectRestrictions businessObjectRestrictions)
          This method builds a maintenance url.
 Map<String,String[]> getParameters()
           
 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
 List<String> getReadOnlyFieldsList()
          Gets the readOnlyFieldsList attribute.
 List<String> getReturnKeys()
          This method is public because some unit tests depend on it.
 String getReturnLocation()
           
 HtmlData getReturnUrl(BusinessObject businessObject, LookupForm lookupForm, List returnKeys, BusinessObjectRestrictions businessObjectRestrictions)
          This method builds the return url
 HtmlData getReturnUrl(BusinessObject businessObject, Map fieldConversions, String lookupImpl, List returnKeys, BusinessObjectRestrictions businessObjectRestrictions)
          Builds the return value url.
 List<Row> getRows()
          Returns a list of Row objects to be used to generate the search query screen Generally, setDataObjectClass needs to be called with a non-null value for proper operation
 List<? extends BusinessObject> getSearchResults(Map<String,String> fieldValues)
          Performs a search and returns result list.
 List<? extends BusinessObject> getSearchResultsUnbounded(Map<String,String> fieldValues)
          Similar to getSearchResults, but the number of returned rows is not bounded
 String getSupplementalMenuBar()
          This method gets the supplemental lookup menu if any
 String getTitle()
           
 boolean isResultReturnable(BusinessObject object)
          Determines whether a given BusinessObject that's returned as one of the lookup's results is considered returnable, which means that for single-value lookups, a "return value" link may be rendered, and for multiple value lookups, a checkbox is rendered.
 boolean isSearchUsingOnlyPrimaryKeyValues()
          This method returns whether the previously executed getSearchResults used the primary key values to search, ignoring all non key values
 void performClear(LookupForm lookupForm)
          This method allows for overriding the clear behavior
 boolean performCustomAction(boolean ignoreErrors)
          performs custom actions.
 Collection<? extends BusinessObject> performLookup(LookupForm lookupForm, Collection<ResultRow> resultTable, boolean bounded)
          This method performs the lookup and returns a collection of BO items
 void setBackLocation(String backLocation)
           
 void setBusinessObjectClass(Class businessObjectClass)
          Initializes the lookup with a business object class.
 void setDocFormKey(String docFormKey)
           
 void setDocNum(String docNum)
           
 void setFieldConversions(Map fieldConversions)
          Sets the requested fields conversions in the lookupable
 void setParameters(Map<String,String[]> parameters)
          Initializes the lookup with the given Map of parameters.
 void setReadOnlyFieldsList(List<String> readOnlyFieldsList)
          Sets the requested read only fields list in the lookupable
 boolean shouldDisplayHeaderNonMaintActions()
           
 boolean shouldDisplayLookupCriteria()
           
 void validateSearchParameters(Map<String,String> fieldValues)
          Validates the values filled in as search criteria, also checks for required field values.
 

Method Detail

setBusinessObjectClass

void setBusinessObjectClass(Class businessObjectClass)
Initializes the lookup with a business object class. This is set via the LookupableHelperService's consumer, namely the Lookupable implementation (or in cases of nesting a wrapping LookupableHelperService). The Lookupable in turn receives this value from the UI via LookupForm population.

Parameters:
businessObjectClass -

getBusinessObjectClass

Class getBusinessObjectClass()
Returns:
Returns the dataObjectClass this lookupable is representing

setParameters

void setParameters(Map<String,String[]> parameters)
Initializes the lookup with the given Map of parameters.

Parameters:
parameters -

getParameters

Map<String,String[]> getParameters()
Returns:
Returns the parameters passed to this lookup

getReturnLocation

String getReturnLocation()
Returns:
String url for the location to return to after the lookup

getColumns

List<Column> getColumns()
Returns:
List of Column objects used to render the result table

validateSearchParameters

void validateSearchParameters(Map<String,String> fieldValues)
Validates the values filled in as search criteria, also checks for required field values.

Parameters:
fieldValues - - Map of property/value pairs

getSearchResults

List<? extends BusinessObject> getSearchResults(Map<String,String> fieldValues)
Performs a search and returns result list.

Parameters:
fieldValues - - Map of property/value pairs
Returns:
List of business objects found by the search
Throws:
Exception

getSearchResultsUnbounded

List<? extends BusinessObject> getSearchResultsUnbounded(Map<String,String> fieldValues)
Similar to getSearchResults, but the number of returned rows is not bounded

Parameters:
fieldValues -
Returns:

checkForAdditionalFields

boolean checkForAdditionalFields(Map<String,String> fieldValues)
Determines if there should be more search fields rendered based on already entered search criteria.

Parameters:
fieldValues - - Map of property/value pairs
Returns:
boolean

getReturnUrl

HtmlData getReturnUrl(BusinessObject businessObject,
                      Map fieldConversions,
                      String lookupImpl,
                      List returnKeys,
                      BusinessObjectRestrictions businessObjectRestrictions)
Builds the return value url.

Parameters:
businessObject - - Instance of a business object containing the return values
fieldConversions - - Map of conversions mapping bo names to caller field names.
lookupImpl - - Current lookup impl name
returnKeys - - Keys to return
Returns:
String url called when selecting a row from the result set

getReturnUrl

HtmlData getReturnUrl(BusinessObject businessObject,
                      LookupForm lookupForm,
                      List returnKeys,
                      BusinessObjectRestrictions businessObjectRestrictions)
This method builds the return url

Parameters:
businessObject -
lookupForm -
returnKeys -
Returns:

getActionUrls

String getActionUrls(BusinessObject businessObject,
                     List pkNames,
                     BusinessObjectRestrictions businessObjectRestrictions)
Builds string of action urls that can take place for a result row

Parameters:
businessObject - - Instance of a business object containing the return values
pkNames - - List of primary key names
Returns:
String rendered in actions column of result set

getCustomActionUrls

List<HtmlData> getCustomActionUrls(BusinessObject businessObject,
                                   List pkNames)
This method is a template method that allows child classes to return their own custom action html data.

Parameters:
businessObject -
pkNames -
Returns:

getInquiryUrl

HtmlData getInquiryUrl(BusinessObject businessObject,
                       String propertyName)
Builds string an inquiry url for drill down on a result field

Parameters:
businessObject - - Instance of a business object containing the return values
propertyName - - Name of the property in the business object
Returns:
String url called on selection of the result field

setFieldConversions

void setFieldConversions(Map fieldConversions)
Sets the requested fields conversions in the lookupable

Parameters:
fieldConversions -

getReadOnlyFieldsList

List<String> getReadOnlyFieldsList()
Gets the readOnlyFieldsList attribute.

Returns:
Returns the readOnlyFieldsList.

setReadOnlyFieldsList

void setReadOnlyFieldsList(List<String> readOnlyFieldsList)
Sets the requested read only fields list in the lookupable

Parameters:
readOnlyFieldsList -

getReturnKeys

List<String> getReturnKeys()
This method is public because some unit tests depend on it.

Returns:
a List of the names of fields which are marked in data dictionary as return fields.

getDocFormKey

String getDocFormKey()

setDocFormKey

void setDocFormKey(String docFormKey)

getDocNum

String getDocNum()

setDocNum

void setDocNum(String docNum)

getMaintenanceUrl

String getMaintenanceUrl(BusinessObject businessObject,
                         HtmlData htmlData,
                         List pkNames,
                         BusinessObjectRestrictions businessObjectRestrictions)
This method builds a maintenance url.

Parameters:
businessObject -
htmlData -
pkNames -
Returns:

allowsMaintenanceNewOrCopyAction

boolean allowsMaintenanceNewOrCopyAction()
Determines if underlying lookup bo has associated maintenance document that allows new or copy maintenance actions.

Returns:
true if bo has maint doc that allows new or copy actions

allowsNewOrCopyAction

boolean allowsNewOrCopyAction(String documentTypeName)
Determines if underlying lookup bo has associated document that allows new or copy maintenance actions.

Returns:
true if bo has doc that allows new or copy actions

getRows

List<Row> getRows()
Returns a list of Row objects to be used to generate the search query screen Generally, setDataObjectClass needs to be called with a non-null value for proper operation

Returns:

getDataDictionaryService

DataDictionaryService getDataDictionaryService()
This method returns the DataDictionaryService used to initialize this helper service and is used by Lookupable implementations to retrieve the proper service.

Returns:

getBusinessObjectDictionaryService

BusinessObjectDictionaryService getBusinessObjectDictionaryService()
This method returns the BusinessObjectDictionaryService used to initialize this helper service and is used by Lookupable implementations to retrieve the proper service.

Returns:

setBackLocation

void setBackLocation(String backLocation)

getBackLocation

String getBackLocation()

performLookup

Collection<? extends BusinessObject> performLookup(LookupForm lookupForm,
                                                   Collection<ResultRow> resultTable,
                                                   boolean bounded)
This method performs the lookup and returns a collection of BO items

Parameters:
lookupForm -
resultTable -
bounded -
Returns:
the list of result BOs, possibly bounded

getDefaultSortColumns

List<String> getDefaultSortColumns()
This method returns a list of the default columns used to sort the result set. For multiple value lookups, this method does not change when different columns are sorted.

Returns:

isSearchUsingOnlyPrimaryKeyValues

boolean isSearchUsingOnlyPrimaryKeyValues()
This method returns whether the previously executed getSearchResults used the primary key values to search, ignoring all non key values

Returns:
See Also:
getPrimaryKeyFieldLabels()

getPrimaryKeyFieldLabels

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

Returns:
See Also:
isSearchUsingOnlyPrimaryKeyValues()

isResultReturnable

boolean isResultReturnable(BusinessObject object)
Determines whether a given BusinessObject that's returned as one of the lookup's results is considered returnable, which means that for single-value lookups, a "return value" link may be rendered, and for multiple value lookups, a checkbox is rendered. Note that this can be part of an authorization mechanism, but not the complete authorization mechanism. The component that invoked the lookup/ lookup caller (e.g. document, nesting lookup, etc.) needs to check that the object that was passed to it was returnable as well because there are ways around this method (e.g. crafting a custom return URL).

Parameters:
object - an object from the search result set
Returns:

performClear

void performClear(LookupForm lookupForm)
This method allows for overriding the clear behavior


shouldDisplayHeaderNonMaintActions

boolean shouldDisplayHeaderNonMaintActions()

shouldDisplayLookupCriteria

boolean shouldDisplayLookupCriteria()

getSupplementalMenuBar

String getSupplementalMenuBar()
This method gets the supplemental lookup menu if any

Returns:
supplemental menu bar

getTitle

String getTitle()
Returns:
String displayed as title for the lookup

performCustomAction

boolean performCustomAction(boolean ignoreErrors)
performs custom actions. return true to reperform search

Parameters:
ignoreErrors -
Returns:
boolean to reperform search

getExtraField

Field getExtraField()
get an extra field

Returns:

applyFieldAuthorizationsFromNestedLookups

void applyFieldAuthorizationsFromNestedLookups(Field field)

applyConditionalLogicForFieldDisplay

void applyConditionalLogicForFieldDisplay()
Performs conditional logic (based on current search values or other parameters) to override field hidden, read-only, and required attributes previously set.



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