org.kuali.rice.krad.lookup
Interface Lookupable

All Superinterfaces:
Serializable, ViewHelperService
All Known Implementing Classes:
AgendaLookupableHelperServiceImpl, FiscalOfficerInfoLookupViewHelperServiceImpl, GroupLookupableImpl, LookupableImpl, PersonLookupableImpl, RoleLookupableImpl

public interface Lookupable
extends ViewHelperService, Serializable

Provides contract for implementing a lookup within the lookup framework

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 Class<?> getDataObjectClass()
          Returns the class for the data object the lookup is configured with
 void getMaintenanceActionLink(LinkField actionLinkField, Object model, String maintenanceMethodToCall)
          Invoked to build a maintenance URL for a result row
 void getReturnUrlForResults(LinkField returnLinkField, Object model)
          Invoked to build the return URL for a result row
 void initSuppressAction(LookupForm lookupForm)
          Initialize the suppressAction indicator on the LookupForm.
 Map<String,String> performClear(LookupForm form, Map<String,String> searchCriteria)
          Invoked when the clear action is requested to result the search fields to their initial default values
 Collection<?> performSearch(LookupForm form, Map<String,String> searchCriteria, boolean bounded)
          Invoked to carry out the lookup search based on the given map of key/value search values
 void setDataObjectClass(Class<?> dataObjectClass)
          Sets the class for the data object the lookup will be provided on
 void setFieldConversions(Map<String,String> fieldConversions)
          Sets the field conversion map on the lookupable
 void setMultiValueLookupSelect(InputField selectField, Object model)
           
 void setReadOnlyFieldsList(List<String> readOnlyFieldsList)
          Sets List of fields on the lookupable that should be made read only in the search criteria group
 boolean validateSearchParameters(LookupForm form, Map<String,String> searchCriteria)
          Invoked to perform validation on the search criteria before the search is performed
 
Methods inherited from interface org.kuali.rice.krad.uif.service.ViewHelperService
applyDefaultValuesForCollectionLine, buildInquiryLink, cleanViewAfterRender, performApplyModel, performComponentInitialization, performComponentLifecycle, performFinalize, performInitialization, populateViewFromRequestParameters, processCollectionAddLine, processCollectionDeleteLine, processMultipleValueLookupResults
 

Method Detail

initSuppressAction

void initSuppressAction(LookupForm lookupForm)
Initialize the suppressAction indicator on the LookupForm.

The suppress action is set to true if the user is not authorized to initiate these documents. The indicator is then used to hide irrelevant actions such as creating a new document or editing existing ones.

Parameters:
lookupForm - on which to initialize the suppressAction indicator

performSearch

Collection<?> performSearch(LookupForm form,
                            Map<String,String> searchCriteria,
                            boolean bounded)
Invoked to carry out the lookup search based on the given map of key/value search values

Parameters:
form - - lookup form instance containing the lookup data
searchCriteria - - map of criteria currently set
bounded - - indicates whether the results should be limited (if necessary) to the max search result limit configured
Returns:
the list of result objects, possibly bounded

performClear

Map<String,String> performClear(LookupForm form,
                                Map<String,String> searchCriteria)
Invoked when the clear action is requested to result the search fields to their initial default values

Parameters:
form - - lookup form instance containing the lookup data
searchCriteria - - map of criteria currently set
Returns:
map of criteria with field values reset to defaults

validateSearchParameters

boolean validateSearchParameters(LookupForm form,
                                 Map<String,String> searchCriteria)
Invoked to perform validation on the search criteria before the search is performed

Parameters:
form - - lookup form instance containing the lookup data
searchCriteria - - map of criteria where key is search property name and value is search value (which can include wildcards)
Returns:
boolean true if validation was successful, false if there were errors and the search should not be performed

setDataObjectClass

void setDataObjectClass(Class<?> dataObjectClass)
Sets the class for the data object the lookup will be provided on

Parameters:
dataObjectClass - - data object class for lookup

getDataObjectClass

Class<?> getDataObjectClass()
Returns the class for the data object the lookup is configured with

Returns:
Class data object class

setFieldConversions

void setFieldConversions(Map<String,String> fieldConversions)
Sets the field conversion map on the lookupable

The field conversions map specifies the mappings for return fields. When the user selects a row to return, for each configured field conversion the corresponding value from the result row will be sent back as the value for the field on the calling field.

Parameters:
fieldConversions - - map of field conversions where key is name of the property on result data object to get value for, and map value is the name of the field to send the value back as (name of the field on the calling view)

setReadOnlyFieldsList

void setReadOnlyFieldsList(List<String> readOnlyFieldsList)
Sets List of fields on the lookupable that should be made read only in the search criteria group

Parameters:
readOnlyFieldsList - - list of read only fields

getReturnUrlForResults

void getReturnUrlForResults(LinkField returnLinkField,
                            Object model)
Invoked to build the return URL for a result row

Based on the line contained in the field context, the URL for returning the role is constructed and set as the href for the link field. If a return link cannot be constructed the field should be set to not render

Parameters:
returnLinkField - - link field that will be used to render the return URL
model - - lookup form containing the data

getMaintenanceActionLink

void getMaintenanceActionLink(LinkField actionLinkField,
                              Object model,
                              String maintenanceMethodToCall)
Invoked to build a maintenance URL for a result row

Based on the line contained in the field context and the given maintenance method that should be called a URL is constructed and set as the href on the link field. If a maintenance link cannot be constructed the field should be set to not render

Parameters:
actionLinkField - - link field that will be used to return the maintenance URL
model - - lookup form containing the data
maintenanceMethodToCall - - name of the method that should be invoked in the maintenance controller

setMultiValueLookupSelect

void setMultiValueLookupSelect(InputField selectField,
                               Object model)


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