本文整理汇总了Java中org.edgexfoundry.domain.meta.CallbackAlert.getId方法的典型用法代码示例。如果您正苦于以下问题:Java CallbackAlert.getId方法的具体用法?Java CallbackAlert.getId怎么用?Java CallbackAlert.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.edgexfoundry.domain.meta.CallbackAlert
的用法示例。
在下文中一共展示了CallbackAlert.getId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入方法依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request, @RequestBody(required=false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
if(actionType == null || id == null || method == null)
throw new ClientException("Callback parameters were null");
if(ActionType.DEVICE.equals(actionType) && method.equals("POST"))
addDevice(id);
if(ActionType.DEVICE.equals(actionType) && method.equals("PUT"))
updateDevice(id);
if(ActionType.DEVICE.equals(actionType) && method.equals("DELETE"))
deleteDevice(id);
if(ActionType.PROFILE.equals(actionType) && method.equals("PUT"))
updateProfile(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST"))
addWatcher(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT"))
updateWatcher(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE"))
deleteWatcher(id);
// <-- SDK Scheduler Block
if(ActionType.SCHEDULE.equals(actionType) && method.equals("POST"))
scheduler.handlePOST(data);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("PUT"))
scheduler.handlePUT(data);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("DELETE"))
scheduler.handleDELETE(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("POST"))
scheduler.handlePOST(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("PUT"))
scheduler.handlePUT(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("DELETE"))
scheduler.handleDELETE(data);
// SDK Scheduler Block -->
}
示例2: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入方法依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request,
@RequestBody(required = false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
// TODO: simply this logic using switch statements
if (actionType == null || id == null || method == null) {
throw new ClientException("Callback parameters were null");
}
if (ActionType.DEVICE.equals(actionType) && method.equals("POST")) {
addDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("PUT")) {
updateDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("DELETE")) {
deleteDevice(id);
}
if (ActionType.PROFILE.equals(actionType) && method.equals("PUT")) {
updateProfile(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST")) {
addWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT")) {
updateWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE")) {
deleteWatcher(id);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("POST")) {
scheduler.handlePost(data);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("PUT")) {
scheduler.handlePut(data);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("DELETE")) {
scheduler.handleDelete(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("POST")) {
scheduler.handlePost(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("PUT")) {
scheduler.handlePut(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("DELETE")) {
scheduler.handleDelete(data);
}
}
示例3: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入方法依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request, @RequestBody(required=false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
if(actionType == null || id == null || method == null)
throw new ClientException("Callback parameters were null");
if(ActionType.DEVICE.equals(actionType) && method.equals("POST"))
addDevice(id);
if(ActionType.DEVICE.equals(actionType) && method.equals("PUT"))
updateDevice(id);
if(ActionType.DEVICE.equals(actionType) && method.equals("DELETE"))
deleteDevice(id);
if(ActionType.PROFILE.equals(actionType) && method.equals("PUT"))
updateProfile(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST"))
addWatcher(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT"))
updateWatcher(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE"))
deleteWatcher(id);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("POST"))
scheduler.handlePOST(data);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("PUT"))
scheduler.handlePUT(data);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("DELETE"))
scheduler.handleDELETE(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("POST"))
scheduler.handlePOST(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("PUT"))
scheduler.handlePUT(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("DELETE"))
scheduler.handleDELETE(data);
}
示例4: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入方法依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request,
@RequestBody(required = false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
// TODO: simply this logic using switch statements
if (actionType == null || id == null || method == null) {
throw new ClientException("Callback parameters were null");
}
if (ActionType.DEVICE.equals(actionType) && method.equals("POST")) {
addDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("PUT")) {
updateDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("DELETE")) {
deleteDevice(id);
}
if (ActionType.PROFILE.equals(actionType) && method.equals("PUT")) {
updateProfile(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST")) {
addWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT")) {
updateWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE")) {
deleteWatcher(id);
}
}
示例5: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入方法依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request,
@RequestBody(required = false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
// TODO: simply this logic using switch statements
if (actionType == null || id == null || method == null) {
throw new ClientException("Callback parameters were null");
}
if (ActionType.DEVICE.equals(actionType) && method.equals("POST")) {
addDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("PUT")) {
updateDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("DELETE")) {
deleteDevice(id);
}
if (ActionType.PROFILE.equals(actionType) && method.equals("PUT")) {
updateProfile(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST")) {
addWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT")) {
updateWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE")) {
deleteWatcher(id);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("POST")) {
scheduler.handlePost(data);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("PUT")) {
scheduler.handlePut(data);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("DELETE")) {
scheduler.handleDelete(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("POST")) {
scheduler.handlePost(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("PUT")) {
scheduler.handlePut(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("DELETE")) {
scheduler.handleDelete(data);
}
}