Class InquirableImpl
- All Implemented Interfaces:
Serializable,Inquirable,ViewHelperService
Inquirable interface that uses metadata
from the data dictionary and performs a query against the database to retrieve
the data object for inquiry
More advanced lookup operations or alternate ways of retrieving metadata can be implemented by extending this base implementation and configuring
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Class<?> A list that can be used to define classes that are superclasses or superinterfaces of kuali objects where those objects' inquiry URLs need to use the name of the superclass or superinterface as the business object class attribute -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildInquirableLink(Object dataObject, String propertyName, Inquiry inquiry) Invoked by theViewHelperServiceto build a link to the inquirybooleanChecks appropriate permissions to determine whether the given user is authorized to download note attachments associated with this inquiry data object.getAlternateKeysForClass(Class<?> clazz) Invokes the module service to retrieve any alternate keys that have been defined for the given classGets the data dictionary serviceprotected DataObjectAuthorizationServiceClass<?> Class for the data object the inquirable should retrieveprotected EncryptionServiceprotected KualiModuleServiceprotected LegacyDataAdapterGet the legacy data adapter.retrieveDataObject(Map<String, String> parameters) Finds primary and alternate key sets configured for the configured data object class and then attempts to find a set with matching key/value pairs from the request, if a set is found then calls the module service (for EBOs) or business object service to retrieve the data objectIterates through the list of key sets looking for a set where the given map of parameters has all the key names and values are non-blank, first matched set is returnedvoidsetDataObjectClass(Class<?> dataObjectClass) Methods inherited from class org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl
addCustomContainerComponents, addLine, applyDefaultValues, applyDefaultValuesForCollectionLine, buildGrowlScript, buildInquiryLink, containsDuplicateLine, extractNewValuesAndAssign, extractSingleValue, filterByReturnedFieldConversions, getConfigurationService, getCurrentPersonContactId, getDataObjectService, getDefaultValueForField, getExpressionEvaluatorFactory, getViewDictionaryService, isDuplicateLine, linkAddedLine, logAndThrowRuntime, performAddLineValidation, performCustomApplyModel, performCustomFinalize, performCustomInitialization, performCustomViewFinalize, performCustomViewInitialization, performDeleteLineValidation, populateDefaultValueForField, populateViewFromRequestParameters, processAfterAddLine, processAfterDeleteLine, processAfterEditLine, processAfterSaveLine, processAndAddLineObject, processBeforeAddLine, processBeforeEditLine, processBeforeSaveLine, processCollectionAddBlankLine, processCollectionAddLine, processCollectionCloseEditLineDialog, processCollectionDeleteLine, processCollectionEditLine, processCollectionRetrieveEditLineDialog, processCollectionSaveLine, processMultipleValueLookupResults, refreshReference, refreshReferences, retrieveEditModesAndActionFlags, setConfigurationService, setDataDictionaryService, setDataObjectService, setElementContext, setExpressionEvaluatorFactory, setLegacyDataAdapter, setViewContext, setViewDictionaryService
-
Field Details
-
dataObjectClass
-
SUPER_CLASS_TRANSLATOR_LIST
A list that can be used to define classes that are superclasses or superinterfaces of kuali objects where those objects' inquiry URLs need to use the name of the superclass or superinterface as the business object class attribute
-
-
Constructor Details
-
InquirableImpl
public InquirableImpl()
-
-
Method Details
-
retrieveDataObject
Finds primary and alternate key sets configured for the configured data object class and then attempts to find a set with matching key/value pairs from the request, if a set is found then calls the module service (for EBOs) or business object service to retrieve the data objectNote at this point on business objects are supported by the default implementation
Responsible for retrieving the data object from its data source (database, service call, etc) based on the given map of field name/value pairsGiven map can contain more than fields (primary key or other) necessary for retrieving the data object. Method will use the fields necessary based on the metadata for the data object class configured on the inquirable
- Specified by:
retrieveDataObjectin interfaceInquirable- Parameters:
parameters- - a map of string field names and values- Returns:
- the data object or null if not found
-
retrieveKeySetFromMap
protected List<String> retrieveKeySetFromMap(List<List<String>> potentialKeySets, Map<String, String> parameters) Iterates through the list of key sets looking for a set where the given map of parameters has all the key names and values are non-blank, first matched set is returned- Parameters:
potentialKeySets- - List of key sets to check for matchparameters- - map of parameter name/value pairs for matching key set- Returns:
- List<String> key set that was matched, or null if none were matched
-
getAlternateKeysForClass
Invokes the module service to retrieve any alternate keys that have been defined for the given class- Parameters:
clazz- - class to find alternate keys for- Returns:
- List<List<String>> list of alternate key sets, or empty list if none are found
-
buildInquirableLink
Description copied from interface:InquirableInvoked by theViewHelperServiceto build a link to the inquiryNote this is used primarily for custom
Inquirableimplementations to customize the inquiry class or parameters for an inquiry. Instead of building the full inquiry link, implementations can make a callback to org.kuali.rice.krad.uif.widget.Inquiry.buildInquiryLink(Object, String, Classinvalid input: '<'?>, Mapinvalid input: '<'String, String>) given an inquiry class and parameters to build the link field.- Specified by:
buildInquirableLinkin interfaceInquirable- Parameters:
dataObject- - parent object for the inquiry propertypropertyName- - name of the property the inquiry is being built forinquiry- - instance of the inquiry widget being built for the property- See Also:
-
getDataObjectClass
Class for the data object the inquirable should retrieveMust be set before invoking any other operations on the
Inquirable, including the retrieveDataObject method- Specified by:
getDataObjectClassin interfaceInquirable- Returns:
- inquiry data object class
-
setDataObjectClass
- Specified by:
setDataObjectClassin interfaceInquirable- See Also:
-
canViewInquiryNoteAttachment
Description copied from interface:InquirableChecks appropriate permissions to determine whether the given user is authorized to download note attachments associated with this inquiry data object. Should probably be in an authorizer class, but since inquiries don't always have document or view associations this is the next best place.- Specified by:
canViewInquiryNoteAttachmentin interfaceInquirable- Parameters:
user- - the user for whom to check authorization- Returns:
- whether or not the user is authorized to download note attachments
-
getLegacyDataAdapter
Description copied from class:ViewHelperServiceImplGet the legacy data adapter.- Overrides:
getLegacyDataAdapterin classViewHelperServiceImpl- Returns:
- The legacy data adapter.
-
getKualiModuleService
-
getDataDictionaryService
Description copied from class:ViewHelperServiceImplGets the data dictionary service- Overrides:
getDataDictionaryServicein classViewHelperServiceImpl- Returns:
- data dictionary service
-
getDataObjectAuthorizationService
-
getEncryptionService
-
getPermissionService
-