001/**
002 * Copyright 2005-2015 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 */
016package org.kuali.rice.kns.workflow.attribute;
017
018import org.kuali.rice.kew.api.extension.ExtensionDefinition;
019import org.kuali.rice.kew.rule.xmlrouting.StandardGenericXMLRuleAttribute;
020import org.w3c.dom.Element;
021
022
023/**
024 * This class extends the workflow xml rule attribute implementation to use the information in the data dictionary to generate labels.
025 * 
026 * @author Kuali Rice Team (rice.collab@kuali.org)
027 *
028 * @deprecated Only used by KNS classes, no replacement.
029 *
030 */
031@Deprecated
032public class KualiXmlRuleAttributeImpl extends StandardGenericXMLRuleAttribute implements KualiXmlAttribute {
033        private static final long serialVersionUID = -3453451186396963835L;
034
035    /**
036     * Constructs a KualiXmlRuleAttributeImpl.java.
037     */
038    public KualiXmlRuleAttributeImpl() {
039        super();
040    }
041
042    /**
043     * This method overrides the super class and modifies the XML that it operates on to put the name and the title in the place
044     * where the super class expects to see them, even though they may no longer exist in the original XML.
045     * 
046     * @see org.kuali.rice.kew.rule.xmlrouting.StandardGenericXMLRuleAttribute#getConfigXML()
047     */
048    @Override
049    public Element getConfigXML() {
050        Element root = super.getConfigXML();
051        KualiXmlAttributeHelper attributeHelper = new KualiXmlAttributeHelper();
052        // this adds the name and title to the xml based on the data dictionary
053        return attributeHelper.processConfigXML(root);
054    }
055
056    @Override
057    public Element getConfigXML(ExtensionDefinition extensionDefinition) {
058        return getConfigXML();
059    }
060
061}