public abstract class AArchiveBundleContainerResolver extends AEmbeddableContainerResolver
Modifier and Type | Field and Description |
---|---|
static org.pfsw.file.IZipEntryFilter |
ALL_ZIP_ENTRIES |
SYS_PROP_CONTAINER_ROOT_DIR
Constructor and Description |
---|
AArchiveBundleContainerResolver(IClassSpaceBuilder classSpaceBuilder,
org.pfsw.tools.cda.base.model.container.BundleContainerSpecification parentContainerSpec) |
Modifier and Type | Method and Description |
---|---|
protected void |
addContainerForClassesFolder(java.lang.String classesFolder)
Adds a container for the given classes folder inside the archive and adds
all classes in that folder to the container.
|
protected java.util.Optional<java.nio.file.Path> |
extractToTempFolder(java.io.File zipFile,
org.pfsw.file.IZipEntryFilter filter) |
protected org.pfsw.tools.cda.base.model.container.BundleContainerSpecification |
getBundleContainerSpec()
Returns the bundle container specification after it has been initialized
by
initBundle(ClasspathPartDefinition, File) invocation. |
protected abstract org.pfsw.file.IZipEntryFilter |
getBundleExtractFilter()
Returns the filter that specifies which files to extract from the bundle
into a temporary folder.
|
protected abstract java.util.Set<java.lang.String> |
getExtraContainerDirNames()
Returns a set of relative directory path names for which separate containers
will be registered.
|
protected java.nio.file.Path |
getTempPath()
Returns the path to the temporary directory to which the archive/bundle
has been extracted by the
initBundle(ClasspathPartDefinition, File) method. |
protected boolean |
initBundle(org.pfsw.tools.cda.base.model.workset.ClasspathPartDefinition partDefinition,
java.io.File zipFile)
Initialize this resolver with the archive (zip) file and some optional
parent container data.
|
protected boolean |
processContainedContainerFile(java.io.File file)
Run another resolver on the given file with the specified relative name.
|
protected void |
setBundleContainerSpec(org.pfsw.tools.cda.base.model.container.BundleContainerSpecification bundleContainerSpec) |
createClassContainer, determineContainerFullName, determineContainerQualifiedName, determineRelativeName, getContainerType, getParentContainerSpec, hasParentContainerSpec, resolveContainer
addContainerToClassSpace, appContext, asAbsoluteFile, coll, fileUtil, findOrCreateContainer, getClassSpaceBuilder, getDefinitionFrom, getLogger, getWorkset, setClassSpaceBuilder, str
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolveContainers
public AArchiveBundleContainerResolver(IClassSpaceBuilder classSpaceBuilder, org.pfsw.tools.cda.base.model.container.BundleContainerSpecification parentContainerSpec)
protected abstract org.pfsw.file.IZipEntryFilter getBundleExtractFilter()
protected abstract java.util.Set<java.lang.String> getExtraContainerDirNames()
protected boolean initBundle(org.pfsw.tools.cda.base.model.workset.ClasspathPartDefinition partDefinition, java.io.File zipFile)
Subclasses must always call this method first. After this method returns with true
they can analyze the extracted temp folder for more sub-containers.
Then the following methods can be used:
partDefinition
- Contains the full name of the parent or is null.zipFile
- The physical archive file to be analyzed (must not be null).protected java.util.Optional<java.nio.file.Path> extractToTempFolder(java.io.File zipFile, org.pfsw.file.IZipEntryFilter filter)
protected void addContainerForClassesFolder(java.lang.String classesFolder)
classesFolder
- The relative folder name that is supposed to contain *.class files.protected boolean processContainedContainerFile(java.io.File file)
file
- The real location on the file system (must not be null).protected java.nio.file.Path getTempPath()
initBundle(ClasspathPartDefinition, File)
method.protected org.pfsw.tools.cda.base.model.container.BundleContainerSpecification getBundleContainerSpec()
initBundle(ClasspathPartDefinition, File)
invocation.protected void setBundleContainerSpec(org.pfsw.tools.cda.base.model.container.BundleContainerSpecification bundleContainerSpec)