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
|
protected DataDictionaryService |
getDataDictionaryService()
Gets the data dictionary service
|
protected DataObjectAuthorizationService |
getDataObjectAuthorizationService() |
protected Class<?> |
getDataObjectClass()
Retrieves the data object class configured for this inquirable
|
protected DataObjectMetaDataService |
getDataObjectMetaDataService() |
protected EncryptionService |
getEncryptionService() |
protected KualiModuleService |
getKualiModuleService() |
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)
Sets the class for the data object the inquirable should retrieve
|
addCustomContainerComponents, addLine, adjustIdIfNecessary, applyAuthorizationAndPresentationLogic, applyDefaultValues, applyDefaultValuesForCollectionLine, buildClientSideStateScript, buildExportTableData, buildExportTableRow, buildGrowlScript, buildInquiryLink, cleanViewAfterRender, findNestedDictionaryAttribute, getBusinessObjectService, getCommonContext, getConfigurationService, getExportTableFormatOptions, getExpressionEvaluator, getPersistenceService, getPersistenceStructureService, getPreModelContext, getViewDictionaryService, initializeDataFieldFromDataDictionary, invokeMethodFinalizer, logAndThrowRuntime, performAddLineValidation, performApplyModel, performComponentApplyModel, performComponentFinalize, performComponentInitialization, performComponentLifecycle, performCustomApplyModel, performCustomFinalize, performCustomInitialization, performDeleteLineValidation, performFinalize, performInitialization, populateDefaultValueForField, populateViewFromRequestParameters, processAfterAddLine, processAfterDeleteLine, processAfterSaveLine, processAnyRemoteFieldsHolder, processBeforeAddLine, processBeforeSaveLine, processCollectionAddBlankLine, processCollectionAddLine, processCollectionDeleteLine, processCollectionSaveLine, processMultipleValueLookupResults, refreshReferences, retrieveEditModesAndActionFlags, runComponentModifiers, setBusinessObjectService, setConfigurationService, setDataDictionaryService, setExpressionEvaluator, setPersistenceService, setPersistenceStructureService, setViewContext, setViewDictionaryService, spawnSubLifecyle, syncClientSideStateForComponent
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
retrieveDataObject
in interface Inquirable
parameters
- - a map of string field names and valuesInquirable#retrieveDataObject(java.util.Map)
protected 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 void setDataObjectClass(Class<?> dataObjectClass)
Inquirable
Must be set before invoking any other operations on the Inquirable
,
including the retrieveDataObject method
setDataObjectClass
in interface Inquirable
dataObjectClass
- the class of the dataObject that this inquirable should
retrieveInquirable.setDataObjectClass(java.lang.Class)
protected Class<?> getDataObjectClass()
protected DataObjectMetaDataService getDataObjectMetaDataService()
protected KualiModuleService getKualiModuleService()
protected DataDictionaryService getDataDictionaryService()
ViewHelperServiceImpl
getDataDictionaryService
in class ViewHelperServiceImpl
protected DataObjectAuthorizationService getDataObjectAuthorizationService()
protected EncryptionService getEncryptionService()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.