From 0bda01815c51b1f1e1d3e3eda592219eb39bf78b Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 11 Jul 2016 14:25:27 +0500 Subject: - Split geofence refresh on 3 functions - Enable back groupsCache --- src/org/traccar/api/resource/GeofencePermissionResource.java | 4 ++-- src/org/traccar/api/resource/GeofenceResource.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/org/traccar/api/resource') diff --git a/src/org/traccar/api/resource/GeofencePermissionResource.java b/src/org/traccar/api/resource/GeofencePermissionResource.java index 329c72b07..3a82845f5 100644 --- a/src/org/traccar/api/resource/GeofencePermissionResource.java +++ b/src/org/traccar/api/resource/GeofencePermissionResource.java @@ -39,7 +39,7 @@ public class GeofencePermissionResource extends BaseResource { Context.getPermissionsManager().checkUser(getUserId(), entity.getUserId()); Context.getPermissionsManager().checkGeofence(getUserId(), entity.getGeofenceId()); Context.getDataManager().linkGeofence(entity.getUserId(), entity.getGeofenceId()); - Context.getGeofenceManager().refresh(); + Context.getGeofenceManager().refreshUserGeofences(); return Response.ok(entity).build(); } @@ -49,7 +49,7 @@ public class GeofencePermissionResource extends BaseResource { Context.getPermissionsManager().checkUser(getUserId(), entity.getUserId()); Context.getPermissionsManager().checkGeofence(getUserId(), entity.getGeofenceId()); Context.getDataManager().unlinkGeofence(entity.getUserId(), entity.getGeofenceId()); - Context.getGeofenceManager().refresh(); + Context.getGeofenceManager().refreshUserGeofences(); return Response.noContent().build(); } diff --git a/src/org/traccar/api/resource/GeofenceResource.java b/src/org/traccar/api/resource/GeofenceResource.java index 44f6fc2f5..960ab813f 100644 --- a/src/org/traccar/api/resource/GeofenceResource.java +++ b/src/org/traccar/api/resource/GeofenceResource.java @@ -78,7 +78,7 @@ public class GeofenceResource extends BaseResource { Context.getPermissionsManager().checkReadonly(getUserId()); Context.getDataManager().addGeofence(entity); Context.getDataManager().linkGeofence(getUserId(), entity.getId()); - Context.getGeofenceManager().refresh(); + Context.getGeofenceManager().refreshGeofences(); return Response.ok(entity).build(); } @@ -97,7 +97,7 @@ public class GeofenceResource extends BaseResource { Context.getPermissionsManager().checkReadonly(getUserId()); Context.getPermissionsManager().checkGeofence(getUserId(), id); Context.getDataManager().removeGeofence(id); - Context.getGeofenceManager().refresh(); + Context.getGeofenceManager().refreshGeofences(); return Response.noContent().build(); } -- cgit v1.2.3