}
static Connection createWorkspaceConnection(SimpleCredentials credentials,
String workspace, MicroKernel microKernel, String revision) throws NoSuchWorkspaceException {
NodeStore store = new KernelNodeStore(microKernel); // TODO: pass revision?
NodeState wspRoot = store.getRoot().getChildNode(workspace);
if (wspRoot == null) {
throw new NoSuchWorkspaceException(workspace);
}
return new ConnectionImpl(credentials, workspace, store, wspRoot);