public class InquirableImpl extends ViewHelperServiceImpl implements Inquirable
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
Modifier and Type | Field and Description |
---|---|
protected Class<?> |
dataObjectClass |
static List<Class<?>> |
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 and Description |
---|
InquirableImpl() |
Modifier and Type | Method and Description |
---|---|
void |
buildInquirableLink(Object dataObject,
String propertyName,
Inquiry inquiry)
Invoked by the
ViewHelperService to build a link to the
inquiry |
protected List<List<String>> |
getAlternateKeysForClass(Class<?> clazz)
Invokes the module service to retrieve any alternate keys that have been
defined for the given class
|
DataDictionaryService |
getDataDictionaryService()
Gets the data dictionary service
|
protected DataObjectAuthorizationService |
getDataObjectAuthorizationService() |
Class<?> |
getDataObjectClass()
Class for the data object the inquirable should retrieve
|
protected EncryptionService |
getEncryptionService() |
protected KualiModuleService |
getKualiModuleService() |
protected LegacyDataAdapter |
getLegacyDataAdapter()
Get the legacy data adapter.
|
Object |
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 object
|
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
|
void |
setDataObjectClass(Class<?> dataObjectClass) |
addCustomContainerComponents, addLine, applyDefaultValues, applyDefaultValuesForCollectionLine, buildGrowlScript, buildInquiryLink, containsDuplicateLine, extractNewValuesAndAssign, extractSingleValue, filterByReturnedFieldConversions, getConfigurationService, 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
protected Class<?> dataObjectClass
public static List<Class<?>> SUPER_CLASS_TRANSLATOR_LIST
public InquirableImpl()
public Object retrieveDataObject(Map<String,String> parameters)
Note 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
retrieveDataObject
in interface Inquirable
parameters
- - a map of string field names and valuesprotected List<String> retrieveKeySetFromMap(List<List<String>> potentialKeySets, Map<String,String> parameters)
potentialKeySets
- - List of key sets to check for matchparameters
- - map of parameter name/value pairs for matching key setprotected List<List<String>> getAlternateKeysForClass(Class<?> clazz)
clazz
- - class to find alternate keys forpublic void buildInquirableLink(Object dataObject, String propertyName, Inquiry inquiry)
Inquirable
ViewHelperService
to build a link to the
inquiry
Note this is used primarily for custom Inquirable
implementations 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,
Class>, Map
buildInquirableLink
in interface Inquirable
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 propertyInquirable.buildInquirableLink(java.lang.Object,
java.lang.String, org.kuali.rice.krad.uif.widget.Inquiry)
public Class<?> getDataObjectClass()
Must be set before invoking any other operations on the Inquirable
,
including the retrieveDataObject method
getDataObjectClass
in interface Inquirable
public void setDataObjectClass(Class<?> dataObjectClass)
setDataObjectClass
in interface Inquirable
Inquirable.getDataObjectClass()
protected LegacyDataAdapter getLegacyDataAdapter()
ViewHelperServiceImpl
getLegacyDataAdapter
in class ViewHelperServiceImpl
protected KualiModuleService getKualiModuleService()
public DataDictionaryService getDataDictionaryService()
ViewHelperServiceImpl
getDataDictionaryService
in class ViewHelperServiceImpl
protected DataObjectAuthorizationService getDataObjectAuthorizationService()
protected EncryptionService getEncryptionService()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.