001/* 002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Florent Guillaume 011 */ 012package org.nuxeo.ecm.core.storage.sql; 013 014import javax.resource.cci.ConnectionFactory; 015import javax.resource.cci.ConnectionSpec; 016 017/** 018 * Interface for the low-level VCS repository. 019 */ 020public interface Repository extends ConnectionFactory, RepositoryManagement { 021 022 /** 023 * Gets a new connection by logging in to the repository with default credentials. 024 * 025 * @return the session 026 */ 027 @Override 028 Session getConnection(); 029 030 /** 031 * Gets a new connection by logging in to the repository with given connection information (credentials). 032 * 033 * @param connectionSpec the parameters to use to connnect 034 * @return the session 035 */ 036 @Override 037 Session getConnection(ConnectionSpec connectionSpec); 038 039 /** 040 * Closes the repository and release all resources. 041 */ 042 void close(); 043 044}