/* ====================================================================
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2001 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Apache" and "Apache Software Foundation" and
 *    "Apache MavenSession" must not be used to endorse or promote products
 *    derived from this software without prior written permission. For
 *    written permission, please contact apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache",
 *    "Apache MavenSession", nor may "Apache" appear in their name, without
 *    prior written permission of the Apache Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 *
 * ====================================================================
 */
package org.apache.maven.hibernate.jelly;

import org.apache.commons.jelly.JellyTagException;
import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
import org.apache.maven.hibernate.beans.SchemaExportBean;

/**
 * 
 * Jelly tag which delagates all calls 
 * to {@link SchemaExportBean}
 * 
 * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a> 
 * @version $Id: SchemaExportTag.java,v 1.1 2003/05/15 13:06:25 michal Exp $
 */
public class SchemaExportTag extends TagSupport
{

   private SchemaExportBean bean = new SchemaExportBean();

   /**
    * 
    */
   protected void execute() throws JellyTagException
   {
      try
      {
         bean.execute();
      }
      catch (Exception e)
      {
         String msg = " Schema Export failed";
         throw new JellyTagException(msg, e);
      }

   }

   /**
    * @see org.apache.commons.jelly.Tag#doTag(org.apache.commons.jelly.XMLOutput)
    */
   public void doTag(XMLOutput arg0) throws JellyTagException
   {
      execute();
   }

   /**
    * @return
    */
   public boolean getText()
   {
      return bean.getText();
   }

   /* (non-Javadoc)
    * @see java.lang.Object#toString()
    */
   public String toString()
   {
      return bean.toString();
   }

   /**
    * @return
    */
   public boolean getQuiet()
   {
      return bean.getQuiet();
   }

   /**
    * @param string
    */
   public void setExcludes(String string)
   {
      bean.setExcludes(string);
   }

   /**
    * @param b
    */
   public void setDrop(boolean b)
   {
      bean.setDrop(b);
   }

   /**
    * @param string
    */
   public void setIncludes(String string)
   {
      bean.setIncludes(string);
   }

   /**
    * @return
    */
   public String getOutputFile()
   {
      return bean.getOutputFile();
   }

   /**
    * @return
    */
   public String getExcludes()
   {
      return bean.getExcludes();
   }

   /**
    * @param string
    */
   public void setOutputFile(String string)
   {
      bean.setOutputFile(string);
   }

   /**
    * @return
    */
   public boolean isDrop()
   {
      return bean.isDrop();
   }

   /**
    * @param string
    */
   public void setConfig(String string)
   {
      bean.setConfig(string);
   }

   /**
    * @return
    */
   public String getIncludes()
   {
      return bean.getIncludes();
   }

   /**
    * @return
    */
   public String getBasedir()
   {
      return bean.getBasedir();
   }

   /**
    * @return
    */
   public String getProperties()
   {
      return bean.getProperties();
   }

   /**
    * @return
    */
   public String getConfig()
   {
      return bean.getConfig();
   }

   /**
    * @param b
    */
   public void setText(boolean b)
   {
      bean.setText(b);
   }

   /**
    * @param string
    */
   public void setBasedir(String string)
   {
      bean.setBasedir(string);
   }

   /**
    * @param b
    */
   public void setQuiet(boolean b)
   {
      bean.setQuiet(b);
   }

   /**
    * @param string
    */
   public void setProperties(String string)
   {
      bean.setProperties(string);
   }

}
