001/**
002 * Copyright 2005-2016 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.docsearch.xml.StandardGenericXMLSearchableAttribute;
020import org.w3c.dom.Element;
021
022
023/**
024 * This class is used to define Kuali searchable attributes
025 * 
026 * @author Kuali Rice Team (rice.collab@kuali.org)
027 *
028 */
029public class KualiXmlSearchableAttributeImpl extends StandardGenericXMLSearchableAttribute implements KualiXmlAttribute {
030    private static final long serialVersionUID = -5759823164605651979L;
031
032        /**
033     * Constructs a KualiXmlRuleAttributeImpl.java.
034     */
035    public KualiXmlSearchableAttributeImpl() {
036        super();
037    }
038
039    /**
040     * This method overrides the super class and modifies the XML that it operates on to put the name and the title in the place
041     * where the super class expects to see them, even though they may no longer exist in the original XML.
042     */
043    @Override
044    public Element getConfigXML(ExtensionDefinition extensionDefinition) {
045        Element root = super.getConfigXML(extensionDefinition);
046        KualiXmlAttributeHelper attributeHelper = new KualiXmlAttributeHelper();
047        // this adds the name and title to the xml based on the data dictionary
048        return attributeHelper.processConfigXML(root);
049    }
050
051}