From jackrabbit-commits-return-1351-apmail-incubator-jackrabbit-commits-archive=www.apache.org@incubator.apache.org Thu Sep 08 20:31:56 2005 Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 55677 invoked from network); 8 Sep 2005 20:31:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Sep 2005 20:31:56 -0000 Received: (qmail 96396 invoked by uid 500); 8 Sep 2005 20:31:56 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 96383 invoked by uid 500); 8 Sep 2005 20:31:56 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 96379 invoked by uid 99); 8 Sep 2005 20:31:56 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 08 Sep 2005 13:31:55 -0700 Received: (qmail 55674 invoked by uid 65534); 8 Sep 2005 20:31:55 -0000 Message-ID: <20050908203155.55673.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r279621 - in /incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator: RepositoryDecorator.java SessionDecorator.java WorkspaceDecorator.java Date: Thu, 08 Sep 2005 20:31:55 -0000 To: jackrabbit-cvs@incubator.apache.org From: jukka@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jukka Date: Thu Sep 8 13:31:33 2005 New Revision: 279621 URL: http://svn.apache.org/viewcvs?rev=279621&view=rev Log: JCR-EXT: Cleanups and improvements to decorator classes. Modified: incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/SessionDecorator.java incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/WorkspaceDecorator.java Modified: incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java?rev=279621&r1=279620&r2=279621&view=diff ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java (original) +++ incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java Thu Sep 8 13:31:33 2005 @@ -29,15 +29,15 @@ public class RepositoryDecorator implements Repository { private DecoratorFactory factory; - + private Repository repository; - + public RepositoryDecorator( DecoratorFactory factory, Repository repository) { this.factory = factory; this.repository = repository; } - + /** * Forwards the method call to the underlying repository. */ @@ -55,7 +55,7 @@ /** * Forwards the method call to the underlying repository. The returned * session is wrapped into a session decorator using the decorator factory. - * + * * @return decorated session */ public Session login(Credentials credentials, String workspaceName) throws @@ -66,7 +66,7 @@ /** * Calls login(credentials, null). - * + * * @return decorated session * @see #login(Credentials, String) */ @@ -77,7 +77,7 @@ /** * Calls login(null, workspaceName). - * + * * @return decorated session * @see #login(Credentials, String) */ @@ -88,7 +88,7 @@ /** * Calls login(null, null). - * + * * @return decorated session * @see #login(Credentials, String) */ Modified: incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/SessionDecorator.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/SessionDecorator.java?rev=279621&r1=279620&r2=279621&view=diff ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/SessionDecorator.java (original) +++ incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/SessionDecorator.java Thu Sep 8 13:31:33 2005 @@ -52,18 +52,18 @@ public class SessionDecorator implements Session { private DecoratorFactory factory; - + private Repository repository; - + private Session session; - + public SessionDecorator( DecoratorFactory factory, Repository repository, Session session) { this.factory = factory; this.repository = repository; this.session = session; } - + /** {@inheritDoc} */ public Repository getRepository() { return repository; @@ -94,7 +94,7 @@ * Forwards the method call to the underlying session. The returned * workspace is wrapped into a workspace decorator using the decorator * factory. - * + * * @return decorated workspace */ public Workspace getWorkspace() { @@ -104,7 +104,7 @@ /** * Forwards the method call to the underlying session. The returned * session is wrapped into a session decorator using the decorator factory. - * + * * @return decorated session */ public Session impersonate(Credentials credentials) throws LoginException, @@ -116,7 +116,7 @@ /** * Forwards the method call to the underlying session. The returned * node is wrapped into a node decorator using the decorator factory. - * + * * @return decorated node */ public Node getRootNode() throws RepositoryException { @@ -127,7 +127,7 @@ /** * Forwards the method call to the underlying session. The returned * node is wrapped into a node decorator using the decorator factory. - * + * * @return decorated node */ public Node getNodeByUUID(String uuid) throws ItemNotFoundException, @@ -141,7 +141,7 @@ * item is wrapped into a node, property, or item decorator using * the decorator factory. The decorator type depends on the type * of the underlying item. - * + * * @return decorated item, property, or node */ public Item getItem(String absPath) throws PathNotFoundException, Modified: incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/WorkspaceDecorator.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/WorkspaceDecorator.java?rev=279621&r1=279620&r2=279621&view=diff ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/WorkspaceDecorator.java (original) +++ incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/WorkspaceDecorator.java Thu Sep 8 13:31:33 2005 @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -41,16 +41,26 @@ import org.xml.sax.ContentHandler; /** - * TODO + * Simple workspace decorator. */ public class WorkspaceDecorator implements Workspace { - private DecoratorFactory factory; - - private Session session; - - private Workspace workspace; - + /** The decorator factory. */ + private final DecoratorFactory factory; + + /** The session (decorator) instance. */ + private final Session session; + + /** The underlying workspace instance. */ + private final Workspace workspace; + + /** + * Creates a workspace decorator. + * + * @param factory + * @param session + * @param workspace + */ public WorkspaceDecorator( DecoratorFactory factory, Session session, Workspace workspace) { this.factory = factory; @@ -58,7 +68,6 @@ this.workspace = workspace; } - /** {@inheritDoc} */ public Session getSession() { return session;