001 /* 002 * Copyright 2007-2009 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.rice.kew.rule.bo; 017 018 import java.util.List; 019 import java.util.Map; 020 021 import org.kuali.rice.kew.rule.RuleDelegation; 022 import org.kuali.rice.kew.rule.web.WebRuleUtils; 023 import org.kuali.rice.kns.inquiry.KualiInquirableImpl; 024 import org.kuali.rice.kns.web.ui.Section; 025 import org.kuali.rice.krad.bo.BusinessObject; 026 027 /** 028 * This is a description of what this class does - ewestfal don't forget to fill this in. 029 * 030 * @author Kuali Rice Team (rice.collab@kuali.org) 031 * 032 */ 033 public class RuleDelegationInquirableImpl extends KualiInquirableImpl { 034 035 @Override 036 public Object retrieveDataObject(Map fieldValues){ 037 RuleDelegation rule = (RuleDelegation)super.retrieveDataObject(fieldValues); 038 WebRuleUtils.populateRuleMaintenanceFields(rule.getDelegationRuleBaseValues()); 039 return rule; 040 } 041 042 /** 043 * This overridden method ... 044 * 045 * @see org.kuali.rice.krad.inquiry.Inquirable#getBusinessObject(java.util.Map) 046 */ 047 public BusinessObject getBusinessObject(Map fieldValues) { 048 RuleDelegation rule = (RuleDelegation)super.getBusinessObject(fieldValues); 049 WebRuleUtils.populateRuleMaintenanceFields(rule.getDelegationRuleBaseValues()); 050 return rule; 051 } 052 053 /** 054 * This overridden method ... 055 * 056 * @see org.kuali.rice.krad.inquiry.Inquirable#getSections(org.kuali.rice.krad.bo.BusinessObject) 057 */ 058 public List getSections(BusinessObject bo) { 059 List<Section> sections = super.getSections(bo); 060 061 return WebRuleUtils.customizeSections(((RuleDelegation)bo).getDelegationRuleBaseValues(), sections, true); 062 063 } 064 065 }