/** * A convenience method for verifying that a rule template contains the expected default action. * * @param expectedDefActions The default actions expected by each responsibility (person, then * group, then role). * @throws Exception */ private void assertRuleTemplateHasExpectedDefaultActions(String[] expectedDefActions) throws Exception { // Acquire the Maintainable and the responsibility constants. final RoutingRuleMaintainable rrMaint = (RoutingRuleMaintainable) ((MaintenanceDocument) ((KualiMaintenanceForm) KNSGlobalVariables.getKualiForm()).getDocument()) .getNewMaintainableObject(); final String[] respSectionConsts = { KEWPropertyConstants.PERSON_RESP_SECTION, KEWPropertyConstants.GROUP_RESP_SECTION, KEWPropertyConstants.ROLE_RESP_SECTION }; // Check each responsibility's default action. for (int i = 0; i < respSectionConsts.length; i++) { final String actualDefAction = ((RuleResponsibilityBo) rrMaint.initNewCollectionLine(respSectionConsts[i])) .getActionRequestedCd(); assertEquals( "The rule template does not have the expected default approve action.", expectedDefActions[i], actualDefAction); } }
/** * This is a hack. This is called by Lookup's execute and it's just our way of making sure that * maint links are turned on, even for an otherwise erstwhile non-maintainable object * * @see * org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#applyConditionalLogicForFieldDisplay() */ @Override public void applyConditionalLogicForFieldDisplay() { super.applyConditionalLogicForFieldDisplay(); LookupForm lookupForm = (LookupForm) KNSGlobalVariables.getKualiForm(); lookupForm.setShowMaintenanceLinks(true); }
@Override public List<KeyValue> getKeyValues() { InstitutionalProposalForm form = (InstitutionalProposalForm) KNSGlobalVariables.getKualiForm(); return getKeyValues( form.getInstitutionalProposalDocument().getInstitutionalProposal().getSponsorCode()); }