예제 #1
0
 public List<PwmSetting> getSettings() {
   final List<PwmSetting> returnList = new ArrayList<>();
   for (final PwmSetting setting : PwmSetting.values()) {
     if (setting.getCategory() == this) {
       returnList.add(setting);
     }
   }
   return Collections.unmodifiableList(returnList);
 }
예제 #2
0
  private PwmSetting readProfileSettingFromXml() {
    final Element categoryElement = PwmSettingXml.readCategoryXml(this);
    final Element profileElement = categoryElement.getChild("profile");
    if (profileElement != null) {
      final String settingKey = profileElement.getAttributeValue("setting");
      if (settingKey != null) {
        return PwmSetting.forKey(settingKey);
      }
    }

    return null;
  }