return value;
}
@SuppressWarnings("unchecked")
public static final User getUser(Map<String, Object> map) {
User user = null;
if (map != null && map.size() > 0) {
Object o = map.get(TestLinkResponseParams.DB_ID.toString());
if (o != null) {
Integer dbID = Integer.parseInt(o.toString());
if (dbID > 0) {
user = new User(dbID);
user.setLogin(getString(map, TestLinkResponseParams.LOGIN.toString()));
user.setFirstName(getString(map, TestLinkResponseParams.FIRST_NAME.toString()));
user.setLastName(getString(map, TestLinkResponseParams.LAST_NAME.toString()));
user.setLocale(getString(map, TestLinkResponseParams.LOCALE.toString()));
user.setEmailAddress(getString(map, TestLinkResponseParams.EMAIL_ADDRESS.toString()));
user.setIsActive(getInteger(map, TestLinkResponseParams.IS_ACTIVE.toString()));
user.setUserApiKey(getString(map, TestLinkResponseParams.USER_API_KEY.toString()));
user.setLoginRegExp(getString(map, TestLinkResponseParams.LOGIN_REGEXP.toString()));
user.setTprojectRoles(getInteger(map, TestLinkResponseParams.TPROJECT_ROLES.toString()));
user.setTplanRoles(getInteger(map, TestLinkResponseParams.TPLAN_ROLES.toString()));
user.setGlobalRole(getRole((Map<String, Object>) map.get(TestLinkResponseParams.GLOBAL_ROLE.toString())));
user.setGlobalRoleID(getInteger(map, TestLinkResponseParams.GLOBAL_ROLE_ID.toString()));
user.setDefaultTestprojectID(getInteger(map, TestLinkResponseParams.DEFAULT_TESTPROJECT_ID.toString()));
}
}
}
return user;
}