It's working now, and will be part of the next release. Example snippet from an extension for one of the tests (other one uses same pattern). We shouldn't need to test for the response itself being null, because it should never be null, but this is my "test to make sure the api works" code, so I'm leaving that in, just in case something breaks in the future. The testing code is from the userDidLogin method of a login event handler.
Code:
ExtensionBoundUserServerVariableResponse er = getApi().getExtensionBoundUserServerVariable(userName, "null");
if (er != null) {
if (er.isSuccess()) {
getApi().getLogger().debug("er = " + er.getValue().toString());
} else {
getApi().getLogger().debug("er success FALSE: ");
Collection<ErrorType> errors = er.getErrors();
for (ErrorType error : errors) {
getApi().getLogger().debug("\t" + error.toString());
}
}
} else {
getApi().getLogger().debug("er is NULL!");
}
Example log:
Code:
2011-Jul-06 08:54:36:239 [worker-17 BinaryTCP-0] DEBUG Extensions.LoginEventHandler.EventHandlers.LoginEventHandlerExample - rousv3 success FALSE:
2011-Jul-06 08:54:36:240 [worker-17 BinaryTCP-0] DEBUG Extensions.LoginEventHandler.EventHandlers.LoginEventHandlerExample - UserVariableDoesNotExist
2011-Jul-06 08:54:36:240 [worker-17 BinaryTCP-0] DEBUG Extensions.LoginEventHandler.EventHandlers.LoginEventHandlerExample - er success FALSE:
2011-Jul-06 08:54:36:240 [worker-17 BinaryTCP-0] DEBUG Extensions.LoginEventHandler.EventHandlers.LoginEventHandlerExample - UserVariableDoesNotExist
I assume that it's better to just use UserVariableDoesNotExist for all of the various types of user variables than to have to add additional ErrorTypes.