use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.
the class MDMEventManagerAction method doRun.
@Override
protected void doRun() {
boolean checkMissingJar = MissingJarService.getInstance().checkMissingJar(true);
if (!checkMissingJar) {
return;
}
MDMServerDef serverDef = getServerDef();
if (serverDef != null) {
try {
ServerDefService.checkMDMConnection(serverDef);
} catch (Exception e) {
MessageDialog.openError(getShell(), Messages.MDMEventManagerAction_CheckConnection, Messages.MDMEventManagerAction_connectFailed);
return;
}
IRepositoryViewObject eventViewObj = getEventMangerViewObject();
TreeObject treeObj = createModel();
XObjectBrowserInput2 input = new XObjectBrowserInput2(eventViewObj, treeObj, Messages.EventManager_text);
input.setServerDef(serverDef);
if (page == null) {
this.page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
}
try {
this.page.openEditor(input, XObjectBrowser2.EDITOR_ID);
} catch (PartInitException e) {
log.error(e.getMessage(), e);
}
setServerDef(null);
}
}
use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.
the class TestTriggerAction method doRun.
@Override
protected void doRun() {
com.amalto.workbench.utils.MDMServerDef serverDef = getServerDef();
if (serverDef == null) {
return;
}
boolean canConnect = checkConnection(serverDef.getUrl(), serverDef.getUser(), serverDef.getPasswd());
if (!canConnect) {
MessageDialog.openError(getShell(), Messages.RoutingRuleMainPage2_CheckConnection, Messages.RoutingRuleMainPage2_UnableToConnect);
return;
}
try {
service = Util.getMDMService(new URL(serverDef.getUrl()), serverDef.getUser(), serverDef.getPasswd());
IWorkbenchPartSite site = commonViewer.getCommonNavigator().getSite();
dialog = new DataClusterDialog(getShell(), new TreeObject(), site);
dialog.setDefaultServerDef(serverDef);
dialog.setOkLabel(Messages.TestTriggerAction_Test);
dialog.setCancelLabel(Messages.TestTriggerAction_Close);
dialog.setSelectionListener(this);
dialog.open();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.
the class ResourceRepositoryFileEditorInput method init.
@Override
protected void init(Item item) {
MDMServerObject serverObject = ((MDMServerObjectItem) item).getMDMServerObject();
String name = null;
if (serverObject instanceof WSResourceE) {
// $NON-NLS-1$
name = serverObject.getName() + "." + ((WSResourceE) serverObject).getFileExtension();
}
Object treeObject = new TreeObject(name, null, TreeObject.RESOURCES, null, null, null);
setModel(treeObject);
setName(name);
}
use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.
the class TransformerMainPage2 method initTransformer.
@Override
protected void initTransformer() throws XtentisException {
TreeObject xObject = getXObject();
transformer = (WSTransformerV2) xObject.getWsObject();
}
use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.
the class LockedObjectDialog method getUnlockedTreeObject.
public Object[] getUnlockedTreeObject(Object[] inputTreeObjs, Map<IRepositoryViewObject, TreeObject> objMap) {
if (inputTreeObjs == null || objMap == null) {
return null;
}
Set<Object> lockedTreeObjs = new HashSet<Object>();
// collect
for (IRepositoryViewObject lockedObj : lockedObjs) {
TreeObject lockedTreeObj = objMap.get(lockedObj);
if (lockedTreeObj != null) {
lockedTreeObjs.add(lockedTreeObj);
}
}
//
List<Object> newUnlockedTreeObjs = new LinkedList<Object>();
for (Object oldObj : inputTreeObjs) {
if (!lockedTreeObjs.contains(oldObj)) {
newUnlockedTreeObjs.add(oldObj);
}
}
return newUnlockedTreeObjs.toArray();
}
Aggregations