Search in sources :

Example 1 with NewDataContainerAction

use of org.talend.mdm.repository.ui.actions.datacontainer.NewDataContainerAction in project tmdm-studio-se by Talend.

the class NewDataModelAction method createDataContainerObject.

protected void createDataContainerObject(final String key) {
    if (!RepositoryResourceUtil.isExistByName(IServerObjectRepositoryType.TYPE_DATACLUSTER, key)) {
        NewDataContainerAction newDataContainerAction = new NewDataContainerAction() {

            @Override
            protected String getInputName() {
                return key;
            }

            @Override
            protected void updateParentItem() {
                IRepositoryViewObject folderViewObj = ContainerCacheService.get(IServerObjectRepositoryType.TYPE_DATACLUSTER, // $NON-NLS-1$
                "");
                if (folderViewObj != null) {
                    Item pItem = folderViewObj.getProperty().getItem();
                    setParentItem((ContainerItem) pItem);
                }
            }
        };
        newDataContainerAction.run();
    }
}
Also used : WSDataModelItem(org.talend.mdm.repository.model.mdmproperties.WSDataModelItem) Item(org.talend.core.model.properties.Item) ContainerItem(org.talend.mdm.repository.model.mdmproperties.ContainerItem) NewDataContainerAction(org.talend.mdm.repository.ui.actions.datacontainer.NewDataContainerAction) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject)

Aggregations

Item (org.talend.core.model.properties.Item)1 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)1 ContainerItem (org.talend.mdm.repository.model.mdmproperties.ContainerItem)1 WSDataModelItem (org.talend.mdm.repository.model.mdmproperties.WSDataModelItem)1 NewDataContainerAction (org.talend.mdm.repository.ui.actions.datacontainer.NewDataContainerAction)1