10-29-2013 01:51 AM
@Override
public boolean createTenantUser(String domain, String username, String password, Map<String, String> properties) {
logger.debug("creating tenant user");
boolean createdUser = true;
try {
AuthenticationUtils.startSession( ("admin@" + domain), TENANT_ADMIN_PASSWORD);
AdministrationServiceSoapPort userService = WebServiceFactory.getAdministrationService();
NamedValue[] attributes = new NamedValue[] {
new NamedValue(Constants.PROP_USER_FIRSTNAME, false, properties.get("firstName"), null),
new NamedValue(Constants.PROP_USER_LASTNAME, false, properties.get("lastName"), null),
};
NewUserDetails newUserDetails = new NewUserDetails( (username + "@" + domain.toLowerCase()), password, attributes);
NewUserDetails[] arrNewUserDetails = {newUserDetails};
UserDetails[] createdUserDetails = userService.createUsers(arrNewUserDetails);
logger.debug("created tenant user with details " + createdUserDetails);
} catch (AuthenticationFault e) {
logger.error(e.getMessage(), e);
createdUser = false;
} catch (Exception e) {
logger.error(e.getMessage(), e);
createdUser = false;
} finally {
AuthenticationUtils.endSession();
}
return createdUser;
}
new NamedValue(Constants.PROP_USER_HOMEFOLDER, false, ("/" + username), null),
10-29-2013 09:04 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.