List<MBeanAttributeInfo> attributeInfos = new ArrayList<>(); for (ConfigItem item : serverConfigurationService.getConfigData().getItems()) { String type = item.getType(); switch (type) { case ServerConfigurationService.TYPE_BOOLEAN:
if (item.getValue() != null) { hItem.setValue(serializeValue(item.getValue(), item.getType(), item.isSecured())); hItem.setValue(serializeValue(item.getValue(), item.getType(), item.isSecured())); if (item.getDefaultValue() != null) { hItem.setDefaultValue(serializeValue(item.getDefaultValue(), item.getType(), item.isSecured())); hItem.setDefaultValue(serializeValue(item.getDefaultValue(), item.getType(), item.isSecured())); hItem.setType(item.getType()); hItem.setDefaulted(item.isDefaulted()); hItem.setSecured(item.isSecured());
serialValue = serializeValue(item.getValue(), item.getType(), item.isSecured()); serialDefaultValue = serializeValue(item.getDefaultValue(), item.getType(), item.isSecured()); serialRawValue = serializeValue(getRawProperty(item.getName()), ServerConfigurationService.TYPE_STRING, item.isSecured()); } catch (IllegalClassException ice) { serialValue, serialRawValue, item.getType(), item.getDescription(), item.getSource(),
/** * Make an impl from something that implements ConfigItem by copying the field values * @param ci a ci object */ @SuppressWarnings("unused") public ConfigItemImpl(ConfigItem ci) { this(ci.getName(), ci.getValue(), ci.getType(), ci.getDescription(), ci.getSource(), ci.getDefaultValue(), ci.getRequested(), ci.getChanged(), null, ci.isRegistered(), ci.isDefaulted(), ci.isSecured(), ci.isDynamic()); if (ci.getHistory() != null) { this.history = Arrays.asList(ci.getHistory()); } else { this.history = new ArrayList<ConfigHistory>(); } }