org.kuali.rice.kew.document
Class RoutingRuleMaintainable

java.lang.Object
  extended by org.kuali.rice.kns.maintenance.KualiMaintainableImpl
      extended by org.kuali.rice.kew.document.RoutingRuleMaintainable
All Implemented Interfaces:
Serializable, SelectiveReferenceRefresher, Maintainable

public class RoutingRuleMaintainable
extends 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:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
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
RoutingRuleMaintainable()
           
 
Method Summary
 List<MaintenanceLock> generateMaintenanceLocks()
          Overridden implementation of maintenance locks.
 String getDocumentTitle(MaintenanceDocument document)
          This is a hook to allow the document to override the generic document title.
protected  RuleBaseValues getNewRule(MaintenanceDocument document)
          Returns the new RuleBaseValues business object.
protected  RuleBaseValues getOldRule(MaintenanceDocument document)
          Returns the old RuleBaseValues business object.
 List getSections(MaintenanceDocument document, 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 getThisRule()
          Returns the RuleBaseValues business object associated with this Maintainable.
 void prepareForSave()
          This overridden method ...
 void processAfterCopy(MaintenanceDocument document, Map<String,String[]> parameters)
          Set the new collection records back to true so they can be deleted (copy should act like new)
 void processAfterEdit(MaintenanceDocument document, Map<String,String[]> parameters)
          This method is a hook to do any necessary post-edit processing, which is to say that it is called when a document is about to be edited; this is therefore a hook to write any code to modify the business object before it is displayed to the end user to edit.
 void processAfterNew(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 saveBusinessObject()
          A complete override of the implementation for saving a Rule
 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.
protected  void setNewCollectionLineDefaultValues(String collectionName, PersistableBusinessObject addLine)
           
 
Methods inherited from class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
addMultipleValueLookupResults, addNewLineToCollection, clearBusinessObjectOfRestrictedValues, clearCollectionRestrictedValues, clearFieldRestrictedValues, decryptEncryptedData, deleteBusinessObject, doRouteStatusChange, 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, getShowInactiveRecords, getWorkflowEngineDocumentIdsToLock, hasBusinessObjectExisted, initNewCollectionLine, isBoNotesEnabled, isExternalBusinessObject, isOldBusinessObjectInDocument, isRelationshipRefreshable, performCollectionForceUpperCase, performFieldForceUpperCase, performFieldForceUpperCase, performForceUpperCase, populateBusinessObject, populateNewCollectionLines, populateNewSubCollectionLines, prepareBusinessObject, prepareBusinessObjectForAdditionFromMultipleValueLookup, processAfterAddLine, processAfterPost, processAfterRetrieve, processBeforeAddLine, refresh, refreshReferences, setBoClass, setBusinessObject, setDocumentNumber, setGenerateDefaultValues, setMaintenanceAction, setShowInactiveRecords, setupNewFromExisting, shouldFieldBeEncrypted, useCustomLockDescriptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

RoutingRuleMaintainable

public RoutingRuleMaintainable()
Method Detail

getSections

public List getSections(MaintenanceDocument document,
                        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 Maintainable
Overrides:
getSections in class KualiMaintainableImpl
oldMaintainable - - If this is the new maintainable, the old is passed in for reference. If it is the old maintainable, then null will be passed in
Returns:
List of org.kuali.ui.Section objects

processAfterNew

public void processAfterNew(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 Maintainable
Overrides:
processAfterNew in class KualiMaintainableImpl
See Also:
org.kuali.rice.kns.maintenance.Maintainable#processAfterNew()

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 Maintainable
Overrides:
setGenerateBlankRequiredValues in class KualiMaintainableImpl
See Also:
org.kuali.rice.kns.maintenance.Maintainable#setGenerateBlankRequiredValues()

saveBusinessObject

public void saveBusinessObject()
A complete override of the implementation for saving a Rule

Specified by:
saveBusinessObject in interface Maintainable
Overrides:
saveBusinessObject in class KualiMaintainableImpl
See Also:
Maintainable.saveBusinessObject()

processAfterCopy

public void processAfterCopy(MaintenanceDocument document,
                             Map<String,String[]> parameters)
Description copied from class: KualiMaintainableImpl
Set the new collection records back to true so they can be deleted (copy should act like new)

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

processAfterEdit

public void processAfterEdit(MaintenanceDocument document,
                             Map<String,String[]> parameters)
Description copied from interface: Maintainable
This method is a hook to do any necessary post-edit processing, which is to say that it is called when a document is about to be edited; this is therefore a hook to write any code to modify the business object before it is displayed to the end user to edit.

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

getNewRule

protected RuleBaseValues getNewRule(MaintenanceDocument document)
Returns the new RuleBaseValues business object.


getOldRule

protected RuleBaseValues getOldRule(MaintenanceDocument document)
Returns the old RuleBaseValues business object.


getThisRule

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


generateMaintenanceLocks

public List<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 Maintainable
Overrides:
generateMaintenanceLocks in class KualiMaintainableImpl
Returns:
String containing the business object class and key value pairs of the current instance that can be used as a unique locking representation.

getDocumentTitle

public String getDocumentTitle(MaintenanceDocument document)
Description copied from class: KualiMaintainableImpl
This is a hook to allow the document to override the generic document title.

Specified by:
getDocumentTitle in interface Maintainable
Overrides:
getDocumentTitle in class KualiMaintainableImpl
Returns:
String document title

prepareForSave

public void prepareForSave()
This overridden method ...

Specified by:
prepareForSave in interface Maintainable
Overrides:
prepareForSave in class KualiMaintainableImpl
See Also:
KualiMaintainableImpl.prepareForSave()

setNewCollectionLineDefaultValues

protected void setNewCollectionLineDefaultValues(String collectionName,
                                                 PersistableBusinessObject addLine)
Overrides:
setNewCollectionLineDefaultValues in class KualiMaintainableImpl
See Also:
KualiMaintainableImpl.setNewCollectionLineDefaultValues(java.lang.String, org.kuali.rice.kns.bo.PersistableBusinessObject)


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