![Tiago Tiago](//static.vivaolinux.com.br/imagens/fotos/desconhecido.png)
qtcreator
(usa Ubuntu)
Enviado em 06/05/2013 - 19:20h
Pessoal estou tentando fazer o controle de acesso em um projeto MDI, no metodo authenticateUser está dando erro no segundo if. Segue abaixo o codigo;
public boolean authenticateUser(Map loginInfo) throws Exception {
username = (String) loginInfo.get("username");
String password = (String) loginInfo.get("password");
if (username == null || password == null) {
return false;
}
username = username.toUpperCase();
password = password.toUpperCase();
loginInfo.put("username", username);
loginInfo.put("password", password);
Response response = ClientUtils.getData("login", new String[]{username, password});
if (response.isError()) {
throw new Exception(response.getErrorMessage());
}
String languageId = ((TextResponse) response).getMessage();
ButtonsAuthorizations buttonsAuthorizations = (ButtonsAuthorizations) ((VOResponse) ClientUtils.getData("getButtonAuthorizations", new Object[0])).getVo();
Hashtable xmlFiles = new Hashtable();
xmlFiles.put("EN", "Resources_en.xml");
xmlFiles.put("IT", "Resources_it.xml");
ClientSettings clientSettings = new ClientSettings(
new XMLResourcesFactory(xmlFiles, true),
domains,
buttonsAuthorizations,
false);
ClientSettings.PERC_TREE_FOLDER = "folder3.gif";
ClientSettings.BACKGROUND = "background4.jpg";
ClientSettings.TREE_BACK = "treeback2.jpg";
ClientSettings.getInstance().setLanguage(languageId);
return true;
}