Class QueryControllerServiceImpl
java.lang.Object
org.kuali.rice.krad.web.service.impl.QueryControllerServiceImpl
- All Implemented Interfaces:
QueryControllerService
Default implementation of the query controller service.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildLookupCriteriaParameters(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 voidbuildLookupUrlParameters(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.protected Class<?> getLookupDataObjectClass(Properties urlParameters) Returns the Class instance for the data object whose lookup view was requested.protected StringgetLookupUrlFromModuleService(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 ModelAndViewServiceInstance of model and view service to use within the collection service.performFieldQuery(UifFormBase form) Retrieves field query parameters from the request and invokesAttributeQueryService.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.Retrieves suggest query parameters from the request and invokesAttributeQueryService.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.ModelAndViewperformLookup(UifFormBase form) Inspects the given request and action parameters on the form to build a URL to the requested lookup view.voidsetAttributeQueryService(AttributeQueryService attributeQueryService) voidsetModelAndViewService(ModelAndViewService modelAndViewService)
-
Constructor Details
-
QueryControllerServiceImpl
public QueryControllerServiceImpl()
-
-
Method Details
-
performLookup
Inspects the given request and action parameters on the form to build a URL to the requested lookup view.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.- Specified by:
performLookupin interfaceQueryControllerService- Parameters:
form- form instance containing the model data- Returns:
- ModelAndView configured for redirecting to the lookup view
- See Also:
-
getLookupDataObjectClass
Returns the Class instance for the data object whose lookup view was requested.- Parameters:
urlParameters- properties containing the lookup configuration- Returns:
- Classinvalid input: '<'?> lookup data object class
- Throws:
RuntimeException- if class cannot be created from data object class name
-
getLookupUrlFromModuleService
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.- Parameters:
lookupDataObjectClass- data object class to find responsible module service forurlParameters- properties containing the lookup configuration- Returns:
- String lookup URL returned from module service, or null if not module service was found
-
buildLookupUrlParameters
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.- Parameters:
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 parameters
-
buildLookupCriteriaParameters
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.- Parameters:
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 parameters
-
performFieldSuggest
Retrieves suggest query parameters from the request and invokesAttributeQueryService.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.- Specified by:
performFieldSuggestin interfaceQueryControllerService- Parameters:
form- form instance containing the model data- Returns:
- AttributeQueryResult containing the results of the suggest query
-
performFieldQuery
Retrieves field query parameters from the request and invokesAttributeQueryService.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 request- Specified by:
performFieldQueryin interfaceQueryControllerService- Parameters:
form- form instance containing the model data- Returns:
- AttributeQueryResult containing the results of the field query
-
getModelAndViewService
Instance of model and view service to use within the collection service.- Returns:
- ModelAndViewService instance
-
setModelAndViewService
- See Also:
-
getAttributeQueryService
-
setAttributeQueryService
-