use of com.amalto.workbench.providers.XObjectBrowserInput in project tmdm-studio-se by Talend.
the class OpenObjectAction method doSelectServer.
public boolean doSelectServer(Item item, IRepositoryViewEditorInput editorInput) {
MDMServerObject serverObject = ((MDMServerObjectItem) item).getMDMServerObject();
if (serverObject.getType() == TreeObject.DATA_CLUSTER) {
// Data Cluster
MDMServerDef lastServerDef = RepositoryResourceUtil.getLastServerDef(item);
MDMServerDef serverDef = openServerDialog(lastServerDef);
if (serverDef != null) {
XObjectBrowserInput input = (XObjectBrowserInput) editorInput;
TreeObject xobject = (TreeObject) input.getModel();
if (xobject != null && xobject.getWsKey() != null) {
TreeParent serverRoot = getServerRoot(serverDef);
xobject.setWsKey(new WSDataClusterPK(xobject.getWsKey().toString()));
xobject.setServerRoot(serverRoot);
return true;
}
}
return false;
}
return true;
}
use of com.amalto.workbench.providers.XObjectBrowserInput in project tmdm-studio-se by Talend.
the class XObjectBrowser2 method addPageForXObject.
@Override
protected void addPageForXObject(TreeObject xobject) throws PartInitException {
switch(xobject.getType()) {
case TreeObject.VIEW:
addPage(new ViewBrowserMainPage2(this));
break;
case TreeObject.DATA_CLUSTER:
if (xobject.getDisplayName() != null && xobject.getDisplayName().equals(XSystemObjects.DC_MDMITEMSTRASH.getName())) {
addPage(new ItemsTrashBrowserMainPage(this));
break;
}
// page index 0
addPage(new DataClusterBrowserMainPage(this));
setPageImage(0, EclipseResourceManager.getImage(RepositoryPlugin.PLUGIN_ID, masterImgPath));
setPageText(0, Messages.bind(Messages.DataClusterBrowserMainPage_masterDataContainer, ((XObjectBrowserInput) getEditorInput()).getName()));
exAdapter = ExAdapterManager.getAdapter(this, IXObjectBrowser2ExAdapter.class);
if (exAdapter != null) {
boolean pageAdded = exAdapter.addPageForXObject(this, getEditorInput(), xobject);
if (pageAdded) {
setPageText(1, exAdapter.getPageText());
setPageImage(1, exAdapter.getPageImage());
stagingDBExist = exAdapter.isStagingDBExist();
}
}
break;
case TreeObject.SUBSCRIPTION_ENGINE:
try {
addPage(new RoutingEngineV2BrowserMainPage2(this));
} catch (PartInitException e) {
log.error(e.getMessage(), e);
}
break;
}
// switch
}
Aggregations