|
|
@ -137,7 +137,8 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@PUT
|
|
|
|
@PUT
|
|
|
|
public Response updateDeviceType(String type, DeviceType deviceType) {
|
|
|
|
@Path("/{type}")
|
|
|
|
|
|
|
|
public Response updateDeviceType(@PathParam("type") String type, DeviceType deviceType) {
|
|
|
|
if (deviceType != null && deviceType.getDeviceTypeMetaDefinition() != null) {
|
|
|
|
if (deviceType != null && deviceType.getDeviceTypeMetaDefinition() != null) {
|
|
|
|
if (deviceType.getName() == null || !deviceType.getName().equals(type)) {
|
|
|
|
if (deviceType.getName() == null || !deviceType.getName().equals(type)) {
|
|
|
|
return Response.status(Response.Status.BAD_REQUEST).entity("Type name mismatch. Expected: '" + type +
|
|
|
|
return Response.status(Response.Status.BAD_REQUEST).entity("Type name mismatch. Expected: '" + type +
|
|
|
@ -163,7 +164,10 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Response addDeviceTypePlatformConfig(String type, PlatformConfiguration platformConfiguration) {
|
|
|
|
@POST
|
|
|
|
|
|
|
|
@Path("/{type}/configs")
|
|
|
|
|
|
|
|
public Response addDeviceTypePlatformConfig(@PathParam("type") String type,
|
|
|
|
|
|
|
|
PlatformConfiguration platformConfiguration) {
|
|
|
|
boolean isSaved;
|
|
|
|
boolean isSaved;
|
|
|
|
if (platformConfiguration.getType() == null || !platformConfiguration.getType().equals(type)) {
|
|
|
|
if (platformConfiguration.getType() == null || !platformConfiguration.getType().equals(type)) {
|
|
|
|
return Response.status(Response.Status.BAD_REQUEST).entity("Type name mismatch. Expected: '" + type +
|
|
|
|
return Response.status(Response.Status.BAD_REQUEST).entity("Type name mismatch. Expected: '" + type +
|
|
|
|