public class OleLookupableImpl extends org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl implements org.kuali.rice.krad.lookup.Lookupable
Constructor and Description |
---|
OleLookupableImpl() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,String> |
adjustCriteriaForNestedEBOs(Map<String,String> searchCriteria,
boolean unbounded) |
boolean |
allowsMaintenanceDeleteAction(Object dataObject)
Determines if given data object has associated maintenance document that allows delete maintenance
actions.
|
boolean |
allowsMaintenanceEditAction(Object dataObject)
Determines if given data object has associated maintenance document that allows edit maintenance
actions
|
boolean |
allowsMaintenanceNewOrCopyAction()
Determines if given data object has associated maintenance document that allows new or copy
maintenance
actions
|
void |
generateErrorMessageForResults(org.kuali.rice.krad.web.form.LookupForm form,
String messageToDisplay)
Convenience method for setting an error message on the lookup results section
|
protected void |
generateLookupResultsMessages(org.kuali.rice.krad.web.form.LookupForm form,
Map<String,String> searchCriteria,
Collection<?> searchResult,
boolean unbounded)
Helper function to render lookup results messages
|
protected String |
getActionUrlHref(org.kuali.rice.krad.web.form.LookupForm lookupForm,
Object dataObject,
String methodToCall,
List<String> pkNames)
Generates a URL to perform a maintenance action on the given result data object
|
protected Map<String,org.kuali.rice.krad.uif.field.InputField> |
getCriteriaFieldsForValidation(org.kuali.rice.krad.uif.view.LookupView lookupView,
org.kuali.rice.krad.web.form.LookupForm form)
Returns the criteria fields in a map keyed by the field property name.
|
protected org.kuali.rice.krad.service.DataObjectAuthorizationService |
getDataObjectAuthorizationService() |
Class<?> |
getDataObjectClass() |
protected org.kuali.rice.krad.service.DataObjectMetaDataService |
getDataObjectMetaDataService() |
org.kuali.rice.krad.service.DocumentDictionaryService |
getDocumentDictionaryService() |
protected org.kuali.rice.core.api.encryption.EncryptionService |
getEncryptionService() |
protected org.kuali.rice.krad.service.LookupService |
getLookupService() |
void |
getMaintenanceActionLink(org.kuali.rice.krad.uif.element.Action actionLink,
Object model,
String maintenanceMethodToCall) |
protected String |
getMaintenanceDocumentTypeName()
Returns the maintenance document type associated with the business object class or null if one does not exist.
|
Map<String,String> |
getPropertyKeyValuesFromDataObject(List<String> propertyNames,
Object dataObject) |
protected List<String> |
getReturnKeys(org.kuali.rice.krad.uif.view.LookupView lookupView,
org.kuali.rice.krad.web.form.LookupForm lookupForm,
Object dataObject)
Returns the configured return key property names or if not configured defaults to the primary keys
for the data object class
|
protected String |
getReturnUrl(org.kuali.rice.krad.uif.view.LookupView lookupView,
org.kuali.rice.krad.web.form.LookupForm lookupForm,
Object dataObject)
Builds the URL for returning the given data object result row
|
void |
getReturnUrlForResults(org.kuali.rice.krad.uif.element.Action returnLink,
Object model) |
protected Properties |
getReturnUrlParameters(org.kuali.rice.krad.uif.view.LookupView lookupView,
org.kuali.rice.krad.web.form.LookupForm lookupForm,
Object dataObject)
Builds up a
Properties object that will be used to provide the request parameters for the
return URL link |
protected List<?> |
getSearchResults(org.kuali.rice.krad.web.form.LookupForm form,
Map<String,String> searchCriteria,
boolean unbounded)
Get the search results of the lookup
|
protected List<?> |
getSearchResultsForEBO(Map<String,String> searchCriteria,
boolean unbounded)
Get the search results of an
|
void |
initSuppressAction(org.kuali.rice.krad.web.form.LookupForm lookupForm) |
protected boolean |
isResultReturnable(Object dataObject)
Determines whether a given data object 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.
|
Map<String,String> |
performClear(org.kuali.rice.krad.web.form.LookupForm form,
Map<String,String> searchCriteria) |
void |
performInitialization(org.kuali.rice.krad.uif.view.View view,
Object model)
Initialization of Lookupable requires that the business object class be set for the
ViewHelperServiceImpl.initializeDataFieldFromDataDictionary(org.kuali.rice.krad.uif.view.View,
org.kuali.rice.krad.uif.field.DataField) method |
Collection<?> |
performSearch(org.kuali.rice.krad.web.form.LookupForm form,
Map<String,String> searchCriteria,
boolean bounded) |
protected Map<String,String> |
processSearchCriteria(org.kuali.rice.krad.web.form.LookupForm lookupForm,
Map<String,String> searchCriteria)
Process the search criteria to be used with the lookup
|
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService) |
void |
setDataObjectAuthorizationService(org.kuali.rice.krad.service.DataObjectAuthorizationService dataObjectAuthorizationService) |
void |
setDataObjectClass(Class<?> dataObjectClass) |
void |
setDataObjectMetaDataService(org.kuali.rice.krad.service.DataObjectMetaDataService dataObjectMetaDataService) |
void |
setDocumentDictionaryService(org.kuali.rice.krad.service.DocumentDictionaryService documentDictionaryService) |
void |
setEncryptionService(org.kuali.rice.core.api.encryption.EncryptionService encryptionService) |
void |
setLookupService(org.kuali.rice.krad.service.LookupService lookupService) |
void |
setMultiValueLookupSelect(org.kuali.rice.krad.uif.field.InputField selectField,
Object model)
Sets the value for the attribute field control to contain the field conversion values for the line
|
protected void |
sortSearchResults(org.kuali.rice.krad.web.form.LookupForm form,
List<?> searchResults)
Sorts the given list of search results based on the lookup view's configured sort attributes
|
boolean |
validateSearchParameters(org.kuali.rice.krad.web.form.LookupForm form,
Map<String,String> searchCriteria) |
protected void |
validateSearchParameterWildcardAndOperators(org.kuali.rice.krad.uif.field.InputField inputField,
String searchPropertyValue)
Validates that any wildcards contained within the search value are valid wilcards and allowed for the
property type for which the field is searching
|
addCustomContainerComponents, addLine, adjustIdIfNecessary, applyAuthorizationAndPresentationLogic, applyDefaultValues, applyDefaultValuesForCollectionLine, buildClientSideStateScript, buildExportTableData, buildExportTableRow, buildGrowlScript, buildInquiryLink, cleanViewAfterRender, findNestedDictionaryAttribute, getBusinessObjectService, getCommonContext, getConfigurationService, getDataDictionaryService, getExportTableFormatOptions, getExpressionEvaluator, getPersistenceService, getPersistenceStructureService, getPreModelContext, getViewDictionaryService, initializeDataFieldFromDataDictionary, invokeMethodFinalizer, logAndThrowRuntime, performAddLineValidation, performApplyModel, performComponentApplyModel, performComponentFinalize, performComponentInitialization, performComponentLifecycle, performCustomApplyModel, performCustomFinalize, performCustomInitialization, performDeleteLineValidation, performFinalize, populateDefaultValueForField, populateViewFromRequestParameters, processAfterAddLine, processAfterDeleteLine, processAfterSaveLine, processAnyRemoteFieldsHolder, processBeforeAddLine, processBeforeSaveLine, processCollectionAddBlankLine, processCollectionAddLine, processCollectionDeleteLine, processCollectionSaveLine, processMultipleValueLookupResults, refreshReferences, retrieveEditModesAndActionFlags, runComponentModifiers, setBusinessObjectService, setDataDictionaryService, setExpressionEvaluator, setPersistenceService, setPersistenceStructureService, setViewContext, setViewDictionaryService, spawnSubLifecyle, syncClientSideStateForComponent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyDefaultValuesForCollectionLine, buildExportTableData, buildInquiryLink, cleanViewAfterRender, getCommonContext, getExpressionEvaluator, performApplyModel, performComponentInitialization, performComponentLifecycle, performFinalize, populateViewFromRequestParameters, processCollectionAddBlankLine, processCollectionAddLine, processCollectionDeleteLine, processCollectionSaveLine, processMultipleValueLookupResults, refreshReferences, spawnSubLifecyle
public OleLookupableImpl()
public void performInitialization(org.kuali.rice.krad.uif.view.View view, Object model)
ViewHelperServiceImpl.initializeDataFieldFromDataDictionary(org.kuali.rice.krad.uif.view.View,
org.kuali.rice.krad.uif.field.DataField)
methodperformInitialization
in interface org.kuali.rice.krad.uif.service.ViewHelperService
performInitialization
in class org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl
ViewHelperServiceImpl.performInitialization(org.kuali.rice.krad.uif.view.View,
java.lang.Object)
public void initSuppressAction(org.kuali.rice.krad.web.form.LookupForm lookupForm)
initSuppressAction
in interface org.kuali.rice.krad.lookup.Lookupable
Lookupable.initSuppressAction(org.kuali.rice.krad.web.form.LookupForm)
public Collection<?> performSearch(org.kuali.rice.krad.web.form.LookupForm form, Map<String,String> searchCriteria, boolean bounded)
performSearch
in interface org.kuali.rice.krad.lookup.Lookupable
Lookupable.performSearch(org.kuali.rice.krad.web.form.LookupForm, java.util.Map<java.lang.String, java.lang.String>, boolean)
protected List<?> getSearchResults(org.kuali.rice.krad.web.form.LookupForm form, Map<String,String> searchCriteria, boolean unbounded)
form
- lookup form instance containing the lookup datasearchCriteria
- map of criteria currently setunbounded
- indicates whether the complete result should be returned. When set to false the result is
limited (if necessary) to the max search result limit configured.public void generateErrorMessageForResults(org.kuali.rice.krad.web.form.LookupForm form, String messageToDisplay)
generateErrorMessageForResults
in interface org.kuali.rice.krad.lookup.Lookupable
form
- messageToDisplay
- protected void generateLookupResultsMessages(org.kuali.rice.krad.web.form.LookupForm form, Map<String,String> searchCriteria, Collection<?> searchResult, boolean unbounded)
form
- searchCriteria
- searchResult
- unbounded
- protected void sortSearchResults(org.kuali.rice.krad.web.form.LookupForm form, List<?> searchResults)
First if the posted view exists we grab the sort attributes from it. This will take into account expressions that might have been configured on the sort attributes. If the posted view does not exist (because we did a search from a get request or form session storage is off), we get the sort attributes from the view that we will be rendered (and was initialized before controller call). However, expressions will not be evaluated yet, thus if expressions were configured we don't know the results and can not sort the list
form
- - lookup form instance containing view informationsearchResults
- - list of search results to sortprotected Map<String,String> processSearchCriteria(org.kuali.rice.krad.web.form.LookupForm lookupForm, Map<String,String> searchCriteria)
Processing entails primarily of the removal of filtered and unused/blank search criteria. Encrypted field values are decrypted in this process as well.
lookupForm
- lookup form instance containing the lookup datasearchCriteria
- map of criteria currently setprotected List<?> getSearchResultsForEBO(Map<String,String> searchCriteria, boolean unbounded)
searchCriteria
- map of criteria currently setunbounded
- indicates whether the complete result should be returned. When set to false the result is
limited (if necessary) to the max search result limit configured.protected Map<String,String> adjustCriteriaForNestedEBOs(Map<String,String> searchCriteria, boolean unbounded) throws InstantiationException, IllegalAccessException
searchCriteria
- map of criteria currently setunbounded
- indicates whether the complete result should be returned. When set to false the result is
limited (if necessary) to the max search result limit configured.InstantiationException
IllegalAccessException
public Map<String,String> performClear(org.kuali.rice.krad.web.form.LookupForm form, Map<String,String> searchCriteria)
performClear
in interface org.kuali.rice.krad.lookup.Lookupable
Lookupable.performClear(org.kuali.rice.krad.web.form.LookupForm, java.util.Map<java.lang.String, java.lang.String>)
public boolean validateSearchParameters(org.kuali.rice.krad.web.form.LookupForm form, Map<String,String> searchCriteria)
validateSearchParameters
in interface org.kuali.rice.krad.lookup.Lookupable
Lookupable.validateSearchParameters(org.kuali.rice.krad.web.form.LookupForm, java.util.Map<java.lang.String, java.lang.String>)
protected Map<String,org.kuali.rice.krad.uif.field.InputField> getCriteriaFieldsForValidation(org.kuali.rice.krad.uif.view.LookupView lookupView, org.kuali.rice.krad.web.form.LookupForm form)
lookupView
- form
- lookup form instance containing the lookup dataprotected void validateSearchParameterWildcardAndOperators(org.kuali.rice.krad.uif.field.InputField inputField, String searchPropertyValue)
inputField
- - attribute field instance for the field that is being searchedsearchPropertyValue
- - value given for field to search forpublic void getReturnUrlForResults(org.kuali.rice.krad.uif.element.Action returnLink, Object model)
getReturnUrlForResults
in interface org.kuali.rice.krad.lookup.Lookupable
Lookupable.getReturnUrlForResults(org.kuali.rice.krad.uif.element.Action, java.lang.Object)
protected String getReturnUrl(org.kuali.rice.krad.uif.view.LookupView lookupView, org.kuali.rice.krad.web.form.LookupForm lookupForm, Object dataObject)
Note return URL will only be built if a return location is specified on the LookupForm
lookupView
- - lookup view instance containing lookup configurationlookupForm
- - lookup form instance containing the datadataObject
- - data object instance for the current line and for which the return URL is being builtprotected Properties getReturnUrlParameters(org.kuali.rice.krad.uif.view.LookupView lookupView, org.kuali.rice.krad.web.form.LookupForm lookupForm, Object dataObject)
Properties
object that will be used to provide the request parameters for the
return URL linklookupView
- - lookup view instance containing lookup configurationlookupForm
- - lookup form instance containing the datadataObject
- - data object instance for the current line and for which the return URL is being builtprotected List<String> getReturnKeys(org.kuali.rice.krad.uif.view.LookupView lookupView, org.kuali.rice.krad.web.form.LookupForm lookupForm, Object dataObject)
Returns the configured return key property names or if not configured defaults to the primary keys for the data object class
lookupView
- - lookup view instance containing lookup configurationlookupForm
- - lookup form instance containing the datadataObject
- - data object instancepublic void getMaintenanceActionLink(org.kuali.rice.krad.uif.element.Action actionLink, Object model, String maintenanceMethodToCall)
getMaintenanceActionLink
in interface org.kuali.rice.krad.lookup.Lookupable
Lookupable.getMaintenanceActionLink(org.kuali.rice.krad.uif.element.Action, java.lang.Object, java.lang.String)
protected String getActionUrlHref(org.kuali.rice.krad.web.form.LookupForm lookupForm, Object dataObject, String methodToCall, List<String> pkNames)
Will build a URL containing keys of the data object to invoke the given maintenance action method within the maintenance controller
dataObject
- - data object instance for the line to build the maintenance action link formethodToCall
- - method name on the maintenance controller that should be invokedpkNames
- - list of primary key field names for the data object whose key/value pairs will be added to
the maintenance linkpublic void setMultiValueLookupSelect(org.kuali.rice.krad.uif.field.InputField selectField, Object model)
setMultiValueLookupSelect
in interface org.kuali.rice.krad.lookup.Lookupable
LookupableImpl.setMultiValueLookupSelect(org.kuali.rice.krad.uif.field.InputField, java.lang.Object)
public boolean allowsMaintenanceNewOrCopyAction()
public boolean allowsMaintenanceEditAction(Object dataObject)
public boolean allowsMaintenanceDeleteAction(Object dataObject)
protected String getMaintenanceDocumentTypeName()
protected boolean isResultReturnable(Object dataObject)
dataObject
- - an object from the search result setpublic void setDataObjectClass(Class<?> dataObjectClass)
setDataObjectClass
in interface org.kuali.rice.krad.lookup.Lookupable
Lookupable.setDataObjectClass(java.lang.Class<?>)
public Class<?> getDataObjectClass()
getDataObjectClass
in interface org.kuali.rice.krad.lookup.Lookupable
Lookupable.getDataObjectClass()
public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService)
setConfigurationService
in class org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl
protected org.kuali.rice.krad.service.DataObjectAuthorizationService getDataObjectAuthorizationService()
public void setDataObjectAuthorizationService(org.kuali.rice.krad.service.DataObjectAuthorizationService dataObjectAuthorizationService)
protected org.kuali.rice.krad.service.DataObjectMetaDataService getDataObjectMetaDataService()
public void setDataObjectMetaDataService(org.kuali.rice.krad.service.DataObjectMetaDataService dataObjectMetaDataService)
public org.kuali.rice.krad.service.DocumentDictionaryService getDocumentDictionaryService()
public void setDocumentDictionaryService(org.kuali.rice.krad.service.DocumentDictionaryService documentDictionaryService)
protected org.kuali.rice.krad.service.LookupService getLookupService()
public void setLookupService(org.kuali.rice.krad.service.LookupService lookupService)
protected org.kuali.rice.core.api.encryption.EncryptionService getEncryptionService()
public void setEncryptionService(org.kuali.rice.core.api.encryption.EncryptionService encryptionService)
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.