Return-Path: X-Original-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 041389BEF for ; Sat, 21 Apr 2012 07:41:50 +0000 (UTC) Received: (qmail 37940 invoked by uid 500); 21 Apr 2012 07:41:49 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 37914 invoked by uid 500); 21 Apr 2012 07:41:49 -0000 Mailing-List: contact oak-commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-commits@jackrabbit.apache.org Delivered-To: mailing list oak-commits@jackrabbit.apache.org Received: (qmail 37888 invoked by uid 99); 21 Apr 2012 07:41:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2012 07:41:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2012 07:41:45 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7EE9C238897D; Sat, 21 Apr 2012 07:41:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1328601 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentRepository.java Date: Sat, 21 Apr 2012 07:41:24 -0000 To: oak-commits@jackrabbit.apache.org From: jukka@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120421074124.7EE9C238897D@eris.apache.org> Author: jukka Date: Sat Apr 21 07:41:24 2012 New Revision: 1328601 URL: http://svn.apache.org/viewvc?rev=1328601&view=rev Log: OAK-18: Define Oak API Updated ContentRepository javadocs Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentRepository.java Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentRepository.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentRepository.java?rev=1328601&r1=1328600&r2=1328601&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentRepository.java (original) +++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentRepository.java Sat Apr 21 07:41:24 2012 @@ -20,27 +20,47 @@ import javax.jcr.NoSuchWorkspaceExceptio import javax.security.auth.login.LoginException; /** - * The {@code RepositoryService} is the main access point of the oak-api. It - * serves the following purposes: - * - *
    - *
  • validating a given login request and providing a {@link ContentSession} - * that is used for further communication with the persistent layer (i.e. - * Microkernel).
  • - *
+ * Oak content repository. The repository may local or remote, or a cluster + * of any size. These deployment details are all hidden behind this interface. + *

+ * All access to the repository happens through authenticated + * {@link ContentSession} instances acquired through the + * {@link #login(Object, String)} method, which is why that is the only + * method of this interface. + *

+ * Starting and stopping ContentRepository instances is the responsibility + * of each particular deployment and not covered by this interface. + * Repository clients should use a deployment-specific mechanism (JNDI, + * OSGi service, etc.) to acquire references to ContentRepository instances. */ public interface ContentRepository { /** - * Try to login a user identified by the passed {@code credentials}. On success - * this method returns a {@link ContentSession} to the given {@code workspace}. + * Authenticates a user based on the given credentials or available + * out-of-band information and, if successful, returns a + * {@link ContentSession} instance for accessing repository content + * inside the specified workspace as the authenticated user. + *

+ * TODO: Determine whether ContentSessions should cover a single + * workspace or the entire repository. + *

+ * The exact type of access credentials is undefined, as this method + * simply acts as a generic messenger between clients and pluggable + * login modules that take care of the actual authentication. See + * the documentation of relevant login modules for the kind of access + * credentials they expect. + *

+ * TODO: Instead of the explicit access credentials, should this method + * rather take the arguments to be passed to the relevant + * JAAS {@link javax.security.auth.login.LoginContext} constructor? * - * @param credentials + * @param credentials access credentials, or {@code null} * @param workspaceName - * @return the connection - * @throws LoginException + * @return authenticated repository session + * @throws LoginException if authentication failed * @throws NoSuchWorkspaceException */ ContentSession login(Object credentials, String workspaceName) throws LoginException, NoSuchWorkspaceException; -} \ No newline at end of file + +}