package org.apache.maven.hibernate.jelly;

/* ====================================================================
 *   Copyright 2001-2004 The Apache Software Foundation.
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 * ====================================================================
 */

import org.apache.commons.jelly.*;
import org.apache.maven.hibernate.beans.MappingsAggregatorBean;

public class AggregateMappingsTag extends TagSupport
{

	private MappingsAggregatorBean bean = new MappingsAggregatorBean();
	
    protected void execute()
        throws JellyTagException
    {
        try
        {
            bean.execute();
        }
        catch(Exception e)
        {
            String msg = " Mapping aggreagtion failed: " + e.getMessage();
            throw new JellyTagException(msg, e);
        }
    }

    public void doTag(XMLOutput arg0)
        throws JellyTagException
    {
        execute();
    }

    public String toString()
    {
        return bean.toString();
    }

    public void setExcludes(String string)
    {
        bean.setExcludes(string);
    }

    public void setIncludes(String string)
    {
        bean.setIncludes(string);
    }

    public String getExcludes()
    {
        return bean.getExcludes();
    }

    public String getIncludes()
    {
        return bean.getIncludes();
    }

    public String getBasedir()
    {
        return bean.getBasedir();
    }

    public void setBasedir(String string)
    {
        bean.setBasedir(string);
    }

    public String getAggregateOutputFile()
    {
        return bean.getAggregateOutputFile();
    }

    public void setAggregateOutputFile(String aggregateOutputFile)
    {
        bean.setAggregateOutputFile(aggregateOutputFile);
    }
    
}