use of org.talend.mdm.repository.model.mdmserverobject.MDMServerObject 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 org.talend.mdm.repository.model.mdmserverobject.MDMServerObject in project tmdm-studio-se by Talend.
the class AbstractInteractiveHandler method deploy.
/*
* (non-Javadoc)
*
* @see
* org.talend.mdm.repository.core.service.IInteractiveHandler#deploy(com.amalto.workbench.webservices.XtentisPort,
* org.talend.core.model.properties.Item, org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)
*/
@Override
public boolean deploy(AbstractDeployCommand cmd) throws XtentisException {
IRepositoryViewObject viewObj = cmd.getViewObject();
Item item = viewObj.getProperty().getItem();
MDMServerObject serverObject = ((MDMServerObjectItem) item).getMDMServerObject();
Object wsObj = convert(item, serverObject);
TMDMService service = getService(cmd.getServerDef());
return doDeployWSObject(service, wsObj);
}
use of org.talend.mdm.repository.model.mdmserverobject.MDMServerObject in project tmdm-studio-se by Talend.
the class DataModelInteractiveHandler method deploy.
@Override
public boolean deploy(AbstractDeployCommand cmd) throws XtentisException {
IRepositoryViewObject viewObj = cmd.getViewObject();
Item item = viewObj.getProperty().getItem();
MDMServerObject serverObject = ((MDMServerObjectItem) item).getMDMServerObject();
Object wsObj = convert(item, serverObject);
//
ICommandParameter parameter = cmd.getParameter();
if (parameter != null) {
callModelService(cmd);
return true;
} else {
TMDMService service = getService(cmd.getServerDef());
return doDeployWSObject(service, wsObj);
}
}
use of org.talend.mdm.repository.model.mdmserverobject.MDMServerObject 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 org.talend.mdm.repository.model.mdmserverobject.MDMServerObject in project tmdm-studio-se by Talend.
the class RemoveFromRepositoryAction method removeServerObject.
private void removeServerObject(IRepositoryViewObject viewObj) {
if (removed.contains(viewObj.getId())) {
return;
}
removed.add(viewObj.getId());
try {
Item item = viewObj.getProperty().getItem();
IEditorReference ref = RepositoryResourceUtil.isOpenedInEditor(viewObj);
if (ref != null) {
RepositoryResourceUtil.closeEditor(ref, true);
}
factory.deleteObjectLogical(viewObj);
if (item instanceof MDMServerObjectItem) {
MDMServerObject serverObj = ((MDMServerObjectItem) item).getMDMServerObject();
CommandManager.getInstance().pushCommand(ICommand.CMD_DELETE, viewObj.getId(), serverObj.getName());
}
} catch (BusinessException e) {
MessageDialog.openError(getShell(), Messages.Common_Error, e.getMessage());
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
Aggregations