use of org.talend.repository.services.model.services.ServiceItem 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);
}
}
}
use of org.talend.repository.services.model.services.ServiceItem in project tesb-studio-se by Talend.
the class OpenJobAction method getReferenceJobId.
protected static String getReferenceJobId(IRepositoryNode node) {
String parentPortName = node.getParent().getObject().getLabel();
ServiceItem serviceItem = (ServiceItem) node.getParent().getParent().getObject().getProperty().getItem();
List<ServicePort> listPort = ((ServiceConnection) serviceItem.getConnection()).getServicePort();
for (ServicePort port : listPort) {
if (port.getName().equals(parentPortName)) {
List<ServiceOperation> listOperation = port.getServiceOperation();
for (ServiceOperation operation : listOperation) {
if (operation.getLabel().equals(node.getObject().getLabel())) {
return operation.getReferenceJobId();
}
}
break;
}
}
return null;
}
Aggregations