@Override public void setName(String name) { super.setName(name); serviceEntity = new ServiceEntity(name, "config", "Server configuration"); serviceEntity.addIdentities( new ServiceIdentity[] { new ServiceIdentity("automation", "command-list", "Configuration commands") }); serviceEntity.addFeatures(DEF_FEATURES); config_list = new ServiceEntity(name, "list", "List"); config_list.addIdentities( new ServiceIdentity[] { new ServiceIdentity("automation", "command-list", "Config listings") }); config_list.addFeatures(DEF_FEATURES); config_set = new ServiceEntity(name, "set", "Set"); config_set.addIdentities( new ServiceIdentity[] { new ServiceIdentity("automation", "command-list", "Config settings") }); config_set.addFeatures(DEF_FEATURES); ServiceEntity item = new ServiceEntity(getName(), "--none--", "Add new component..."); item.addFeatures(CMD_FEATURES); item.addIdentities(new ServiceIdentity("automation", "command-node", "Add new component...")); config_set.addItems(item); serviceEntity.addItems(config_list, config_set); }
@Override public void initializationCompleted() { super.initializationCompleted(); if (monitoring != null) { monitoring.initializationCompleted(); } }
@Override public void componentAdded(Configurable component) { super.componentAdded(component); if (log.isLoggable(Level.CONFIG)) { log.config(" component: " + component.getName()); } ServiceEntity item = config_list.findNode(component.getName()); if (item == null) { item = new ServiceEntity(getName(), component.getName(), "Component: " + component.getName()); item.addFeatures(CMD_FEATURES); item.addIdentities( new ServiceIdentity[] { new ServiceIdentity("automation", "command-node", "Component: " + component.getName()) }); config_list.addItems(new ServiceEntity[] {item}); } if (config_set.findNode(component.getName()) == null) { config_set.addItems(new ServiceEntity[] {item}); } if (component.getClass().getName().equals(ROUTER_COMP_CLASS_NAME)) { routerCompName = component.getName(); } // end of if (component.getClass().getName().equals()) }
/** * Sets all configuration properties for object. * * @param props */ @Override public void setProperties(final Map<String, Object> props) { super.setProperties(props); // setupLogManager(props); demoMode = (Boolean) props.get("demo-mode"); }