Class RoutingRuleMaintainable

java.lang.Object
org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl
org.kuali.rice.krad.maintenance.MaintainableImpl
org.kuali.rice.kns.maintenance.KualiMaintainableImpl
org.kuali.rice.kew.document.RoutingRuleMaintainable
All Implemented Interfaces:
Serializable, org.kuali.rice.kns.lookup.SelectiveReferenceRefresher, org.kuali.rice.kns.maintenance.Maintainable, org.kuali.rice.krad.maintenance.Maintainable, org.kuali.rice.krad.uif.service.ViewHelperService

public class RoutingRuleMaintainable extends org.kuali.rice.kns.maintenance.KualiMaintainableImpl
This class is the maintainable implementation for Routing Rules in KEW (represented by the RuleBaseValues business object).
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Field Summary

    Fields inherited from class org.kuali.rice.kns.maintenance.KualiMaintainableImpl

    businessObject, businessObjectAuthorizationService, businessObjectDictionaryService, businessObjectMetaDataService, documentHelperService, inactiveRecordDisplay, maintenanceDocumentDictionaryService, newCollectionLineNames, newCollectionLines, personService
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.kuali.rice.krad.maintenance.MaintenanceLock>
    Overridden implementation of maintenance locks.
    getDocumentTitle(org.kuali.rice.kns.document.MaintenanceDocument document)
     
    protected RuleBaseValues
    getNewRule(org.kuali.rice.kns.document.MaintenanceDocument document)
    Returns the new RuleBaseValues business object.
    protected RuleBaseValues
    getOldRule(org.kuali.rice.kns.document.MaintenanceDocument document)
    Returns the old RuleBaseValues business object.
    getSections(org.kuali.rice.kns.document.MaintenanceDocument document, org.kuali.rice.kns.maintenance.Maintainable oldMaintainable)
    Override the getSections method on this maintainable so that the Section Containing the various Rule Attributes can be dynamically generated based on the RuleTemplate which is selected.
    protected RuleBaseValues
    Returns the RuleBaseValues business object associated with this Maintainable.
    void
    processAfterCopy(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
     
    void
    processAfterEdit(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
     
    void
    processAfterNew(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
    On creation of a new rule document, we must validate that a rule template and document type are set.
    void
    A complete override of the implementation for saving a Rule
    void
    This is a hack to get around the fact that when a document is first created, this value is true which causes issues if you want to be able to initialize fields on the document using request parameters.
    protected void
    setNewCollectionLineDefaultValues(String collectionName, org.kuali.rice.krad.bo.PersistableBusinessObject addLine)
     

    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, getCoreSections, getDataObjectMetaDataService, getDocumentHelperService, getDuplicateIdentifierFieldsFromDataDictionary, getInactiveRecordDisplay, getMaintainableTitle, getMaintenanceDocumentDictionaryService, getMultiValueIdentifierList, getNewCollectionLine, getPersistenceStructureService, getPersonService, getShowInactiveRecords, hasBusinessObjectExisted, initNewCollectionLine, isBoNotesEnabled, isExternalBusinessObject, isNotesEnabled, isOldBusinessObjectInDocument, isRelationshipRefreshable, performCollectionForceUpperCase, performFieldForceUpperCase, performFieldForceUpperCase, performForceUpperCase, populateBusinessObject, populateNewCollectionLines, populateNewSubCollectionLines, prepareBusinessObject, prepareBusinessObjectForAdditionFromMultipleValueLookup, processAfterAddLine, processAfterPost, processBeforeAddLine, refresh, refreshReferences, retrieveObjectForEditOrCopy, saveDataObject, setBoClass, setBusinessObject, setBusinessObjectAuthorizationService, setBusinessObjectDictionaryService, setBusinessObjectMetaDataService, setDataObject, setDataObjectMetaDataService, setDocumentHelperService, setGenerateDefaultValues, setMaintenanceDocumentDictionaryService, setPersonService, setShowInactiveRecords, setupNewFromExisting, shouldFieldBeEncrypted

    Methods inherited from class org.kuali.rice.krad.maintenance.MaintainableImpl

    deleteDataObject, doRouteStatusChange, generateMaintenanceLocks, getCustomLockDescriptor, getDataObject, getDataObjectAuthorizationService, getDataObjectClass, getDataObjectService, getDocumentDictionaryService, getDocumentNumber, getDocumentTitle, getDocumentTypeName, getEncryptionService, getKualiRuleService, getLegacyDataAdapter, getLockingDocumentId, getMaintenanceAction, getMaintenanceDocumentService, getPersistableBusinessObject, getWorkflowEngineDocumentIdsToLock, isLockable, isOldDataObjectInDocument, performAddLineValidation, performCustomApplyModel, performCustomFinalize, performCustomViewFinalize, prepareExternalBusinessObject, prepareForSave, processAfterAddLine, processAfterCopy, processAfterDeleteLine, processAfterEdit, processAfterNew, processAfterPost, processAfterRetrieve, retrieveObjectForEditOrCopy, setDataObjectAuthorizationService, setDataObjectClass, setDocumentDictionaryService, setDocumentNumber, setEncryptionService, setKualiRuleService, setLegacyDataAdapter, setMaintenanceAction, setMaintenanceDocumentService, setupNewFromExisting, useCustomLockDescriptors

    Methods inherited from class org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl

    addCustomContainerComponents, addLine, applyDefaultValues, applyDefaultValuesForCollectionLine, buildGrowlScript, buildInquiryLink, containsDuplicateLine, extractNewValuesAndAssign, extractSingleValue, filterByReturnedFieldConversions, getConfigurationService, getCurrentPersonContactId, getDataDictionaryService, getDefaultValueForField, getExpressionEvaluatorFactory, getViewDictionaryService, isDuplicateLine, linkAddedLine, logAndThrowRuntime, performCustomInitialization, performCustomViewInitialization, performDeleteLineValidation, populateDefaultValueForField, populateViewFromRequestParameters, processAfterEditLine, processAfterSaveLine, processAndAddLineObject, processBeforeAddLine, processBeforeEditLine, processBeforeSaveLine, processCollectionAddBlankLine, processCollectionAddLine, processCollectionCloseEditLineDialog, processCollectionDeleteLine, processCollectionEditLine, processCollectionRetrieveEditLineDialog, processCollectionSaveLine, processMultipleValueLookupResults, refreshReference, retrieveEditModesAndActionFlags, setConfigurationService, setDataDictionaryService, setDataObjectService, setElementContext, setExpressionEvaluatorFactory, setViewContext, setViewDictionaryService

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.kuali.rice.krad.maintenance.Maintainable

    deleteDataObject, doRouteStatusChange, getCustomLockDescriptor, getDataObject, getDataObjectClass, getDocumentTitle, getLockingDocumentId, getMaintenanceAction, getPersistableBusinessObject, getWorkflowEngineDocumentIdsToLock, isLockable, isOldDataObjectInDocument, prepareExternalBusinessObject, prepareForSave, processAfterCopy, processAfterEdit, processAfterNew, processAfterPost, processAfterRetrieve, retrieveObjectForEditOrCopy, setDataObjectClass, setDocumentNumber, setMaintenanceAction, setupNewFromExisting, useCustomLockDescriptors

    Methods inherited from interface org.kuali.rice.krad.uif.service.ViewHelperService

    addCustomContainerComponents, applyDefaultValues, applyDefaultValuesForCollectionLine, buildGrowlScript, buildInquiryLink, getDefaultValueForField, getExpressionEvaluatorFactory, performCustomApplyModel, performCustomFinalize, performCustomInitialization, performCustomViewFinalize, performCustomViewInitialization, populateDefaultValueForField, populateViewFromRequestParameters, processAfterAddLine, processAfterDeleteLine, processAfterEditLine, processAfterSaveLine, processAndAddLineObject, processBeforeAddLine, processBeforeEditLine, processBeforeSaveLine, processCollectionAddBlankLine, processCollectionAddLine, processCollectionCloseEditLineDialog, processCollectionDeleteLine, processCollectionEditLine, processCollectionRetrieveEditLineDialog, processCollectionSaveLine, processMultipleValueLookupResults, refreshReference, retrieveEditModesAndActionFlags, setElementContext, setViewContext
  • Constructor Details

    • RoutingRuleMaintainable

      public RoutingRuleMaintainable()
  • Method Details

    • getSections

      public List getSections(org.kuali.rice.kns.document.MaintenanceDocument document, org.kuali.rice.kns.maintenance.Maintainable oldMaintainable)
      Override the getSections method on this maintainable so that the Section Containing the various Rule Attributes can be dynamically generated based on the RuleTemplate which is selected.
      Specified by:
      getSections in interface org.kuali.rice.kns.maintenance.Maintainable
      Overrides:
      getSections in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
    • processAfterNew

      public void processAfterNew(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
      On creation of a new rule document, we must validate that a rule template and document type are set.
      Specified by:
      processAfterNew in interface org.kuali.rice.kns.maintenance.Maintainable
      Overrides:
      processAfterNew in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
    • setGenerateBlankRequiredValues

      public void setGenerateBlankRequiredValues(String docTypeName)
      This is a hack to get around the fact that when a document is first created, this value is true which causes issues if you want to be able to initialize fields on the document using request parameters. See SectionBridge.toSection for the "if" block where it populates Field.propertyValue to see why this causes problems
      Specified by:
      setGenerateBlankRequiredValues in interface org.kuali.rice.kns.maintenance.Maintainable
      Overrides:
      setGenerateBlankRequiredValues in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
    • saveBusinessObject

      public void saveBusinessObject()
      A complete override of the implementation for saving a Rule
      Specified by:
      saveBusinessObject in interface org.kuali.rice.kns.maintenance.Maintainable
      Overrides:
      saveBusinessObject in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
    • processAfterCopy

      public void processAfterCopy(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
      Specified by:
      processAfterCopy in interface org.kuali.rice.kns.maintenance.Maintainable
      Overrides:
      processAfterCopy in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
    • 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
    • getNewRule

      protected RuleBaseValues getNewRule(org.kuali.rice.kns.document.MaintenanceDocument document)
      Returns the new RuleBaseValues business object.
    • getOldRule

      protected RuleBaseValues getOldRule(org.kuali.rice.kns.document.MaintenanceDocument document)
      Returns the old RuleBaseValues business object.
    • getThisRule

      protected RuleBaseValues getThisRule()
      Returns the RuleBaseValues business object associated with this Maintainable.
    • generateMaintenanceLocks

      public List<org.kuali.rice.krad.maintenance.MaintenanceLock> generateMaintenanceLocks()
      Overridden implementation of maintenance locks. The default locking for Routing Rules is based on previous version (can't route more than one rule based off the same previous verison). However, for the first version of a rule, the previous version id will be null. So for a new Route Rule maintenance document we don't want any locks generated. TODO can we just let the locking key be the primary key? (ruleBaseValuesId)
      Specified by:
      generateMaintenanceLocks in interface org.kuali.rice.krad.maintenance.Maintainable
      Overrides:
      generateMaintenanceLocks in class org.kuali.rice.krad.maintenance.MaintainableImpl
    • getDocumentTitle

      public String getDocumentTitle(org.kuali.rice.kns.document.MaintenanceDocument document)
      Specified by:
      getDocumentTitle in interface org.kuali.rice.kns.maintenance.Maintainable
      Overrides:
      getDocumentTitle in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
    • setNewCollectionLineDefaultValues

      protected void setNewCollectionLineDefaultValues(String collectionName, org.kuali.rice.krad.bo.PersistableBusinessObject addLine)
      Overrides:
      setNewCollectionLineDefaultValues in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl