|
|
@ -13,19 +13,15 @@ import io.swagger.annotations.SwaggerDefinition;
|
|
|
|
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.apimgt.annotations.api.Scopes;
|
|
|
|
import org.wso2.carbon.apimgt.annotations.api.Scopes;
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceTypeList;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.DeviceTypeEvent;
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.DeviceTypeEvent;
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.EventAttributeList;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.EventRecords;
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.EventRecords;
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.TransportType;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.util.Constants;
|
|
|
|
import org.wso2.carbon.device.mgt.jaxrs.util.Constants;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import javax.ws.rs.Consumes;
|
|
|
|
import javax.ws.rs.Consumes;
|
|
|
|
import javax.ws.rs.DELETE;
|
|
|
|
import javax.ws.rs.DELETE;
|
|
|
|
import javax.ws.rs.GET;
|
|
|
|
import javax.ws.rs.GET;
|
|
|
|
import javax.ws.rs.HeaderParam;
|
|
|
|
|
|
|
|
import javax.ws.rs.POST;
|
|
|
|
import javax.ws.rs.POST;
|
|
|
|
import javax.ws.rs.Path;
|
|
|
|
import javax.ws.rs.Path;
|
|
|
|
import javax.ws.rs.PathParam;
|
|
|
|
import javax.ws.rs.PathParam;
|
|
|
@ -66,8 +62,7 @@ import javax.ws.rs.core.Response;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@Path("/events")
|
|
|
|
@Path("/events")
|
|
|
|
@Api(value = "Device Event Management", description = "This API corresponds to all tasks related to device " +
|
|
|
|
@Api(value = "Device Event Management")
|
|
|
|
"event management")
|
|
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
@Consumes(MediaType.APPLICATION_JSON)
|
|
|
|
@Consumes(MediaType.APPLICATION_JSON)
|
|
|
|
public interface DeviceEventManagementService {
|
|
|
|
public interface DeviceEventManagementService {
|
|
|
@ -120,13 +115,14 @@ public interface DeviceEventManagementService {
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
Response deployDeviceTypeEventDefinition(@ApiParam(name = "type", value = "The device type, such as android, ios," +
|
|
|
|
Response deployDeviceTypeEventDefinition(
|
|
|
|
" and windows.", required = false)
|
|
|
|
@ApiParam(name = "type", value = "The device type, such as android, ios, and windows.")
|
|
|
|
@PathParam("type")String deviceType,
|
|
|
|
@PathParam("type")String deviceType,
|
|
|
|
@QueryParam("skipPersist")boolean skipPersist,
|
|
|
|
@ApiParam(name = "skipPersist", value = "Is it required to persist the data or not")
|
|
|
|
@ApiParam(name = "deviceTypeEvent", value = "Add the data to complete " +
|
|
|
|
@QueryParam("skipPersist") boolean skipPersist,
|
|
|
|
"the DeviceTypeEvent object.", required = true)
|
|
|
|
@ApiParam(name = "deviceTypeEvent", value = "Add the data to complete the DeviceTypeEvent object.",
|
|
|
|
@Valid DeviceTypeEvent deviceTypeEvent);
|
|
|
|
required = true)
|
|
|
|
|
|
|
|
@Valid DeviceTypeEvent deviceTypeEvent);
|
|
|
|
|
|
|
|
|
|
|
|
@DELETE
|
|
|
|
@DELETE
|
|
|
|
@Path("/{type}")
|
|
|
|
@Path("/{type}")
|
|
|
@ -358,7 +354,6 @@ public interface DeviceEventManagementService {
|
|
|
|
@QueryParam("max") double max
|
|
|
|
@QueryParam("max") double max
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
@GET
|
|
|
|
@Path("/{type}")
|
|
|
|
@Path("/{type}")
|
|
|
|
@ApiOperation(
|
|
|
|
@ApiOperation(
|
|
|
@ -408,8 +403,7 @@ public interface DeviceEventManagementService {
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
Response getDeviceTypeEventDefinition(@ApiParam(name = "type", value = "The type of the device, such as android," +
|
|
|
|
Response getDeviceTypeEventDefinition(
|
|
|
|
" ios, or windows.", required = false)
|
|
|
|
@ApiParam(name = "type", value = "The type of the device, such as android, ios, or windows.")
|
|
|
|
@PathParam("type")String deviceType) ;
|
|
|
|
@PathParam("type")String deviceType) ;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|