Merge branch 'IoTS-1.0.0-M1' of https://github.com/wso2/carbon-device-mgt-plugins into IoTS-1.0.0-M1

Shabirmean 9 years ago
commit 720711b0e4

@ -136,6 +136,11 @@
<artifactId>jsr311-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

@ -21,6 +21,9 @@ package org.wso2.carbon.device.mgt.iot.arduino.service;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.device.DeviceType;
import org.wso2.carbon.apimgt.annotations.device.feature.Feature;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
@ -67,7 +70,8 @@ import java.util.NoSuchElementException;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
@Path("/ArduinoDeviceManager")
@API( name="arduino", version="1.0.0", context="/arduino")
@DeviceType( value = "arduino")
public class ArduinoService {
private static Log log = LogFactory.getLog(ArduinoService.class);
@ -479,6 +483,8 @@ public class ArduinoService {
*/
@Path("controller/bulb/{state}")
@POST
@Feature( code="ARDUINO_BULB_CONTROL", name="Control Bulb",
description="Control Bulb on Arduino Arduino")
public void switchBulb(@HeaderParam("owner") String owner,
@HeaderParam("deviceId") String deviceId,
@HeaderParam("protocol") String protocol,
@ -548,6 +554,8 @@ public class ArduinoService {
@Path("controller/pushdata")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Feature( code="ARDUINO_READ_DATA", name="Read Data",
description="Read Data from Arduino")
public void pushData(final DeviceJSON dataMsg, @Context HttpServletResponse response) {
String owner = dataMsg.owner;
@ -640,6 +648,8 @@ public class ArduinoService {
@Path("controller/push_temperature")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Feature( code="ARDUINO_READ_TEMP", name="Read Tempreature",
description="Read Tempreature from Arduino")
public void pushTemperatureData(final DeviceJSON dataMsg,
@Context HttpServletResponse response,
@Context HttpServletRequest request) {

@ -37,22 +37,6 @@
<param-name>managed-api-owner</param-name>
<param-value>admin</param-value>
</context-param>
<context-param>
<param-name>managed-api-name</param-name>
<param-value>arduino</param-value>
</context-param>
<context-param>
<param-name>managed-api-endpoint</param-name>
<param-value>http://localhost:9763/arduino</param-value>
</context-param>
<context-param>
<param-name>managed-api-version</param-name>
<param-value>1.0.0</param-value>
</context-param>
<context-param>
<param-name>managed-api-context</param-name>
<param-value>/arduino</param-value>
</context-param>
<context-param>
<param-name>managed-api-context-template</param-name>
<param-value>/arduino/{version}</param-value>
@ -67,4 +51,5 @@
</context-param>
</web-app>

@ -20,7 +20,6 @@ import javax.ws.rs.core.Response;
* Created by nuwan on 11/13/15.
*/
@Path("/DigitalDisplayDeviceManager")
@API( name="digital_display", version="1.0.0", context="/digital_display")
@DeviceType( value = "digital_display")
public class DigitalDisplayControllerService {

@ -18,6 +18,8 @@ package org.wso2.carbon.device.mgt.iot.digitaldisplay.api;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.device.DeviceType;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
@ -38,6 +40,7 @@ import java.util.Date;
import java.util.UUID;
@WebService
@API( name="digital_display", version="1.0.0", context="/digital_display")
public class DigitalDisplayManagerService {
private static Log log = LogFactory.getLog(DigitalDisplayManagerService.class);

@ -215,6 +215,12 @@
<version>4.0</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

@ -18,6 +18,9 @@
package org.wso2.carbon.device.mgt.iot.droneanalyzer.service;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.device.DeviceType;
import org.wso2.carbon.apimgt.annotations.device.feature.Feature;
import org.wso2.carbon.certificate.mgt.core.dto.SCEPResponse;
import org.wso2.carbon.certificate.mgt.core.exception.KeystoreException;
import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService;
@ -59,7 +62,8 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
@Path("/DroneAnalyzerServiceUnitManager")
@API( name="drone_analyzer", version="1.0.0", context="/drone_analyzer")
@DeviceType( value = "drone_analyzer")
public class DroneService {
private static org.apache.commons.logging.Log log = LogFactory.getLog(DroneService.class);
@ -373,6 +377,8 @@ public class DroneService {
@Path("controller/send_command")
@POST
@Feature( code="DRONE_SEND_COMMAND", name="Send Command",
description="Send Commands to Drone")
public Response droneController(@QueryParam("owner") String owner, @QueryParam("deviceId") String deviceId,
@QueryParam("action") String action, @QueryParam("duration") String duration,
@QueryParam("speed") String speed){

@ -37,22 +37,6 @@
<param-name>managed-api-owner</param-name>
<param-value>admin</param-value>
</context-param>
<context-param>
<param-name>managed-api-name</param-name>
<param-value>drone_analyzer</param-value>
</context-param>
<context-param>
<param-name>managed-api-endpoint</param-name>
<param-value>http://localhost:9763/drone_analyzer</param-value>
</context-param>
<context-param>
<param-name>managed-api-version</param-name>
<param-value>1.0.0</param-value>
</context-param>
<context-param>
<param-name>managed-api-context</param-name>
<param-value>/drone_analyzer</param-value>
</context-param>
<context-param>
<param-name>managed-api-context-template</param-name>
<param-value>/drone_analyzer/{version}</param-value>

@ -80,7 +80,6 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
@Path("/VirtualFireAlarmDeviceManager")
@API( name="virtual_firealarm", version="1.0.0", context="/virtual_firealarm")
@DeviceType( value = "virtual_firealarm")
public class VirtualFireAlarmService {

Loading…
Cancel
Save