@Reference
BundleContext bundleContext;
@Override
public Object execute() throws Exception {
DumpDestination destination;
// create default file name if none provided
if (fileName == null || fileName.trim().length() == 0) {
fileName = dumpFormat.format(new Date());
if (!directory) {
fileName += ".zip";
}
}
File target = new File(fileName);
// if directory switch is on, create dump in directory
if (directory) {
destination = Dump.directory(target);
} else {
destination = Dump.zip(target);
}
Dump.dump(bundleContext, destination);
System.out.println("Created dump " + destination.toString());
return null;
}