Search in sources :

Example 21 with TreeObject

use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.

the class XObjectEditor method addPages.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
     */
@Override
protected void addPages() {
    updateTitle();
    TreeObject xobject = (TreeObject) ((XObjectEditorInput) this.getEditorInput()).getModel();
    // backup initial object
    this.initialXObject = new TreeObject(xobject.getDisplayName(), xobject.getServerRoot(), xobject.getType(), xobject.getWsKey(), xobject.getWsObject(), xobject.getAdditionalInfo());
    if (!xobject.isXObject()) {
        return;
    }
    // register model listener
    xobject.addListener(this);
    // available models
    java.util.List<IAvailableModel> availablemodels = AvailableModelUtil.getAvailableModels(isLocalInput());
    for (IAvailableModel model : availablemodels) {
        model.addPage(xobject, this);
    }
    addPageForXObject(xobject);
}
Also used : IAvailableModel(com.amalto.workbench.availablemodel.IAvailableModel) TreeObject(com.amalto.workbench.models.TreeObject)

Example 22 with TreeObject

use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.

the class AFormPage method commitChanges.

/**
 * Commit changes back to the model - must be called by the listeners
 *
 * @param onSave
 */
protected void commitChanges() {
    this.comitting = true;
    if (!this.refreshing) {
        TreeObject xobject = (TreeObject) this.getEditor().getEditorInput().getAdapter(XObjectEditor.class);
        commit();
        if (xobject.getParent() != null) {
            // e.g. not standalone but part
            // of model
            xobject.fireEvent(IXObjectModelListener.UPDATE, xobject.getParent(), xobject);
        }
    }
    this.comitting = false;
}
Also used : TreeObject(com.amalto.workbench.models.TreeObject)

Example 23 with TreeObject

use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.

the class ViewBrowserInput method init.

protected void init(Item item) {
    MDMServerObject serverObject = ((MDMServerObjectItem) item).getMDMServerObject();
    Object treeObject = Bean2EObjUtil.getInstance().wrapEObjWithTreeObject(serverObject);
    setModel(treeObject);
    setName(serverObject.getName());
}
Also used : MDMServerObjectItem(org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) TreeObject(com.amalto.workbench.models.TreeObject) MDMServerObject(org.talend.mdm.repository.model.mdmserverobject.MDMServerObject) MDMServerObject(org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)

Example 24 with TreeObject

use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.

the class XObjectBrowserInput2 method init.

protected void init(Item item) {
    MDMServerObject serverObject = ((MDMServerObjectItem) item).getMDMServerObject();
    Object treeObject = Bean2EObjUtil.getInstance().wrapEObjWithTreeObject(serverObject);
    setModel(treeObject);
    setName(serverObject.getName());
}
Also used : MDMServerObjectItem(org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) TreeObject(com.amalto.workbench.models.TreeObject) MDMServerObject(org.talend.mdm.repository.model.mdmserverobject.MDMServerObject) MDMServerObject(org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)

Example 25 with TreeObject

use of com.amalto.workbench.models.TreeObject in project tmdm-studio-se by Talend.

the class XObjectEditorInput2 method init.

protected void init(Item item) {
    MDMServerObject serverObject = ((MDMServerObjectItem) item).getMDMServerObject();
    Object treeObject = Bean2EObjUtil.getInstance().wrapEObjWithTreeObject(serverObject);
    setModel(treeObject);
    setName(serverObject.getName());
}
Also used : MDMServerObjectItem(org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) TreeObject(com.amalto.workbench.models.TreeObject) MDMServerObject(org.talend.mdm.repository.model.mdmserverobject.MDMServerObject) MDMServerObject(org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)

Aggregations

TreeObject (com.amalto.workbench.models.TreeObject)66 TreeParent (com.amalto.workbench.models.TreeParent)21 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)14 ArrayList (java.util.ArrayList)12 MDMServerObject (org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)12 TMDMService (com.amalto.workbench.webservices.TMDMService)6 WSDataModel (com.amalto.workbench.webservices.WSDataModel)5 WSDataModelPK (com.amalto.workbench.webservices.WSDataModelPK)5 WSGetDataModel (com.amalto.workbench.webservices.WSGetDataModel)5 Document (org.dom4j.Document)5 Element (org.dom4j.Element)5 EObject (org.eclipse.emf.ecore.EObject)5 MDMServerObjectItem (org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem)5 WSDataClusterPK (com.amalto.workbench.webservices.WSDataClusterPK)4 InvocationTargetException (java.lang.reflect.InvocationTargetException)4 IAvailableModel (com.amalto.workbench.availablemodel.IAvailableModel)3 UserInfo (com.amalto.workbench.utils.UserInfo)3 WSDataCluster (com.amalto.workbench.webservices.WSDataCluster)3 WSDigest (com.amalto.workbench.webservices.WSDigest)3 WSDigestKey (com.amalto.workbench.webservices.WSDigestKey)3