@Override protected KuraRequestChannel translateChannel(GenericRequestChannel kapuaChannel) throws KapuaException { KuraRequestChannel kuraRequestChannel = new KuraRequestChannel(); kuraRequestChannel.setMessageClassification(CONTROL_MESSAGE_CLASSIFIER); StringBuilder appIdSb = new StringBuilder(); appIdSb.append(kapuaChannel.getAppName().getValue()); if (kapuaChannel.getVersion() != null && StringUtils.isNotEmpty(kapuaChannel.getVersion().getValue())) { appIdSb.append("-") .append(kapuaChannel.getVersion().getValue()); } kuraRequestChannel.setAppId(appIdSb.toString()); kuraRequestChannel.setMethod(MethodDictionaryKapuaKura.get(kapuaChannel.getMethod())); kuraRequestChannel.setResources(kapuaChannel.getResources()); return kuraRequestChannel; }
@Override protected KuraRequestChannel translateChannel(GenericRequestChannel kapuaChannel) throws KapuaException { KuraRequestChannel kuraRequestChannel = new KuraRequestChannel(); kuraRequestChannel.setMessageClassification(CONTROL_MESSAGE_CLASSIFIER); StringBuilder appIdSb = new StringBuilder(); appIdSb.append(kapuaChannel.getAppName().getValue()); if (kapuaChannel.getVersion() != null && StringUtils.isNotEmpty(kapuaChannel.getVersion().getValue())) { appIdSb.append("-") .append(kapuaChannel.getVersion().getValue()); } kuraRequestChannel.setAppId(appIdSb.toString()); kuraRequestChannel.setMethod(MethodDictionaryKapuaKura.get(kapuaChannel.getMethod())); kuraRequestChannel.setResources(kapuaChannel.getResources()); return kuraRequestChannel; }
PermissionFactory permissionFactory = locator.getFactory(PermissionFactory.class); Actions action; switch (requestInput.getChannel().getMethod()) { case EXECUTE: action = Actions.execute; genericRequestChannel.setAppName(requestInput.getChannel().getAppName()); genericRequestChannel.setVersion(requestInput.getChannel().getVersion()); genericRequestChannel.setMethod(requestInput.getChannel().getMethod()); genericRequestChannel.setResources(requestInput.getChannel().getResources()); deviceEventCreator.setPosition(responseMessage.getPosition()); deviceEventCreator.setSentOn(responseMessage.getSentOn()); deviceEventCreator.setAction(genericRequestChannel.getMethod()); deviceEventCreator.setResponseCode(responseMessage.getResponseCode()); deviceEventCreator.setEventMessage(responseMessage.getPayload().toDisplayString());
PermissionFactory permissionFactory = locator.getFactory(PermissionFactory.class); Actions action; switch (requestInput.getChannel().getMethod()) { case EXECUTE: action = Actions.execute; genericRequestChannel.setAppName(requestInput.getChannel().getAppName()); genericRequestChannel.setVersion(requestInput.getChannel().getVersion()); genericRequestChannel.setMethod(requestInput.getChannel().getMethod()); genericRequestChannel.setResources(requestInput.getChannel().getResources()); deviceEventCreator.setPosition(responseMessage.getPosition()); deviceEventCreator.setSentOn(responseMessage.getSentOn()); deviceEventCreator.setAction(genericRequestChannel.getMethod()); deviceEventCreator.setResponseCode(responseMessage.getResponseCode()); deviceEventCreator.setEventMessage(responseMessage.getPayload().toDisplayString());
PermissionFactory permissionFactory = locator.getFactory(PermissionFactory.class); Actions action; switch (requestInput.getChannel().getMethod()) { case EXECUTE: action = Actions.execute; genericRequestChannel.setAppName(requestInput.getChannel().getAppName()); genericRequestChannel.setVersion(requestInput.getChannel().getVersion()); genericRequestChannel.setMethod(requestInput.getChannel().getMethod()); genericRequestChannel.setResources(requestInput.getChannel().getResources()); deviceEventCreator.setPosition(responseMessage.getPosition()); deviceEventCreator.setSentOn(responseMessage.getSentOn()); deviceEventCreator.setAction(genericRequestChannel.getMethod()); deviceEventCreator.setResponseCode(responseMessage.getResponseCode()); deviceEventCreator.setEventMessage(responseMessage.getPayload().toDisplayString());