removed device type and feature annotation

revert-dabc3590
ayyoob 8 years ago
parent d6bfce396d
commit cf5525dc3f

@ -25,13 +25,10 @@ import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension; import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag; import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@DeviceType(value = "android_sense")
@SwaggerDefinition( @SwaggerDefinition(
info = @Info( info = @Info(
version = "1.0.0", version = "1.0.0",
@ -57,7 +54,6 @@ public interface AndroidSenseService {
*/ */
@Path("device/{deviceId}/words") @Path("device/{deviceId}/words")
@POST @POST
@Feature(code = "keywords", name = "Add Keywords", description = "Send keywords to the device")
@Scope(key = "device:android-sense:enroll", name = "", description = "") @Scope(key = "device:android-sense:enroll", name = "", description = "")
Response sendKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("keywords") String keywords); Response sendKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("keywords") String keywords);
@ -69,13 +65,11 @@ public interface AndroidSenseService {
*/ */
@Path("device/{deviceId}/words/threshold") @Path("device/{deviceId}/words/threshold")
@POST @POST
@Feature(code = "threshold", name = "Add a Threshold", description = "Set a threshold for word in the device")
@Scope(key = "device:android-sense:enroll", name = "", description = "") @Scope(key = "device:android-sense:enroll", name = "", description = "")
Response sendThreshold(@PathParam("deviceId") String deviceId, @QueryParam("threshold") String threshold); Response sendThreshold(@PathParam("deviceId") String deviceId, @QueryParam("threshold") String threshold);
@Path("device/{deviceId}/words") @Path("device/{deviceId}/words")
@DELETE @DELETE
@Feature(code = "remove", name = "Remove Keywords", description = "Remove the keywords")
@Scope(key = "device:android-sense:enroll", name = "", description = "") @Scope(key = "device:android-sense:enroll", name = "", description = "")
Response removeKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("words") String words); Response removeKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("words") String words);

@ -25,8 +25,6 @@ import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag; import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -46,12 +44,10 @@ import javax.ws.rs.core.Response;
@Tag(name = "arduino", description = "") @Tag(name = "arduino", description = "")
} }
) )
@DeviceType(value = "arduino")
public interface ArduinoService { public interface ArduinoService {
@Path("device/{deviceId}/bulb") @Path("device/{deviceId}/bulb")
@POST @POST
@Feature(code = "bulb", name = "Control Bulb", description = "Control Bulb on Arduino Uno")
@Scope(key = "device:arduino:enroll", name = "", description = "") @Scope(key = "device:arduino:enroll", name = "", description = "")
Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state); Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state);

@ -24,8 +24,6 @@ import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension; import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag; import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
@ -46,12 +44,10 @@ import javax.ws.rs.core.Response;
@Tag(name = "raspberrypi", description = "") @Tag(name = "raspberrypi", description = "")
} }
) )
@DeviceType(value = "raspberrypi")
public interface RaspberryPiService { public interface RaspberryPiService {
@Path("device/{deviceId}/bulb") @Path("device/{deviceId}/bulb")
@POST @POST
@Feature(code = "bulb", name = "Bulb On / Off", description = "Switch on/off Raspberry Pi agent's bulb. (On / Off)")
@Scope(key = "device:raspberrypi:enroll", name = "", description = "") @Scope(key = "device:raspberrypi:enroll", name = "", description = "")
Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state); Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state);

@ -24,8 +24,6 @@ import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension; import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag; import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -52,7 +50,6 @@ import javax.ws.rs.core.Response;
@Tag(name = "virtual_firealarm", description = "") @Tag(name = "virtual_firealarm", description = "")
} }
) )
@DeviceType(value = "virtual_firealarm")
public interface VirtualFireAlarmService { public interface VirtualFireAlarmService {
/** /**
@ -67,7 +64,6 @@ public interface VirtualFireAlarmService {
@POST @POST
@Path("device/{deviceId}/buzz") @Path("device/{deviceId}/buzz")
@Scope(key = "device:firealarm:enroll", name = "", description = "") @Scope(key = "device:firealarm:enroll", name = "", description = "")
@Feature(code = "buzz", name = "Buzzer On / Off", description = "Switch on/off Virtual Fire Alarm Buzzer. (On / Off)")
Response switchBuzzer(@PathParam("deviceId") String deviceId, Response switchBuzzer(@PathParam("deviceId") String deviceId,
@FormParam("state") String state); @FormParam("state") String state);

Loading…
Cancel
Save