01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.workflow.attribute;
17:
18: import org.apache.commons.logging.Log;
19: import org.apache.commons.logging.LogFactory;
20: import org.w3c.dom.Element;
21:
22: import edu.iu.uis.eden.routetemplate.xmlrouting.StandardGenericXMLRuleAttribute;
23:
24: /**
25: * This class extends the workflow xml rule attribute implementation to use the information in the data dictionary to generate
26: * labels.
27: */
28: public class KualiXmlRuleAttributeImpl extends
29: StandardGenericXMLRuleAttribute implements KualiXmlAttribute {
30: private static Log LOG = LogFactory
31: .getLog(KualiXmlRuleAttributeImpl.class);
32:
33: /**
34: * Constructs a KualiXmlRuleAttributeImpl.java.
35: */
36: public KualiXmlRuleAttributeImpl() {
37: super ();
38: }
39:
40: /**
41: * This method overrides the super class and modifies the XML that it operates on to put the name and the title in the place
42: * where the super class expects to see them, even though they may no longer exist in the original XML.
43: *
44: * @see edu.iu.uis.eden.routetemplate.xmlrouting.StandardGenericXMLRuleAttribute#getConfigXML()
45: */
46: public Element getConfigXML() {
47: Element root = getAttributeConfigXML();
48: KualiXmlAttributeHelper attributeHelper = new KualiXmlAttributeHelper();
49: // this adds the name and title to the xml based on the data dictionary
50: return attributeHelper.processConfigXML(root);
51: }
52:
53: public Element getAttributeConfigXML() {
54: return super.getConfigXML();
55: }
56:
57: }
|