|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.shrinkwrap.api.ArchiveFactory
public final class ArchiveFactory

Responsible for creating Archives, which may be
presented to the caller in a designated Assignable view.
| Method Summary | ||
|---|---|---|
|
create(java.lang.Class<T> type)
Creates a new archive of the specified type. |
|
|
create(java.lang.Class<T> type,
java.lang.String archiveName)
Creates a new archive of the specified type. |
|
|
createFromZipFile(java.lang.Class<T> type,
java.io.File archiveFile)
Creates a new archive of the specified type as imported from the specified File. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public <T extends Assignable> T create(java.lang.Class<T> type)
throws java.lang.IllegalArgumentException,
UnknownExtensionTypeException
Configuration
specific to this ArchiveFactory.
Generates a random name for the archive and adds proper extension based
on the service descriptor properties file if extension property is present
(e.g. shrinkwrap/impl-base/src/main/resources/META-INF/services/org.jboss.shrinkwrap.api.spec.JavaArchive)
type - The type of the archive e.g. WebArchive
Assignable archive base
java.lang.IllegalArgumentException - if type is not specified
UnknownExtensionTypeException - If no extension mapping is found for the specified type
public <T extends Assignable> T create(java.lang.Class<T> type,
java.lang.String archiveName)
throws java.lang.IllegalArgumentException
Configuration
specific to this ArchiveFactory.
type - The type of the archive e.g. WebArchivearchiveName - the archiveName to use
Assignable view
java.lang.IllegalArgumentException - either argument is not supplied
public <T extends Assignable> T createFromZipFile(java.lang.Class<T> type,
java.io.File archiveFile)
throws java.lang.IllegalArgumentException,
ArchiveImportException
File. The file is expected to be encoded as
ZIP (ie. JAR/WAR/EAR). The name of the archive will be set to File.getName().
The archive will be be backed by the Configuration
specific to this ArchiveFactory.
type - The type of the archive e.g. WebArchivearchiveFile - the archiveFile to use
Assignable view
java.lang.IllegalArgumentException - If either argument is not supplied, if the specified
File does not exist, or is not a valid ZIP file
ArchiveImportException - If an error occurred during the import process
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||