org.kuali.kfs.module.bc.businessobject.lookup
Class LockMonitorLookupableHelperServiceImpl

java.lang.Object
  extended by org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
      extended by org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl
          extended by org.kuali.kfs.module.bc.businessobject.lookup.LockMonitorLookupableHelperServiceImpl
All Implemented Interfaces:
Serializable, org.kuali.rice.kns.lookup.LookupableHelperService

public class LockMonitorLookupableHelperServiceImpl
extends org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl

Implements custom search routine to find the current budget locks and build up the result List. Set an unlock URL for each lock.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl
LOG, searchUsingOnlyPrimaryKeyValues
 
Fields inherited from class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
ACTION_URLS_CHILDREN_END, ACTION_URLS_CHILDREN_SEPARATOR, ACTION_URLS_CHILDREN_STARTER, ACTION_URLS_EMPTY, ACTION_URLS_SEPARATOR, backLocation, businessObjectAuthorizationService, businessObjectClass, businessObjectDictionaryService, businessObjectMetaDataService, businessObjectService, configurationService, dataDictionaryService, docFormKey, docNum, encryptionService, fieldConversions, forceLookupResultFieldInquiryCache, inquirableClassCache, kualiInquirable, lookupResultsService, lookupService, maintenanceDocumentDictionaryService, noLookupResultFieldInquiryCache, parameters, parameterService, persistenceStructureService, readOnlyFieldsList, referencesToRefresh, resultColumns, RESULTS_DEFAULT_MAX_COLUMN_LENGTH, rows, sequenceAccessorService, TITLE_ACTION_URL_PREPENDTEXT_PROPERTY, TITLE_RETURN_URL_PREPENDTEXT_PROPERTY
 
Constructor Summary
LockMonitorLookupableHelperServiceImpl()
           
 
Method Summary
protected  void getAccountLocks(List<BudgetConstructionLockSummary> results, String lockUnivId)
          Calls lock service to retrieve all current account locks and builds a lock summary object for each returned lock.
 List<org.kuali.rice.kns.lookup.HtmlData> getCustomActionUrls(org.kuali.rice.kns.bo.BusinessObject businessObject, List pkNames)
          Builds unlink action for each type of lock.
 org.kuali.rice.kns.lookup.HtmlData getInquiryUrl(org.kuali.rice.kns.bo.BusinessObject bo, String propertyName)
          Since this lookupable is called by the budget lookup action, the context will be KFS, not Rice.
protected  void getOrphanFundingLocks(List<BudgetConstructionLockSummary> results, String lockUnivId)
          Calls lock service to retrieve all funding locks that do not have a corresponding position locks and builds a lock summary object for each returned lock.
protected  void getOrphanPositionLocks(List<BudgetConstructionLockSummary> results, String lockUnivId)
          Calls lock service to retrieve all current position locks without a corresponding funding lock and builds a lock summary object for each returned lock.
protected  org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
           
protected  void getPositionFundingLocks(List<BudgetConstructionLockSummary> results, String lockUnivId)
          Calls lock service to retrieve all current position/funding locks and builds a lock summary object for each returned lock.
 org.kuali.rice.kns.lookup.HtmlData getReturnUrl(org.kuali.rice.kns.bo.BusinessObject businessObject, org.kuali.rice.kns.web.struts.form.LookupForm lookupForm, List pkNames, org.kuali.rice.kns.authorization.BusinessObjectRestrictions businessObjectRestrictions)
           
 List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResults(Map<String,String> fieldValues)
           
protected  void getTransactionLocks(List<BudgetConstructionLockSummary> results, String lockUnivId)
          Calls lock service to retrieve all current transaction locks and builds a lock summary object for each returned lock.
protected  String getUniversalIdFromNetworkID(String networkID)
          Uses org.kuali.rice.kim.service.PersonService to retrieve user object associated with the given network id (if not blank) and then returns universal id.
 void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
          Sets the kualiConfigurationService attribute value.
 void validateSearchParameters(Map fieldValues)
          Overridden to prevent a validation exception from thrown when the search method is called to refresh the results after an error is encountered.
 
Methods inherited from class org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl
getExternalBusinessObjectProperty, getExternalizableBusinessObjectClass, getExternalizableBusinessObjectFieldValues, getExternalizableBusinessObjectProperties, getPrimaryKeyFieldLabels, getSearchResultsHelper, getSearchResultsUnbounded, hasExternalBusinessObjectProperty, isExternalBusinessObjectProperty, isSearchUsingOnlyPrimaryKeyValues, removeExternalizableBusinessObjectFieldValues
 
Methods inherited from class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
addToReturnHref, allowsMaintenanceDeleteAction, allowsMaintenanceEditAction, allowsMaintenanceNewOrCopyAction, allowsNewOrCopyAction, applyConditionalLogicForFieldDisplay, applyFieldAuthorizationsFromNestedLookups, checkForAdditionalFields, getActionUrlHref, getActionUrls, getActionUrlTitleText, getBackLocation, getBusinessObjectAuthorizationService, getBusinessObjectClass, getBusinessObjectDictionaryService, getBusinessObjectMetaDataService, getBusinessObjectService, getColumnMaxLength, getColumns, getConditionallyHiddenPropertyNames, getConditionallyReadOnlyPropertyNames, getConditionallyRequiredPropertyNames, getCurrentSearchFieldValue, getDataDictionaryService, getDefaultSortColumns, getDocFormKey, getDocNum, getEmptyActionUrls, getEmptyAnchorHtmlData, getEncryptionService, getExtraField, getKualiConfigurationService, getKualiInquirable, getLookupResultsService, getLookupService, getMaintenanceDocumentDictionaryService, getMaintenanceDocumentTypeName, getMaintenanceUrl, getParameters, getParameters, getParameterService, getParametersFromPrimaryKey, getPersistenceStructureService, getPropertyClass, getReadOnlyFieldsList, getReferencesToRefresh, getReturnAnchorHtmlData, getReturnHref, getReturnHref, getReturnInputHtmlData, getReturnKeys, getReturnLocation, getReturnUrl, getRows, getSequenceAccessorService, getSupplementalMenuBar, getTitle, getUrlData, getUrlData, isResultReturnable, maskValueIfNecessary, performClear, performCustomAction, performLookup, preprocessDateFields, setBackLocation, setBusinessObjectClass, setBusinessObjectDictionaryService, setBusinessObjectMetaDataService, setBusinessObjectService, setDataDictionaryService, setDocFormKey, setDocNum, setEncryptionService, setFieldConversions, setKualiInquirable, setLookupResultsService, setLookupService, setMaintenanceDocumentDictionaryService, setParameters, setParameterService, setParameterService, setPersistenceStructureService, setReadOnlyFieldsList, setReferencesToRefresh, setRows, setSequenceAccessorService, shouldDisplayHeaderNonMaintActions, shouldDisplayLookupCriteria, validateSearchParameterWildcardAndOperators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockMonitorLookupableHelperServiceImpl

public LockMonitorLookupableHelperServiceImpl()
Method Detail

getSearchResults

public List<? extends org.kuali.rice.kns.bo.BusinessObject> getSearchResults(Map<String,String> fieldValues)
Specified by:
getSearchResults in interface org.kuali.rice.kns.lookup.LookupableHelperService
Overrides:
getSearchResults in class org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl
See Also:
AbstractLookupableHelperServiceImpl.getSearchResults(java.util.Map)

getAccountLocks

protected void getAccountLocks(List<BudgetConstructionLockSummary> results,
                               String lockUnivId)
Calls lock service to retrieve all current account locks and builds a lock summary object for each returned lock.

Parameters:
results - - result list to add lock summaries

getTransactionLocks

protected void getTransactionLocks(List<BudgetConstructionLockSummary> results,
                                   String lockUnivId)
Calls lock service to retrieve all current transaction locks and builds a lock summary object for each returned lock.

Parameters:
results - - result list to add lock summaries

getOrphanFundingLocks

protected void getOrphanFundingLocks(List<BudgetConstructionLockSummary> results,
                                     String lockUnivId)
Calls lock service to retrieve all funding locks that do not have a corresponding position locks and builds a lock summary object for each returned lock.

Parameters:
results - - result list to add lock summaries

getPositionFundingLocks

protected void getPositionFundingLocks(List<BudgetConstructionLockSummary> results,
                                       String lockUnivId)
Calls lock service to retrieve all current position/funding locks and builds a lock summary object for each returned lock.

Parameters:
results - - result list to add lock summaries

getOrphanPositionLocks

protected void getOrphanPositionLocks(List<BudgetConstructionLockSummary> results,
                                      String lockUnivId)
Calls lock service to retrieve all current position locks without a corresponding funding lock and builds a lock summary object for each returned lock.

Parameters:
results - - result list to add lock summaries

getCustomActionUrls

public List<org.kuali.rice.kns.lookup.HtmlData> getCustomActionUrls(org.kuali.rice.kns.bo.BusinessObject businessObject,
                                                                    List pkNames)
Builds unlink action for each type of lock.

Specified by:
getCustomActionUrls in interface org.kuali.rice.kns.lookup.LookupableHelperService
Overrides:
getCustomActionUrls in class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
See Also:
AbstractLookupableHelperServiceImpl.getCustomActionUrls(org.kuali.rice.kns.bo.BusinessObject, java.util.List)

getUniversalIdFromNetworkID

protected String getUniversalIdFromNetworkID(String networkID)
Uses org.kuali.rice.kim.service.PersonService to retrieve user object associated with the given network id (if not blank) and then returns universal id. Add error to GlobalVariables if the user was not found.

Parameters:
networkID - - network id for the user to find
Returns:
universal id for the user or null if not found or the network id was blank

getReturnUrl

public org.kuali.rice.kns.lookup.HtmlData getReturnUrl(org.kuali.rice.kns.bo.BusinessObject businessObject,
                                                       org.kuali.rice.kns.web.struts.form.LookupForm lookupForm,
                                                       List pkNames,
                                                       org.kuali.rice.kns.authorization.BusinessObjectRestrictions businessObjectRestrictions)
Specified by:
getReturnUrl in interface org.kuali.rice.kns.lookup.LookupableHelperService
Overrides:
getReturnUrl in class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
See Also:
org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#getReturnUrl(org.kuali.rice.kns.bo.BusinessObject, java.util.Map, java.lang.String)

validateSearchParameters

public void validateSearchParameters(Map fieldValues)
Overridden to prevent a validation exception from thrown when the search method is called to refresh the results after an error is encountered.

Specified by:
validateSearchParameters in interface org.kuali.rice.kns.lookup.LookupableHelperService
Overrides:
validateSearchParameters in class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
See Also:
AbstractLookupableHelperServiceImpl.validateSearchParameters(java.util.Map)

getInquiryUrl

public org.kuali.rice.kns.lookup.HtmlData getInquiryUrl(org.kuali.rice.kns.bo.BusinessObject bo,
                                                        String propertyName)
Since this lookupable is called by the budget lookup action, the context will be KFS, not Rice. So the generated inquiries will not have the Rice context (kr/) and be invalid. This override adds the Rice context to the inquiry Url to working around the issue.

Specified by:
getInquiryUrl in interface org.kuali.rice.kns.lookup.LookupableHelperService
Overrides:
getInquiryUrl in class org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl
See Also:
AbstractLookupableHelperServiceImpl.getInquiryUrl(org.kuali.rice.kns.bo.BusinessObject, java.lang.String)

setKualiConfigurationService

public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
Sets the kualiConfigurationService attribute value.

Parameters:
kualiConfigurationService - The kualiConfigurationService to set.

getPersonService

protected org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
Returns:
Returns the personService.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.