diff options
author | Abyss777 <abyss@fox5.ru> | 2018-06-27 15:55:19 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-06-27 15:55:19 +0500 |
commit | 14840af2abd9976b8f5634af8e77f4a7126dfac1 (patch) | |
tree | d9bd2bc190a1a67bda345cc804f3b21d20416cec /src/org/traccar/api | |
parent | b70e46560359a181b0136fa1c6b0400615bfc904 (diff) | |
download | traccar-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.tar.gz traccar-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.tar.bz2 traccar-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.zip |
- Rename NotificationException to MessageException
- Simplify Notificator instantiation
- Make sms configuration more clear
- Move some defaults in code
- Some cleanup
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r-- | src/org/traccar/api/resource/NotificationResource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/api/resource/NotificationResource.java b/src/org/traccar/api/resource/NotificationResource.java index 0d7a7982d..9631a52b7 100644 --- a/src/org/traccar/api/resource/NotificationResource.java +++ b/src/org/traccar/api/resource/NotificationResource.java @@ -31,7 +31,7 @@ import org.traccar.api.ExtendedObjectResource; import org.traccar.model.Event; import org.traccar.model.Notification; import org.traccar.model.Typed; -import org.traccar.notification.NotificationException; +import org.traccar.notification.MessageException; @Path("notifications") @@ -57,7 +57,7 @@ public class NotificationResource extends ExtendedObjectResource<Notification> { @POST @Path("test") - public Response testMessage() throws NotificationException, InterruptedException { + public Response testMessage() throws MessageException, InterruptedException { for (Typed method : Context.getNotificatorManager().getAllNotificatorTypes()) { Context.getNotificatorManager() .getNotificator(method.getType()).sendSync(getUserId(), new Event("test", 0), null); @@ -68,7 +68,7 @@ public class NotificationResource extends ExtendedObjectResource<Notification> { @POST @Path("test/{notificator}") public Response testMessage(@PathParam("notificator") String notificator) - throws NotificationException, InterruptedException { + throws MessageException, InterruptedException { Context.getNotificatorManager().getNotificator(notificator).sendSync(getUserId(), new Event("test", 0), null); return Response.noContent().build(); } |