Search in sources :

Example 6 with UserInfo

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);
}
Also used : TreeParent(com.amalto.workbench.models.TreeParent) UserInfo(com.amalto.workbench.utils.UserInfo)

Aggregations

TreeParent (com.amalto.workbench.models.TreeParent)6 UserInfo (com.amalto.workbench.utils.UserInfo)6 TreeObject (com.amalto.workbench.models.TreeObject)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)3 XtentisServerObjectsRetriever (com.amalto.workbench.providers.XtentisServerObjectsRetriever)2 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 IAvailableModel (com.amalto.workbench.availablemodel.IAvailableModel)1 TMDMService (com.amalto.workbench.webservices.TMDMService)1 WSDataCluster (com.amalto.workbench.webservices.WSDataCluster)1 WSDataClusterPK (com.amalto.workbench.webservices.WSDataClusterPK)1 WSDataModel (com.amalto.workbench.webservices.WSDataModel)1 WSDataModelPK (com.amalto.workbench.webservices.WSDataModelPK)1 WSGetComponentVersion (com.amalto.workbench.webservices.WSGetComponentVersion)1 WSGetDataCluster (com.amalto.workbench.webservices.WSGetDataCluster)1 WSGetDataModel (com.amalto.workbench.webservices.WSGetDataModel)1 WSGetMenu (com.amalto.workbench.webservices.WSGetMenu)1 WSGetMenuPKs (com.amalto.workbench.webservices.WSGetMenuPKs)1 WSGetRoutingRule (com.amalto.workbench.webservices.WSGetRoutingRule)1 WSGetRoutingRulePKs (com.amalto.workbench.webservices.WSGetRoutingRulePKs)1 WSGetStoredProcedure (com.amalto.workbench.webservices.WSGetStoredProcedure)1