ShrinkWrap Implementation Base 1.0.0-cr-2

org.jboss.shrinkwrap.impl.base.container
Class EnterpriseContainerBase<T extends Archive<T>>

java.lang.Object
  extended by org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
      extended by org.jboss.shrinkwrap.impl.base.container.ContainerBase<T>
          extended by org.jboss.shrinkwrap.impl.base.container.EnterpriseContainerBase<T>
Type Parameters:
T -
All Implemented Interfaces:
Archive<T>, Assignable, ClassContainer<T>, EnterpriseContainer<T>, LibraryContainer<T>, ManifestContainer<T>, ResourceContainer<T>, ServiceProviderContainer<T>, ArchiveFormatAssociable
Direct Known Subclasses:
EnterpriseArchiveImpl

public abstract class EnterpriseContainerBase<T extends Archive<T>>
extends ContainerBase<T>
implements EnterpriseContainer<T>

EnterpriseContainerSupport Abstract class that helps implement the EnterpriseContainer. Used by specs that extends the EnterpriseContainer.

Version:
$Revision: $
Author:
Aslak Knutsen

Field Summary
 
Fields inherited from interface org.jboss.shrinkwrap.api.container.ManifestContainer
DEFAULT_MANIFEST_NAME
 
Constructor Summary
protected EnterpriseContainerBase(Class<T> actualType, Archive<?> archive)
           
 
Method Summary
 T addAsApplicationResource(Asset resource, ArchivePath target)
           
 T addAsApplicationResource(Asset resource, String target)
           
 T addAsApplicationResource(File resource)
           
 T addAsApplicationResource(File resource, ArchivePath target)
           
 T addAsApplicationResource(File resource, String target)
           
 T addAsApplicationResource(Package resourcePackage, String resourceName)
           
 T addAsApplicationResource(Package resourcePackage, String resourceName, ArchivePath target)
           
 T addAsApplicationResource(Package resourcePackage, String resourceName, String target)
           
 T addAsApplicationResource(String resourceName)
           
 T addAsApplicationResource(String resourceName, ArchivePath target)
           
 T addAsApplicationResource(String resourceName, String target)
           
 T addAsApplicationResource(URL resource, ArchivePath target)
           
 T addAsApplicationResource(URL resource, String target)
           
 T addAsApplicationResources(Package resourcePackage, String... resourceNames)
           
 T addAsModule(Archive<?> archive)
          
 T addAsModule(Asset resource, ArchivePath targetPath)
           
 T addAsModule(Asset resource, String targetPath)
           
 T addAsModule(File resource)
           
 T addAsModule(File resource, ArchivePath targetPath)
           
 T addAsModule(File resource, String targetPath)
           
 T addAsModule(String resourceName)
          
 T addAsModule(String resourceName, ArchivePath targetPath)
           
 T addAsModule(String resourceName, String targetPath)
           
 T addAsModule(URL resource, ArchivePath targetPath)
           
 T addAsModule(URL resource, String targetPath)
           
 T addAsModules(Archive<?>... archives)
          
 T addAsModules(File... resources)
          
 T addAsModules(String... resourceNames)
          
protected abstract  ArchivePath getApplicationPath()
          Should be implemented to set the path for Application related resources.
protected abstract  ArchivePath getModulePath()
          Should be implemented to set the path for Module related resources.
 T setApplicationXML(Asset resource)
           
 T setApplicationXML(File resource)
           
 T setApplicationXML(Package resourcePackage, String resourceName)
           
 T setApplicationXML(String resourceName)
           
 T setApplicationXML(URL resource)
           
 
Methods inherited from class org.jboss.shrinkwrap.impl.base.container.ContainerBase
add, add, add, add, add, add, add, addAsDirectories, addAsDirectories, addAsDirectory, addAsDirectory, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResources, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResources, addAsServiceProvider, addAsServiceProviderAndClasses, addClass, addClass, addClass, addClasses, addDefaultPackage, addManifest, addPackage, addPackage, addPackages, addPackages, addPackages, addPackages, contains, contains, covarientReturn, delete, delete, equals, get, get, getActualClass, getArchiveFormat, getAsType, getAsType, getAsType, getAsType, getAsType, getAsType, getClassesPath, getContent, getContent, getLibraryPath, getManifestPath, getName, getResourcePath, hashCode, merge, merge, merge, merge, merge, merge, setManifest, setManifest, setManifest, setManifest, setManifest, toString, toString, toString, writeTo
 
Methods inherited from class org.jboss.shrinkwrap.impl.base.AssignableBase
as, getArchive
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
 

Constructor Detail

EnterpriseContainerBase

protected EnterpriseContainerBase(Class<T> actualType,
                                  Archive<?> archive)
Method Detail

getApplicationPath

protected abstract ArchivePath getApplicationPath()
Should be implemented to set the path for Application related resources.

Returns:
Base Path for the EnterpriseContainer application resources

setApplicationXML

public T setApplicationXML(String resourceName)
                                       throws IllegalArgumentException
Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

setApplicationXML

public T setApplicationXML(File resource)
                                       throws IllegalArgumentException
Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

setApplicationXML

public T setApplicationXML(URL resource)
                                       throws IllegalArgumentException
Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

setApplicationXML

public T setApplicationXML(Asset resource)
                                       throws IllegalArgumentException
Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

setApplicationXML

public T setApplicationXML(Package resourcePackage,
                           String resourceName)
                                       throws IllegalArgumentException
Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(String resourceName)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(File resource)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(String resourceName,
                                  String target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(File resource,
                                  String target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(URL resource,
                                  String target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(Asset resource,
                                  String target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(String resourceName,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(File resource,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(URL resource,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(Asset resource,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResources

public T addAsApplicationResources(Package resourcePackage,
                                   String... resourceNames)
                                               throws IllegalArgumentException
Specified by:
addAsApplicationResources in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(Package resourcePackage,
                                  String resourceName)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(Package resourcePackage,
                                  String resourceName,
                                  String target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsApplicationResource

public T addAsApplicationResource(Package resourcePackage,
                                  String resourceName,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

getModulePath

protected abstract ArchivePath getModulePath()
Should be implemented to set the path for Module related resources.

Returns:
Base Path for the EnterpriseContainer module resources

addAsModule

public T addAsModule(Archive<?> archive)
                                 throws IllegalArgumentException

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException
See Also:
EnterpriseContainer.addAsModule(org.jboss.shrinkwrap.api.Archive)

addAsModule

public T addAsModule(String resourceName)

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
See Also:
EnterpriseContainer.addAsModule(java.lang.String)

addAsModule

public T addAsModule(File resource)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsModules

public T addAsModules(Archive<?>... archives)
                                  throws IllegalArgumentException

Specified by:
addAsModules in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException
See Also:
EnterpriseContainer.addAsModules(org.jboss.shrinkwrap.api.Archive[])

addAsModules

public T addAsModules(String... resourceNames)
                                  throws IllegalArgumentException

Specified by:
addAsModules in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException
See Also:
EnterpriseContainer.addAsModules(java.lang.String[])

addAsModules

public T addAsModules(File... resources)
                                  throws IllegalArgumentException

Specified by:
addAsModules in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException
See Also:
EnterpriseContainer.addAsModules(java.io.File[])

addAsModule

public T addAsModule(File resource,
                     ArchivePath targetPath)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsModule

public T addAsModule(String resourceName,
                     ArchivePath targetPath)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsModule

public T addAsModule(URL resource,
                     ArchivePath targetPath)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsModule

public T addAsModule(File resource,
                     String targetPath)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsModule

public T addAsModule(Asset resource,
                     String targetPath)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsModule

public T addAsModule(String resourceName,
                     String targetPath)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsModule

public T addAsModule(URL resource,
                     String targetPath)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

addAsModule

public T addAsModule(Asset resource,
                     ArchivePath targetPath)
                                 throws IllegalArgumentException
Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Throws:
IllegalArgumentException

ShrinkWrap Implementation Base 1.0.0-cr-2

Copyright © 2011 JBoss by Red Hat. All Rights Reserved.