.getDestination().getGroup().getId());
// we need to obtain the bundle type (the remote plugin container needs it). our first criteria can't fetch this deep, we have to do another query.
BundleVersionCriteria bvc = new BundleVersionCriteria();
bvc.addFilterId(liveDeployment.getBundleVersion().getId());
bvc.fetchBundle(true); // will eagerly fetch the bundle type
PageList<BundleVersion> bvs = bundleManager.findBundleVersionsByCriteria(subject, bvc);
liveDeployment.setBundleVersion(bvs.get(0)); // wire up the full bundle version back into the live deployment
// the bundle type doesn't eagerly load the resource type - the remote plugin container needs that too
ResourceTypeCriteria rtc = new ResourceTypeCriteria();
rtc.addFilterIgnored(null); // we are purging, so we don't care if this returns ignored types or not, just purge anyway