|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gemini.blueprint.test.internal.util.jar.JarCreator
public class JarCreator
Helper class for creating Jar files. Note that this class is stateful and the same instance should not be reused.
Field Summary | |
---|---|
static String |
EVERYTHING_PATTERN
|
Constructor Summary | |
---|---|
JarCreator()
|
Method Summary | |
---|---|
protected int |
addJarContent(Manifest manifest,
Map entries)
Actual jar creation. |
org.springframework.core.io.Resource |
createJar(Manifest manifest)
Create a jar using the current settings and return a Resource
pointing to the jar. |
org.springframework.core.io.Resource |
createJar(Manifest manifest,
Map content)
Create a jar using the current settings and return a Resource
pointing to the jar. |
String |
determineRootPath()
Resources' root path (the root path does not become part of the jar). |
Collection |
getContainedPackages()
|
String[] |
getContentPattern()
|
org.springframework.core.io.support.ResourcePatternResolver |
getPatternResolver()
|
String |
getRootPath()
|
Storage |
getStorage()
|
boolean |
isAddFolders()
|
Map |
resolveContent()
Resolve the jar content based on its path. |
void |
setAddFolders(boolean addFolders)
Whether the folders in which the files reside, should be added to the archive. |
void |
setContentPattern(String[] contentPattern)
Pattern for content matching. |
void |
setPatternResolver(org.springframework.core.io.support.ResourcePatternResolver patternResolver)
|
void |
setRootPath(String rootPath)
|
void |
setStorage(Storage jarStorage)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EVERYTHING_PATTERN
Constructor Detail |
---|
public JarCreator()
Method Detail |
---|
public String determineRootPath()
protected int addJarContent(Manifest manifest, Map entries) throws IOException
manifest
- to useentries
- array of resource to include in the jar
IOException
public org.springframework.core.io.Resource createJar(Manifest manifest)
Resource
pointing to the jar.
manifest
- public org.springframework.core.io.Resource createJar(Manifest manifest, Map content)
Resource
pointing to the jar.
manifest
- public Map resolveContent()
public Collection getContainedPackages()
public String[] getContentPattern()
public void setContentPattern(String[] contentPattern)
EVERYTHING_PATTERN
can become problematic on windows due to file system locking.
contentPattern
- The contentPattern to set.public org.springframework.core.io.support.ResourcePatternResolver getPatternResolver()
public void setPatternResolver(org.springframework.core.io.support.ResourcePatternResolver patternResolver)
patternResolver
- The patternResolver to set.public Storage getStorage()
public void setStorage(Storage jarStorage)
jarStorage
- The jarStorage to set.public String getRootPath()
- public void setRootPath(String rootPath)
rootPath
- The rootPath to set.public boolean isAddFolders()
public void setAddFolders(boolean addFolders)
addFolders
- The addFolders to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |