public class QueryControllerServiceImpl extends Object implements QueryControllerService
Constructor and Description |
---|
QueryControllerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildLookupCriteriaParameters(UifFormBase form,
javax.servlet.http.HttpServletRequest request,
Class<?> lookupDataObjectClass,
Properties urlParameters)
If lookup criteria parameters were configured, pulls the values for those parameters from the form and
passes as values to pre-populate the lookup view criteria.
|
protected void |
buildLookupUrlParameters(UifFormBase form,
javax.servlet.http.HttpServletRequest request,
Class<?> lookupDataObjectClass,
Properties urlParameters)
Modifies the given properties object representing the lookup URL parameters to add additional parameters
based on the form and action parameters.
|
AttributeQueryService |
getAttributeQueryService() |
protected Class<?> |
getLookupDataObjectClass(Properties urlParameters)
Returns the Class instance for the data object whose lookup view was requested.
|
protected String |
getLookupUrlFromModuleService(Class<?> lookupDataObjectClass,
Properties urlParameters)
Attempts to find a module service that claims responsibility for the given data object class and if
found invokes that module service to build the lookup url.
|
protected ModelAndViewService |
getModelAndViewService()
Instance of model and view service to use within the collection service.
|
AttributeQueryResult |
performFieldQuery(UifFormBase form)
Retrieves field query parameters from the request and invokes
AttributeQueryService.performFieldQuery(org.kuali.rice.krad.uif.lifecycle.ViewPostMetadata, java.lang.String, java.util.Map<java.lang.String, java.lang.String>) to carry out the
field query. |
AttributeQueryResult |
performFieldSuggest(UifFormBase form)
Retrieves suggest query parameters from the request and invokes
AttributeQueryService.performFieldSuggestQuery(org.kuali.rice.krad.uif.lifecycle.ViewPostMetadata, java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>) to carry out the
suggest query. |
org.springframework.web.servlet.ModelAndView |
performLookup(UifFormBase form)
Inspects the given request and action parameters on the form to build a URL to the requested
lookup view.
|
void |
setAttributeQueryService(AttributeQueryService attributeQueryService) |
void |
setModelAndViewService(ModelAndViewService modelAndViewService) |
public QueryControllerServiceImpl()
public org.springframework.web.servlet.ModelAndView performLookup(UifFormBase form)
First the data object class for the lookup view is found from the action parameters. A call is then made to check if there is a module service that handles that class, and if so the URL from the module service is used. If not, the base url is and other lookup URL parameters are created from the action parameters and form.
Handles the perform lookup action by building up a URL to the lookup view and configuring a redirect.performLookup
in interface QueryControllerService
form
- form instance containing the model datagetLookupDataObjectClass(java.util.Properties)
,
getLookupUrlFromModuleService(java.lang.Class<?>, java.util.Properties)
,
buildLookupUrlParameters(org.kuali.rice.krad.web.form.UifFormBase,
javax.servlet.http.HttpServletRequest, java.lang.Class<?>, java.util.Properties)
protected Class<?> getLookupDataObjectClass(Properties urlParameters)
urlParameters
- properties containing the lookup configurationRuntimeException
- if class cannot be created from data object class nameprotected String getLookupUrlFromModuleService(Class<?> lookupDataObjectClass, Properties urlParameters)
lookupDataObjectClass
- data object class to find responsible module service forurlParameters
- properties containing the lookup configurationprotected void buildLookupUrlParameters(UifFormBase form, javax.servlet.http.HttpServletRequest request, Class<?> lookupDataObjectClass, Properties urlParameters)
form
- form instance containing the model datarequest
- http request object being handledlookupDataObjectClass
- data object class the lookup URL is being built forurlParameters
- properties instance holding the lookup URL parametersprotected void buildLookupCriteriaParameters(UifFormBase form, javax.servlet.http.HttpServletRequest request, Class<?> lookupDataObjectClass, Properties urlParameters)
form
- form instance containing the model datarequest
- http request object being handledlookupDataObjectClass
- data object class the lookup URL is being built forurlParameters
- properties instance holding the lookup URL parameterspublic AttributeQueryResult performFieldSuggest(UifFormBase form)
AttributeQueryService.performFieldSuggestQuery(org.kuali.rice.krad.uif.lifecycle.ViewPostMetadata, java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>)
to carry out the
suggest query.
Invoked to provides options (execute a query) for a field that contains a suggest widget.performFieldSuggest
in interface QueryControllerService
form
- form instance containing the model datapublic AttributeQueryResult performFieldQuery(UifFormBase form)
AttributeQueryService.performFieldQuery(org.kuali.rice.krad.uif.lifecycle.ViewPostMetadata, java.lang.String, java.util.Map<java.lang.String, java.lang.String>)
to carry out the
field query.
Invoked to execute the attribute query associated with a field given the query parameters
found in the requestperformFieldQuery
in interface QueryControllerService
form
- form instance containing the model dataprotected ModelAndViewService getModelAndViewService()
public void setModelAndViewService(ModelAndViewService modelAndViewService)
public AttributeQueryService getAttributeQueryService()
public void setAttributeQueryService(AttributeQueryService attributeQueryService)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.