ShrinkWrap Implementation Base 1.0.0

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

java.lang.Object
  extended by org.jboss.shrinkwrap.impl.base.ArchiveBase<T>
      extended by org.jboss.shrinkwrap.impl.base.MemoryMapArchiveBase<T>
Type Parameters:
T -
All Implemented Interfaces:
Archive<T>, Assignable, ArchiveFormatAssociable, Configurable
Direct Known Subclasses:
MemoryMapArchiveImpl

public abstract class MemoryMapArchiveBase<T extends Archive<T>>
extends ArchiveBase<T>
implements Archive<T>

MemoryMapArchiveBase A base implementation for all MemoryMap archives. Thread-safe.

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

Constructor Summary
MemoryMapArchiveBase(Configuration configuration)
          Constructor This constructor will generate a unique Archive.getName() per instance.
MemoryMapArchiveBase(String archiveName, Configuration configuration)
          Constructor This constructor will generate an Archive with the provided name.
 
Method Summary
 T add(Archive<?> archive, ArchivePath path, Class<? extends StreamExporter> exporter)
          
 T add(Archive<?> archive, String path, Class<? extends StreamExporter> exporter)
          
 T add(Asset asset, ArchivePath path)
          
 T addAsDirectory(ArchivePath path)
          
 boolean contains(ArchivePath path)
          
 boolean contains(String path)
          
 Node delete(ArchivePath path)
          
 Node delete(String archivePath)
          
 Node get(ArchivePath path)
          
 Map<ArchivePath,Node> getContent()
          
 Map<ArchivePath,Node> getContent(Filter<ArchivePath> filter)
          
 
Methods inherited from class org.jboss.shrinkwrap.impl.base.ArchiveBase
add, add, add, add, addAsDirectories, addAsDirectories, addAsDirectory, as, covariantReturn, equals, get, getActualClass, getArchiveFormat, getAsType, getAsType, getAsType, getAsType, getAsType, getAsType, getConfiguration, getName, hashCode, merge, merge, merge, merge, merge, merge, toString, toString, toString, writeTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.shrinkwrap.api.Archive
add, add, add, add, addAsDirectories, addAsDirectories, addAsDirectory, get, getAsType, getAsType, getAsType, getAsType, getAsType, getAsType, getName, merge, merge, merge, merge, merge, merge, toString, toString, toString, writeTo
 
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
 

Constructor Detail

MemoryMapArchiveBase

public MemoryMapArchiveBase(Configuration configuration)
                     throws IllegalArgumentException
Constructor This constructor will generate a unique Archive.getName() per instance.

Parameters:
configuration - The configuration for this archive
Throws:
IllegalArgumentException - If the configuration is not specified

MemoryMapArchiveBase

public MemoryMapArchiveBase(String archiveName,
                            Configuration configuration)
                     throws IllegalArgumentException
Constructor This constructor will generate an Archive with the provided name.

Parameters:
archiveName -
configuration - The configuration for this archive
Throws:
IllegalArgumentException - If the name or configuration is not specified
Method Detail

add

public T add(Asset asset,
             ArchivePath path)

Specified by:
add in interface Archive<T extends Archive<T>>
See Also:
Archive.add(org.jboss.shrinkwrap.api.asset.Asset, org.jboss.shrinkwrap.api.ArchivePath)

add

public T add(Archive<?> archive,
             String path,
             Class<? extends StreamExporter> exporter)

Specified by:
add in interface Archive<T extends Archive<T>>
See Also:
Archive.add(org.jboss.shrinkwrap.api.Archive, java.lang.String, java.lang.Class)

add

public T add(Archive<?> archive,
             ArchivePath path,
             Class<? extends StreamExporter> exporter)

Specified by:
add in interface Archive<T extends Archive<T>>
Overrides:
add in class ArchiveBase<T extends Archive<T>>
See Also:
ArchiveBase.add(org.jboss.shrinkwrap.api.Archive, org.jboss.shrinkwrap.api.ArchivePath, java.lang.Class)

addAsDirectory

public T addAsDirectory(ArchivePath path)
                                    throws IllegalArgumentException

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

contains

public boolean contains(ArchivePath path)

Specified by:
contains in interface Archive<T extends Archive<T>>
See Also:
Archive.contains(org.jboss.shrinkwrap.api.ArchivePath)

contains

public boolean contains(String path)
                 throws IllegalArgumentException

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

delete

public Node delete(ArchivePath path)

Specified by:
delete in interface Archive<T extends Archive<T>>
See Also:
org.jboss.shrinkwrap.api.Archive#delete(org.jboss.declarchive.api.ArchivePath)

delete

public Node delete(String archivePath)

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

get

public Node get(ArchivePath path)

Specified by:
get in interface Archive<T extends Archive<T>>
See Also:
Archive.get(org.jboss.shrinkwrap.api.ArchivePath)

getContent

public Map<ArchivePath,Node> getContent()

Specified by:
getContent in interface Archive<T extends Archive<T>>
See Also:
Archive.getContent()

getContent

public Map<ArchivePath,Node> getContent(Filter<ArchivePath> filter)

Specified by:
getContent in interface Archive<T extends Archive<T>>
See Also:
Archive.getContent(org.jboss.shrinkwrap.api.Filter)

ShrinkWrap Implementation Base 1.0.0

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