01: /*
02: * Copyright (c) 1998-2004 Caucho Technology -- all rights reserved
03: *
04: * This file is part of Resin(R) Open Source
05: *
06: * Each copy or derived work must preserve the copyright notice and this
07: * notice unmodified.
08: *
09: * Resin Open Source is free software; you can redistribute it and/or modify
10: * it under the terms of the GNU General Public License as published by
11: * the Free Software Foundation; either version 2 of the License, or
12: * (at your option) any later version.
13: *
14: * Resin Open Source is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17: * of NON-INFRINGEMENT. See the GNU General Public License for more
18: * details.
19: *
20: * You should have received a copy of the GNU General Public License
21: * along with Resin Open Source; if not, write to the
22: * Free SoftwareFoundation, Inc.
23: * 59 Temple Place, Suite 330
24: * Boston, MA 02111-1307 USA
25: *
26: * @author Scott Ferguson
27: */
28:
29: package javax.enterprise.deploy.spi;
30:
31: import javax.enterprise.deploy.model.DDBeanRoot;
32: import javax.enterprise.deploy.model.DeployableObject;
33: import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException;
34: import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
35: import java.io.InputStream;
36: import java.io.OutputStream;
37:
38: /**
39: * Top-level configuration.
40: */
41: public interface DeploymentConfiguration {
42: /**
43: * Returns an interface to the descriptor.
44: */
45: public DeployableObject getDeployableObject();
46:
47: /**
48: * Returns an interface to the descriptor.
49: */
50: public DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean)
51: throws ConfigurationException;
52:
53: /**
54: * Removes a config bean
55: */
56: public void removeDConfigBean(DConfigBeanRoot bean)
57: throws BeanNotFoundException;
58:
59: /**
60: * Restores a config bean
61: */
62: public DConfigBeanRoot restoreDConfigBean(
63: InputStream archiveStream, DDBeanRoot bean)
64: throws ConfigurationException;
65:
66: /**
67: * Saves a config bean
68: */
69: public void saveDConfigBean(OutputStream archiveStream,
70: DDBeanRoot bean) throws ConfigurationException;
71:
72: /**
73: * Restores the configuration.
74: */
75: public void restore(InputStream archiveStream)
76: throws ConfigurationException;
77:
78: /**
79: * Saves the configuration.
80: */
81: public void save(OutputStream archiveStream)
82: throws ConfigurationException;
83: }
|