protected void onComponentChanged(final ObjectPropertyChanged message) { String compId = message.curr().getObjectId(); ObjectProperty curr = message.curr(); ObjectProperty prev = message.prev(); log.debug("Recieved ComponentChangedMessag [" + message.action() + "]id:" + compId); log.info("Recieved ComponentChangedMessag [" + message.action() + "]id:" + compId); switch (message.action()) { case "add": if (this.onComponentChangedAddedPre(compId, curr)) { this.componetsObjectProperties.put(compId, curr); this.onComponentChangedAdded(compId, curr); } break; case "update": if (this.onComponentChangedUpdatePre(compId, prev, curr)) { this.onComponentChangedUpdate(compId, prev, curr); } break; case "delete": if (this.onComponentChangedDeletePre(compId, prev)) { this.onComponentChangedDelete(compId, curr); } break; default: log.debug("invalid action"); return; } }
private void onComponentManagerChanged(ObjectPropertyChanged msg) { if (msg.action() == ObjectPropertyChanged.Action.add.name() || msg.action() == ObjectPropertyChanged.Action.update.name()) { log.debug("onRemoteObjectManaagerChanged: " + msg.action()); this.updateComponentManager(msg.curr().getObjectId(), msg.curr()); } }
// ////////////////////////////////////////////////// // ComponentChaned // ////////////////////////////////////////////////// protected boolean isComponentChanged(final ObjectPropertyChanged message) { String id = null; switch (message.action()) { case "add": case "update": id = message.curr().getObjectId(); break; case "delete": id = message.prev().getObjectId(); break; default: log.debug("invalid action"); return false; } if (this.componetsObjectProperties.containsKey(id)) { return true; } return false; }