use of com.sun.enterprise.admin.servermgmt.xml.stringsubs.MemberEntry in project Payara by payara.
the class ArchiveEntryWrapperImpl method extract.
/**
* Extract all the substitutable entries for an archive.
* It also takes care of extracting substitutable entries
* from nested archives.
*
* @throws IOException If any IO error occurs during extraction.
*/
private void extract() throws IOException {
for (Object object : _archive.getArchiveOrMemberEntry()) {
String extratFilePath = _extractDir.getAbsolutePath() + File.separator;
if (object instanceof Archive) {
Archive archive = (Archive) object;
File file = new File(extratFilePath + archive.getName());
try {
extractEntry(archive.getName(), file);
} catch (IllegalArgumentException e) {
continue;
}
_extractedEntries.put(archive.getName(), file);
new ArchiveEntryWrapperImpl(archive, extratFilePath, this);
_noOfExtractedEntries.incrementAndGet();
} else if (object instanceof MemberEntry) {
MemberEntry entry = (MemberEntry) object;
File file = new File(extratFilePath + entry.getName());
try {
extractEntry(entry.getName(), file);
} catch (IllegalArgumentException e) {
continue;
}
_extractedEntries.put(entry.getName(), file);
getAllArchiveMemberList().add(new ArchiveMemberHandler(file, this));
_noOfExtractedEntries.incrementAndGet();
} else {
_logger.log(Level.WARNING, SLogger.INVALID_ARCHIVE_ENTRY, new Object[] { object, _archive.getName() });
}
}
}
Aggregations