From commits-return-4313-apmail-jackrabbit-commits-archive=jackrabbit.apache.org@jackrabbit.apache.org Wed Jul 11 14:24:42 2007 Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 31870 invoked from network); 11 Jul 2007 14:24:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jul 2007 14:24:40 -0000 Received: (qmail 25096 invoked by uid 500); 11 Jul 2007 14:24:42 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 25066 invoked by uid 500); 11 Jul 2007 14:24:42 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 25031 invoked by uid 99); 11 Jul 2007 14:24:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 07:24:42 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 07:24:38 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 56D2A1A981A; Wed, 11 Jul 2007 07:24:18 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r555283 - /jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java Date: Wed, 11 Jul 2007 14:24:18 -0000 To: commits@jackrabbit.apache.org From: angela@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070711142418.56D2A1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: angela Date: Wed Jul 11 07:24:17 2007 New Revision: 555283 URL: http://svn.apache.org/viewvc?view=rev&rev=555283 Log: javadoc Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java?view=diff&rev=555283&r1=555282&r2=555283 ============================================================================== --- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java (original) +++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java Wed Jul 11 07:24:17 2007 @@ -17,37 +17,66 @@ package org.apache.jackrabbit.spi; /** - * SessionInfo... + * SessionInfo is created upon + * {@link RepositoryService#obtain(javax.jcr.Credentials, String)} or + * {@link RepositoryService#obtain(SessionInfo, String)} and will be used for + * any call on the RepositoryService that requires user and workspace + * identification.

+ * + * In addition the SessionInfo acts as primary container for + * lock tokens. They will assert that a given SessionInfo is able to execute + * operations on the RepositoryService that are affected by existing locks.

+ * + * Finally the SessionInfo holds an identifier of the last {@link EventBundle} + * that has been retrieved by this SessionInfo. This allows the + * SessionInfo to indicate the latest known modification to + * the RepositoryService upon retrieval of subsequent {@link EventBundle}s. */ public interface SessionInfo { /** - * - * @return + * Returns the user id. + * + * @return The user identification. + * @see RepositoryService#obtain(javax.jcr.Credentials, String) */ public String getUserID(); /** + * Returns the workspace name. * - * @return + * @return The name of the {@link javax.jcr.Workspace workspace} this + * SessionInfo has been built for. + * @see RepositoryService#obtain(javax.jcr.Credentials, String) + * @see javax.jcr.Workspace#getName() */ public String getWorkspaceName(); /** + * Returns the lock tokens present on this SessionInfo. * - * @return + * @return lock tokens present on this SessionInfo. */ public String[] getLockTokens(); /** + * Add the given lock token to this SessionInfo. The token will + * enable the SessionInfo to operate on Items that are affected by the + * lock identified by the given token. * - * @param lockToken + * @param lockToken to be added. */ public void addLockToken(String lockToken); /** + * Removes the given lock token from this SessionInfo. + * This must happen if the associated Session successfully removes the Lock + * from a Node or if the token is removed from the Session itself by calling + * {@link javax.jcr.Session#removeLockToken(String)}. Consequently all + * RepositoryService operations affected by a lock will fail + * with LockException provided the lock hasn't been released. * - * @param lockToken + * @param lockToken to be removed. */ public void removeLockToken(String lockToken); @@ -78,4 +107,4 @@ * delivered using this SessionInfo. */ public void setLastEventBundleId(String eventBundleId); -} \ No newline at end of file +}