org.kuali.rice.kns.inquiry
Class KualiInquirableImpl

java.lang.Object
  extended by org.kuali.rice.kns.inquiry.KualiInquirableImpl
All Implemented Interfaces:
Inquirable
Direct Known Subclasses:
GroupInquirableImpl, KimTypeInquirableImpl, ParameterDetailTypeInquirableImpl, PersonInquirableImpl, RoleInquirableImpl, RoleMemberInquirableImpl, RuleBaseValuesInquirableImpl, RuleDelegationInquirableImpl

public class KualiInquirableImpl
extends Object
implements Inquirable

Kuali inquirable implementation. Implements methods necessary to retrieve the business object and render the ui. NOTE: this class is not thread safe. When using this class or any subclasses in Spring, make sure that this is not a singleton service, or serious errors may occur.


Field Summary
protected  Class businessObjectClass
           
protected  BusinessObjectDictionaryService businessObjectDictionaryService
           
protected  BusinessObjectMetaDataService businessObjectMetaDataService
           
protected static BusinessObjectService businessObjectService
           
protected  DataDictionaryService dataDictionaryService
           
protected  EncryptionService encryptionService
           
protected  Map<String,Boolean> inactiveRecordDisplay
           
static String INQUIRY_TITLE_PREFIX
           
protected  KualiConfigurationService kualiConfigurationService
           
private static org.apache.log4j.Logger LOG
           
protected  LookupService lookupService
           
protected  PersistenceStructureService persistenceStructureService
           
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 (see {@link RiceConstants#BUSINESS_OBJECT_CLASS_ATTRIBUTE)
 
Constructor Summary
KualiInquirableImpl()
          Default constructor, initializes services from spring
 
Method Summary
 void addAdditionalSections(List columns, BusinessObject bo)
           
protected  String createTitleText(Class<? extends BusinessObject> boClass)
          creates the title text for a given BO
 BusinessObject getBusinessObject(Map fieldValues)
          Return a business object by searching with map, the map keys should be a property name of the business object, with the map value as the value to search for.
 Class getBusinessObjectClass()
           
 BusinessObjectDictionaryService getBusinessObjectDictionaryService()
           
 BusinessObjectMetaDataService getBusinessObjectMetaDataService()
           
 BusinessObjectService getBusinessObjectService()
           
 DataDictionaryService getDataDictionaryService()
           
 EncryptionService getEncryptionService()
           
 String getHtmlMenuBar()
           
protected  HtmlData.AnchorHtmlData getHyperLink(Class inquiryClass, Map<String,String> fieldList, String inquiryUrl)
           
protected  HtmlData.AnchorHtmlData getHyperLink(Class inquiryClass, Map<String,String> fieldList, String inquiryUrl, String displayText)
           
 Map<String,Boolean> getInactiveRecordDisplay()
          Returns the Map used to control the state of inactive record collection display.
 HtmlData getInquiryUrl(BusinessObject businessObject, String attributeName, boolean forceInquiry)
          Helper method to build an inquiry url for a result field.
protected  HtmlData.AnchorHtmlData getInquiryUrlForPrimaryKeys(Class clazz, Object businessObject, List<String> primaryKeys, String displayText)
           
protected  KualiConfigurationService getKualiConfigurationService()
          Retrieves the KualiConfigurationService.
 LookupService getLookupService()
           
 PersistenceStructureService getPersistenceStructureService()
           
 List<Section> getSections(BusinessObject bo)
          Objects extending KualiInquirableBase must specify the Section objects used to display the inquiry result.
 boolean getShowInactiveRecords(String collectionName)
          Indicates whether inactive records for the given collection should be display.
 String getTitle()
           
 void setBusinessObjectClass(Class businessObjectClass)
           
 void setBusinessObjectDictionaryService(BusinessObjectDictionaryService businessObjectDictionaryService)
           
 void setBusinessObjectMetaDataService(BusinessObjectMetaDataService businessObjectMetaDataService)
           
 void setDataDictionaryService(DataDictionaryService dataDictionaryService)
           
 void setEncryptionService(EncryptionService encryptionService)
           
 void setKualiConfigurationService(KualiConfigurationService kualiConfigurationService)
           
 void setLookupService(LookupService lookupService)
           
 void setPersistenceStructureService(PersistenceStructureService persistenceStructureService)
           
 void setShowInactiveRecords(String collectionName, boolean showInactive)
          Indicates to maintainble whether or not inactive records should be displayed for the given collection name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

lookupService

protected LookupService lookupService

businessObjectDictionaryService

protected BusinessObjectDictionaryService businessObjectDictionaryService

businessObjectMetaDataService

protected BusinessObjectMetaDataService businessObjectMetaDataService

persistenceStructureService

protected PersistenceStructureService persistenceStructureService

dataDictionaryService

protected DataDictionaryService dataDictionaryService

encryptionService

protected EncryptionService encryptionService

kualiConfigurationService

protected KualiConfigurationService kualiConfigurationService

businessObjectService

protected static BusinessObjectService businessObjectService

businessObjectClass

protected Class businessObjectClass

inactiveRecordDisplay

protected Map<String,Boolean> inactiveRecordDisplay

SUPER_CLASS_TRANSLATOR_LIST

public 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 (see {@link RiceConstants#BUSINESS_OBJECT_CLASS_ATTRIBUTE)


INQUIRY_TITLE_PREFIX

public static final String INQUIRY_TITLE_PREFIX
See Also:
Constant Field Values
Constructor Detail

KualiInquirableImpl

public KualiInquirableImpl()
Default constructor, initializes services from spring

Method Detail

getBusinessObject

public BusinessObject getBusinessObject(Map fieldValues)
Return a business object by searching with map, the map keys should be a property name of the business object, with the map value as the value to search for.

Specified by:
getBusinessObject in interface Inquirable

getSections

public List<Section> getSections(BusinessObject bo)
Objects extending KualiInquirableBase must specify the Section objects used to display the inquiry result.

Specified by:
getSections in interface Inquirable

getInquiryUrl

public HtmlData getInquiryUrl(BusinessObject businessObject,
                              String attributeName,
                              boolean forceInquiry)
Helper method to build an inquiry url for a result field.

Specified by:
getInquiryUrl in interface Inquirable
Parameters:
bo - the business object instance to build the urls for
propertyName - the property which links to an inquirable
Returns:
String url to inquiry

getHyperLink

protected HtmlData.AnchorHtmlData getHyperLink(Class inquiryClass,
                                               Map<String,String> fieldList,
                                               String inquiryUrl)

createTitleText

protected String createTitleText(Class<? extends BusinessObject> boClass)
creates the title text for a given BO

Parameters:
boClass - the BO class
Returns:
the title text

addAdditionalSections

public void addAdditionalSections(List columns,
                                  BusinessObject bo)
Specified by:
addAdditionalSections in interface Inquirable

getHtmlMenuBar

public String getHtmlMenuBar()
Specified by:
getHtmlMenuBar in interface Inquirable
See Also:
Inquirable.getHtmlMenuBar()

getTitle

public String getTitle()
Specified by:
getTitle in interface Inquirable
See Also:
Inquirable.getTitle()

getBusinessObjectClass

public Class getBusinessObjectClass()
Returns:
Returns the businessObjectClass.

setBusinessObjectClass

public void setBusinessObjectClass(Class businessObjectClass)
Specified by:
setBusinessObjectClass in interface Inquirable
Parameters:
businessObjectClass - The businessObjectClass to set.

getInactiveRecordDisplay

public Map<String,Boolean> getInactiveRecordDisplay()
Description copied from interface: Inquirable
Returns the Map used to control the state of inactive record collection display. Exposed for setting from the maintenance jsp.

Specified by:
getInactiveRecordDisplay in interface Inquirable
See Also:
Inquirable.getInactiveRecordDisplay()

getShowInactiveRecords

public boolean getShowInactiveRecords(String collectionName)
Description copied from interface: Inquirable
Indicates whether inactive records for the given collection should be display.

Specified by:
getShowInactiveRecords in interface Inquirable
Parameters:
collectionName - - name of the collection (or sub-collection) to check inactive record display setting
Returns:
true if inactive records should be displayed, false otherwise
See Also:
Inquirable.getShowInactiveRecords(java.lang.String)

setShowInactiveRecords

public void setShowInactiveRecords(String collectionName,
                                   boolean showInactive)
Description copied from interface: Inquirable
Indicates to maintainble whether or not inactive records should be displayed for the given collection name.

Specified by:
setShowInactiveRecords in interface Inquirable
Parameters:
collectionName - - name of the collection (or sub-collection) to set inactive record display setting
showInactive - - true to display inactive, false to not display inactive records
See Also:
Inquirable.setShowInactiveRecords(java.lang.String, boolean)

getLookupService

public LookupService getLookupService()

setLookupService

public void setLookupService(LookupService lookupService)

getBusinessObjectDictionaryService

public BusinessObjectDictionaryService getBusinessObjectDictionaryService()

setBusinessObjectDictionaryService

public void setBusinessObjectDictionaryService(BusinessObjectDictionaryService businessObjectDictionaryService)

getPersistenceStructureService

public PersistenceStructureService getPersistenceStructureService()

setPersistenceStructureService

public void setPersistenceStructureService(PersistenceStructureService persistenceStructureService)

getDataDictionaryService

public DataDictionaryService getDataDictionaryService()

setDataDictionaryService

public void setDataDictionaryService(DataDictionaryService dataDictionaryService)

getEncryptionService

public EncryptionService getEncryptionService()

setEncryptionService

public void setEncryptionService(EncryptionService encryptionService)

getKualiConfigurationService

protected KualiConfigurationService getKualiConfigurationService()
Retrieves the KualiConfigurationService. In the event that instances of this class are not created as Spring beans, override this method to return an instance from the service locator.

Returns:

setKualiConfigurationService

public void setKualiConfigurationService(KualiConfigurationService kualiConfigurationService)

getBusinessObjectMetaDataService

public BusinessObjectMetaDataService getBusinessObjectMetaDataService()

setBusinessObjectMetaDataService

public void setBusinessObjectMetaDataService(BusinessObjectMetaDataService businessObjectMetaDataService)

getBusinessObjectService

public BusinessObjectService getBusinessObjectService()

getInquiryUrlForPrimaryKeys

protected HtmlData.AnchorHtmlData getInquiryUrlForPrimaryKeys(Class clazz,
                                                              Object businessObject,
                                                              List<String> primaryKeys,
                                                              String displayText)

getHyperLink

protected HtmlData.AnchorHtmlData getHyperLink(Class inquiryClass,
                                               Map<String,String> fieldList,
                                               String inquiryUrl,
                                               String displayText)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.