Search in sources :

Example 1 with RepositoryFactory

use of org.apache.sling.ide.transport.RepositoryFactory in project sling by apache.

the class ServerUtil method stopRepository.

public static void stopRepository(IServer server, IProgressMonitor monitor) throws CoreException {
    RepositoryFactory repository = Activator.getDefault().getRepositoryFactory();
    try {
        RepositoryInfo repositoryInfo = getRepositoryInfo(server, monitor);
        repository.disconnectRepository(repositoryInfo);
    } catch (RuntimeException | URISyntaxException e) {
        throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage(), e));
    }
}
Also used : Status(org.eclipse.core.runtime.Status) CoreException(org.eclipse.core.runtime.CoreException) RepositoryInfo(org.apache.sling.ide.transport.RepositoryInfo) RepositoryFactory(org.apache.sling.ide.transport.RepositoryFactory) URISyntaxException(java.net.URISyntaxException)

Aggregations

URISyntaxException (java.net.URISyntaxException)1 RepositoryFactory (org.apache.sling.ide.transport.RepositoryFactory)1 RepositoryInfo (org.apache.sling.ide.transport.RepositoryInfo)1 CoreException (org.eclipse.core.runtime.CoreException)1 Status (org.eclipse.core.runtime.Status)1