org.jboss.shrinkwrap.api.container
Interface ResourceAdapterContainer<T extends Archive<T>>

Type Parameters:
T -
All Known Subinterfaces:
ResourceAdapterArchive

public interface ResourceAdapterContainer<T extends Archive<T>>

Defines the contract for a component capable of storing Resource adapter resources.

Version:
$Revision: $
Author:
John Bailey, Aslak Knutsen

Method Summary
 T setResourceAdapterXML(Asset resource)
          Adds the Asset as ra.xml to the container, returning the container itself.
 T setResourceAdapterXML(File resource)
          Adds the File as ra.xml to the container, returning the container itself.
 T setResourceAdapterXML(Package resourcePackage, String resourceName)
          Adds the resource inside the package as ra.xml to the container, returning the container itself.
 T setResourceAdapterXML(String resourceName)
          Adds the resource as ra.xml to the container, returning the container itself.
 T setResourceAdapterXML(URL resource)
          Adds the URL as ra.xml to the container, returning the container itself.
 

Method Detail

setResourceAdapterXML

T setResourceAdapterXML(String resourceName)
                                           throws IllegalArgumentException
Adds the resource as ra.xml to the container, returning the container itself.
The ClassLoader used to obtain the resource is up to the implementation.

Parameters:
resourceName - resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
setResourceAdapterXML(Asset)

setResourceAdapterXML

T setResourceAdapterXML(File resource)
                                           throws IllegalArgumentException
Adds the File as ra.xml to the container, returning the container itself.

Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
setResourceAdapterXML(Asset)

setResourceAdapterXML

T setResourceAdapterXML(URL resource)
                                           throws IllegalArgumentException
Adds the URL as ra.xml to the container, returning the container itself.

Parameters:
resource - URL resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
setResourceAdapterXML(Asset)

setResourceAdapterXML

T setResourceAdapterXML(Asset resource)
                                           throws IllegalArgumentException
Adds the Asset as ra.xml to the container, returning the container itself.

Parameters:
resource - Asset resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null

setResourceAdapterXML

T setResourceAdapterXML(Package resourcePackage,
                        String resourceName)
                                           throws IllegalArgumentException
Adds the resource inside the package as ra.xml to the container, returning the container itself.

The ClassLoader used to obtain the resource is up to the implementation.

Parameters:
resourcePackage - The package of the resources
resourceName - The name of the resource inside resourcePackage
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourcePackage is null
IllegalArgumentException - if resourceName is null
See Also:
setResourceAdapterXML(String)


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