|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl org.kuali.rice.kew.impl.document.search.DocumentSearchCriteriaBoLookupableHelperService
public class DocumentSearchCriteriaBoLookupableHelperService
Implementation of lookupable helper service which handles the complex lookup behavior required by the KEW document search screen.
Field Summary | |
---|---|
protected DocumentSearchCriteria |
criteria
|
protected DocumentSearchResults |
searchResults
|
Fields inherited from class org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl |
---|
LOG, searchUsingOnlyPrimaryKeyValues |
Constructor Summary | |
---|---|
DocumentSearchCriteriaBoLookupableHelperService()
|
Method Summary | |
---|---|
protected void |
applyCriteriaChangesToFields(DocumentSearchCriteriaContract criteria)
Applies changes that might have happened to the criteria back to the fields so that they show up on the form. |
boolean |
checkForAdditionalFields(Map<String,String> fieldValues)
Determines if there should be more search fields rendered based on already entered search criteria, and generates additional form rows. |
protected Map<String,String> |
cleanupFieldValues(Map<String,String> fieldValues,
Map<String,String[]> parameters)
Cleans up various issues with fieldValues coming from the lookup form (namely, that they don't include multi-valued field values!). |
protected void |
executeColumnCustomization(ResultRow resultRow,
DocumentSearchResult searchResult,
DocumentSearchResultSetConfiguration resultSetConfiguration,
DocumentSearchCriteriaConfiguration criteriaConfiguration)
Executes customization of columns, could include removing certain columns or adding additional columns to the result row (in cases where columns are added by document search customization, such as searchable attributes). |
protected HtmlData.AnchorHtmlData |
generateDocumentHandlerUrl(String documentId,
DocumentType documentType,
boolean superUserSearch)
Generates the appropriate document handler url for the given document. |
protected HtmlData.AnchorHtmlData |
generateRouteLogUrl(String documentId)
|
DocumentSearchCriteriaProcessor |
getDocumentSearchCriteriaProcessor()
|
DocumentSearchCriteriaTranslator |
getDocumentSearchCriteriaTranslator()
|
DocumentSearchService |
getDocumentSearchService()
|
Field |
getExtraField()
get an extra field |
protected Iterable<Field> |
getFormFields()
Returns an iterable of current form fields |
protected Map<String,String[]> |
getFormFieldsValues()
Preserves Field values, saving single or array property value depending on field type; single property value is converted into String[1] This implementation makes the assumption that a Field can either represent a single property value, or an array of values but not both! (only one is preserved) |
HtmlData |
getInquiryUrl(BusinessObject bo,
String propertyName)
Custom implementation of getInquiryUrl that sets up doc handler link. |
protected String |
getSavedSearchName()
|
protected List<? extends BusinessObject> |
getSearchResultsHelper(Map<String,String> fieldValues,
boolean unbounded)
This method does the actual search, with the parameters specified, and returns the result. |
String |
getSupplementalMenuBar()
This method gets the supplemental lookup menu if any |
protected boolean |
isAdvancedSearch()
Returns true if the current search being executed is an "advanced" search. |
protected boolean |
isClearSavedSearch()
Returns true if the current "search" being executed is an "clear" search. |
protected boolean |
isDocumentHandlerPopup()
Returns true if the document handler should open in a new window. |
protected boolean |
isFlagSet(String flagName)
Parses a boolean request parameter |
boolean |
isRouteLogPopup()
Returns true if the route log should open in a new window. |
protected boolean |
isSuperUserSearch()
Returns true if the current search being executed is a super user search. |
protected DocumentSearchCriteria |
loadCriteria(Map<String,String> fieldValues)
Loads the document search criteria from the given map of field values as submitted from the search screen, and populates the current form Rows/Fields with the saved criteria fields |
protected boolean |
loadSavedSearch(boolean ignoreErrors)
Loads a saved search |
protected void |
mergeFieldValues(Map<String,String[]> values)
Overrides Row Field values with Map values |
protected static void |
overrideFieldValue(Field field,
Map<String,String[]> newValues,
Map<String,String[]> oldValues)
Overrides a Field value; sets a fallback/restored value if there is no new value |
void |
performClear(LookupForm lookupForm)
This method does the logic for the clear action. |
boolean |
performCustomAction(boolean ignoreErrors)
Performs custom document search/lookup actions. |
Collection<? extends BusinessObject> |
performLookup(LookupForm lookupForm,
Collection<ResultRow> resultTable,
boolean bounded)
Performs the lookup and returns a collection of lookup items |
protected void |
populateCustomColumns(List<Column> customColumns,
DocumentSearchResult searchResult)
|
protected void |
populateResultWarningMessages(DocumentSearchResults searchResults)
Inspects the lookup results to determine if any warning messages should be published to the message map. |
protected List<org.kuali.rice.kew.impl.document.search.DocumentSearchCriteriaBo> |
populateSearchResults(List<DocumentSearchResult> lookupResults)
|
protected void |
postProcessResults(Collection<ResultRow> resultRows,
DocumentSearchResults searchResults)
Takes a collection of result rows and does final processing on them. |
protected void |
repopulateSearchTypeFlags()
Repopulate the fields indicating advanced/superuser search type. |
void |
setDocumentSearchCriteriaProcessor(DocumentSearchCriteriaProcessor documentSearchCriteriaProcessor)
|
void |
setDocumentSearchCriteriaTranslator(DocumentSearchCriteriaTranslator documentSearchCriteriaTranslator)
|
void |
setDocumentSearchService(DocumentSearchService documentSearchService)
|
protected static void |
setFieldValue(Field field,
String[] values)
Sets a Field value appropriately, depending on whether it is a "multi-value" field type |
protected void |
setFormField(String name,
String value)
Sets a single form field |
protected void |
setRows()
Override setRows in order to post-process and add documenttype-dependent fields |
protected void |
setRows(String documentTypeName)
Sets the rows for the search criteria. |
boolean |
shouldDisplayHeaderNonMaintActions()
|
boolean |
shouldDisplayLookupCriteria()
|
protected void |
toggleFormView()
Handles toggling between form views. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DocumentSearchResults searchResults
protected DocumentSearchCriteria criteria
Constructor Detail |
---|
public DocumentSearchCriteriaBoLookupableHelperService()
Method Detail |
---|
protected List<? extends BusinessObject> getSearchResultsHelper(Map<String,String> fieldValues, boolean unbounded)
KualiLookupableHelperServiceImpl
getSearchResultsHelper
in class KualiLookupableHelperServiceImpl
fieldValues
- A Map of the fieldNames and fieldValues to be searched on.unbounded
- Whether the results should be bounded or not to a certain max size.
protected void populateResultWarningMessages(DocumentSearchResults searchResults)
protected void applyCriteriaChangesToFields(DocumentSearchCriteriaContract criteria)
protected Map<String,String> cleanupFieldValues(Map<String,String> fieldValues, Map<String,String[]> parameters)
protected DocumentSearchCriteria loadCriteria(Map<String,String> fieldValues)
protected List<org.kuali.rice.kew.impl.document.search.DocumentSearchCriteriaBo> populateSearchResults(List<DocumentSearchResult> lookupResults)
public Collection<? extends BusinessObject> performLookup(LookupForm lookupForm, Collection<ResultRow> resultTable, boolean bounded)
AbstractLookupableHelperServiceImpl
performLookup
in interface LookupableHelperService
performLookup
in class AbstractLookupableHelperServiceImpl
protected static void setFieldValue(Field field, String[] values)
protected Map<String,String[]> getFormFieldsValues()
protected static void overrideFieldValue(Field field, Map<String,String[]> newValues, Map<String,String[]> oldValues)
protected void mergeFieldValues(Map<String,String[]> values)
values
- protected void setFormField(String name, String value)
protected void toggleFormView()
protected boolean loadSavedSearch(boolean ignoreErrors)
public boolean performCustomAction(boolean ignoreErrors)
performCustomAction
in interface LookupableHelperService
performCustomAction
in class AbstractLookupableHelperServiceImpl
ignoreErrors
-
LookupableHelperService.performCustomAction(boolean)
public HtmlData getInquiryUrl(BusinessObject bo, String propertyName)
getInquiryUrl
in interface LookupableHelperService
getInquiryUrl
in class AbstractLookupableHelperServiceImpl
bo
- the business object instance to build the urls forpropertyName
- the property which links to an inquirable
protected HtmlData.AnchorHtmlData generateDocumentHandlerUrl(String documentId, DocumentType documentType, boolean superUserSearch)
protected HtmlData.AnchorHtmlData generateRouteLogUrl(String documentId)
protected boolean isDocumentHandlerPopup()
public boolean isRouteLogPopup()
protected boolean isFlagSet(String flagName)
protected boolean isSuperUserSearch()
protected boolean isAdvancedSearch()
protected boolean isClearSavedSearch()
protected String getSavedSearchName()
protected void setRows()
setRows
in class AbstractLookupableHelperServiceImpl
protected Iterable<Field> getFormFields()
protected void setRows(String documentTypeName)
documentTypeName
- the name of the document type currently entered on the form, if this is a valid document
type then it may have search attribute fields that need to be displayed; documentType name may also be loaded
via a saved searchpublic String getSupplementalMenuBar()
LookupableHelperService
getSupplementalMenuBar
in interface LookupableHelperService
getSupplementalMenuBar
in class AbstractLookupableHelperServiceImpl
LookupableHelperService.getSupplementalMenuBar()
public boolean shouldDisplayHeaderNonMaintActions()
shouldDisplayHeaderNonMaintActions
in interface LookupableHelperService
shouldDisplayHeaderNonMaintActions
in class AbstractLookupableHelperServiceImpl
LookupableHelperService.shouldDisplayHeaderNonMaintActions()
public boolean shouldDisplayLookupCriteria()
shouldDisplayLookupCriteria
in interface LookupableHelperService
shouldDisplayLookupCriteria
in class AbstractLookupableHelperServiceImpl
LookupableHelperService.shouldDisplayLookupCriteria()
public boolean checkForAdditionalFields(Map<String,String> fieldValues)
checkForAdditionalFields
in interface LookupableHelperService
checkForAdditionalFields
in class AbstractLookupableHelperServiceImpl
fieldValues
- - Map of property/value pairs
LookupableHelperService.checkForAdditionalFields(java.util.Map)
public Field getExtraField()
LookupableHelperService
getExtraField
in interface LookupableHelperService
getExtraField
in class AbstractLookupableHelperServiceImpl
Lookupable.getExtraField()
public void performClear(LookupForm lookupForm)
AbstractLookupableHelperServiceImpl
performClear
in interface LookupableHelperService
performClear
in class AbstractLookupableHelperServiceImpl
LookupableHelperService#performClear()
protected void repopulateSearchTypeFlags()
protected void postProcessResults(Collection<ResultRow> resultRows, DocumentSearchResults searchResults)
protected void executeColumnCustomization(ResultRow resultRow, DocumentSearchResult searchResult, DocumentSearchResultSetConfiguration resultSetConfiguration, DocumentSearchCriteriaConfiguration criteriaConfiguration)
protected void populateCustomColumns(List<Column> customColumns, DocumentSearchResult searchResult)
public void setDocumentSearchService(DocumentSearchService documentSearchService)
public DocumentSearchService getDocumentSearchService()
public DocumentSearchCriteriaProcessor getDocumentSearchCriteriaProcessor()
public void setDocumentSearchCriteriaProcessor(DocumentSearchCriteriaProcessor documentSearchCriteriaProcessor)
public DocumentSearchCriteriaTranslator getDocumentSearchCriteriaTranslator()
public void setDocumentSearchCriteriaTranslator(DocumentSearchCriteriaTranslator documentSearchCriteriaTranslator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |