/** * adds the indicated properties */ @SuppressWarnings("unchecked") public BrooklynProperties addFromMap(Map properties) { putAll(properties); return this; }
@SuppressWarnings("unchecked") public BrooklynProperties addEnvironmentVars() { putAll(System.getenv()); return this; } @SuppressWarnings("unchecked")
@SuppressWarnings("unchecked") public BrooklynProperties addSystemProperties() { putAll(System.getProperties()); return this; }
/** * Creates a new LocalManagementContext. * * @param brooklynProperties the BrooklynProperties. * @param storageFactory the BrooklynStorageFactory to use. If this instance is null, it means that the system * is going to use BrooklynProperties to figure out which instance to load or otherwise * use a default instance. */ @VisibleForTesting public LocalManagementContext(BrooklynProperties brooklynProperties, BrooklynStorageFactory storageFactory) { super(brooklynProperties,storageFactory); configMap.putAll(checkNotNull(brooklynProperties, "brooklynProperties")); this.locationManager = new LocalLocationManager(this); this.accessManager = new LocalAccessManager(); this.usageManager = new LocalUsageManager(this); INSTANCES.add(this); }