org.kuali.kfs.vnd.document
Class VendorMaintainableImpl

java.lang.Object
  extended by org.kuali.rice.kns.maintenance.KualiMaintainableImpl
      extended by org.kuali.kfs.sys.document.FinancialSystemMaintainable
          extended by org.kuali.kfs.vnd.document.VendorMaintainableImpl
All Implemented Interfaces:
Serializable, org.kuali.rice.kns.lookup.SelectiveReferenceRefresher, org.kuali.rice.kns.maintenance.Maintainable

public class VendorMaintainableImpl
extends FinancialSystemMaintainable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
boClass, businessObject, businessObjectAuthorizationService, businessObjectDictionaryService, businessObjectMetaDataService, businessObjectService, dataDictionaryService, docTypeName, documentHelperService, documentNumber, encryptionService, inactiveRecordDisplay, maintenanceAction, maintenanceDocumentDictionaryService, maintenanceDocumentService, newCollectionLines, persistenceStructureService, personService
 
Constructor Summary
VendorMaintainableImpl()
           
 
Method Summary
protected  boolean answerSplitNodeQuestion(String nodeName)
           
 void doRouteStatusChange(org.kuali.rice.kns.bo.DocumentHeader header)
           
 List<org.kuali.rice.kns.document.MaintenanceLock> generateMaintenanceLocks()
          Returns the locking representation of the vendor.
 String getDocumentTitle(org.kuali.rice.kns.document.MaintenanceDocument document)
          Overrides the kuali default documents title with a Vendor-specific document title style
protected  boolean isRelationshipRefreshable(Class boClass, String relationshipName)
           
 void processAfterEdit(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
           
 void refresh(String refreshCaller, Map fieldValues, org.kuali.rice.kns.document.MaintenanceDocument document)
          Refreshes the vendorDetail.
 void refreshBusinessObject()
          Temporarily saves vendorHeader into a temp object, then put back the vendorHeader into the VendorDetail after the refresh, so that we don't lose the values
 void saveBusinessObject()
          Checks whether the vendor has already had a vendor detail assigned id.
 void setBusinessObject(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          If the vendorFirstLastNameIndicator is true, this method will set the vendor first name and vendor last name fields from the vendorName field, then set the vendorName field to null.
 void setGenerateDefaultValues(String docTypeName)
           
 void setupNewFromExisting(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
          Create a new division vendor if the user clicks on the "Create a new division" link.
 
Methods inherited from class org.kuali.kfs.sys.document.FinancialSystemMaintainable
populateChartOfAccountsCodeFields, processAfterPost, processBeforeAddLine, refreshReferences
 
Methods inherited from class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
addMultipleValueLookupResults, addNewLineToCollection, clearBusinessObjectOfRestrictedValues, clearCollectionRestrictedValues, clearFieldRestrictedValues, decryptEncryptedData, deleteBusinessObject, generateAllAffectedReferences, getAffectedReferencesFromLookup, getAllRefreshableReferences, getBoClass, getBusinessObject, getBusinessObjectAuthorizationService, getBusinessObjectDictionaryService, getBusinessObjectMetaDataService, getBusinessObjectService, getCoreSections, getCustomLockDescriptor, getDataDictionaryService, getDocumentHelperService, getDocumentTypeName, getDuplicateIdentifierFieldsFromDataDictionary, getEncryptionService, getInactiveRecordDisplay, getLockingDocumentId, getMaintainableTitle, getMaintenanceAction, getMaintenanceDocumentDictionaryService, getMaintenanceDocumentService, getMultiValueIdentifierList, getNewCollectionLine, getPersistenceStructureService, getPersonService, getSections, getShowInactiveRecords, getWorkflowEngineDocumentIdsToLock, hasBusinessObjectExisted, initNewCollectionLine, isBoNotesEnabled, isExternalBusinessObject, isOldBusinessObjectInDocument, performCollectionForceUpperCase, performFieldForceUpperCase, performFieldForceUpperCase, performForceUpperCase, populateBusinessObject, populateNewCollectionLines, populateNewSubCollectionLines, prepareBusinessObject, prepareBusinessObjectForAdditionFromMultipleValueLookup, prepareForSave, processAfterAddLine, processAfterCopy, processAfterNew, processAfterRetrieve, setBoClass, setDocumentNumber, setGenerateBlankRequiredValues, setMaintenanceAction, setNewCollectionLineDefaultValues, setShowInactiveRecords, shouldFieldBeEncrypted, useCustomLockDescriptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VendorMaintainableImpl

public VendorMaintainableImpl()
Method Detail

setGenerateDefaultValues

public void setGenerateDefaultValues(String docTypeName)
Specified by:
setGenerateDefaultValues in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
setGenerateDefaultValues in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
org.kuali.rice.kns.maintenance.KualiMaintainableImpl#setGenerateDefaultValues(boolean)

getDocumentTitle

public String getDocumentTitle(org.kuali.rice.kns.document.MaintenanceDocument document)
Overrides the kuali default documents title with a Vendor-specific document title style

Specified by:
getDocumentTitle in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
getDocumentTitle in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
KualiMaintainableImpl.getDocumentTitle(org.kuali.rice.kns.document.MaintenanceDocument)

doRouteStatusChange

public void doRouteStatusChange(org.kuali.rice.kns.bo.DocumentHeader header)
Specified by:
doRouteStatusChange in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
doRouteStatusChange in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl

refresh

public void refresh(String refreshCaller,
                    Map fieldValues,
                    org.kuali.rice.kns.document.MaintenanceDocument document)
Refreshes the vendorDetail. Currently we need this mainly for refreshing the soldToVendor object after returning from the lookup for a sold to vendor.

Specified by:
refresh in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
refresh in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
KualiMaintainableImpl.refresh(java.lang.String, java.util.Map, org.kuali.rice.kns.document.MaintenanceDocument)

refreshBusinessObject

public void refreshBusinessObject()
Temporarily saves vendorHeader into a temp object, then put back the vendorHeader into the VendorDetail after the refresh, so that we don't lose the values


saveBusinessObject

public void saveBusinessObject()
Checks whether the vendor has already had a vendor detail assigned id. If not, it will call the private method to set the detail assigned id. The method will also call the vendorService to determine whether it should save the vendor header (i.e. if this is a parent) and will save the vendor header accordingly. This is because we are not going to save vendor header automatically along with the saving of vendor detail, so if the vendor is a parent, we have to save the vendor header separately. Restriction-related information will be changed based on whether the Vendor Restricted Indicator was changed. If the Tax Number or Tax Type code have changed, the fact will be recorded with a new record in the Tax Change table. Finally the method will call the saveBusinessObject( ) of the super class to save the vendor detail.

Specified by:
saveBusinessObject in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
saveBusinessObject in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
KualiMaintainableImpl.saveBusinessObject()

processAfterEdit

public void processAfterEdit(org.kuali.rice.kns.document.MaintenanceDocument document,
                             Map<String,String[]> parameters)
Specified by:
processAfterEdit in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
processAfterEdit in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
org.kuali.rice.kns.maintenance.KualiMaintainableImpl#processAfterEdit()

setBusinessObject

public void setBusinessObject(org.kuali.rice.kns.bo.PersistableBusinessObject bo)
If the vendorFirstLastNameIndicator is true, this method will set the vendor first name and vendor last name fields from the vendorName field, then set the vendorName field to null. Then it sets the businessObject of this maintainable to the VendorDetail object that contains our modification to the name fields.

Specified by:
setBusinessObject in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
setBusinessObject in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
Maintainable.saveBusinessObject()

generateMaintenanceLocks

public List<org.kuali.rice.kns.document.MaintenanceLock> generateMaintenanceLocks()
Returns the locking representation of the vendor. If the vendor detail id is not null, call the super class implementation of generateMaintenanceLocks which will set the locking key to be the header and detail ids. However, if the detail id is null, that means this is a new vendor (parent or division) and we should ignore locking.

Specified by:
generateMaintenanceLocks in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
generateMaintenanceLocks in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
Maintainable.generateMaintenanceLocks()

setupNewFromExisting

public void setupNewFromExisting(org.kuali.rice.kns.document.MaintenanceDocument document,
                                 Map<String,String[]> parameters)
Create a new division vendor if the user clicks on the "Create a new division" link. By default, the vendorParentIndicator is set to true in the constructor of VendorDetail, but if we're creating a new division, it's not a parent, so we need to set the vendorParentIndicator to false in this case.

Specified by:
setupNewFromExisting in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
setupNewFromExisting in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
org.kuali.rice.kns.maintenance.Maintainable#setupNewFromExisting()

isRelationshipRefreshable

protected boolean isRelationshipRefreshable(Class boClass,
                                            String relationshipName)
Overrides:
isRelationshipRefreshable in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
KualiMaintainableImpl.isRelationshipRefreshable(java.lang.Class, java.lang.String)

answerSplitNodeQuestion

protected boolean answerSplitNodeQuestion(String nodeName)
                                   throws UnsupportedOperationException
Overrides:
answerSplitNodeQuestion in class FinancialSystemMaintainable
Returns:
Throws:
UnsupportedOperationException
See Also:
FinancialSystemMaintainable.answerSplitNodeQuestion(java.lang.String)


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