aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorGábor Somogyi <gabor.g.somogyi@gmail.com>2016-05-06 00:00:33 +0200
committerGábor Somogyi <gabor.g.somogyi@gmail.com>2016-05-06 00:00:33 +0200
commit393192ff0253e74e1ada9cb364a1c05cc7ac7e23 (patch)
treeea07f1c29c9f9124b205e9b1df46118b8a11825c /src/org/traccar/api
parent69c6d76fa6f5aba94477fae71fc348cd464ba2ac (diff)
downloadtraccar-server-393192ff0253e74e1ada9cb364a1c05cc7ac7e23.tar.gz
traccar-server-393192ff0253e74e1ada9cb364a1c05cc7ac7e23.tar.bz2
traccar-server-393192ff0253e74e1ada9cb364a1c05cc7ac7e23.zip
Rename SupportedCommand to CommandType
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r--src/org/traccar/api/resource/CommandTypeResource.java (renamed from src/org/traccar/api/resource/SupportedCommandResource.java)10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/api/resource/SupportedCommandResource.java b/src/org/traccar/api/resource/CommandTypeResource.java
index 1d5ce8595..9f9ecf249 100644
--- a/src/org/traccar/api/resource/SupportedCommandResource.java
+++ b/src/org/traccar/api/resource/CommandTypeResource.java
@@ -18,7 +18,7 @@ package org.traccar.api.resource;
import org.traccar.Context;
import org.traccar.api.BaseResource;
import org.traccar.model.Position;
-import org.traccar.model.SupportedCommand;
+import org.traccar.model.CommandType;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
@@ -30,17 +30,17 @@ import java.sql.SQLException;
import java.util.Collection;
import java.util.Collections;
-@Path("supportedcommands")
+@Path("commandtypes")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-public class SupportedCommandResource extends BaseResource {
+public class CommandTypeResource extends BaseResource {
@GET
- public Collection<SupportedCommand> get(@QueryParam("deviceId") long deviceId) throws SQLException {
+ public Collection<CommandType> get(@QueryParam("deviceId") long deviceId) throws SQLException {
Context.getPermissionsManager().checkDevice(getUserId(), deviceId);
Position lastPosition = Context.getConnectionManager().getLastPosition(deviceId);
if (lastPosition != null) {
- return Context.getServerManager().getProtocolSuppportedCommands(lastPosition.getProtocol());
+ return Context.getServerManager().getProtocolCommandTypes(lastPosition.getProtocol());
} else {
return Collections.EMPTY_LIST;
}