/**
* @see org.osgi.jmx.framework.FrameworkMBean#setBundleStartLevels(long[], int[])
*/
public CompositeData setBundleStartLevels(long[] bundleIdentifiers, int[] newlevels) throws IOException {
if(bundleIdentifiers == null || newlevels == null){
return new BatchActionResult("Failed to setBundleStartLevels arguments can't be null").toCompositeData();
}
if(bundleIdentifiers != null && newlevels != null && bundleIdentifiers.length != newlevels.length){
return new BatchActionResult("Failed to setBundleStartLevels size of arguments should be same").toCompositeData();
}
for (int i = 0; i < bundleIdentifiers.length; i++) {
try {
setBundleStartLevel(bundleIdentifiers[i], newlevels[i]);
} catch (Throwable t) {
return createFailedBatchActionResult(bundleIdentifiers, i, t);
}
}
return new BatchActionResult(bundleIdentifiers).toCompositeData();
}