@Override public <T extends Location> T createLocation(Map<?, ?> config, Class<T> type) { if (isInitialManagementContextReal()) { return initialManagementContext.getLocationManager().createLocation(config, type); } else { throw new IllegalStateException("Non-deployment context "+this+" is not valid for this operation: cannot create "+type); } }
@Override public Location manage(Location loc) { if (isInitialManagementContextReal()) { return initialManagementContext.getLocationManager().manage(loc); } else { throw new IllegalStateException("Non-deployment context "+this+" is not valid for this operation: cannot manage "+loc); } }
@Override public Collection<Location> getLocations() { if (isInitialManagementContextReal()) { return initialManagementContext.getLocationManager().getLocations(); } else { return Collections.emptyList(); } }
@Override public <T extends Location> T createLocation(LocationSpec<T> spec) { if (isInitialManagementContextReal()) { return initialManagementContext.getLocationManager().createLocation(spec); } else { throw new IllegalStateException("Non-deployment context "+this+" is not valid for this operation: cannot create "+spec); } }
@Override public void unmanage(Location loc) { if (isInitialManagementContextReal()) { initialManagementContext.getLocationManager().unmanage(loc); } else { throw new IllegalStateException("Non-deployment context "+this+" is not valid for this operation: cannot unmanage "+loc); } }
@Override public Location getLocation(String id) { if (isInitialManagementContextReal()) { return initialManagementContext.getLocationManager().getLocation(id); } else { return null; } }