use of com.amalto.workbench.utils.UserInfo in project tmdm-studio-se by Talend.
the class RepositoryWebServiceAdapter method resetXObject.
public static void resetXObject(MDMServerDef serverDef, TreeObject xobject) {
String serverName = serverDef.getHost();
String username = serverDef.getUser();
String password = serverDef.getPasswd();
String endpointaddress = // $NON-NLS-1$
serverDef.getProtocol() + serverDef.getHost() + ":" + serverDef.getPort() + serverDef.getPath();
TreeParent serverRoot = new TreeParent(serverName, null, TreeObject._SERVER_, endpointaddress, username + ":" + // $NON-NLS-1$//$NON-NLS-2$
(password == null ? "" : password));
UserInfo user = new UserInfo();
user.setUsername(username);
user.setPassword(password);
user.setServerUrl(endpointaddress);
serverRoot.setUser(user);
xobject.setServerRoot(serverRoot);
}
Aggregations