Skip to content
Permalink
Browse files

Minor update for AssetIdFilter

  • Loading branch information...
richturner committed May 10, 2019
1 parent 1e01ec1 commit 59c1f4b453ea8d6f6b0c95a5f5a57a2cb266effe
@@ -45,7 +45,6 @@
import org.openremote.model.datapoint.Datapoint;
import org.openremote.model.datapoint.DatapointInterval;
import org.openremote.model.datapoint.NumberDatapoint;
import org.openremote.model.event.shared.SharedEventWithAssetId;
import org.openremote.model.event.shared.TenantFilter;
import org.openremote.model.interop.Consumer;
import org.openremote.model.map.MapResource;
@@ -187,7 +186,7 @@ public void enableLiveUpdates(boolean enable) {
protected void subscribeLiveUpdates(boolean subscribe) {
if (subscribe) {
environment.getEventService().subscribe(
SharedEventWithAssetId.class,
AttributeEvent.class,
new AssetEvent.AssetIdFilter(asset.getId())
);
} else {
@@ -40,7 +40,6 @@
import org.openremote.model.attribute.AttributeValueType;
import org.openremote.model.event.bus.EventBus;
import org.openremote.model.event.bus.EventRegistration;
import org.openremote.model.event.shared.SharedEventWithAssetId;
import org.openremote.model.geo.GeoJSON;
import org.openremote.model.map.MapResource;
import org.openremote.model.value.Values;
@@ -181,7 +180,7 @@ public void onMapReady() {
if (asset.hasGeoFeature() || dashboardAttributes.size() > 0) {
showAssetInfoItems();
environment.getEventService().subscribe(
SharedEventWithAssetId.class,
AttributeEvent.class,
new AssetEvent.AssetIdFilter(asset.getId())
);
}
@@ -32,7 +32,7 @@
*/
public class AssetEvent extends SharedEventWithAssetId {

public static class AssetIdFilter extends EventFilter<SharedEventWithAssetId> {
public static class AssetIdFilter<T extends SharedEventWithAssetId> extends EventFilter<T> {

public static final String FILTER_TYPE = "asset-id";

0 comments on commit 59c1f4b

Please sign in to comment.
You can’t perform that action at this time.