|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Archive<T extends Archive<T>>
Archive Represents a collection of resources which may be constructed declaratively / programmatically.
Method Summary | |
---|---|
T |
add(Archive<?> archive,
ArchivePath path)
Add an archive under a specific context and maintain the archive name as context path. |
T |
add(Asset asset,
ArchivePath target)
Adds the specified asset under the specified path into the target context |
T |
add(Asset asset,
ArchivePath target,
String name)
Adds the specified asset under the specified target (directory) using the specified name. |
T |
add(Asset asset,
String target)
Adds the specified resource under the context denoted by the specified target |
T |
addDirectories(ArchivePath... paths)
Adds the specified directory. |
T |
addDirectories(String... paths)
Adds the specified directory. |
T |
addDirectory(ArchivePath path)
Adds the specified directory. |
T |
addDirectory(String path)
Adds the specified directory. |
boolean |
contains(ArchivePath path)
Denotes whether this archive contains a resource at the specified path |
boolean |
delete(ArchivePath path)
Removes the asset in the archive at the specified Path. |
Node |
get(ArchivePath path)
Obtains the Node located at the specified path |
Node |
get(String path)
Obtains the Node located at the specified path |
Map<ArchivePath,Node> |
getContent()
Obtains all assets in this archive, along with its respective Path. |
Map<ArchivePath,Node> |
getContent(Filter<ArchivePath> filter)
Obtains all assets matching given filter in this archive, along with its respective Path. |
String |
getName()
Obtains the name of this archive (ie. myLibrary.jar) |
T |
merge(Archive<?> source)
Merge the contents from an existing archive without maintaining the archive name in the context path. |
T |
merge(Archive<?> source,
ArchivePath path)
Merge the contents from an existing archive in a specific path without maintaining the archive name in the context path. |
T |
merge(Archive<?> source,
ArchivePath path,
Filter<ArchivePath> filter)
Merge the contents from an existing archive in a specific path without maintaining the archive name in the context path. |
T |
merge(Archive<?> source,
Filter<ArchivePath> filter)
Merge the contents from an existing archive without maintaining the archive name in the context path. |
String |
toString()
Acts as a shorthand for toString(Formatter)
where the Formatters.SIMPLE is leveraged. |
String |
toString(boolean verbose)
If "true" is specified, acts as a shorthand for toString(Formatter)
where the Formatters.VERBOSE is leveraged. |
String |
toString(Formatter formatter)
Returns a view of this Archive as returned from the
specified Formatter . |
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable |
---|
as |
Method Detail |
---|
String getName()
T add(Asset asset, ArchivePath target) throws IllegalArgumentException
target
- The context under which to add the assetsasset
-
IllegalArgumentException
- If no target or assets were specified
IllegalArchivePathException
- If the target is invalid.T add(Asset asset, ArchivePath target, String name) throws IllegalArgumentException
target
- The context directory under which to add the assetname
- The name to assign the assent under the target namespaceasset
-
IllegalArgumentException
- If the target, name, or asset was not specified
IllegalArchivePathException
- If the target is invalid.T add(Asset asset, String target) throws IllegalArgumentException
target
- asset
-
IllegalArgumentException
- If either the target or asset is not specified
IllegalArchivePathException
- If the target is invalid.T addDirectory(String path) throws IllegalArgumentException
path
- The path to add
IllegalArgumentException
- If no path was specified
IllegalArchivePathException
- If the path is invalid.T addDirectories(String... paths) throws IllegalArgumentException
paths
- The paths to add
IllegalArgumentException
- If no paths were specified
IllegalArchivePathException
- If at least one path is invalid.T addDirectory(ArchivePath path) throws IllegalArgumentException
path
- The path to add
IllegalArgumentException
- If no path was specified
IllegalArchivePathException
- If the path is invalid.T addDirectories(ArchivePath... paths) throws IllegalArgumentException
paths
- The paths to add
IllegalArgumentException
- If no paths were specified
IllegalArchivePathException
- If at least one path is invalid.Node get(ArchivePath path) throws IllegalArgumentException
Node
located at the specified path
path
-
Node
, or null if nothing is found at the specified path
IllegalArgumentException
- If the path is not specifiedNode get(String path) throws IllegalArgumentException
Node
located at the specified path
path
-
Node
, or null if nothing is found at the Path
IllegalArgumentException
- If the path is not specifiedboolean contains(ArchivePath path) throws IllegalArgumentException
path
-
IllegalArgumentException
- If the path is not specifiedboolean delete(ArchivePath path) throws IllegalArgumentException
path
-
IllegalArgumentException
Map<ArchivePath,Node> getContent()
Map<ArchivePath,Node> getContent(Filter<ArchivePath> filter)
T add(Archive<?> archive, ArchivePath path) throws IllegalArgumentException
path
- to usearchive
- to add
IllegalArgumentException
- If the path or archive are not specifiedT merge(Archive<?> source) throws IllegalArgumentException
source
- Archive to add contents from
IllegalArgumentException
- If the existing archive is not specifiedT merge(Archive<?> source, Filter<ArchivePath> filter) throws IllegalArgumentException
ArchivePath
s to include form the source Archive
.
source
- Archive to add contents from
IllegalArgumentException
- If the existing archive is not specifiedT merge(Archive<?> source, ArchivePath path) throws IllegalArgumentException
source
- Archive to add contents frompath
- Path to add contents to
IllegalArgumentException
- If the path or existing archive is not specifiedT merge(Archive<?> source, ArchivePath path, Filter<ArchivePath> filter) throws IllegalArgumentException
ArchivePath
s to include form the source Archive
.
source
- Archive to add contents frompath
- Path to add contents tofilter
- Filter to use for including Asset
s in the merge.
IllegalArgumentException
- If the path or existing archive is not specifiedString toString()
toString(Formatter)
where the Formatters.SIMPLE
is leveraged.
toString
in class Object
String toString(boolean verbose)
toString(Formatter)
where the Formatters.VERBOSE
is leveraged. Otherwise the
Formatters.SIMPLE
will be used (equivalent to toString()
).
String toString(Formatter formatter) throws IllegalArgumentException
Archive
as returned from the
specified Formatter
. Common options may be to use
the predefined formatters located in Formatters
formatter
-
IllegalArgumentException
- If the formatter is not specified
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |