private void readDefaultStartLevel(ConfigData configData, Properties props) { if (props.getProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL) != null) configData.setInitialBundleStartLevel(Integer.parseInt(props.getProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL))); }
private void readDefaultStartLevel(ConfigData configData, Properties props) { if (props.getProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL) != null) configData.setInitialBundleStartLevel(Integer.parseInt(props.getProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL))); }
@SuppressWarnings({"rawtypes", "unchecked"}) EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin, PlatformAdmin admin, StartLevel slService, boolean runtime) { this.context = context; this.fwAdmin = fwAdmin; this.platformAdmin = admin; this.startLevelService = slService; if (context != null) { cmTracker = new ServiceTracker(context, ConfiguratorManipulator.class.getName(), null); cmTracker.open(); } // this.runtime = runtime; if (runtime) initializeRuntime(); // XXX For Equinox, default value of Initial Bundle Start Level is 4. // Precisely speaking, it's not correct. // Equinox doesn't support setting initial bundle start level as an OSGi terminology. // Only bundles installed by config.ini and updateconfigurator will have that start level(4). // Others has a start level of 1. configData.setInitialBundleStartLevel(4); }
EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin, PlatformAdmin admin, StartLevel slService, boolean runtime) { this.context = context; this.fwAdmin = fwAdmin; this.platformAdmin = admin; this.startLevelService = slService; if (context != null) { cmTracker = new ServiceTracker(context, ConfiguratorManipulator.class.getName(), null); cmTracker.open(); } // this.runtime = runtime; if (runtime) initializeRuntime(); // XXX For Equinox, default value of Initial Bundle Start Level is 4. // Precisely speaking, it's not correct. // Equinox doesn't support setting initial bundle start level as an OSGi terminology. // Only bundles installed by config.ini and updateconfigurator will have that start level(4). // Others has a start level of 1. configData.setInitialBundleStartLevel(4); }
configData.setInitialBundleStartLevel(startLevelService.getInitialBundleStartLevel());
configData.setInitialBundleStartLevel(startLevelService.getInitialBundleStartLevel());
public void setConfigData(ConfigData configData) { this.configData.initialize(); this.configData.setInitialBundleStartLevel(configData.getInitialBundleStartLevel()); this.configData.setBeginningFwStartLevel(configData.getBeginingFwStartLevel()); BundleInfo[] bInfos = configData.getBundles(); for (int i = 0; i < bInfos.length; i++) this.configData.addBundle(bInfos[i]); this.configData.setProperties(configData.getProperties()); if (this.configData.getFwName().equals(configData.getFwName())) if (this.configData.getFwVersion().equals(configData.getFwVersion())) { // TODO refine the algorithm to copying fw dependent props. // configData.getFwName()/getFwVersion()/ // getLauncherName()/getLauncherVersion() might be taken into consideration. this.configData.setProperties(configData.getProperties()); } }
@Override public void setConfigData(ConfigData configData) { this.configData.initialize(); this.configData.setInitialBundleStartLevel(configData.getInitialBundleStartLevel()); this.configData.setBeginningFwStartLevel(configData.getBeginingFwStartLevel()); BundleInfo[] bInfos = configData.getBundles(); for (int i = 0; i < bInfos.length; i++) this.configData.addBundle(bInfos[i]); this.configData.setProperties(configData.getProperties()); if (this.configData.getFwName().equals(configData.getFwName())) if (this.configData.getFwVersion().equals(configData.getFwVersion())) { // TODO refine the algorithm to copying fw dependent props. // configData.getFwName()/getFwVersion()/ // getLauncherName()/getLauncherVersion() might be taken into consideration. this.configData.setProperties(configData.getProperties()); } }