org.kuali.rice.kns.lookup
Interface Lookupable

All Superinterfaces:
Serializable
All Known Implementing Classes:
GroupLookupableImpl, KualiLookupableImpl, PermissionLookupableImpl, PersonLookupableImpl, ResponsibilityLookupableImpl, RoleLookupableImpl, RuleBaseValuesLookupableImpl, RuleDelegationLookupableImpl

public interface Lookupable
extends Serializable

This class defines an interface for lookupables. They should act as facades for LookupableHelperServices and also expose bean handlers (getCreateNewUrl, getHtmlMenuBar, getTitle, getRows, getExtraButton{Source,Params})


Method Summary
 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 fieldValues)
          Determines if there should be more search fields rendered based on already entered search criteria.
 Class getBusinessObjectClass()
           
 List getColumns()
           
 String getCreateNewUrl()
          Builds the Url for a maintenance new document for the lookup business object class
 List getDefaultSortColumns()
          This method returns a list of the default columns used to sort the result set.
 String getExtraButtonParams()
           
 String getExtraButtonSource()
           
 Field getExtraField()
          get extra field
 String getExtraOnLoad()
          method returns the extraOnLoad variable.
 String getHtmlMenuBar()
           
 LookupableHelperService getLookupableHelperService()
          Returns the LookupableHelperService designated to help this lookup
 Map getParameters()
           
 String getPrimaryKeyFieldLabels()
          Returns a comma delimited list of primary key field labels, as defined in the DD
 String getReturnLocation()
           
 HtmlData getReturnUrl(org.kuali.rice.kns.bo.BusinessObject businessObject, Map fieldConversions, String lookupImpl, BusinessObjectRestrictions businessObjectRestrictions)
          Builds the return value url.
 List getRows()
           
 List<org.kuali.rice.kns.bo.BusinessObject> getSearchResults(Map<String,String> fieldValues)
          Performs a search and returns result list.
 List<org.kuali.rice.kns.bo.BusinessObject> getSearchResultsUnbounded(Map<String,String> fieldValues)
          Similar to getSearchResults, but the number of returned rows is not bounded
 String getSupplementalMenuBar()
           
 String getTitle()
           
 boolean isSearchUsingOnlyPrimaryKeyValues()
          Returns whether this search was performed using the values of the primary keys only
 void performClear(LookupForm lookupForm)
          This method allows for customization of the lookup clear
 boolean performCustomAction(boolean ignoreErrors)
          This method is called from a custom action button or script
 Collection performLookup(LookupForm lookupForm, List<ResultRow> resultTable, boolean bounded)
          This method performs the lookup and returns a collection of lookup items
 void setBusinessObjectClass(Class businessObjectClass)
          Initializes the lookup with a businss object class It is required that implementations of this method will initialize the search area used by the UI to provide the search form.
 void setExtraOnLoad(String extraOnLoad)
           
 void setFieldConversions(Map fieldConversions)
          Sets the requested fields conversions in the lookupable
 void setLookupableHelperService(LookupableHelperService helper)
          Sets the helper service for instance
 void setParameters(Map 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()
          This method checks whether the header non maint actions should be shown
 boolean shouldDisplayLookupCriteria()
          This method checks whether the criteria should be shown
 void validateSearchParameters(Map 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 businss object class It is required that implementations of this method will initialize the search area used by the UI to provide the search form. In particular, it will ensure that getRows() will return valid results

Parameters:
boClass -

getBusinessObjectClass

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

setParameters

void setParameters(Map parameters)
Initializes the lookup with the given Map of parameters.

Parameters:
parameters -

getParameters

Map getParameters()
Returns:
Returns the parameters passed to this lookup

getHtmlMenuBar

String getHtmlMenuBar()
Returns:
the html to be displayed as a menu bar

getSupplementalMenuBar

String getSupplementalMenuBar()
Returns:
the html to be displayed as a supplemental menu bar

getRows

List getRows()
Returns:
List of Row objects used to render the search area

getTitle

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

getReturnLocation

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

getColumns

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

validateSearchParameters

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

Parameters:
fieldValues - - Map of property/value pairs

performLookup

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

Parameters:
lookupForm -
resultTable -
bounded -
Returns:
results of lookup

getSearchResults

List<org.kuali.rice.kns.bo.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<org.kuali.rice.kns.bo.BusinessObject> getSearchResultsUnbounded(Map<String,String> fieldValues)
Similar to getSearchResults, but the number of returned rows is not bounded

Parameters:
fieldValues -
Returns:

getExtraButtonSource

String getExtraButtonSource()
Returns:
String providing source for optional extra button

getExtraButtonParams

String getExtraButtonParams()
Returns:
String providing return parameters for optional extra button

checkForAdditionalFields

boolean checkForAdditionalFields(Map 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(org.kuali.rice.kns.bo.BusinessObject businessObject,
                      Map fieldConversions,
                      String lookupImpl,
                      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
Returns:
String url called when selecting a row from the result set

getCreateNewUrl

String getCreateNewUrl()
Builds the Url for a maintenance new document for the lookup business object class

Parameters:
businessObject -
Returns:
String rendered on Lookup screen for maintenance new document

setFieldConversions

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

Parameters:
fieldConversions -

setReadOnlyFieldsList

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

Parameters:
readOnlyFieldsList -

setLookupableHelperService

void setLookupableHelperService(LookupableHelperService helper)
Sets the helper service for instance

Parameters:
helper - the helper service

getLookupableHelperService

LookupableHelperService getLookupableHelperService()
Returns the LookupableHelperService designated to help this lookup

Returns:

isSearchUsingOnlyPrimaryKeyValues

boolean isSearchUsingOnlyPrimaryKeyValues()
Returns whether this search was performed using the values of the primary keys only

Returns:

getPrimaryKeyFieldLabels

String getPrimaryKeyFieldLabels()
Returns a comma delimited list of primary key field labels, as defined in the DD

Returns:

getDefaultSortColumns

List 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:

performClear

void performClear(LookupForm lookupForm)
This method allows for customization of the lookup clear


shouldDisplayHeaderNonMaintActions

boolean shouldDisplayHeaderNonMaintActions()
This method checks whether the header non maint actions should be shown


shouldDisplayLookupCriteria

boolean shouldDisplayLookupCriteria()
This method checks whether the criteria should be shown


performCustomAction

boolean performCustomAction(boolean ignoreErrors)
This method is called from a custom action button or script


getExtraField

Field getExtraField()
get extra field

Returns:

getExtraOnLoad

String getExtraOnLoad()
method returns the extraOnLoad variable. The varible is currently accessed in page.tag and is called in the onLoad. it allows us to inject javascript onload.


setExtraOnLoad

void setExtraOnLoad(String extraOnLoad)

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 © 2004-2011 The Kuali Foundation. All Rights Reserved.