Class ServerGroupArchive<T extends org.jboss.shrinkwrap.api.Archive<T>>

  • All Implemented Interfaces:
    org.jboss.shrinkwrap.api.Archive<T>, org.jboss.shrinkwrap.api.Assignable

    public class ServerGroupArchive<T extends org.jboss.shrinkwrap.api.Archive<T>>
    extends Object
    implements org.jboss.shrinkwrap.api.Archive<T>
    Allows an archive to be wrapped and return the server group names this archive should be associated with.
    Author:
    James R. Perkins
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T add​(org.jboss.shrinkwrap.api.Archive<?> archive, String path, Class<? extends org.jboss.shrinkwrap.api.exporter.StreamExporter> exporter)  
      T add​(org.jboss.shrinkwrap.api.Archive<?> archive, org.jboss.shrinkwrap.api.ArchivePath path, Class<? extends org.jboss.shrinkwrap.api.exporter.StreamExporter> exporter)  
      T add​(org.jboss.shrinkwrap.api.asset.Asset asset, String target)  
      T add​(org.jboss.shrinkwrap.api.asset.Asset asset, String target, String name)  
      T add​(org.jboss.shrinkwrap.api.asset.Asset asset, org.jboss.shrinkwrap.api.ArchivePath target)  
      T add​(org.jboss.shrinkwrap.api.asset.Asset asset, org.jboss.shrinkwrap.api.ArchivePath target, String name)  
      T add​(org.jboss.shrinkwrap.api.asset.NamedAsset namedAsset)  
      T addAsDirectories​(String... paths)  
      T addAsDirectories​(org.jboss.shrinkwrap.api.ArchivePath... paths)  
      T addAsDirectory​(String path)  
      T addAsDirectory​(org.jboss.shrinkwrap.api.ArchivePath path)  
      T addHandlers​(org.jboss.shrinkwrap.api.ArchiveEventHandler... handlers)  
      <TYPE extends org.jboss.shrinkwrap.api.Assignable>
      TYPE
      as​(Class<TYPE> clazz)  
      boolean contains​(String path)  
      boolean contains​(org.jboss.shrinkwrap.api.ArchivePath path)  
      org.jboss.shrinkwrap.api.Node delete​(String archivePath)  
      org.jboss.shrinkwrap.api.Node delete​(org.jboss.shrinkwrap.api.ArchivePath path)  
      T filter​(org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)  
      org.jboss.shrinkwrap.api.Node get​(String path)  
      org.jboss.shrinkwrap.api.Node get​(org.jboss.shrinkwrap.api.ArchivePath path)  
      <X extends org.jboss.shrinkwrap.api.Archive<X>>
      X
      getAsType​(Class<X> type, String path)  
      <X extends org.jboss.shrinkwrap.api.Archive<X>>
      X
      getAsType​(Class<X> type, String path, org.jboss.shrinkwrap.api.ArchiveFormat archiveFormat)  
      <X extends org.jboss.shrinkwrap.api.Archive<X>>
      X
      getAsType​(Class<X> type, org.jboss.shrinkwrap.api.ArchivePath path)  
      <X extends org.jboss.shrinkwrap.api.Archive<X>>
      X
      getAsType​(Class<X> type, org.jboss.shrinkwrap.api.ArchivePath path, org.jboss.shrinkwrap.api.ArchiveFormat archiveFormat)  
      <X extends org.jboss.shrinkwrap.api.Archive<X>>
      Collection<X>
      getAsType​(Class<X> type, org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)  
      <X extends org.jboss.shrinkwrap.api.Archive<X>>
      Collection<X>
      getAsType​(Class<X> type, org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter, org.jboss.shrinkwrap.api.ArchiveFormat archiveFormat)  
      Map<org.jboss.shrinkwrap.api.ArchivePath,​org.jboss.shrinkwrap.api.Node> getContent()  
      Map<org.jboss.shrinkwrap.api.ArchivePath,​org.jboss.shrinkwrap.api.Node> getContent​(org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)  
      String getId()  
      String getName()  
      Set<String> getServerGroups()
      THe server groups this archive should be associated with.
      T merge​(org.jboss.shrinkwrap.api.Archive<?> source)  
      T merge​(org.jboss.shrinkwrap.api.Archive<?> source, String path)  
      T merge​(org.jboss.shrinkwrap.api.Archive<?> source, String path, org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)  
      T merge​(org.jboss.shrinkwrap.api.Archive<?> source, org.jboss.shrinkwrap.api.ArchivePath path)  
      T merge​(org.jboss.shrinkwrap.api.Archive<?> source, org.jboss.shrinkwrap.api.ArchivePath path, org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)  
      T merge​(org.jboss.shrinkwrap.api.Archive<?> source, org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)  
      T move​(String source, String target)  
      T move​(org.jboss.shrinkwrap.api.ArchivePath source, org.jboss.shrinkwrap.api.ArchivePath target)  
      org.jboss.shrinkwrap.api.Archive<T> shallowCopy()  
      org.jboss.shrinkwrap.api.Archive<T> shallowCopy​(org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)  
      String toString()  
      String toString​(boolean verbose)  
      String toString​(org.jboss.shrinkwrap.api.formatter.Formatter formatter)  
      void writeTo​(OutputStream outputStream, org.jboss.shrinkwrap.api.formatter.Formatter formatter)  
    • Method Detail

      • getServerGroups

        public Set<String> getServerGroups()
        THe server groups this archive should be associated with.
        Returns:
        a set of server groups
      • getName

        public String getName()
        Specified by:
        getName in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • getId

        public String getId()
        Specified by:
        getId in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • add

        public T add​(org.jboss.shrinkwrap.api.asset.Asset asset,
                     org.jboss.shrinkwrap.api.ArchivePath target)
              throws IllegalArgumentException
        Specified by:
        add in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • add

        public T add​(org.jboss.shrinkwrap.api.asset.Asset asset,
                     org.jboss.shrinkwrap.api.ArchivePath target,
                     String name)
              throws IllegalArgumentException
        Specified by:
        add in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • add

        public T add​(org.jboss.shrinkwrap.api.asset.NamedAsset namedAsset)
              throws IllegalArgumentException
        Specified by:
        add in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • addAsDirectory

        public T addAsDirectory​(org.jboss.shrinkwrap.api.ArchivePath path)
                         throws IllegalArgumentException
        Specified by:
        addAsDirectory in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • addAsDirectories

        public T addAsDirectories​(org.jboss.shrinkwrap.api.ArchivePath... paths)
                           throws IllegalArgumentException
        Specified by:
        addAsDirectories in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • addHandlers

        public T addHandlers​(org.jboss.shrinkwrap.api.ArchiveEventHandler... handlers)
        Specified by:
        addHandlers in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • get

        public org.jboss.shrinkwrap.api.Node get​(org.jboss.shrinkwrap.api.ArchivePath path)
                                          throws IllegalArgumentException
        Specified by:
        get in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • getAsType

        public <X extends org.jboss.shrinkwrap.api.Archive<X>> X getAsType​(Class<X> type,
                                                                           String path)
        Specified by:
        getAsType in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • getAsType

        public <X extends org.jboss.shrinkwrap.api.Archive<X>> X getAsType​(Class<X> type,
                                                                           org.jboss.shrinkwrap.api.ArchivePath path)
        Specified by:
        getAsType in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • getAsType

        public <X extends org.jboss.shrinkwrap.api.Archive<X>> Collection<X> getAsType​(Class<X> type,
                                                                                       org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)
        Specified by:
        getAsType in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • getAsType

        public <X extends org.jboss.shrinkwrap.api.Archive<X>> X getAsType​(Class<X> type,
                                                                           String path,
                                                                           org.jboss.shrinkwrap.api.ArchiveFormat archiveFormat)
        Specified by:
        getAsType in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • getAsType

        public <X extends org.jboss.shrinkwrap.api.Archive<X>> X getAsType​(Class<X> type,
                                                                           org.jboss.shrinkwrap.api.ArchivePath path,
                                                                           org.jboss.shrinkwrap.api.ArchiveFormat archiveFormat)
        Specified by:
        getAsType in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • getAsType

        public <X extends org.jboss.shrinkwrap.api.Archive<X>> Collection<X> getAsType​(Class<X> type,
                                                                                       org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter,
                                                                                       org.jboss.shrinkwrap.api.ArchiveFormat archiveFormat)
        Specified by:
        getAsType in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • contains

        public boolean contains​(org.jboss.shrinkwrap.api.ArchivePath path)
                         throws IllegalArgumentException
        Specified by:
        contains in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • delete

        public org.jboss.shrinkwrap.api.Node delete​(org.jboss.shrinkwrap.api.ArchivePath path)
                                             throws IllegalArgumentException
        Specified by:
        delete in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • getContent

        public Map<org.jboss.shrinkwrap.api.ArchivePath,​org.jboss.shrinkwrap.api.Node> getContent()
        Specified by:
        getContent in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • getContent

        public Map<org.jboss.shrinkwrap.api.ArchivePath,​org.jboss.shrinkwrap.api.Node> getContent​(org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)
        Specified by:
        getContent in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • filter

        public T filter​(org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)
        Specified by:
        filter in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • add

        public T add​(org.jboss.shrinkwrap.api.Archive<?> archive,
                     org.jboss.shrinkwrap.api.ArchivePath path,
                     Class<? extends org.jboss.shrinkwrap.api.exporter.StreamExporter> exporter)
              throws IllegalArgumentException
        Specified by:
        add in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • add

        public T add​(org.jboss.shrinkwrap.api.Archive<?> archive,
                     String path,
                     Class<? extends org.jboss.shrinkwrap.api.exporter.StreamExporter> exporter)
              throws IllegalArgumentException
        Specified by:
        add in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • merge

        public T merge​(org.jboss.shrinkwrap.api.Archive<?> source,
                       org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)
                throws IllegalArgumentException
        Specified by:
        merge in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • merge

        public T merge​(org.jboss.shrinkwrap.api.Archive<?> source,
                       org.jboss.shrinkwrap.api.ArchivePath path)
                throws IllegalArgumentException
        Specified by:
        merge in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • merge

        public T merge​(org.jboss.shrinkwrap.api.Archive<?> source,
                       org.jboss.shrinkwrap.api.ArchivePath path,
                       org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)
                throws IllegalArgumentException
        Specified by:
        merge in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • merge

        public T merge​(org.jboss.shrinkwrap.api.Archive<?> source,
                       String path,
                       org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)
                throws IllegalArgumentException
        Specified by:
        merge in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
      • move

        public T move​(org.jboss.shrinkwrap.api.ArchivePath source,
                      org.jboss.shrinkwrap.api.ArchivePath target)
               throws IllegalArgumentException,
                      org.jboss.shrinkwrap.api.IllegalArchivePathException
        Specified by:
        move in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
        org.jboss.shrinkwrap.api.IllegalArchivePathException
      • move

        public T move​(String source,
                      String target)
               throws IllegalArgumentException,
                      org.jboss.shrinkwrap.api.IllegalArchivePathException
        Specified by:
        move in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Throws:
        IllegalArgumentException
        org.jboss.shrinkwrap.api.IllegalArchivePathException
      • toString

        public String toString()
        Specified by:
        toString in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
        Overrides:
        toString in class Object
      • toString

        public String toString​(boolean verbose)
        Specified by:
        toString in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • shallowCopy

        public org.jboss.shrinkwrap.api.Archive<T> shallowCopy()
        Specified by:
        shallowCopy in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • shallowCopy

        public org.jboss.shrinkwrap.api.Archive<T> shallowCopy​(org.jboss.shrinkwrap.api.Filter<org.jboss.shrinkwrap.api.ArchivePath> filter)
        Specified by:
        shallowCopy in interface org.jboss.shrinkwrap.api.Archive<T extends org.jboss.shrinkwrap.api.Archive<T>>
      • as

        public <TYPE extends org.jboss.shrinkwrap.api.Assignable> TYPE as​(Class<TYPE> clazz)
        Specified by:
        as in interface org.jboss.shrinkwrap.api.Assignable