((FormComponent)LDAPAuthProviderPanel.this.get("userFormat")).processInput();
String username = (String)((FormComponent)TestLDAPConnectionPanel.this.get("username")).getConvertedInput();
String password = (String)((FormComponent)TestLDAPConnectionPanel.this.get("password")).getConvertedInput();
LDAPSecurityServiceConfig ldapConfig = (LDAPSecurityServiceConfig) getForm().getModelObject();
doTest(ldapConfig, username, password);
target.addComponent(getPage().get("feedback"));
}
void doTest(LDAPSecurityServiceConfig ldapConfig, String username,
String password) {
try {
if (ldapConfig.getUserDnPattern() == null && ldapConfig.getUserFilter() == null) {
error("Neither user dn pattern or user filter specified");
return;
}
LDAPSecurityProvider provider = new LDAPSecurityProvider(getSecurityManager());