Search in sources :

Example 1 with ServiceMetadataDialog

use of org.talend.repository.services.ui.ServiceMetadataDialog in project tesb-studio-se by Talend.

the class ServiceMetadataAction method doRun.

@Override
protected void doRun() {
    final IRepositoryNode node = getNode();
    final ServiceItem serviceItem = (ServiceItem) node.getObject().getProperty().getItem();
    final boolean isLocked = isLocked(node.getObject());
    new ServiceMetadataDialog(getWorkbenchWindow(), serviceItem, (ServiceConnection) serviceItem.getConnection()).open();
    if (!isLocked) {
        // restore lock state.
        try {
            ProxyRepositoryFactory.getInstance().unlock(node.getObject());
        } catch (PersistenceException | LoginException e) {
            ExceptionHandler.process(e);
        }
    }
}
Also used : ServiceConnection(org.talend.repository.services.model.services.ServiceConnection) IRepositoryNode(org.talend.repository.model.IRepositoryNode) ServiceMetadataDialog(org.talend.repository.services.ui.ServiceMetadataDialog) PersistenceException(org.talend.commons.exception.PersistenceException) LoginException(org.talend.commons.exception.LoginException) ServiceItem(org.talend.repository.services.model.services.ServiceItem)

Aggregations

LoginException (org.talend.commons.exception.LoginException)1 PersistenceException (org.talend.commons.exception.PersistenceException)1 IRepositoryNode (org.talend.repository.model.IRepositoryNode)1 ServiceConnection (org.talend.repository.services.model.services.ServiceConnection)1 ServiceItem (org.talend.repository.services.model.services.ServiceItem)1 ServiceMetadataDialog (org.talend.repository.services.ui.ServiceMetadataDialog)1