[jboss-svn-commits] JBoss Common SVN: r3461 - in declarchive/trunk/api/src/main/java/org/jboss/declarchive/api: container and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Aug 17 14:06:38 EDT 2009


Author: ALRubinger
Date: 2009-08-17 14:06:38 -0400 (Mon, 17 Aug 2009)
New Revision: 3461

Added:
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ClassContainer.java
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/EnterpriseContainer.java
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/LibraryContainer.java
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ManifestContainer.java
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ResourceContainer.java
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/WebContainer.java
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/EnterpriseArchive.java
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/JavaArchive.java
   declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/WebArchive.java
Log:
[TMPARCH-6] Applied Aslak's patch for new Container IFs and spec-compliant compositions

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ClassContainer.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ClassContainer.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ClassContainer.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.container;
+
+import org.jboss.declarchive.api.Archive;
+
+/**
+ * ClassContainer
+ * 
+ * Defines the contract for a component capable of storing 
+ * Java Classes.
+ * <br/><br/>
+ * The actual path to the Class resources within the Archive 
+ * is up to the implementations/specifications.
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface ClassContainer<T extends Archive<T>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Adds the specified Classes to the archive.
+    * 
+    * @param classes
+    * @return This virtual archive
+    * @throws IllegalArgumentException If no classes were specified
+    */
+   T add(Class<?>... classes) throws IllegalArgumentException;
+
+   /**
+    * Adds all classes in the specified Packages to the archive.
+    * 
+    * @param recursive Should the packages be added recursively
+    * @param packages All the packages to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException If no packages were specified
+    */
+   T add(boolean recursive, Package... packages) throws IllegalArgumentException;
+}

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/EnterpriseContainer.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/EnterpriseContainer.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/EnterpriseContainer.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.container;
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.Path;
+
+/**
+ * EnterpriseContainer
+ * 
+ * Defines the contract for a component capable of storing 
+ * Enterprise related resources.
+ * <br/><br/>
+ * The actual path to the Enterprise resources within the Archive 
+ * is up to the implementations/specifications.
+ * 
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface EnterpriseContainer<T extends Archive<T>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Adds a resource to this Archive as application.xml.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation. 
+    * <br/>
+    * For instance a resourceName of "test/example.xml" could be placed in 
+    * "/META-INF/application.xml"
+    * 
+    * @param resourceName Name of the ClassLoader resource to add 
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T setApplicationXML(String resourceName) throws IllegalArgumentException;
+   
+   /**
+    * Adds a resource to this Archives application context.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation.
+    * <br/>
+    * For instance a resourceName of "test/example.xml" could be placed in 
+    * "/META-INF/test/example.xml"
+    *   
+    * @param resourceName Name of the ClassLoader resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T addApplicationResource(String resourceName) throws IllegalArgumentException;
+   
+   /**
+    * Adds a resource to this Archives application context.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation.
+    * <br/>
+    * For instance a resourceName of "test/example.xml" and a 
+    * target of "example/myexample.xml" could be placed in 
+    * "/META-INF/example/myexample.xml"
+    *   
+    * @param resourceName Name of the ClassLoader resource to add
+    * @param newName New name of the resource in the container
+    * @return This virtual archive
+    * @throws IllegalArgumentException if target is null
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T addApplicationResource(Path target, String resourceName) throws IllegalArgumentException;
+}

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/LibraryContainer.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/LibraryContainer.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/LibraryContainer.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.container;
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.Path;
+
+/**
+ * LibraryContainer
+ * 
+ * Defines the contract for a component capable of storing 
+ * Libraries.
+ * <br/><br/>
+ * The actual path to the Library resources within the Archive 
+ * is up to the implementations/specifications.
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface LibraryContainer<T extends Archive<T>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Adds the resource with the specified name
+    * as a library to the container, returning the container itself.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation.  The resource will be placed into 
+    * the Container Library path under the same context from which it was retrieved.
+    * <br/>
+    * For instance a resourceName of "test/library.jar" could be placed
+    * "/lib/test/library.jar".
+    * 
+    * @param resourceName Name of the ClassLoader resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T addLibrary(String resourceName) throws IllegalArgumentException;
+   
+   /**
+    * Adds the resource with the specified name
+    * as a library to the container under the target path, returning the container itself.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation.  The resource will be placed into 
+    * the Containers Library path under the relative target path.
+    * <br/>
+    * For instance a resourceName of "test/library.jar" and target as "/test/example.jar" could be placed in
+    * "/lib/test/example.jar".
+    * 
+    * @param target New name of the resource in the container
+    * @param resourceName Name of the ClassLoader resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if target is null
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T addLibrary(Path target, String resourceName) throws IllegalArgumentException;
+   
+   /**
+    * Add another Archive<?> to this Archive as a Library.
+    * <br/><br/>
+    * For instance a Archive with name 'example.jar' could be placed in
+    * "/lib/example.jar".
+    * 
+    * @param archive The Archive to be added to the Library path
+    * @return This virtual archive
+    * @throws IllegalArgumentException if Archive is null
+    */
+   T addLibrary(Archive<?> archive) throws IllegalArgumentException;
+}

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ManifestContainer.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ManifestContainer.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ManifestContainer.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.container;
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.Path;
+
+/**
+ * ManifestContainer
+ * 
+ * Defines the contract for a component capable of storing 
+ * Manifest related resources.
+ * <br/><br/>
+ * The actual path to the Manifest resources within the Archive 
+ * is up to the implementations/specifications.
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ * @param <T>
+ */
+public interface ManifestContainer<T extends Archive<T>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Adds a resource to this Archive as MEANIFEST.MF.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation. 
+    * <br/>
+    * For instance a resourceName of "test/example.txt" could be placed in 
+    * "/META-INF/MANIFEST.MF"
+    * 
+    * @param resourceName Name of the ClassLoader resource to add 
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T setManifest(String resourceName) throws IllegalArgumentException;
+   
+   /**
+    * Adds the resource with the specified name
+    * to the container, returning the container itself.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation. 
+    * <br/>
+    * For instance a resourceName of "test/example.xml" could be placed in 
+    * "/META-INF/test/example.xml"
+    * 
+    * @param resourceName Name of the ClassLoader resource to add 
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T addManifestResource(String resourceName) throws IllegalArgumentException;
+   
+   /**
+    * Adds the resource with the specified name
+    * to the container, returning the container itself.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation. 
+    * <br/>
+    * For instance a resourceName of "test/library.xml" and target of "/test/example.xml" could be placed in
+    * "/META-INF/test/example.xml".
+    * 
+    * @param target The target relative to Manifest path within the archive into which we'll place the resource
+    * @param resourceName Name of the ClassLoader resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if target is null
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T addManifestResource(Path target, String resourceName) throws IllegalArgumentException;
+}

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ResourceContainer.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ResourceContainer.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/ResourceContainer.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.container;
+
+import java.net.URL;
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.Path;
+
+/**
+ * ResourceContainer
+ * 
+ * Defines the contract for a component capable of storing 
+ * a series of ClassLoader resources
+ * <br/><br/>
+ * The actual path to the Resources within the Archive 
+ * is up to the implementations/specifications.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface ResourceContainer<T extends Archive<T>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Adds the resource with the specified name
+    * to the container, returning the container itself.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation.  The resource will be placed into 
+    * the Container under the same context from which it was retrieved.
+    * <br/>
+    * For instance a resourceName of "META-INF/resource.xml" will be placed
+    * at the same location within the Container.
+    * 
+    * @param resourceName Name of the ClassLoader resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException If the name is null
+    */
+   T addResource(String resourceName) throws IllegalArgumentException;
+
+   /**
+    * Adds the resource with the specified name
+    * to the container, returning the container itself.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation.  The resource will be placed into 
+    * the Container under the same context specified by
+    * "target"
+    * 
+    * @param target The target within the archive into which we'll place the resource
+    * @param resourceName Name of the ClassLoader resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException If the target is null
+    * @throws IllegalArgumentException If the resourceName is null
+    */
+   T addResource(Path target, String resourceName) throws IllegalArgumentException;
+
+   /**
+    * Adds the resource with the specified name
+    * to the container, returning the container itself.
+    * <br/><br/> 
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation.  The resource will be placed into 
+    * the Container under the same context specified by
+    * "target"
+    * 
+    * @param target The target within the archive into which we'll place the resource
+    * @param resourceName Name of the ClassLoader resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException If the target is null
+    * @throws IllegalArgumentException If the resourceName is null
+    */
+   T addResource(String target, String resourceName) throws IllegalArgumentException;
+
+   /**
+    * Adds the specified resource to the archive, using the specified ClassLoader
+    * to load the resource
+    * 
+    * @param target The target within the archive into which we'll place the resource
+    * @param resourceName The name of the resource to load
+    * @param classLoader The ClassLoader from where the resource should be loaded
+    * @return This virtual archive
+    * @throws IllegalArgumentException If the target is null
+    * @throws IllegalArgumentException If the resourceName is null
+    * @throws IllegalArgumentException If the classLoader is null
+    */
+   T addResource(Path target, String resourceName, ClassLoader classLoader) throws IllegalArgumentException;
+
+   /**
+    * Adds the resource located at the specified URL to the archive.  The
+    * location within the archive will be equal to the path portion of the 
+    * specified URL.
+    * 
+    * @param location The location of the resource to load
+    * @return This virtual archive
+    * @throws IllegalArgumentException If the location is null
+    */
+   T addResource(URL location) throws IllegalArgumentException;
+
+   /**
+    * Adds the resource located at the specified URL to
+    * the archive at the specified path.
+    * 
+    * @param newtarget The target within the archive into which we'll place the resource
+    * @param location The location of the resource to load
+    * @return This virtual archive
+    * @throws IllegalArgumentException If the target is null
+    * @throws IllegalArgumentException If the location is null 
+    */
+   T addResource(Path target, URL location) throws IllegalArgumentException;
+
+}

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/WebContainer.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/WebContainer.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/container/WebContainer.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.container;
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.Path;
+
+/**
+ * WebContainer
+ *
+ * Defines the contract for a component capable of storing 
+ * Web related resources.
+ * <br/><br/>
+ * The actual path to the Web resources within the Archive 
+ * is up to the implementations/specifications.
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ * @param <T>
+ */
+public interface WebContainer<T extends Archive<T>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Adds a resource to this Archive as web.xml.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation. 
+    * <br/>
+    * For instance a resourceName of "test/example.xml" could be placed in 
+    * "/WEB-INF/web.xml"
+    * 
+    * @param resourceName Name of the ClassLoader resource to add 
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T setWebXML(String resourceName)  throws IllegalArgumentException;
+   
+   /**
+    * Adds the resource with the specified name
+    * to the container, returning the container itself.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation. 
+    * <br/>
+    * For instance a resourceName of "test/example.xml" could be placed in 
+    * "/WEB-INF/test/example.xml"
+    * 
+    * @param resourceName
+    * @return
+    * @throws IllegalArgumentException
+    */
+   T addWebResource(String resourceName) throws IllegalArgumentException;
+   
+   /**
+    * Adds the resource with the specified name
+    * to the container, returning the container itself.
+    * <br/><br/>
+    * The ClassLoader used to obtain the resource is up to
+    * the implementation. 
+    * <br/>
+    * For instance a resourceName of "test/library.xml" and target of "/test/example.xml" could be placed in
+    * "/lib/test/example.xml".
+    * 
+    * @param target The target relative to Manifest path within the archive into which we'll place the resource
+    * @param resourceName Name of the ClassLoader resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if target is null
+    * @throws IllegalArgumentException if resourceName is null
+    */
+   T addWebResource(Path target, String resourceName) throws IllegalArgumentException;
+}

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/EnterpriseArchive.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/EnterpriseArchive.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/EnterpriseArchive.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.spec;
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.container.EnterpriseContainer;
+import org.jboss.declarchive.api.container.LibraryContainer;
+import org.jboss.declarchive.api.container.ManifestContainer;
+import org.jboss.declarchive.api.container.ResourceContainer;
+
+/**
+ * EnterpriseArchive
+ *
+ * Traditional EAR (Java Enterprise Archive) structure. Used in 
+ * construction of enterprise applications.
+ *
+ * @see TODO: find ear spec doc url
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface EnterpriseArchive extends 
+      Archive<EnterpriseArchive>, 
+      ResourceContainer<EnterpriseArchive>, 
+      ManifestContainer<EnterpriseArchive>, 
+      LibraryContainer<EnterpriseArchive>,
+      EnterpriseContainer<EnterpriseArchive>
+{
+
+}

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/JavaArchive.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/JavaArchive.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/JavaArchive.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.spec;
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.container.ClassContainer;
+import org.jboss.declarchive.api.container.ManifestContainer;
+import org.jboss.declarchive.api.container.ResourceContainer;
+
+/**
+ * JavaArchive
+ * 
+ * Traditional JAR (Java ARchive) structure. Used in 
+ * construction of libraries and applications.
+ *
+ * @see http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface JavaArchive extends 
+      Archive<JavaArchive>, 
+      ResourceContainer<JavaArchive>, 
+      ManifestContainer<JavaArchive>, 
+      ClassContainer<JavaArchive>
+{
+}

Added: declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/WebArchive.java
===================================================================
--- declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/WebArchive.java	                        (rev 0)
+++ declarchive/trunk/api/src/main/java/org/jboss/declarchive/api/spec/WebArchive.java	2009-08-17 18:06:38 UTC (rev 3461)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+package org.jboss.declarchive.api.spec;
+
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.container.ClassContainer;
+import org.jboss.declarchive.api.container.LibraryContainer;
+import org.jboss.declarchive.api.container.ManifestContainer;
+import org.jboss.declarchive.api.container.WebContainer;
+
+/**
+ * WebArchive
+ * 
+ * Traditional WAR (Java Web Archive) structure. Used in 
+ * construction of web applications.
+ *
+ * @see TODO: find war spec doc url
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface WebArchive extends 
+      Archive<WebArchive>, 
+      ManifestContainer<WebArchive>,
+      ClassContainer<WebArchive>,
+      LibraryContainer<WebArchive>,
+      WebContainer<WebArchive>
+{
+}



More information about the jboss-svn-commits mailing list