Home » jboss-javaee-sources » javax.enterprise.deploy » spi » [javadoc | source]

    1   /*
    2   * JBoss, Home of Professional Open Source
    3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
    4   * by the @authors tag. See the copyright.txt in the distribution for a
    5   * full listing of individual contributors.
    6   *
    7   * This is free software; you can redistribute it and/or modify it
    8   * under the terms of the GNU Lesser General Public License as
    9   * published by the Free Software Foundation; either version 2.1 of
   10   * the License, or (at your option) any later version.
   11   *
   12   * This software is distributed in the hope that it will be useful,
   13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   15   * Lesser General Public License for more details.
   16   *
   17   * You should have received a copy of the GNU Lesser General Public
   18   * License along with this software; if not, write to the Free
   19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
   21   */
   22   package javax.enterprise.deploy.spi;
   23   
   24   import java.io.InputStream;
   25   import java.io.OutputStream;
   26   
   27   import javax.enterprise.deploy.model.DDBeanRoot;
   28   import javax.enterprise.deploy.model.DeployableObject;
   29   import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException;
   30   import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
   31   
   32   /**
   33    * A container for server specific configuration for a top level deployment.
   34    *
   35    * @author <a href="mailto:adrian@jboss.org">Adrian Brock</a>
   36    * @version $Revision: 37459 $
   37    */
   38   public interface DeploymentConfiguration
   39   {
   40      // Constants -----------------------------------------------------
   41      
   42      // Public --------------------------------------------------------
   43   
   44      /**
   45       * Return an object that provides access to the deployment descriptor
   46       *
   47       * @return the deployable object
   48       */
   49      DeployableObject getDeployableObject();
   50      
   51      /**
   52       * Return the top level configuration for a deployment descriptor
   53       *
   54       * @param bean the root of the deployment descriptor
   55       * @return the configuration
   56       * @throws ConfigurationException for an error in the deployment descriptor
   57       */
   58      DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean) throws ConfigurationException;
   59      
   60      /**
   61       * Remove a root configuration and all its children
   62       *
   63       * @param bean the configuration
   64       * @throws BeanNotFoundException when the bean is not found
   65       */
   66      void removeDConfigBean(DConfigBeanRoot bean) throws BeanNotFoundException;
   67      
   68      /**
   69       * Restore a configuration from an input stream
   70       *
   71       * @param input the input stream
   72       * @param bean the deployment descriptor
   73       * @return the configuration
   74       * @throws ConfigurationException when there is an error in the configuration
   75       */
   76      DConfigBeanRoot restoreDConfigBean(InputStream input, DDBeanRoot bean) throws ConfigurationException;
   77      
   78      /**
   79       * Save a configuration to an output stream
   80       *
   81       * @param output the output stream
   82       * @param bean the configuration
   83       * @throws ConfigurationException when there is an error in the configuration
   84       */
   85      void saveDConfigBean(OutputStream output, DConfigBeanRoot bean) throws ConfigurationException;
   86   
   87      /**
   88       * Restores a full set of configuration beans
   89       *
   90       * @param input the input stream
   91       * @throws ConfigurationException for an error in the configuration
   92       */
   93      void restore(InputStream input) throws ConfigurationException;
   94      
   95      /**
   96       * Saves the fulls set of configuration beans
   97       *
   98       * @param output the output stream
   99       * @throws ConfigurationException for an error in the configuration
  100       */
  101      void save(OutputStream output) throws ConfigurationException;
  102   }

Home » jboss-javaee-sources » javax.enterprise.deploy » spi » [javadoc | source]