[geronimo-j2ee-deployment-1.1-spec] 01/02: Imported Upstream version 1.1

Eugenio Cano-Manuel zero123-guest at alioth.debian.org
Mon Sep 2 12:08:23 UTC 2013


This is an automated email from the git hooks/post-receive script.

zero123-guest pushed a commit to branch master
in repository geronimo-j2ee-deployment-1.1-spec.

commit bd003662d8a7065cc7f476317d4f0c3883fbff85
Author: Eugenio Cano-Manuel <eugeniocanom at gmail.com>
Date:   Fri Aug 30 11:11:52 2013 +0200

    Imported Upstream version 1.1
---
 LICENSE.txt                                        |  203 +++++++++++
 NOTICE.txt                                         |    6 +
 pom.xml                                            |   44 +++
 .../java/javax/enterprise/deploy/model/DDBean.java |  116 +++++++
 .../javax/enterprise/deploy/model/DDBeanRoot.java  |  112 ++++++
 .../enterprise/deploy/model/DeployableObject.java  |  145 ++++++++
 .../deploy/model/J2eeApplicationObject.java        |  121 +++++++
 .../javax/enterprise/deploy/model/XpathEvent.java  |  122 +++++++
 .../enterprise/deploy/model/XpathListener.java     |   40 +++
 .../model/exceptions/DDBeanCreateException.java    |   52 +++
 .../javax/enterprise/deploy/shared/ActionType.java |  118 +++++++
 .../enterprise/deploy/shared/CommandType.java      |  127 +++++++
 .../deploy/shared/DConfigBeanVersionType.java      |  116 +++++++
 .../javax/enterprise/deploy/shared/ModuleType.java |  142 ++++++++
 .../javax/enterprise/deploy/shared/StateType.java  |  121 +++++++
 .../shared/factories/DeploymentFactoryManager.java |  158 +++++++++
 .../javax/enterprise/deploy/spi/DConfigBean.java   |  132 +++++++
 .../enterprise/deploy/spi/DConfigBeanRoot.java     |   62 ++++
 .../deploy/spi/DeploymentConfiguration.java        |  117 +++++++
 .../enterprise/deploy/spi/DeploymentManager.java   |  360 ++++++++++++++++++++
 .../java/javax/enterprise/deploy/spi/Target.java   |   45 +++
 .../enterprise/deploy/spi/TargetModuleID.java      |   82 +++++
 .../spi/exceptions/BeanNotFoundException.java      |   42 +++
 .../spi/exceptions/ClientExecuteException.java     |   51 +++
 .../spi/exceptions/ConfigurationException.java     |   58 ++++
 .../DConfigBeanVersionUnsupportedException.java    |   41 +++
 .../DeploymentManagerCreationException.java        |   43 +++
 .../spi/exceptions/InvalidModuleException.java     |   42 +++
 .../exceptions/OperationUnsupportedException.java  |   44 +++
 .../deploy/spi/exceptions/TargetException.java     |   45 +++
 .../deploy/spi/factories/DeploymentFactory.java    |  109 ++++++
 .../deploy/spi/status/ClientConfiguration.java     |   46 +++
 .../deploy/spi/status/DeploymentStatus.java        |   87 +++++
 .../deploy/spi/status/ProgressEvent.java           |   74 ++++
 .../deploy/spi/status/ProgressListener.java        |   42 +++
 .../deploy/spi/status/ProgressObject.java          |  122 +++++++
 src/site/site.xml                                  |   37 ++
 .../enterprise/deploy/model/XPathEventTest.java    |   56 +++
 .../enterprise/deploy/shared/ActionTypeTest.java   |   65 ++++
 .../enterprise/deploy/shared/CommandTypeTest.java  |   68 ++++
 .../deploy/shared/DConfigBeanVersionTypeTest.java  |   63 ++++
 .../enterprise/deploy/shared/ModuleTypeTest.java   |   75 ++++
 .../enterprise/deploy/shared/StateTypeTest.java    |   65 ++++
 .../factories/DeploymentFactoryManagerTest.java    |  154 +++++++++
 .../deploy/spi/MockDeploymentManager.java          |  127 +++++++
 .../spi/factories/MockDeploymentFactory.java       |   62 ++++
 46 files changed, 4159 insertions(+)

diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.
+
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 0000000..3b4090d
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,6 @@
+Apache Geronimo 
+Copyright 2003-2006 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..a6f630d
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+
+<!-- $Rev: 487002 $ $Date: 2006-12-14 07:40:03 +0100 (Thu, 14 Dec 2006) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>specs</artifactId>
+        <version>1.2</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>geronimo-j2ee-deployment_1.1_spec</artifactId>
+    <name>J2EE Deployment 1.1</name>
+    <version>1.1</version>
+
+
+  <scm>
+    <connection>scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-j2ee-deployment_1.1_spec-1.1</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-j2ee-deployment_1.1_spec-1.1</developerConnection>
+    <url>https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-j2ee-deployment_1.1_spec-1.1</url>
+  </scm>
+</project>
diff --git a/src/main/java/javax/enterprise/deploy/model/DDBean.java b/src/main/java/javax/enterprise/deploy/model/DDBean.java
new file mode 100644
index 0000000..ffb12e3
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/model/DDBean.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.model;
+
+/**
+ * An interface for beans that represent a fragment of a standard deployment
+ * descriptor.  A link is provided to the J2EE application that includes this bean.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DDBean {
+    /**
+     * Returns the location in the deployment descriptor from which this bean is derived.
+     *
+     * @return The XPath of this Bean.
+     */
+    public String getXpath();
+
+    /**
+     * Returns the XML text for by this bean.
+     *
+     * @return The XML text for this Bean.
+     */
+    public String getText();
+
+    /**
+     * Returns the ATTLIST ID value for the XML tag defined by the Xpath for this bean.
+     *
+     * @return The XML text for this Bean or 'null' if no attribute was specifed with the tag.
+     */
+    public String getId();
+
+    /**
+     * Return the root element for this DDBean.
+     *
+     * @return The DDBeanRoot at the root of this DDBean tree.
+     */
+    public DDBeanRoot getRoot();
+
+    /**
+     * Return a list of DDBeans based upon the XPath.
+     *
+     * @param xpath An XPath string referring to a location in the same deployment descriptor as this standard bean.
+     *
+     * @return a list of DDBeans or 'null' if no matching XML data is found.
+     */
+    public DDBean[] getChildBean(String xpath);
+
+    /**
+     * Return a list of text values for a given XPath in the deployment descriptor.
+     *
+     * @param xpath An XPath.
+     *
+     * @return The list text values for this XPath or 'null' if no matching XML data is found.
+     */
+    public String[] getText(String xpath);
+
+    /**
+     * Register a listener for a specific XPath.
+     *
+     * @param xpath The XPath this listener is to be registered for.
+     * @param xpl The listener object.
+     */
+    public void addXpathListener(String xpath, XpathListener xpl);
+
+    /**
+     * Unregister a listener for a specific XPath.
+     *
+     * @param xpath The XPath this listener is to be registered for.
+     * @param xpl The listener object.
+     */
+    public void removeXpathListener(String xpath, XpathListener xpl);
+
+    /**
+     * Returns the list of attribute names associated with XML element.
+     *
+     * @since 1.1
+     *
+     * @return a list of attribute names on this element.  Null
+     * is returned if there are no attributes.
+     */
+    public String[] getAttributeNames();
+
+    /**
+     * Returns the string value of the named attribute.
+     *
+     * @since 1.1
+     *
+     * @return the value of the attribute.  Null is returned
+     *   if there is no such attribute.
+     */
+    public String getAttributeValue(String attrName);
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/model/DDBeanRoot.java b/src/main/java/javax/enterprise/deploy/model/DDBeanRoot.java
new file mode 100644
index 0000000..6a1375a
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/model/DDBeanRoot.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.model;
+
+import javax.enterprise.deploy.shared.ModuleType;
+
+/**
+ * An interface that represents the root of a standard deployment descriptor.
+ * A DDBeanRoot is a type of DDBean.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DDBeanRoot extends DDBean {
+    /**
+     * Return the ModuleType of deployment descriptor.
+     *
+     * @return The ModuleType of deployment descriptor
+     */
+    public ModuleType getType();
+
+    /**
+     * Return the containing DeployableObject
+     *
+     * @return The DeployableObject that contains this deployment descriptor
+     */
+    public DeployableObject getDeployableObject();
+
+    /**
+     * A convenience method to return the DTD version number. The DeployableObject has this information.
+     *
+     * Note: the method getDDBeanRootVersion() is preferred to this method.
+     * @see #getDDBeanRootVersion
+     *
+     * @return a string containing the DTD version number
+     */
+    public String getModuleDTDVersion();
+
+    /**
+     * A convenience method to return the version number of an
+     * XML instance document.  This method is replacing the
+     * method DeployableObject.getModuleDTDVersion, because
+     * it returns the version number of any J2EE XML instance document
+     *
+     * @return <p>a string that is the version number of the XML instance document.
+     *  Null is returned if no version number can be found.</p>
+     * <p>A module's deployment descriptor file always contains
+     * a document type identifier, DOCTYPE.  The DOCTYPE statement
+     * contains the module DTD version number in the label of the
+     * statement.</p>
+     * <p>The format of the DOCTYPE statement is:</p>
+     * <pre><!DOCTYPE root_element PUBLIC "-//organization//label//language" "location"></pre>
+     * <dl>
+     *   <dt>root_element</dt><dd>is the name of the root document in the DTD.</dd>
+     *   <dt>organization</dt><dd>is the name of the organization responsible
+     * for the creation and maintenance of the DTD
+     * being referenced.</dd>
+     *   <dt>label</dt><dd>is a unique descriptive name for the public text being
+     * referenced.  </dd>
+     *   <dt>language</dt><dd>is the ISO 639 language id representing the natural
+     * language encoding of th DTD.</dd>
+     *   <dt>location</dt><dd>is the URL of the DTD.</dd>
+     * </dl>
+     * <p>An example J2EE deployment descriptor DOCTYPE statement is:</p>
+     * <pre><!DOCTYPE application-client PUBLIC
+     *                "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN"
+     *                "http://java.sun.com/dtd/application-client_1_3.dtd"></pre>
+     * <p>In this example the label is, "DTD J2EE Application Client 1.3",
+     * and the DTD version number is 1.3. A call to getModuleDTDVersion
+     * would return a string containing, "1.3".</p>
+     */
+    public String getDDBeanRootVersion();
+
+    /**
+     * Return the XPath for this standard bean. The root XPath is "/".
+     * 
+     * @return "/" this is the root standard bean.
+     */
+    public String getXpath();
+
+    /**
+     * Returns the filename relative to the root of the module of the XML instance document this
+     * DDBeanRoot represents.
+     *
+     * @since 1.1
+     *
+     *  @return String the filename relative to the root of the module
+     */
+    public String getFilename();
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/model/DeployableObject.java b/src/main/java/javax/enterprise/deploy/model/DeployableObject.java
new file mode 100644
index 0000000..feb1b24
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/model/DeployableObject.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.model;
+
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import javax.enterprise.deploy.model.exceptions.DDBeanCreateException;
+import javax.enterprise.deploy.shared.ModuleType;
+
+/**
+ * The DeployableObject interface is an abstract representation of a J2EE deployable
+ * module (JAR, WAR, RAR, EAR).  A DeployableObject provides access to the module's
+ * deployment descriptor and class files.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DeployableObject {
+    /**
+     * Return the ModuleType of deployment descriptor (i.e., EAR, JAR, WAR, RAR)
+     * this deployable object represents. Values are found in DeploymentManager.
+     *
+     * @return The ModuleType of deployable object
+     */
+    public ModuleType getType();
+
+    /**
+     * Return the top level standard bean representing the root of the deployment descriptor.
+     *
+     * @return A standard bean representing the deployment descriptor.
+     */
+    public DDBeanRoot getDDBeanRoot();
+
+    /**
+     * Return an array of standard beans representing the XML content returned based upon the XPath.
+     *
+     * @param xpath AAn XPath string identifying the data to be extracted from the deployment descriptor.
+     *
+     * @return an array of DDBeans or <code>null</code> if no matching data is found.
+     */
+    public DDBean[] getChildBean(String xpath);
+
+    /**
+     *
+     * @param xpath An xpath string referring to a location in the deployment descriptor
+     *
+     * @return a list XML content or <code>null</code> if no matching data is found.
+     */
+    public String[] getText(String xpath);
+
+    /**
+     * Retrieve the specified class from this deployable module.
+     * <p>One use: to get all finder methods from an EJB.  If the tool is attempting to package a
+     * module and retrieve a class from the package, the class request may fail. The class may
+     * not yet be available. The tool should respect the manifest Class-Path entries.</p>
+     *
+     * @param className Class to retrieve.
+     *
+     * @return Class representation of the class
+     */
+    public Class getClassFromScope(String className);
+
+    /**
+     * A convenience method to return the deployment descriptor
+     * document version number of the primary deployment descriptor
+     * for the module (e.g. web.xml, ejb-jar.xml, ra.xml, application.xml,
+     * and  application-client.xml.)  The version number for documents
+     * webservices.xml , webservicesclient.xml and the like are not returned
+     * by this method.  DDBeanRoot.getDDBeanRootVersion should be used
+     * instead.
+     *
+     * This method is being deprecated.  DDBeanRoot.getDDBeanRootVersion
+     * should be used instead.
+     *
+     * @deprecated As of version 1.1, replace by DDBeanRoot.getDDBeanRootVersion()
+     *
+     * @return a string that is the version number of the XML instance document.
+     *  Null is returned if no version number can be found.
+     */
+    public String getModuleDTDVersion();
+
+    /**
+     * Returns a DDBeanRoot object for the XML instance document named.
+     * This method should be used to return DDBeanRoot objects for non deployment
+     * descriptor XML instance documents such as WSDL files.
+     *
+     * @since 1.1
+     *
+     * @param filename the full path name from the root of the module of the xml
+     *        instance document for which a DDBeanRoot object is to be returned.
+     *
+     * @return a DDBeanRoot object for the XML data.
+     *
+     * @throws java.io.FileNotFoundException if the named file can not be found
+     * @throws javax.enterprise.deploy.model.exceptions.DDBeanCreateException
+     *         if an error is encountered creating the DDBeanRoot object.
+     */
+    public DDBeanRoot getDDBeanRoot(String filename) throws FileNotFoundException, DDBeanCreateException;
+
+    /**
+     * Returns an enumeration of the module file entries.  All elements in the
+     * enumeration are of type String.  Each String represents a file name relative
+     * to the root of the module.
+     *
+     * @since 1.1
+     *
+     * @return an enumeration of the archive file entries.
+     */
+    public Enumeration entries();
+
+    /**
+     * Returns the InputStream for the given entry name.
+     * The file name must be relative to the root of the module.
+     *
+     * @since 1.1
+     *
+     * @param name the file name relative to the root of the module.
+     *
+     * @return the InputStream for the given entry name or null if not found.
+     */
+    public InputStream getEntry(String name);
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/model/J2eeApplicationObject.java b/src/main/java/javax/enterprise/deploy/model/J2eeApplicationObject.java
new file mode 100644
index 0000000..0048369
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/model/J2eeApplicationObject.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.model;
+
+import javax.enterprise.deploy.shared.ModuleType;
+
+/**
+ * J2eeApplicationObject is an interface that represents a J2EE application (EAR);
+ * it maintains a DeployableObject for each module in the archive.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface J2eeApplicationObject extends DeployableObject {
+    /**
+     * Return the DeployableObject of the specified URI designator.
+     *
+     * @param uri Describes where to get the module from.
+     *
+     * @return the DeployableObject describing the j2ee module at this uri
+     *         or <code>null</code> if there is not match.
+     */
+    public DeployableObject getDeployableObject(String uri);
+
+    /**
+     * Return the all DeployableObjects of the specified type.
+     *
+     * @param type The type of module to return.
+     *
+     * @return the list of DeployableObjects describing the j2ee modules of
+     *         this type or <code>null</code> if there are no matches.
+     */
+    public DeployableObject[] getDeployableObjects(ModuleType type);
+
+    /**
+     * Return the all DeployableObjects in this application.
+     *
+     * @return the DeployableObject instances describing the j2ee modules in
+     *         this application or <code>null</code> if there are none available.
+     */
+    public DeployableObject[] getDeployableObjects();
+
+    /**
+     * Return the list of URIs of the designated module type.
+     *
+     * @param type The type of module to return.
+     *
+     * @return the Uris of the contained modules or <code>null</code> if there
+     *         are no matches.
+     */
+    public String[] getModuleUris(ModuleType type);
+
+    /**
+     * Return the list of URIs for all modules in the application.
+     *
+     * @return the Uris of the contained modules or <code>null</code> if
+     *         the application is completely empty.
+     */
+    public String[] getModuleUris();
+
+    /**
+     * Return a list of DDBean instances based upon an XPath; all deployment
+     * descriptors of the specified type are searched.
+     *
+     * @param type  The type of deployment descriptor to query.
+     * @param xpath An XPath string referring to a location in the deployment descriptor
+     *
+     * @return The list of DDBeans or <code>null</code> if there are no matches.
+     */
+    public DDBean[] getChildBean(ModuleType type, String xpath);
+
+    /**
+     * Return the text value from the XPath; search only the deployment descriptors
+     * of the specified type.
+     *
+     * @param type  The type of deployment descriptor to query.
+     * @param xpath The xpath to query for.
+     *
+     * @return The text values of this xpath or <code>null</code> if there are no matches.
+     */
+    public String[] getText(ModuleType type, String xpath);
+
+    /**
+     * Register a listener for changes in XPath that are related to this deployableObject.
+     *
+     * @param type  The type of deployment descriptor to query.
+     * @param xpath The xpath to listen for.
+     * @param xpl   The listener.
+     */
+    public void addXpathListener(ModuleType type, String xpath, XpathListener xpl);
+
+    /**
+     * Unregister the listener for an XPath.
+     * @param type  The type of deployment descriptor to query.
+     * @param xpath The xpath to listen for.
+     * @param xpl   The listener.
+     */
+    public void removeXpathListener(ModuleType type, String xpath, XpathListener xpl);
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/model/XpathEvent.java b/src/main/java/javax/enterprise/deploy/model/XpathEvent.java
new file mode 100644
index 0000000..4262c3f
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/model/XpathEvent.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.model;
+
+import java.beans.PropertyChangeEvent;
+
+/**
+ * An Event class describing DDBeans being added to or removed from a J2EE
+ * application, or updated in place.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class XpathEvent {
+    /**
+     * Adding a DDBean
+     */
+    public static final Object BEAN_ADDED = new Object();
+    /**
+     * Removing a DDBean
+     */
+    public static final Object BEAN_REMOVED = new Object();
+    /**
+     * Changing a DDBean
+     */
+    public static final Object BEAN_CHANGED = new Object();
+
+    private PropertyChangeEvent pce;
+    private DDBean bean;
+    private Object type;
+
+    /**
+     * A description of a change in the DDBean tree.
+     *
+     * @param bean The DDBean being added, removed, or updated.
+     * @param type Indicates whether this is an add, remove, or update event.
+     */
+    public XpathEvent(DDBean bean, Object type) {
+        this.bean = bean;
+        this.type = type;
+    }
+
+    /**
+     * Gets the underlying property change event, with new and
+     * old values.  This is typically used for change events.
+     * It is not in the public API, but is included in the
+     * downloadable JSR-88 classes.
+     */
+    public PropertyChangeEvent getChangeEvent() {
+        return pce;
+    }
+
+    /**
+     * Sets the underlying property change event, with new and
+     * old values.  This is typically used for change events.
+     * It is not in the public API, but is included in the
+     * downloadable JSR-88 classes.
+     *
+     * @param pce The property change event that triggered this XpathEvent.
+     */
+    public void setChangeEvent(PropertyChangeEvent pce) {
+        this.pce = pce;
+    }
+
+    /**
+     * The bean being added/removed/changed.
+     *
+     * @return The bean being added/removed/changed.
+     */
+    public DDBean getBean() {
+        return bean;
+    }
+
+    /**
+     * Is this an add event?
+     *
+     * @return <code>true</code> if this is an add event.
+     */
+    public boolean isAddEvent() {
+        return BEAN_ADDED == type;
+    }
+
+    /**
+     * Is this a remove event?
+     *
+     * @return <code>true</code> if this is a remove event.
+     */
+    public boolean isRemoveEvent() {
+        return BEAN_REMOVED == type;
+    }
+
+    /**
+     * Is this a change event?
+     *
+     * @return <code>true</code> if this is a change event.
+     */
+    public boolean isChangeEvent() {
+        return BEAN_CHANGED == type;
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/model/XpathListener.java b/src/main/java/javax/enterprise/deploy/model/XpathListener.java
new file mode 100644
index 0000000..5097568
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/model/XpathListener.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.model;
+
+/**
+ * The listener interface for receiving XpathEvents
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface XpathListener {
+    /**
+     * Invoked when an XpathEvent is generated for this listener
+     *
+     * @param xpe The XpathEvent
+     */
+    public void fireXpathEvent(XpathEvent xpe);
+}
diff --git a/src/main/java/javax/enterprise/deploy/model/exceptions/DDBeanCreateException.java b/src/main/java/javax/enterprise/deploy/model/exceptions/DDBeanCreateException.java
new file mode 100644
index 0000000..468da68
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/model/exceptions/DDBeanCreateException.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.model.exceptions;
+
+/**
+ * This exception reports errors in generating a DDBean.
+ *
+ * @since 1.1
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class DDBeanCreateException extends Exception {
+    /**
+     * Creates new <code>DDBeanCreateException</code> without detail message.
+     */
+    public DDBeanCreateException() {
+        super();
+    }
+
+    /**
+     * Constructs an <code>DDBeanCreateException</code> with the
+     * specified detail message.
+     *
+     * @param msg the detail message.
+     */
+    public DDBeanCreateException(String msg) {
+        super(msg);
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/shared/ActionType.java b/src/main/java/javax/enterprise/deploy/shared/ActionType.java
new file mode 100644
index 0000000..34e2e2c
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/shared/ActionType.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+/**
+ * Class ActionTypes defines enumeration values for the J2EE DeploymentStatus
+ * actions.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class ActionType {
+    /**
+     * The action is currently executing.
+     */
+    public static final ActionType EXECUTE = new ActionType(0);
+    /**
+     * The action has been canceled.
+     */
+    public static final ActionType CANCEL = new ActionType(1);
+    /**
+     * A stop operation is being performed on the DeploymentManager action command.
+     */
+    public static final ActionType STOP = new ActionType(2);
+
+    private static final ActionType[] enumValueTable = new ActionType[]{
+        EXECUTE,
+        CANCEL,
+        STOP,
+    };
+
+    private static final String[] stringTable = new String[]{
+        "execute",
+        "cancel",
+        "stop",
+    };
+
+    private int value;
+
+    /**
+     * Construct a new enumeration value with the given integer value.
+     */
+    protected ActionType(int value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns this enumeration value's integer value.
+     *
+     * @return the value
+     */
+    public int getValue() {
+        return value;
+    }
+
+    /**
+     * Returns the string table for class ActionType
+     */
+    protected String[] getStringTable() {
+        return stringTable;
+    }
+
+    /**
+     * Returns the enumeration value table for class ActionType
+     */
+    protected ActionType[] getEnumValueTable() {
+        return enumValueTable;
+    }
+
+    /**
+     * Return an object of the specified value.
+     *
+     * @param value a designator for the object.
+     */
+    public static ActionType getActionType(int value) {
+        return enumValueTable[value];
+    }
+
+    /**
+     * Return the string name of this ActionType or the integer value if
+     * outside the bounds of the table
+     */
+    public String toString() {
+        return (value >= 0 && value <= 2) ? stringTable[value] : String.valueOf(value);
+    }
+
+    /**
+     * Returns the lowest integer value used by this enumeration value's
+     * enumeration class.
+     *
+     * @return the offset of the lowest enumeration value.
+     */
+    protected int getOffset() {
+        return 0;
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/shared/CommandType.java b/src/main/java/javax/enterprise/deploy/shared/CommandType.java
new file mode 100644
index 0000000..dba9632
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/shared/CommandType.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+/**
+ * Defines enumerated values for the available deployment commands.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class CommandType {
+    /**
+     * The DeploymentManger action operation being processed is distribute.
+     */
+    public static final CommandType DISTRIBUTE = new CommandType(0);
+    /**
+     * The DeploymentManger action operation being processed is start.
+     */
+    public static final CommandType START = new CommandType(1);
+    /**
+     * The DeploymentManger action operation being processed is stop.
+     */
+    public static final CommandType STOP = new CommandType(2);
+    /**
+     * The DeploymentManger action operation being processed is undeploy.
+     */
+    public static final CommandType UNDEPLOY = new CommandType(3);
+    /**
+     * he DeploymentManger action operation being processed is redeploy.
+     */
+    public static final CommandType REDEPLOY = new CommandType(4);
+
+    private static final CommandType[] enumValueTable = new CommandType[]{
+        DISTRIBUTE,
+        START,
+        STOP,
+        UNDEPLOY,
+        REDEPLOY,
+    };
+
+    private static final String[] stringTable = new String[]{
+        "distribute",
+        "start",
+        "stop",
+        "undeploy",
+        "redeploy",
+    };
+
+    private int value;
+
+    /**
+     * Construct a new enumeration value with the given integer value.
+     */
+    protected CommandType(int value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns this enumeration value's integer value.
+     */
+    public int getValue() {
+        return value;
+    }
+
+    /**
+     * Returns the string table for class CommandType
+     */
+    protected String[] getStringTable() {
+        return stringTable;
+    }
+
+    /**
+     * Returns the enumeration value table for class CommandType
+     */
+    protected CommandType[] getEnumValueTable() {
+        return enumValueTable;
+    }
+
+    /**
+     * Return an object of the specified value.
+     *
+     * @param value a designator for the object.
+     */
+    public static CommandType getCommandType(int value) {
+        return enumValueTable[value];
+    }
+
+    /**
+     * Return the string name of this CommandType or the integer value if
+     * outside the bounds of the table
+     */
+    public String toString() {
+        return (value >= 0 && value <= 4) ? stringTable[value] : String.valueOf(value);
+    }
+
+    /**
+     * Returns the lowest integer value used by this enumeration value's
+     * enumeration class.
+     *
+     * @return the offset of the lowest enumeration value.
+     */
+    protected int getOffset() {
+        return 0;
+    }
+}
diff --git a/src/main/java/javax/enterprise/deploy/shared/DConfigBeanVersionType.java b/src/main/java/javax/enterprise/deploy/shared/DConfigBeanVersionType.java
new file mode 100644
index 0000000..414c718
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/shared/DConfigBeanVersionType.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+/**
+ * Class DConfigBeanVersionTypes defines enumeration values for the J2EE
+ * Platform verion number.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class DConfigBeanVersionType {
+    /**
+     * J2EE Platform version 1.3
+     */
+    public static final DConfigBeanVersionType V1_3 = new DConfigBeanVersionType(0);
+    /**
+     * J2EE Platform version 1.3.1
+     */
+    public static final DConfigBeanVersionType V1_3_1 = new DConfigBeanVersionType(1);
+    /**
+     * J2EE Platform version 1.4
+     */
+    public static final DConfigBeanVersionType V1_4 = new DConfigBeanVersionType(2);
+
+    private static final DConfigBeanVersionType[] enumValueTable = {
+        V1_3,
+        V1_3_1,
+        V1_4,
+    };
+
+    private static final String[] stringTable = {
+        "V1_3",
+        "V1_3_1",
+        "V1_4",
+    };
+
+    private int value;
+
+    /**
+     * Construct a new enumeration value with the given integer value.
+     */
+    protected DConfigBeanVersionType(int value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns this enumeration value's integer value.
+     */
+    public int getValue() {
+        return value;
+    }
+
+    /**
+     * Returns the string table for class DConfigBeanVersionType
+     */
+    protected String[] getStringTable() {
+        return stringTable;
+    }
+
+    /**
+     * Returns the enumeration value table for class DConfigBeanVersionType
+     */
+    protected DConfigBeanVersionType[] getEnumValueTable() {
+        return enumValueTable;
+    }
+
+    /**
+     * Return an object of the specified value.
+     *
+     * @param value a designator for the object.
+     */
+    public static DConfigBeanVersionType getDConfigBeanVersionType(int value) {
+        return enumValueTable[value];
+    }
+
+    /**
+     * Return the string name of this DConfigBeanVersionType or the integer
+     * value if outside the bounds of the table
+     */
+    public String toString() {
+        return (value >= 0 && value <= 2) ? getStringTable()[value] : String.valueOf(value);
+    }
+
+    /**
+     * Returns the lowest integer value used by this enumeration value's
+     * enumeration class.
+     *
+     * @return the offset of the lowest enumeration value.
+     */
+    protected int getOffset() {
+        return 0;
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/shared/ModuleType.java b/src/main/java/javax/enterprise/deploy/shared/ModuleType.java
new file mode 100644
index 0000000..e62e897
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/shared/ModuleType.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+/**
+ * Class ModuleTypes defines enumeration values for the J2EE module types.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class ModuleType {
+    /**
+     * The module is an EAR archive.
+     */
+    public static final ModuleType EAR = new ModuleType(0);
+    /**
+     * The module is an Enterprise Java Bean archive.
+     */
+    public static final ModuleType EJB = new ModuleType(1);
+    /**
+     * The module is an Client Application archive.
+     */
+    public static final ModuleType CAR = new ModuleType(2);
+    /**
+     * The module is an Connector archive.
+     */
+    public static final ModuleType RAR = new ModuleType(3);
+    /**
+     * The module is an Web Application archive.
+     */
+    public static final ModuleType WAR = new ModuleType(4);
+
+    private static final ModuleType[] enumValueTable = {
+        EAR,
+        EJB,
+        CAR,
+        RAR,
+        WAR,
+    };
+
+    private static final String[] stringTable = {
+        "ear",
+        "ejb",
+        "car",
+        "rar",
+        "war",
+    };
+
+    private static final String[] moduleExtensionTable = {
+        ".ear",
+        ".jar",
+        ".jar",
+        ".rar",
+        ".war",
+    };
+
+    private int value;
+
+    /**
+     * Construct a new enumeration value with the given integer value.
+     */
+    protected ModuleType(int value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns this enumeration value's integer value.
+     */
+    public int getValue() {
+        return value;
+    }
+
+    /**
+     * Returns the string table for class ModuleType
+     */
+    protected String[] getStringTable() {
+        return stringTable;
+    }
+
+    /**
+     * Returns the enumeration value table for class ModuleType
+     */
+    protected ModuleType[] getEnumValueTable() {
+        return enumValueTable;
+    }
+
+    /**
+     * Return the file extension string for this enumeration.
+     */
+    public String getModuleExtension() {
+        return moduleExtensionTable[value];
+    }
+
+    /**
+     * Return an object of the specified value.
+     *
+     * @param value a designator for the object.
+     */
+    public static ModuleType getModuleType(int value) {
+        return enumValueTable[value];
+    }
+
+    /**
+     * Return the string name of this ModuleType or the integer value if
+     * outside the bounds of the table
+     */
+    public String toString() {
+        return (value >= 0 && value <= 4) ? stringTable[value] : String.valueOf(value);
+    }
+
+    /**
+     * Returns the lowest integer value used by this enumeration value's
+     * enumeration class.
+     *
+     * @return the offset of the lowest enumeration value.
+     */
+    protected int getOffset() {
+        return 0;
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/shared/StateType.java b/src/main/java/javax/enterprise/deploy/shared/StateType.java
new file mode 100644
index 0000000..be64768
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/shared/StateType.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+/**
+ * Defines enumeration values for the various states of a deployment action.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class StateType {
+    /**
+     * The action operation is running normally.
+     */
+    public static final StateType RUNNING = new StateType(0);
+    /**
+     * The action operation has completed normally.
+     */
+    public static final StateType COMPLETED = new StateType(1);
+    /**
+     * The action operation has failed.
+     */
+    public static final StateType FAILED = new StateType(2);
+    /**
+     * The DeploymentManager is running in disconnected mode.
+     */
+    public static final StateType RELEASED = new StateType(3);
+
+    private static final StateType[] enumValueTable = {
+        RUNNING,
+        COMPLETED,
+        FAILED,
+        RELEASED,
+    };
+
+    private static final String[] stringTable = {
+        "running",
+        "completed",
+        "failed",
+        "released",
+    };
+
+    private int value;
+
+    /**
+     * Construct a new enumeration value with the given integer value.
+     */
+    protected StateType(int value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns this enumeration value's integer value.
+     */
+    public int getValue() {
+        return value;
+    }
+
+    /**
+     * Returns the string table for class StateType
+     */
+    protected String[] getStringTable() {
+        return stringTable;
+    }
+
+    /**
+     * Returns the enumeration value table for class StateType
+     */
+    protected StateType[] getEnumValueTable() {
+        return enumValueTable;
+    }
+
+    /**
+     * Return an object of the specified value.
+     *
+     * @param value a designator for the object.
+     */
+    public static StateType getStateType(int value) {
+        return enumValueTable[value];
+    }
+
+    /**
+     * Return the string name of this StateType or the integer value if
+     * outside the bounds of the table
+     */
+    public String toString() {
+        return (value >= 0 && value <= 3) ? stringTable[value] : String.valueOf(value);
+    }
+
+    /**
+     * Returns the lowest integer value used by this enumeration value's
+     * enumeration class.
+     *
+     * @return the offset of the lowest enumeration value.
+     */
+    protected int getOffset() {
+        return 0;
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.java b/src/main/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.java
new file mode 100644
index 0000000..9019963
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared.factories;
+
+import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+/**
+ * The DeploymentFactoryManager class is a central registry for J2EE
+ * DeploymentFactory objects. The DeploymentFactoryManager retains references
+ * to DeploymentFactory objects loaded by a tool. A DeploymentFactory object
+ * provides a reference to a DeploymentManager. The DeploymentFactoryManager
+ * has been implemented as a singleton. A tool gets a reference to the
+ * DeploymentFactoryManager via the getInstance method. The
+ * DeploymentFactoryManager can return two types of DeploymentManagers, a
+ * connected DeploymentManager and a disconnected DeploymentManager. The
+ * connected DeploymentManager provides access to any product resources that
+ * may be required for configurations and deployment. The method to retrieve a
+ * connected DeploymentManager is getDeploymentManager. This method provides
+ * parameters for user name and password that the product may require for user
+ * authentication. A disconnected DeploymentManager does not provide access to
+ * a running J2EE product. The method to retrieve a disconnected
+ * DeploymentManager is getDisconnectedDeploymentManager. A disconnected
+ * DeploymentManager does not need user authentication information.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public final class DeploymentFactoryManager {
+    private static DeploymentFactoryManager instance;
+
+    private ArrayList deploymentFactories = new ArrayList();
+
+    private DeploymentFactoryManager() {
+    }
+
+    /**
+     * Retrieve the Singleton DeploymentFactoryManager
+     *
+     * @return DeploymentFactoryManager instance
+     */
+    public static DeploymentFactoryManager getInstance() {
+        if(instance == null) {
+            instance = new DeploymentFactoryManager();
+        }
+        return instance;
+    }
+
+    /**
+     * Retrieve the lists of currently registered DeploymentFactories.
+     *
+     * @return the list of DeploymentFactory objects or an empty array if there are none.
+     */
+    public DeploymentFactory[] getDeploymentFactories() {
+        return (DeploymentFactory[])deploymentFactories.toArray(new DeploymentFactory[deploymentFactories.size()]);
+    }
+
+    /**
+     * Retrieves a DeploymentManager instance to use for deployment. The caller
+     * provides a URI and optional username and password, and all registered
+     * DeploymentFactories will be checked. The first one to understand the URI
+     * provided will attempt to initiate a server connection and return a ready
+     * DeploymentManager instance.
+     *
+     * @param uri      The uri to check
+     * @param username An optional username (may be <tt>null</tt> if no
+     *                 authentication is required for this platform).
+     * @param password An optional password (may be <tt>null</tt> if no
+     *                 authentication is required for this platform).
+     *
+     * @return A ready DeploymentManager instance.
+     *
+     * @throws DeploymentManagerCreationException Occurs when the factory
+     *         appropriate to the specified URI was unable to initialize a
+     *         DeploymentManager instance (server down, unable to authenticate,
+     *         etc.).
+     */
+    public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException {
+        if(uri == null) {
+            throw new IllegalArgumentException("URI for DeploymentManager should not be null");
+        }
+        DeploymentManager manager = null;
+        for(Iterator i = deploymentFactories.iterator(); i.hasNext();) {
+            DeploymentFactory factory = (DeploymentFactory)i.next();
+            if(factory.handlesURI(uri)) {
+                manager = factory.getDeploymentManager(uri, username, password);
+                if(manager != null) {
+                    return manager;
+                }
+            }
+        }
+        throw new DeploymentManagerCreationException("Could not get DeploymentManager; No registered DeploymentFactory handles this URI");
+    }
+
+    /**
+     * Return a disconnected DeploymentManager instance.
+     *
+     * @param uri identifier of the disconnected DeploymentManager to return.
+     *
+     * @return A DeploymentManager instance.
+     *
+     * @throws DeploymentManagerCreationException occurs if the
+     *         DeploymentManager could not be created.
+     */
+    public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException {
+        if(uri == null) {
+            throw new IllegalArgumentException("URI for DeploymentManager should not be null");
+        }
+        DeploymentManager manager = null;
+        for(Iterator i = deploymentFactories.iterator(); i.hasNext();) {
+            DeploymentFactory factory = (DeploymentFactory)i.next();
+            if(factory.handlesURI(uri)) {
+                manager = factory.getDisconnectedDeploymentManager(uri);
+                if(manager != null) {
+                    return manager;
+                }
+            }
+        }
+        throw new DeploymentManagerCreationException("Could not get DeploymentManager; No registered DeploymentFactory handles this URI");
+    }
+
+    /**
+     * Registers a DeploymentFactory so it will be able to handle requests.
+     */ 
+    public void registerDeploymentFactory(DeploymentFactory factory) {
+        if(factory == null) {
+            throw new IllegalArgumentException("DeploymentFactory to register should not be null");
+        }
+        if(!deploymentFactories.contains(factory)) {
+            deploymentFactories.add(factory);
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/DConfigBean.java b/src/main/java/javax/enterprise/deploy/spi/DConfigBean.java
new file mode 100644
index 0000000..036483a
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/DConfigBean.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi;
+
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.model.XpathEvent;
+import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
+import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException;
+import java.beans.PropertyChangeListener;
+
+/**
+ * The interface for configuring a server-specific deployment descriptor, or subset of same.
+ * A DConfigBean corresponds to a specific location in a standard deployment descriptor,
+ * typically where values (such as names and roles) are used.
+ *
+ * <p>There are three different ways that DConfigBeans are created:</p>
+ *
+ * <ul>
+ *   <li><code>DeploymentConfigurator.getDConfigBean(DDBeanRoot)</code> is called by the
+ *       deployment tool to create a DConfigBeanRoot for each deployment descriptor in
+ *       the J2EE application.</li>
+ *   <li><code>DConfigBean.getDConfigBean(DDBean)</code> is called by the deployment
+ *       tool for each DDBean that corresponds to a relative XPath pattern given to the
+ *       deployment tool by the method <code>DConfigBean.getXpaths()</code>.</li>
+ *   <li>Each DConfigBean can structure its configurations as a tree-structure of
+ *       DConfigBeans; a DConfigBean can have properties of type DConfigBean or
+ *       DConfigBean[].</li>
+ * <ul>
+ *
+ * <p>The properties of DConfigBeans are displayed and edited by the deployment tool by
+ * using the JavaBean Property classes.</p>
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DConfigBean {
+    /**
+     * Return the JavaBean containing the deployment descriptor XML text associated with this DConfigBean.
+     *
+     * @return The bean class containing the XML text for this DConfigBean.
+     */
+    public DDBean getDDBean();
+
+    /**
+     * Return a list of XPaths designating the deployment descriptor information this
+     * DConfigBean requires.  Each server vendor may need to specify different
+     * server-specific information.  Each String returned by this method is an XPath
+     * describing a certain portion of the standard deployment descriptor for which
+     * there is corresponding server-specific configuration.
+     *
+     * @return a list of XPath Strings representing XML data to be retrieved or
+     *         <code>null</code> if there are none.
+     */
+    public String[] getXpaths();
+
+    /**
+     * Return the JavaBean containing the server-specific deployment configuration
+     * information based upon the XML data provided by the DDBean.
+     *
+     * @param bean The DDBean containing the XML data to be evaluated.
+     *
+     * @return The DConfigBean to display the server-specific properties for the standard bean.
+     *
+     * @throws ConfigurationException reports errors in generating a configuration bean.
+     *         This DDBean is considered undeployable to this server until this exception is
+     *         resolved.  A suitably descriptive message is required so the user can diagnose
+     *         the error.
+     */
+    public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException;
+
+    /**
+     * Remove a child DConfigBean from this bean.
+     *
+     * @param bean The child DConfigBean to be removed.
+     *
+     * @throws BeanNotFoundException the bean provided is not in the child list of this bean.
+     */
+    public void removeDConfigBean(DConfigBean bean) throws BeanNotFoundException;
+
+    /**
+     * A notification that the DDBean provided in the event has changed and this bean
+     * or its child beans need to reevaluate themselves.
+     *
+     * <p><i>It is advisable, though not declared explicitly in the specification, for a
+     * DConfigBean to receive change events for itself, and add or remove events for
+     * its direct children.  The DConfigBean implementation should not add or remove
+     * beans here if it will add or remove those beans again in response to a call to
+     * getDConfigBean or removeDConfigBean.</i></p>
+     *
+     * @see #getDConfigBean
+     * @see #removeDConfigBean
+     *
+     * @param event an event containing a reference to the DDBean which has changed.
+     */
+    public void notifyDDChange(XpathEvent event);
+
+    /**
+     * Register a property listener for this bean.
+     *
+     * @param pcl PropertyChangeListener to add
+     */
+    public void addPropertyChangeListener(PropertyChangeListener pcl);
+
+    /**
+     * Unregister a property listener for this bean.
+     *
+     * @param pcl Listener to remove.
+     */
+    public void removePropertyChangeListener(PropertyChangeListener pcl);
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/DConfigBeanRoot.java b/src/main/java/javax/enterprise/deploy/spi/DConfigBeanRoot.java
new file mode 100644
index 0000000..db712a7
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/DConfigBeanRoot.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi;
+
+import javax.enterprise.deploy.model.DDBeanRoot;
+
+/**
+ * The DConfigBeanRoot interface represent the root of a deployment descriptor.
+ * A DConfigBeanRoot is associated with a DDRoot object which in turn is associated
+ * with a specific deployment descriptor file.
+ *
+ * <p>Only DConfigBeanRoots are saved or restored by methods in
+ * DeploymentConfiguration.</p>
+ *
+ * @see DeploymentConfiguration
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DConfigBeanRoot extends DConfigBean {
+    /**
+     * Return a DConfigBean for a deployment descriptor that is not the module's
+     * primary deployment descriptor.   Web services provides a deployment descriptor
+     * in addition to the module's primary deployment descriptor.  Only the DDBeanRoot
+     * for this category of secondary deployment descriptors are to be passed as arguments
+     * through this method.
+     *
+     * Web service has two deployment descriptor files, one that defines the web service
+     * and one that defines a client of a web service.  See the Web Service specification for
+     * the details.
+     *
+     * @since 1.1
+     *
+     * @param ddBeanRoot represents the root element of a deployment descriptor file.
+     *
+     * @return a DConfigBean to be used for processing this deployment descriptor data. Null may be returned
+     *         if no DConfigBean is required for this deployment descriptor.
+     */
+    public DConfigBean getDConfigBean(DDBeanRoot ddBeanRoot);
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/DeploymentConfiguration.java b/src/main/java/javax/enterprise/deploy/spi/DeploymentConfiguration.java
new file mode 100644
index 0000000..26c354e
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/DeploymentConfiguration.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi;
+
+import javax.enterprise.deploy.model.DeployableObject;
+import javax.enterprise.deploy.model.DDBeanRoot;
+import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
+import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException;
+import java.io.OutputStream;
+import java.io.InputStream;
+
+/**
+ * An interface that defines a container for all the server-specific configuration
+ * information for a single top-level J2EE module.  The DeploymentConfiguration
+ * object could represent a single stand alone module or an EAR file that contains
+ * several sub-modules.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DeploymentConfiguration {
+    /**
+     * Returns an object that provides access to the deployment descriptor data
+     * and classes of a J2EE module.
+     *
+     * @return A DeployableObject
+     */
+    public DeployableObject getDeployableObject();
+
+    /**
+     * Returns the top level configuration bean, DConfigBeanRoot, associated with
+     * the deployment descriptor represented by the designated DDBeanRoot bean.
+     *
+     * @param bean The top level bean that represents the associated deployment descriptor.
+     *
+     * @return the DConfigBeanRoot for editing the server-specific properties required by the module.
+     *
+     * @throws ConfigurationException reports errors in generating a configuration bean
+     */
+    public DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean) throws ConfigurationException;
+
+    /**
+     * Remove the root DConfigBean and all its children.
+     *
+     * @param bean the top leve DConfigBean to remove.
+     *
+     * @throws BeanNotFoundException the bean provided is not in this beans child list.
+     */
+    public void removeDConfigBean(DConfigBeanRoot bean) throws BeanNotFoundException;
+
+    /**
+     * Restore from disk to instantated objects all the DConfigBeans associated with a
+     * specific deployment descriptor. The beans may be fully or partially configured.
+     *
+     * @param inputArchive The input stream for the file from which the DConfigBeans
+     *                     should be restored.
+     * @param bean         The DDBeanRoot bean associated with the deployment descriptor file.
+     *
+     * @return The top most parent configuration bean, DConfigBeanRoot
+     *
+     * @throws ConfigurationException reports errors in generating a configuration bean
+     */
+    public DConfigBeanRoot restoreDConfigBean(InputStream inputArchive, DDBeanRoot bean) throws ConfigurationException;
+
+    /**
+     * Save to disk all the configuration beans associated with a particular deployment
+     * descriptor file. The saved data may be fully or partially configured DConfigBeans.
+     * The output file format is recommended to be XML.
+     *
+     * @param outputArchive The output stream to which the DConfigBeans should be saved.
+     * @param bean          The top level bean, DConfigBeanRoot, from which to be save.
+     *
+     * @throws ConfigurationException reports errors in storing a configuration bean
+     */
+    public void saveDConfigBean(OutputStream outputArchive, DConfigBeanRoot bean) throws ConfigurationException;
+
+    /**
+     * Restore from disk to a full set of configuration beans previously stored.
+     *
+     * @param inputArchive The input stream from which to restore the Configuration.
+     *
+     * @throws ConfigurationException reports errors in generating a configuration bean
+     */
+    public void restore(InputStream inputArchive) throws ConfigurationException;
+
+    /**
+     * Save to disk the current set configuration beans created for this deployable
+     * module.  It is recommended the file format be XML.
+     *
+     * @param outputArchive The output stream to which to save the Configuration.
+     *
+     * @throws ConfigurationException reports errors in storing a configuration bean
+     */
+    public void save(OutputStream outputArchive) throws ConfigurationException;
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/DeploymentManager.java b/src/main/java/javax/enterprise/deploy/spi/DeploymentManager.java
new file mode 100644
index 0000000..2c02304
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/DeploymentManager.java
@@ -0,0 +1,360 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi;
+
+import javax.enterprise.deploy.spi.exceptions.DConfigBeanVersionUnsupportedException;
+import javax.enterprise.deploy.spi.exceptions.TargetException;
+import javax.enterprise.deploy.spi.exceptions.InvalidModuleException;
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import javax.enterprise.deploy.shared.DConfigBeanVersionType;
+import javax.enterprise.deploy.shared.ModuleType;
+import javax.enterprise.deploy.model.DeployableObject;
+import java.io.File;
+import java.io.InputStream;
+import java.util.Locale;
+
+/**
+ * The DeploymentManager object provides the core set of functions a J2EE platform
+ * must provide for J2EE application deployment. It provides server related
+ * information, such as, a list of deployment targets, and vendor unique runtime
+ * configuration information.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DeploymentManager {
+    /**
+     * Retrieve the list of deployment targets supported by this DeploymentManager.
+     *
+     * @return A list of deployment Target designators the user may select for
+     *         application deployment or <code>null</code> if there are none.
+     *
+     * @throws IllegalStateException is thrown when the method is called when
+     *         running in disconnected mode.
+     */
+    public Target[] getTargets() throws IllegalStateException;
+
+    /**
+     * Retrieve the list of J2EE application modules distributed to the identified
+     * targets and that are currently running on the associated server or servers.
+     *
+     * @param moduleType A predefined designator for a J2EE module type.
+     * @param targetList A list of deployment Target designators the user wants
+     *                   checked for module run status.
+     *
+     * @return An array of TargetModuleID objects representing the running modules
+     *         or <code>null</code> if there are none.
+     *
+     * @throws TargetException occurs when an invalid Target was provided.
+     * @throws IllegalStateException is thrown when the method is called when running
+     *         in disconnected mode.
+     */
+    public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException;
+
+    /**
+     * Retrieve the list of J2EE application modules distributed to the identified
+     * targets and that are currently not running on the associated server or servers.
+     *
+     * @param moduleType A predefined designator for a J2EE module type.
+     * @param targetList A list of deployment Target designators the user wants checked
+     *                   for module not running status.
+     *
+     * @return An array of TargetModuleID objects representing the non-running modules
+     *         or <code>null</code> if there are none.
+     *
+     * @throws TargetException occurs when an invalid Target was provided.
+     * @throws IllegalStateException is thrown when the method is called when running
+     *         in disconnected mode.
+     */
+    public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException;
+
+    /**
+     * Retrieve the list of all J2EE application modules running or not running on the
+     * identified targets.
+     *
+     * @param moduleType A predefined designator for a J2EE module type.
+     * @param targetList A list of deployment Target designators the user wants checked
+     *                   for module not running status.
+     *
+     * @return An array of TargetModuleID objects representing all deployed modules
+     *         running or not or <code>null</code> if there are no deployed modules.
+     *
+     * @throws TargetException occurs when an invalid Target was provided.
+     * @throws IllegalStateException is thrown when the method is called when running
+     *         in disconnected mode.
+     */
+    public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException;
+
+    /**
+     * Retrieve the object that provides server-specific deployment configuration
+     * information for the J2EE deployable component.
+     *
+     * @param dObj An object representing a J2EE deployable component.
+     *
+     * @return An object used to configure server-specific deployment information
+     *
+     * @throws InvalidModuleException The DeployableObject is an unknown or unsupported
+     *         component for this configuration tool.
+     */
+    public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException;
+
+    /**
+     * The distribute method performs three tasks; it validates the deployment
+     * configuration data, generates all container specific classes and interfaces,
+     * and moves the fully baked archive to the designated deployment targets.
+     *
+     * @param targetList     A list of server targets the user is specifying this application
+     *                       should be deployed to.
+     * @param moduleArchive  The file name of the application archive to be distributed.
+     * @param deploymentPlan The file containing the runtime configuration information
+     *                       associated with this application archive.
+     *
+     * @return an object that tracks and reports the status of the distribution process.
+     *
+     * @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
+     */
+    public ProgressObject distribute(Target[] targetList, File moduleArchive, File deploymentPlan) throws IllegalStateException;
+
+    /**
+     * The distribute method performs three tasks; it validates the deployment
+     * configuration data, generates all container specific classes and interfaces,
+     * and moves the fully baked archive to the designated deployment targets.
+     *
+     * @param targetList     A list of server targets the user is specifying this application
+     *                       should be deployed to.
+     * @param moduleArchive  The stream containing the application archive to be distributed.
+     * @param deploymentPlan The stream containing the runtime configuration information
+     *                       associated with this application archive.
+     *
+     * @return an object that tracks and reports the status of the distribution process.
+     *
+     * @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
+     */
+    public ProgressObject distribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException;
+
+    /**
+     * Start the application running.
+     *
+     * <p>Only the TargetModuleIDs which represent a root module are valid for being
+     * started.  A root TargetModuleID has no parent.  A TargetModuleID with a parent
+     * can not be individually started.  A root TargetModuleID module and all its
+     * child modules will be started.</p>
+     *
+     * @param moduleIDList An array of TargetModuleID objects representing the modules to be started.
+     *
+     * @return An object that tracks and reports the status of the start operation.
+     *
+     * @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
+     */
+    public ProgressObject start(TargetModuleID[] moduleIDList) throws IllegalStateException;
+
+    /**
+     * Stop the application running.
+     *
+     * <p>Only the TargetModuleIDs which represent a root module are valid for
+     * being stopped.  A root TargetModuleID has no parent.  A TargetModuleID
+     * with a parent can not be individually stopped.  A root TargetModuleID
+     * module and all its child modules will be stopped.</p>
+     *
+     * @param moduleIDList An array of TargetModuleID objects representing the modules to be stopped.
+     *
+     * @return An object that tracks and reports the status of the stop operation.
+     *
+     * @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
+     */
+    public ProgressObject stop(TargetModuleID[] moduleIDList) throws IllegalStateException;
+
+    /**
+     * Remove the application from the target server.
+     *
+     * <p>Only the TargetModuleIDs which represent a root module are valid for
+     * undeployment.  A root TargetModuleID has no parent.  A TargetModuleID with
+     * a parent can not be undeployed.  A root TargetModuleID module and all its
+     * child modules will be undeployed.  The root TargetModuleID module and all
+     * its child modules must stopped before they can be undeployed.
+     *
+     * @param moduleIDList An array of TargetModuleID objects representing the root
+     *                     modules to be undeployed.
+     *
+     * @return An object that tracks and reports the status of the stop operation.
+     *
+     * @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
+     */
+    public ProgressObject undeploy(TargetModuleID[] moduleIDList) throws IllegalStateException;
+
+    /**
+     * This method designates whether this platform vendor provides application
+     * redeployment functionality.  A value of true means it is supported.  False
+     * means it is not.
+     *
+     * @return A value of true means redeployment is supported by this vendor's
+     *         DeploymentManager. False means it is not.
+     */
+    public boolean isRedeploySupported();
+
+    /**
+     * (optional) The redeploy method provides a means for updating currently
+     * deployed J2EE applications.  This is an optional method for vendor
+     * implementation.  Redeploy replaces a currently deployed application with an
+     * updated version.  The runtime configuration information for the updated
+     * application must remain identical to the application it is updating.  When
+     * an application update is redeployed, all existing client connections to the
+     * original running application must not be disrupted; new clients will connect
+     * to the application update.  This operation is valid for TargetModuleIDs that
+     * represent a root module.  A root TargetModuleID has no parent.  A root
+     * TargetModuleID module and all its child modules will be redeployed.  A child
+     * TargetModuleID module cannot be individually redeployed.  The redeploy
+     * operation is complete only when this action for all the modules has completed.
+     *
+     * @param moduleIDList   An array of designators of the applications to be updated.
+     * @param moduleArchive  The file name of the application archive to be redeployed.
+     * @param deploymentPlan The deployment configuration information associated with
+     *                       this application archive.
+     *
+     * @return An object that tracks and reports the status of the redeploy operation.
+     *
+     * @throws UnsupportedOperationException this optional command is not supported by
+     *         this implementation.
+     * @throws IllegalStateException is thrown when the method is called when running
+     *         in disconnected mode.
+     */
+    public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan) throws UnsupportedOperationException, IllegalStateException;
+
+    /**
+     * (optional) The redeploy method provides a means for updating currently
+     * deployed J2EE applications.  This is an optional method for vendor
+     * implementation.  Redeploy replaces a currently deployed application with an
+     * updated version.  The runtime configuration information for the updated
+     * application must remain identical to the application it is updating.  When
+     * an application update is redeployed, all existing client connections to the
+     * original running application must not be disrupted; new clients will connect
+     * to the application update.  This operation is valid for TargetModuleIDs that
+     * represent a root module.  A root TargetModuleID has no parent.  A root
+     * TargetModuleID module and all its child modules will be redeployed.  A child
+     * TargetModuleID module cannot be individually redeployed.  The redeploy
+     * operation is complete only when this action for all the modules has completed.
+     *
+     * @param moduleIDList   An array of designators of the applications to be updated.
+     * @param moduleArchive  The stream containing the application archive to be redeployed.
+     * @param deploymentPlan The streeam containing the deployment configuration information
+     *                       associated with this application archive.
+     *
+     * @return An object that tracks and reports the status of the redeploy operation.
+     *
+     * @throws UnsupportedOperationException this optional command is not supported by
+     *         this implementation.
+     * @throws IllegalStateException is thrown when the method is called when running
+     *         in disconnected mode.
+     */
+    public ProgressObject redeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan) throws UnsupportedOperationException, IllegalStateException;
+
+    /**
+     * The release method is the mechanism by which the tool signals to the
+     * DeploymentManager that the tool does not need it to continue running
+     * connected to the platform.  The tool may be signaling it wants to run in a
+     * disconnected mode or it is planning to shutdown.  When release is called the
+     * DeploymentManager may close any J2EE resource connections it had for
+     * deployment configuration and perform other related resource cleanup.  It
+     * should not accept any new operation requests (i.e., distribute, start, stop,
+     * undeploy, redeploy.  It should finish any operations that are currently in
+     * process.  Each ProgressObject associated with a running operation should be
+     * marked as released (see the ProgressObject).
+     */
+    public void release();
+
+    /**
+     * Returns the default locale supported by this implementation of
+     * javax.enterprise.deploy.spi subpackages.
+     *
+     * @return the default locale for this implementation.
+     */
+    public Locale getDefaultLocale();
+
+    /**
+     * Returns the active locale this implementation of
+     * javax.enterprise.deploy.spi subpackages is running.
+     *
+     * @return the active locale of this implementation.
+     */
+    public Locale getCurrentLocale();
+
+    /**
+     * Set the active locale for this implementation of
+     * javax.enterprise.deploy.spi subpackages to run.
+     *
+     * @param locale the locale to set
+     *
+     * @throws UnsupportedOperationException the provide locale is not supported.
+     */
+    public void setLocale(Locale locale) throws UnsupportedOperationException;
+
+    /**
+     * Returns an array of supported locales for this implementation.
+     *
+     * @return the list of supported locales.
+     */
+    public Locale[] getSupportedLocales();
+
+    /**
+     * Reports if this implementation supports the designated locale.
+     *
+     * @param locale  the locale to check
+     *
+     * @return A value of <code>true</code> means it is supported and <code>false</code> it is not.
+     */
+    public boolean isLocaleSupported(Locale locale);
+
+    /**
+     * Returns the J2EE platform version number for which the configuration
+     * beans are provided.  The beans must have been compiled with the J2SE
+     * version required by the J2EE platform.
+     *
+     * @return a DConfigBeanVersionType object representing the platform
+     *         version number for which these beans are provided.
+     */
+    public DConfigBeanVersionType getDConfigBeanVersion();
+
+    /**
+     * Returns <code>true</code> if the configuration beans support the J2EE platform
+     * version specified.  It returns <code>false</code> if the version is not supported.
+     *
+     * @param version a DConfigBeanVersionType object representing the J2EE
+     *                platform version for which support is requested.
+     *
+     * @return <code>true</code> if the version is supported and 'false if not.
+     */
+    public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version);
+
+    /**
+     * Set the configuration beans to be used to the J2EE platform version specified.
+     *
+     * @param version a DConfigBeanVersionType object representing the J2EE
+     *                platform version for which support is requested.
+     *
+     * @throws DConfigBeanVersionUnsupportedException when the requested bean
+     *         version is not supported.
+     */
+    public void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException;
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/Target.java b/src/main/java/javax/enterprise/deploy/spi/Target.java
new file mode 100644
index 0000000..ee9af84
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/Target.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi;
+
+/**
+ * A Target interface represents a single logical core server of one instance of a
+ * J2EE platform product.  It is a designator for a server and the implied location
+ * to copy a configured application for the server to access.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface Target {
+    /**
+     * Retrieve the name of the target server.
+     */
+    public String getName();
+
+    /**
+     * Retrieve other descriptive information about the target.
+     */
+    public String getDescription();
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/TargetModuleID.java b/src/main/java/javax/enterprise/deploy/spi/TargetModuleID.java
new file mode 100644
index 0000000..779143b
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/TargetModuleID.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi;
+
+/**
+ * A TargetModuleID interface represents a unique identifier for a deployed
+ * application module.  A deployable application module can be an EAR, JAR, WAR or
+ * RAR file.  A TargetModuleID can represent a root module or a child module.  A
+ * root module TargetModuleID has no parent.  It represents a deployed EAR file or
+ * standalone module.  A child module TargetModuleID represents a deployed sub
+ * module of a J2EE application.  A child TargetModuleID has only one parent, the
+ * super module it was bundled and deployed with.  The identifier consists of the
+ * target name and the unique identifier for the deployed application module.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface TargetModuleID {
+    /**
+     * Retrieve the target server that this module was deployed to.
+     *
+     * @return an object representing a server target.
+     */
+    public Target getTarget();
+
+    /**
+     * Retrieve the id assigned to represent the deployed module.
+     */
+    public String getModuleID();
+
+    /**
+     * If this TargetModulID represents a web module retrieve the URL for it.
+     *
+     * @return the URL of a web module or null if the module is not a web module.
+     */
+    public String getWebURL();
+
+    /**
+     * Retrieve the identifier representing the deployed module.
+     */
+    public String toString();
+
+    /**
+     * Retrieve the identifier of the parent object of this deployed module.  If
+     * there is no parent then this is the root object deployed.  The root could
+     * represent an EAR file or it could be a stand alone module that was deployed.
+     *
+     * @return the TargetModuleID of the parent of this object. A <code>null</code>
+     *         value means this module is the root object deployed.
+     */
+    public TargetModuleID getParentTargetModuleID();
+
+    /**
+     * Retrieve a list of identifiers of the children of this deployed module.
+     *
+     * @return a list of TargetModuleIDs identifying the childern of this object.
+     *         A <code>null</code> value means this module has no children
+     */
+    public TargetModuleID[] getChildTargetModuleID();
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/exceptions/BeanNotFoundException.java b/src/main/java/javax/enterprise/deploy/spi/exceptions/BeanNotFoundException.java
new file mode 100644
index 0000000..23aee5f
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/exceptions/BeanNotFoundException.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.exceptions;
+
+/**
+ * This exception is to report that the bean is not a child of the parent bean.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class BeanNotFoundException extends Exception {
+    /**
+     * Creates an new BeanNotFoundException object.
+     *
+     * @param s a string indicating what was wrong with the target.
+     */
+    public BeanNotFoundException(String s) {
+        super(s);
+    }
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/exceptions/ClientExecuteException.java b/src/main/java/javax/enterprise/deploy/spi/exceptions/ClientExecuteException.java
new file mode 100644
index 0000000..fc68cba
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/exceptions/ClientExecuteException.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.exceptions;
+
+/**
+ * This exception reports errors in setting up an application client for
+ * execution.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class ClientExecuteException extends Exception {
+    /**
+     * Creates new <tt>ClientExecuteException</tt> without a detail message.
+     */
+    public ClientExecuteException() {
+        super();
+    }
+
+    /**
+     * Constructs a <tt>ClientExecuteException</tt> with the specified detail
+     * message.
+     *
+     * @param msg the detail message.
+     */
+    public ClientExecuteException(String msg) {
+        super(msg);
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/exceptions/ConfigurationException.java b/src/main/java/javax/enterprise/deploy/spi/exceptions/ConfigurationException.java
new file mode 100644
index 0000000..ed920cf
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/exceptions/ConfigurationException.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.exceptions;
+
+/**
+ * This exception reports errors in generating a configuration bean.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class ConfigurationException extends Exception {
+    /**
+     * Creates new <tt>ConfigurationException</tt> without a detail message.
+     */
+    public ConfigurationException() {
+        super();
+    }
+
+    /**
+     * Constructs a <tt>ConfigurationException</tt> with the specified detail
+     * message.
+     *
+     * @param msg the detail message.
+     */
+    public ConfigurationException(String msg) {
+        super(msg);
+    }
+
+    public ConfigurationException(Throwable cause) {
+        super(cause);
+    }
+
+    public ConfigurationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/exceptions/DConfigBeanVersionUnsupportedException.java b/src/main/java/javax/enterprise/deploy/spi/exceptions/DConfigBeanVersionUnsupportedException.java
new file mode 100644
index 0000000..9953fc4
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/exceptions/DConfigBeanVersionUnsupportedException.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.exceptions;
+
+/**
+ * This exception is to report that there is no support for the DConfigBean
+ * version requested.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class DConfigBeanVersionUnsupportedException extends Exception {
+    /**
+     * Creates a new DConfigBeanVersionUnsupportedException.
+     */
+    public DConfigBeanVersionUnsupportedException(String s) {
+        super(s);
+    }
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/exceptions/DeploymentManagerCreationException.java b/src/main/java/javax/enterprise/deploy/spi/exceptions/DeploymentManagerCreationException.java
new file mode 100644
index 0000000..077498b
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/exceptions/DeploymentManagerCreationException.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.exceptions;
+
+/**
+ * This exception is to report problems in returning a DeploymentManager object
+ * caused by such things as server down, unable to authenticate and the like.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class DeploymentManagerCreationException extends Exception {
+    /**
+     * Creates a new DeploymentManagerCreationException.
+     *
+     * @param s a string providing more information about the problem.
+     */
+    public DeploymentManagerCreationException(String s) {
+        super(s);
+    }
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/exceptions/InvalidModuleException.java b/src/main/java/javax/enterprise/deploy/spi/exceptions/InvalidModuleException.java
new file mode 100644
index 0000000..6569294
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/exceptions/InvalidModuleException.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.exceptions;
+
+/**
+ * This exception is to report an invalid J2EE deployment module type.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class InvalidModuleException extends Exception {
+    /**
+     * Creates a new InvalidModuleException.
+     *
+     * @param s a string indicating what was wrong with the module type.
+     */
+    public InvalidModuleException(String s) {
+        super(s);
+    }
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/exceptions/OperationUnsupportedException.java b/src/main/java/javax/enterprise/deploy/spi/exceptions/OperationUnsupportedException.java
new file mode 100644
index 0000000..d61d1aa
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/exceptions/OperationUnsupportedException.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.exceptions;
+
+/**
+ * This exception is to report that the method called is not supported by this
+ * implementation.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class OperationUnsupportedException extends Exception {
+    /**
+     * Creates a new OperationUnsupportedException.
+     *
+     * @param s a string giving more information about the unsupported
+     *          operation.
+     */
+    public OperationUnsupportedException(String s) {
+        super(s);
+    }
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/exceptions/TargetException.java b/src/main/java/javax/enterprise/deploy/spi/exceptions/TargetException.java
new file mode 100644
index 0000000..6d1875c
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/exceptions/TargetException.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.exceptions;
+
+/**
+ * This exception is to report bad target designators.  Likely causes include:
+ * the server has been reconfigured since the target was originally provided,
+ * or the tools is forging targets instead of using the ones provided by the
+ * DeploymentManager.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class TargetException extends Exception {
+    /**
+     * Creates a new TargetException.
+     *
+     * @param s a string indicating what was wrong with the target.
+     */
+    public TargetException(String s) {
+        super(s);
+    }
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/factories/DeploymentFactory.java b/src/main/java/javax/enterprise/deploy/spi/factories/DeploymentFactory.java
new file mode 100644
index 0000000..7f0fe65
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/factories/DeploymentFactory.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.factories;
+
+import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
+import javax.enterprise.deploy.spi.DeploymentManager;
+
+/**
+ * The DeploymentFactory interface is a deployment driver for a J2EE plaform
+ * product.  It returns a DeploymentManager object which represents a
+ * connection to a specific J2EE platform product.
+ *
+ * Each application server vendor must provide an implementation of this class
+ * in order for the J2EE Deployment API to work with their product.
+ *
+ * The class implementing this interface should have a public no-argument
+ * constructor, and it should be stateless (two instances of the class should
+ * always behave the same).  It is suggested but not required that the class
+ * have a static initializer that registers an instance of the class with the
+ * DeploymentFactoryManager class.
+ *
+ * A <tt>connected</tt> or <tt>disconnected</tt> DeploymentManager can be
+ * requested.  A DeploymentManager that runs connected to the platform can
+ * provide access to J2EE resources.  A DeploymentManager that runs
+ * disconnected only provides module deployment configuration support.
+ *
+ * @see javax.enterprise.deploy.shared.factories.DeploymentFactoryManager
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DeploymentFactory {
+    /**
+     * Tests whether this factory can create a DeploymentManager object based
+     * on the specified URI.  This does not indicate whether such an attempt
+     * will be successful, only whether the factory can handle the uri.
+     *
+     * @param uri The uri to check
+     *
+     * @return <tt>true</tt> if the factory can handle the uri.
+     */
+    public boolean handlesURI(String uri);
+
+    /**
+     * Returns a <tt>connected</tt> DeploymentManager instance.
+     *
+     * @param uri      The URI that specifies the connection parameters
+     * @param username An optional username (may be <tt>null</tt> if no
+     *                 authentication is required for this platform).
+     * @param password An optional password (may be <tt>null</tt> if no
+     *                 authentication is required for this platform).
+     *
+     * @return A ready DeploymentManager instance.
+     *
+     * @throws DeploymentManagerCreationException occurs when a
+     *         DeploymentManager could not be returned (server down, unable
+     *         to authenticate, etc).
+     */
+    public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException;
+
+    /**
+     * Returns a <tt>disconnected</tt> DeploymentManager instance.
+     *
+     * @param uri the uri of the DeploymentManager to return.
+     *
+     * @return A DeploymentManager <tt>disconnected</tt> instance.
+     *
+     * @throws DeploymentManagerCreationException occurs if the
+     *         DeploymentManager could not be created.
+     */
+    public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException;
+
+    /**
+     * Provide a string with the name of this vendor's DeploymentManager.
+     *
+     * @return the name of the vendor's DeploymentManager.
+     */
+    public String getDisplayName();
+
+    /**
+     * Provides a string identifying the version of this vendor's
+     * DeploymentManager.
+     *
+     * @return the name of the vendor's DeploymentManager.
+     */
+    public String getProductVersion();
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/status/ClientConfiguration.java b/src/main/java/javax/enterprise/deploy/spi/status/ClientConfiguration.java
new file mode 100644
index 0000000..c7f2143
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/status/ClientConfiguration.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.status;
+
+import javax.enterprise.deploy.spi.exceptions.ClientExecuteException;
+import java.io.Serializable;
+
+/**
+ * The ClientConfiguration object installs, configures and executes an
+ * Application Client.  This class resolves the settings for installing and
+ * running the application client.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface ClientConfiguration extends Serializable {
+    /**
+     * This method performs an exec and starts the application client running
+     * in another process.
+     *
+     * @throws ClientExecuteException when the configuration is incomplete.
+     */
+    public void execute() throws ClientExecuteException;
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/status/DeploymentStatus.java b/src/main/java/javax/enterprise/deploy/spi/status/DeploymentStatus.java
new file mode 100644
index 0000000..2072dcb
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/status/DeploymentStatus.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.status;
+
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.shared.StateType;
+import javax.enterprise.deploy.shared.ActionType;
+
+/**
+ * The DeploymentStatus interface provides information about the progress of a
+ * deployment action.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface DeploymentStatus {
+    /**
+     * Retrieve the StateType value.
+     *
+     * @return the StateType object
+     */
+    public StateType getState();
+
+    /**
+     * Retrieve the deployment CommandType of this event.
+     *
+     * @return the CommandType Object
+     */
+    public CommandType getCommand();
+
+    /**
+     * Retrieve the deployment ActionType for this event.
+     *
+     * @return the ActionType Object
+     */
+    public ActionType getAction();
+
+    /**
+     * Retrieve any additional information about the status of this event.
+     *
+     * @return message text
+     */
+    public String getMessage();
+
+    /**
+     * A convience method to report if the operation is in the completed state.
+     *
+     * @return <tt>true</tt> if this command has completed successfully
+     */
+    public boolean isCompleted();
+
+    /**
+     * A convience method to report if the operation is in the failed state.
+     *
+     * @return <tt>true</tt> if this command has failed
+     */
+    public boolean isFailed();
+
+    /**
+     * A convience method to report if the operation is in the running state.
+     *
+     * @return <tt>true</tt> if this command is still running
+     */
+    public boolean isRunning();
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/status/ProgressEvent.java b/src/main/java/javax/enterprise/deploy/spi/status/ProgressEvent.java
new file mode 100644
index 0000000..13f9dfb
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/status/ProgressEvent.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.status;
+
+import javax.enterprise.deploy.spi.TargetModuleID;
+import java.util.EventObject;
+
+/**
+ * An event which indicates that a deployment status change has occurred.
+ *
+ * @see ProgressObject
+ * @see ProgressListener
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class ProgressEvent extends EventObject {
+    private TargetModuleID targetModuleID;
+    private DeploymentStatus deploymentStatus;
+
+    /**
+     * Creates a new object representing a deployment progress event.
+     *
+     * @param source         the object on which the Event initially occurred.
+     * @param targetModuleID the combination of target and module for which the
+     *                       event occured.
+     * @param sCode          the object containing the status information.
+     */
+    public ProgressEvent(Object source, TargetModuleID targetModuleID, DeploymentStatus sCode) {
+        super(source);
+        this.targetModuleID = targetModuleID;
+        this.deploymentStatus = sCode;
+    }
+
+    /**
+     * Retrieves the TargetModuleID for this event.
+     *
+     * @return the TargetModuleID
+     */
+    public TargetModuleID getTargetModuleID() {
+        return targetModuleID;
+    }
+
+    /**
+     * Retrieves the status information for this event.
+     *
+     * @return the object containing the status information.
+     */
+    public DeploymentStatus getDeploymentStatus() {
+        return deploymentStatus;
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/javax/enterprise/deploy/spi/status/ProgressListener.java b/src/main/java/javax/enterprise/deploy/spi/status/ProgressListener.java
new file mode 100644
index 0000000..b68ca86
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/status/ProgressListener.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.status;
+
+import java.util.EventListener;
+
+/**
+ * The listener interface for receiving deployment progress events.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface ProgressListener extends EventListener {
+    /**
+     * Invoked when a deployment progress event occurs.
+     *
+     * @param event the progress event.
+     */
+    public void handleProgressEvent(ProgressEvent event);
+}
diff --git a/src/main/java/javax/enterprise/deploy/spi/status/ProgressObject.java b/src/main/java/javax/enterprise/deploy/spi/status/ProgressObject.java
new file mode 100644
index 0000000..e7aa03a
--- /dev/null
+++ b/src/main/java/javax/enterprise/deploy/spi/status/ProgressObject.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.status;
+
+import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException;
+
+/**
+ * The ProgressObject interface tracks and reports the progress of the
+ * deployment activities: distribute, start, stop, undeploy.
+ *
+ * This class has an <i>optional</i> cancel method.  The support of the cancel
+ * function can be tested by the isCancelSupported method.
+ *
+ * The ProgressObject structure allows the user the option of polling for
+ * status or to provide a callback.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public interface ProgressObject {
+    /**
+     * Retrieve the status of this activity.
+     *
+     * @return An object containing the status information.
+     */
+    public DeploymentStatus getDeploymentStatus();
+
+    /**
+     * Retrieve the list of TargetModuleIDs successfully processed or created
+     * by the associated DeploymentManager operation.
+     *
+     * @return a list of TargetModuleIDs.
+     */
+    public TargetModuleID[] getResultTargetModuleIDs();
+
+    /**
+     * Return the ClientConfiguration object associated with the
+     * TargetModuleID.
+     *
+     * @return ClientConfiguration for a given TargetModuleID or <tt>null</tt>
+     *         if none exists.
+     */
+    public ClientConfiguration getClientConfiguration(TargetModuleID id);
+
+    /**
+     * Tests whether the vendor supports a cancel operation for this
+     * deployment action.
+     *
+     * @return <tt>true</tt> if this platform allows this action to be
+     *         canceled.
+     */
+    public boolean isCancelSupported();
+
+    /**
+     * (optional) A cancel request on an in-process operation stops all further
+     * processing of the operation and returns the environment to it original
+     * state before the operation was executed.  An operation that has run to
+     * completion cannot be cancelled.
+     *
+     * @throws OperationUnsupportedException occurs when this optional command
+     *         is not supported by this implementation.
+     */
+    public void cancel() throws OperationUnsupportedException;
+
+    /**
+     * Tests whether the vendor supports a stop operation for the deployment
+     * action.
+     *
+     * @return <tt>true</tt> if this platform allows this action to be
+     *         stopped.
+     */
+    public boolean isStopSupported();
+
+    /**
+     * (optional) A stop request on an in-process operation allows the
+     * operation on the current TargetModuleID to run to completion but does
+     * not process any of the remaining unprocessed TargetModuleID objects.
+     * The processed TargetModuleIDs must be returned by the method
+     * getResultTargetModuleIDs.
+     *
+     * @throws OperationUnsupportedException occurs when this optional command
+     *         is not supported by this implementation.
+     */
+    public void stop() throws OperationUnsupportedException;
+
+    /**
+     * Add a listener to receive progress events on deployment actions.
+     *
+     * @param pol the listener to receive events
+     */
+    public void addProgressListener(ProgressListener pol);
+
+    /**
+     * Remove a progress listener.
+     *
+     * @param pol the listener to remove
+     */
+    public void removeProgressListener(ProgressListener pol);
+}
diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100644
index 0000000..5f48e30
--- /dev/null
+++ b/src/site/site.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+
+<!-- $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $ -->
+
+<project name="${project.name}">
+    
+    <body>
+        
+        ${parentProject}
+        
+        ${modules}
+        
+        ${reports}
+        
+    </body>
+
+</project>
+
+
diff --git a/src/test/java/javax/enterprise/deploy/model/XPathEventTest.java b/src/test/java/javax/enterprise/deploy/model/XPathEventTest.java
new file mode 100644
index 0000000..6d618aa
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/model/XPathEventTest.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.model;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class XPathEventTest extends TestCase {
+
+     public void testIsAddEvent() {
+        XpathEvent addEvent = new XpathEvent(null, XpathEvent.BEAN_ADDED);
+        assertTrue(addEvent.isAddEvent());
+        assertFalse(addEvent.isChangeEvent());
+        assertFalse(addEvent.isRemoveEvent());
+    }
+
+    public void testIsChangeEvent() {
+        XpathEvent changeEvent = new XpathEvent(null, XpathEvent.BEAN_CHANGED);
+        assertTrue(changeEvent.isChangeEvent());
+        assertFalse(changeEvent.isAddEvent());
+        assertFalse(changeEvent.isRemoveEvent());
+    }
+
+    public void testIsRemoveEvent() {
+        XpathEvent removeEvent = new XpathEvent(null, XpathEvent.BEAN_REMOVED);
+        assertTrue(removeEvent.isRemoveEvent());
+        assertFalse(removeEvent.isAddEvent());
+        assertFalse(removeEvent.isChangeEvent());
+    }
+
+}
diff --git a/src/test/java/javax/enterprise/deploy/shared/ActionTypeTest.java b/src/test/java/javax/enterprise/deploy/shared/ActionTypeTest.java
new file mode 100644
index 0000000..024e6e4
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/shared/ActionTypeTest.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class ActionTypeTest extends TestCase {
+
+    public void testValues() {
+        assertEquals(0, ActionType.EXECUTE.getValue());
+        assertEquals(1, ActionType.CANCEL.getValue());
+        assertEquals(2, ActionType.STOP.getValue());
+    }
+
+    public void testToString() {
+        assertEquals("execute", ActionType.EXECUTE.toString());
+        assertEquals("cancel", ActionType.CANCEL.toString());
+        assertEquals("stop", ActionType.STOP.toString());
+        // only possible due to package local access
+        assertEquals("5", new ActionType(5).toString());
+    }
+
+    public void testValueToSmall() {
+        try {
+            ActionType.getActionType(-1);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+
+    public void testValueToLarge() {
+        try {
+            ActionType.getActionType(5);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+}
+
diff --git a/src/test/java/javax/enterprise/deploy/shared/CommandTypeTest.java b/src/test/java/javax/enterprise/deploy/shared/CommandTypeTest.java
new file mode 100644
index 0000000..647df62
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/shared/CommandTypeTest.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class CommandTypeTest extends TestCase {
+    public void testValues() {
+        assertEquals(0, CommandType.DISTRIBUTE.getValue());
+        assertEquals(1, CommandType.START.getValue());
+        assertEquals(2, CommandType.STOP.getValue());
+        assertEquals(3, CommandType.UNDEPLOY.getValue());
+        assertEquals(4, CommandType.REDEPLOY.getValue());
+    }
+
+    public void testToString() {
+        assertEquals("distribute", CommandType.DISTRIBUTE.toString());
+        assertEquals("start", CommandType.START.toString());
+        assertEquals("stop", CommandType.STOP.toString());
+        assertEquals("undeploy", CommandType.UNDEPLOY.toString());
+        assertEquals("redeploy", CommandType.REDEPLOY.toString());
+        // only possible due to package local access
+        assertEquals("10", new ActionType(10).toString());
+        assertEquals("-1", new ActionType(-1).toString());
+    }
+
+    public void testValueToSmall() {
+        try {
+            CommandType.getCommandType(-1);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+
+    public void testValueToLarge() {
+        try {
+            CommandType.getCommandType(10);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+}
diff --git a/src/test/java/javax/enterprise/deploy/shared/DConfigBeanVersionTypeTest.java b/src/test/java/javax/enterprise/deploy/shared/DConfigBeanVersionTypeTest.java
new file mode 100644
index 0000000..6a0b841
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/shared/DConfigBeanVersionTypeTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class DConfigBeanVersionTypeTest extends TestCase {
+     public void testValues() {
+        assertEquals(0, DConfigBeanVersionType.V1_3.getValue());
+        assertEquals(1, DConfigBeanVersionType.V1_3_1.getValue());
+        assertEquals(2, DConfigBeanVersionType.V1_4.getValue());
+    }
+
+    public void testToString() {
+        assertEquals("V1_3", DConfigBeanVersionType.V1_3.toString());
+        assertEquals("V1_3_1", DConfigBeanVersionType.V1_3_1.toString());
+        assertEquals("V1_4", DConfigBeanVersionType.V1_4.toString());
+        // only possible due to package local access
+        assertEquals("5", new ActionType(5).toString());
+    }
+
+    public void testValueToSmall() {
+        try {
+            DConfigBeanVersionType.getDConfigBeanVersionType(-1);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+
+    public void testValueToLarge() {
+        try {
+            DConfigBeanVersionType.getDConfigBeanVersionType(3);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+}
diff --git a/src/test/java/javax/enterprise/deploy/shared/ModuleTypeTest.java b/src/test/java/javax/enterprise/deploy/shared/ModuleTypeTest.java
new file mode 100644
index 0000000..6905c51
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/shared/ModuleTypeTest.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class ModuleTypeTest extends TestCase {
+    public void testValues() {
+        assertEquals(0, ModuleType.EAR.getValue());
+        assertEquals(1, ModuleType.EJB.getValue());
+        assertEquals(2, ModuleType.CAR.getValue());
+        assertEquals(3, ModuleType.RAR.getValue());
+        assertEquals(4, ModuleType.WAR.getValue());
+    }
+
+    public void testToString() {
+        assertEquals("ear", ModuleType.EAR.toString());
+        assertEquals("ejb", ModuleType.EJB.toString());
+        assertEquals("car", ModuleType.CAR.toString());
+        assertEquals("rar", ModuleType.RAR.toString());
+        assertEquals("war", ModuleType.WAR.toString());
+        // only possible due to package local access
+        assertEquals("5", new ModuleType(5).toString());
+    }
+
+    public void testModuleExtension() {
+        assertEquals(".ear", ModuleType.EAR.getModuleExtension());
+        assertEquals(".jar", ModuleType.EJB.getModuleExtension());
+        assertEquals(".jar", ModuleType.CAR.getModuleExtension());
+        assertEquals(".rar", ModuleType.RAR.getModuleExtension());
+        assertEquals(".war", ModuleType.WAR.getModuleExtension());
+    }
+
+    public void testValueToSmall() {
+        try {
+            ModuleType.getModuleType(-1);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+
+    public void testValueToLarge() {
+        try {
+            ModuleType.getModuleType(5);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+}
diff --git a/src/test/java/javax/enterprise/deploy/shared/StateTypeTest.java b/src/test/java/javax/enterprise/deploy/shared/StateTypeTest.java
new file mode 100644
index 0000000..337a0ec
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/shared/StateTypeTest.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class StateTypeTest extends TestCase {
+    public void testValues() {
+        assertEquals(0, StateType.RUNNING.getValue());
+        assertEquals(1, StateType.COMPLETED.getValue());
+        assertEquals(2, StateType.FAILED.getValue());
+        assertEquals(3, StateType.RELEASED.getValue());
+    }
+
+    public void testToString() {
+        assertEquals("running", StateType.RUNNING.toString());
+        assertEquals("completed", StateType.COMPLETED.toString());
+        assertEquals("failed", StateType.FAILED.toString());
+        assertEquals("released", StateType.RELEASED.toString());
+        // only possible due to package local access
+        assertEquals("5", new ActionType(5).toString());
+    }
+
+    public void testValueToSmall() {
+        try {
+            StateType.getStateType(-1);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+
+    public void testValueToLarge() {
+        try {
+            StateType.getStateType(5);
+            fail("Expected AIOOBE");
+        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        }
+    }
+}
diff --git a/src/test/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManagerTest.java b/src/test/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManagerTest.java
new file mode 100644
index 0000000..d11d337
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManagerTest.java
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.shared.factories;
+
+import junit.framework.TestCase;
+
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
+import javax.enterprise.deploy.spi.DeploymentManager;
+
+import javax.enterprise.deploy.spi.factories.MockDeploymentFactory;
+
+/**
+ * Low level tests on the DeploymentFactoryManager.
+ *
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class DeploymentFactoryManagerTest extends TestCase {
+    private DeploymentFactoryManager factoryManager;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        factoryManager = DeploymentFactoryManager.getInstance();
+    }
+
+    protected void tearDown() throws Exception {
+        factoryManager = null;
+        super.tearDown();
+    }
+
+    public void testGetDeploymentManagerWithoutAnyRegisteredFactories() {
+        try {
+            factoryManager.getDeploymentManager("invalid-uri", null, null);
+            fail("Expected a DeploymentManagerCreationException");
+        } catch (DeploymentManagerCreationException e) {
+            assertTrue(e.getMessage().startsWith("Could not get DeploymentManager"));
+        }
+    }
+
+    public void testDisconnectedGetDeploymentManagerWithoutAnyRegisteredFactories() {
+        try {
+            factoryManager.getDisconnectedDeploymentManager("invalid-uri");
+            fail("Expected a DeploymentManagerCreationException");
+        } catch (DeploymentManagerCreationException e) {
+            assertTrue(e.getMessage().startsWith("Could not get DeploymentManager"));
+        }
+    }
+
+    public void testGetDeploymentManagerWithNullURI() {
+        try {
+            factoryManager.getDeploymentManager(null, null, null);
+            fail("Expected an IllegalArgumentException");
+        } catch (IllegalArgumentException e) {
+        } catch(DeploymentManagerCreationException e) {
+            fail("Unexpected Exception: "+e.getMessage());
+        }
+    }
+
+    public void testDisconnectedGetDeploymentManagerWithNullURI() {
+        try {
+            factoryManager.getDisconnectedDeploymentManager(null);
+            fail("Expected an IllegalArgumentException");
+        } catch (IllegalArgumentException e) {
+        } catch(DeploymentManagerCreationException e) {
+            fail("Unexpected Exception: "+e.getMessage());
+        }
+    }
+
+    public void testRegisterNull() {
+        try {
+            factoryManager.registerDeploymentFactory(null);
+            fail("Should have gotten an IllegalArgumentException");
+        } catch(IllegalArgumentException e) {
+        }
+    }
+
+    public void testRegisterDeploymentFactory() {
+        int initialNumberOfFactories = factoryManager.getDeploymentFactories().length;
+
+        DeploymentFactory factory = new MockDeploymentFactory();
+        factoryManager.registerDeploymentFactory(factory);
+
+        int expectedNumberOfFactories = initialNumberOfFactories + 1;
+        int currentNumberOfFactories = factoryManager.getDeploymentFactories().length;
+
+        assertEquals(expectedNumberOfFactories, currentNumberOfFactories);
+    }
+
+    public void testGetDeploymentManager() {
+        ensureFactoryRegistered();
+        DeploymentManager deploymentManager = null;
+        try {
+            deploymentManager = factoryManager.getDeploymentManager("deployer:geronimo://server:port/application", "username", "password");
+        } catch (DeploymentManagerCreationException e) {
+            fail("Didn't expect a DeploymentManagerException here.");
+        }
+        assertNotNull("Expected an instance of the DeploymentManager", deploymentManager);
+    }
+
+    public void testGetDisconnectedDeploymentManager() {
+        ensureFactoryRegistered();
+        DeploymentManager deploymentManager = null;
+        try {
+            deploymentManager = factoryManager.getDeploymentManager("deployer:geronimo:", null, null);
+        } catch (DeploymentManagerCreationException e) {
+            fail("Didn't expect a DeploymentManagerException here.");
+        }
+        assertNotNull("Expected an instance of the DeploymentManager", deploymentManager);
+    }
+
+    public void testDeploymentManagerCreationException() {
+        ensureFactoryRegistered();
+        try {
+            factoryManager.getDisconnectedDeploymentManager("throw-exception");
+            fail("Expected a DeploymentManagerCreationException");
+        } catch (DeploymentManagerCreationException e) {
+            //
+            // jason: probably not a hot idea to validate the message here
+            //
+            // assertTrue(e.getMessage().startsWith("Could not get DeploymentManager"));
+        }
+    }
+
+    private void ensureFactoryRegistered() {
+        int numberOfFactories = factoryManager.getDeploymentFactories().length;
+        if(numberOfFactories == 0) {
+            factoryManager.registerDeploymentFactory(new MockDeploymentFactory());
+        }
+        assertTrue("We should have a registered DeploymentFactory", numberOfFactories > 0);
+    }
+}
diff --git a/src/test/java/javax/enterprise/deploy/spi/MockDeploymentManager.java b/src/test/java/javax/enterprise/deploy/spi/MockDeploymentManager.java
new file mode 100644
index 0000000..3840404
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/spi/MockDeploymentManager.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi;
+
+import javax.enterprise.deploy.model.DeployableObject;
+import javax.enterprise.deploy.shared.DConfigBeanVersionType;
+import javax.enterprise.deploy.shared.ModuleType;
+import javax.enterprise.deploy.spi.exceptions.DConfigBeanVersionUnsupportedException;
+import javax.enterprise.deploy.spi.exceptions.InvalidModuleException;
+import javax.enterprise.deploy.spi.exceptions.TargetException;
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import java.io.File;
+import java.io.InputStream;
+import java.util.Locale;
+
+/**
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class MockDeploymentManager implements DeploymentManager {
+    public Target[] getTargets() throws IllegalStateException {
+        return new Target[0];
+    }
+
+    public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException {
+        return new TargetModuleID[0];
+    }
+
+    public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException {
+        return new TargetModuleID[0];
+    }
+
+    public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException {
+        return new TargetModuleID[0];
+    }
+
+    public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException {
+        return null;
+    }
+
+    public ProgressObject distribute(Target[] targetList, File moduleArchive, File deploymentPlan) throws IllegalStateException {
+        return null;
+    }
+
+    public ProgressObject distribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException {
+        return null;
+    }
+
+    public ProgressObject start(TargetModuleID[] moduleIDList) throws IllegalStateException {
+        return null;
+    }
+
+    public ProgressObject stop(TargetModuleID[] moduleIDList) throws IllegalStateException {
+        return null;
+    }
+
+    public ProgressObject undeploy(TargetModuleID[] moduleIDList) throws IllegalStateException {
+        return null;
+    }
+
+    public boolean isRedeploySupported() {
+        return false;
+    }
+
+    public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan) throws UnsupportedOperationException, IllegalStateException {
+        return null;
+    }
+
+    public ProgressObject redeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan) throws UnsupportedOperationException, IllegalStateException {
+        return null;
+    }
+
+    public void release() {
+    }
+
+    public Locale getDefaultLocale() {
+        return null;
+    }
+
+    public Locale getCurrentLocale() {
+        return null;
+    }
+
+    public void setLocale(Locale locale) throws UnsupportedOperationException {
+    }
+
+    public Locale[] getSupportedLocales() {
+        return new Locale[0];
+    }
+
+    public boolean isLocaleSupported(Locale locale) {
+        return false;
+    }
+
+    public DConfigBeanVersionType getDConfigBeanVersion() {
+        return null;
+    }
+
+    public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version) {
+        return false;
+    }
+
+    public void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException {
+    }
+}
diff --git a/src/test/java/javax/enterprise/deploy/spi/factories/MockDeploymentFactory.java b/src/test/java/javax/enterprise/deploy/spi/factories/MockDeploymentFactory.java
new file mode 100644
index 0000000..d0a2c55
--- /dev/null
+++ b/src/test/java/javax/enterprise/deploy/spi/factories/MockDeploymentFactory.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.enterprise.deploy.spi.factories;
+
+import javax.enterprise.deploy.spi.MockDeploymentManager;
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
+
+/**
+ * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Wed, 25 Oct 2006) $
+ */
+public class MockDeploymentFactory implements DeploymentFactory {
+    public boolean handlesURI(String uri) {
+        // for the moment we accept all uri's
+        return true;
+    }
+
+    public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException {
+        return getDisconnectedDeploymentManager(uri);
+    }
+
+    public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException {
+        if ("return-null".equals(uri)) {
+            return null;
+        } else if ("throw-exception".equals(uri)) {
+            throw new DeploymentManagerCreationException("Simulated Exception");
+        } else {
+            return new MockDeploymentManager();
+        }
+    }
+
+    public String getDisplayName() {
+        return null;
+    }
+
+    public String getProductVersion() {
+        return null;
+    }
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/geronimo-j2ee-deployment-1.1-spec.git



More information about the pkg-java-commits mailing list