Search in sources :

Example 1 with CDOSession

use of org.eclipse.emf.cdo.session.CDOSession in project InformationSystem by ObeoNetwork.

the class EmbeddedCDOServer method getRemoteProjectsURIs.

/**
 * Retrieve remote projects from CDO server
 * @param parentMonitor
 * @return
 */
public Collection<URI> getRemoteProjectsURIs(IProgressMonitor parentMonitor) {
    SubMonitor monitor = SubMonitor.convert(parentMonitor, 1);
    monitor.setTaskName("Retrieving remote projects list");
    String productGroup = "org.eclipse.emf.cdo.sessions";
    CDOSession session = (CDOSession) IPluginContainer.INSTANCE.getElement(productGroup, "cdo", getTcpUrl());
    CDOTransaction transaction = session.openTransaction();
    Collection<URI> remoteProjectsURIs = getRemoteProjectsURIs(transaction);
    transaction.close();
    session.close();
    monitor.worked(1);
    monitor.done();
    return remoteProjectsURIs;
}
Also used : CDOSession(org.eclipse.emf.cdo.session.CDOSession) CDOTransaction(org.eclipse.emf.cdo.transaction.CDOTransaction) SubMonitor(org.eclipse.core.runtime.SubMonitor) URI(org.eclipse.emf.common.util.URI)

Aggregations

SubMonitor (org.eclipse.core.runtime.SubMonitor)1 CDOSession (org.eclipse.emf.cdo.session.CDOSession)1 CDOTransaction (org.eclipse.emf.cdo.transaction.CDOTransaction)1 URI (org.eclipse.emf.common.util.URI)1