private static Boolean getBoolean(Element e, String name) { String s = getString(e, name); if (s != null) { return new Boolean(s); } else { return null; } }
private static void setValuesFromElement(BERoleConfig roleConfig, Element e) throws Exception { roleConfig.setCallSSL(getBoolean(e, _CALLSSL)); roleConfig.setCallBasicAuth(getBoolean(e, _CALLBASICAUTH)); roleConfig.setCallUsername(getString(e, _CALLUSERNAME)); roleConfig.setCallPassword(getString(e, _CALLPASSWORD)); roleConfig.setCallbackSSL(getBoolean(e, _CALLBACKSSL)); roleConfig.setCallbackBasicAuth(getBoolean(e, _CALLBACKBASICAUTH)); roleConfig.setIPList(getStringArray(e, _IPLIST)); }
private static void setValuesFromElement(BERoleConfig roleConfig, Element e) throws Exception { roleConfig.setCallSSL(getBoolean(e, _CALLSSL)); roleConfig.setCallBasicAuth(getBoolean(e, _CALLBASICAUTH)); roleConfig.setCallUsername(getString(e, _CALLUSERNAME)); roleConfig.setCallPassword(getString(e, _CALLPASSWORD)); roleConfig.setCallbackSSL(getBoolean(e, _CALLBACKSSL)); roleConfig.setCallbackBasicAuth(getBoolean(e, _CALLBACKBASICAUTH)); roleConfig.setIPList(getStringArray(e, _IPLIST)); }
private static Boolean getBoolean(Element e, String name) { String s = getString(e, name); if (s != null) { return new Boolean(s); } else { return null; } }
private static String[] getStringArray(Element e, String name) { String s = getString(e, name); if (s != null) { String[] array = s.split(" +"); if (array.length == 1 && array[0].length() == 0) { return null; } return array; } else { return null; } }
private static String[] getStringArray(Element e, String name) { String s = getString(e, name); if (s != null) { String[] array = s.split(" +"); if (array.length == 1 && array[0].length() == 0) { return null; } return array; } else { return null; } }