Class ExplodedImporterImpl
- java.lang.Object
-
- org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
-
- org.jboss.shrinkwrap.impl.base.importer.ExplodedImporterImpl
-
- All Implemented Interfaces:
Assignable,ExplodedImporter
public class ExplodedImporterImpl extends AssignableBase<Archive<?>> implements ExplodedImporter
ExplodedImporterImpl Importer used to import Exploded directory structures into aArchive- Version:
- $Revision: $
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.LoggerlogLogger
-
Constructor Summary
Constructors Constructor Description ExplodedImporterImpl(Archive<?> archive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voida()private ArchivePathcalculatePath(java.io.File root, java.io.File child)Calculate the relative child path.private voiddoImport(java.io.File root, java.io.File[] files, Filter<ArchivePath> filter)ExplodedImporterimportDirectory(java.io.File file)Import a directory structure as a archive.ExplodedImporterimportDirectory(java.io.File file, Filter<ArchivePath> filter)Import a directory structure as a archive.ExplodedImporterimportDirectory(java.lang.String fileName)Import a directory structure as a archive.ExplodedImporterimportDirectory(java.lang.String fileName, Filter<ArchivePath> filter)Import a directory structure as a archive.private java.lang.StringunifyPath(java.lang.String path)Windows vs Linux will return different path separators, unify the paths.-
Methods inherited from class org.jboss.shrinkwrap.impl.base.AssignableBase
as, getArchive
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
-
-
-
-
Constructor Detail
-
ExplodedImporterImpl
public ExplodedImporterImpl(Archive<?> archive)
-
-
Method Detail
-
a
void a()
-
importDirectory
public ExplodedImporter importDirectory(java.lang.String fileName)
Import a directory structure as a archive.- Specified by:
importDirectoryin interfaceExplodedImporter- Parameters:
fileName- The name of the directory to import- Returns:
- this
- See Also:
ExplodedImporter.importDirectory(java.lang.String)
-
importDirectory
public ExplodedImporter importDirectory(java.lang.String fileName, Filter<ArchivePath> filter)
Import a directory structure as a archive.- Specified by:
importDirectoryin interfaceExplodedImporter- Parameters:
fileName- The name of the directory to importfilter- The filter control which files or directories will be imported- Returns:
- this
- See Also:
ExplodedImporter.importDirectory(java.lang.String, org.jboss.shrinkwrap.api.Filter)
-
importDirectory
public ExplodedImporter importDirectory(java.io.File file)
Import a directory structure as a archive.- Specified by:
importDirectoryin interfaceExplodedImporter- Parameters:
file- The directory to import- Returns:
- this
- See Also:
ExplodedImporter.importDirectory(java.io.File)
-
importDirectory
public ExplodedImporter importDirectory(java.io.File file, Filter<ArchivePath> filter)
Import a directory structure as a archive.- Specified by:
importDirectoryin interfaceExplodedImporter- Parameters:
file- The directory to importfilter- The filter control which files or directories will be imported- Returns:
- this
- See Also:
ExplodedImporter.importDirectory(java.io.File, org.jboss.shrinkwrap.api.Filter)
-
doImport
private void doImport(java.io.File root, java.io.File[] files, Filter<ArchivePath> filter)
-
calculatePath
private ArchivePath calculatePath(java.io.File root, java.io.File child)
Calculate the relative child path.- Parameters:
root- The Archive root folderchild- The Child file- Returns:
- a Path fort he child relative to root
-
unifyPath
private java.lang.String unifyPath(java.lang.String path)
Windows vs Linux will return different path separators, unify the paths.- Returns:
-
-