Return-Path: <cvs-return-161-tigrisq-archive=mail-subclipse=cvs=tigris.org=tigris.org@subclipse.tigris.org>
Delivered-To: tigrisq-archive=mail-subclipse=cvs=tigris.org@tigris.org
Received: (qmail 21192 invoked by uid 5302); 28 Sep 2003 19:24:12 -0000
Mailing-List: contact cvs-help@subclipse.tigris.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
list-help: <mailto:cvs-help@subclipse.tigris.org>
list-unsubscribe: <mailto:cvs-unsubscribe@subclipse.tigris.org>
list-post: <mailto:cvs@subclipse.tigris.org>
Reply-To: cvs@subclipse.tigris.org
Delivered-To: mailing list cvs@subclipse.tigris.org
Received: (qmail 20529 invoked from network); 28 Sep 2003 19:24:11 -0000
Date: Sun, 28 Sep 2003 14:21:11 -0500
Message-Id: <200309281921.h8SJLBP10591@svn.collab.net>
X-Authentication-Warning: svn.collab.net: svn set sender to cchab@tigris.org using -f
From: cchab@tigris.org
To: cvs@subclipse.tigris.org
Subject:  subclipse commit: rev 151 - in trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter: . javahl

Author: cchab
Date: Sun Sep 28 14:21:09 2003
New Revision: 151

Added:
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNClientAdapter.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNDirEntry.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNLogMessage.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNProperty.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNStatus.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientAdapterFactory.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientException.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNNodeKind.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNRevision.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlConverter.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlDirEntry.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlLogMessage.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlNotificationHandler.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlPropertyData.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlStatus.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/SVNClientAdapter.java
      - copied, changed from rev 147, trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientAdapter.java
Removed:
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/RevisionUtils.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientAdapter.java
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/StandardNotificationHandler.java
Modified:
   trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNNotifyListener.java
Log:
We now use interfaces for svnClientAdapter. 
This way, we can use either javahl, svn command line 
(will be commited soon) or webdav (?) as an implementation
This way subclipse and svnant are totally independant from javahl

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNClientAdapter.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNClientAdapter.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,425 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+
+public interface ISVNClientAdapter {
+	/**
+	 * Add a notification listener
+	 */
+	public abstract void addNotifyListener(ISVNNotifyListener listener);
+	/**
+	 * Remove a notification listener 
+	 */
+	public abstract void removeNotifyListener(ISVNNotifyListener listener);
+	/**
+	 * Sets the username.
+	 */
+	public abstract void setUsername(String username);
+	/**
+	 * Sets the password.
+	 */
+	public abstract void setPassword(String password);
+	
+    
+    /**
+	 * Register callback interface to supply username and password on demand
+	 */
+//	public abstract void setPromptUserPassword(PromptUserPassword prompt);
+    
+    
+	/**
+	 * Adds a file (or directory) to the repository.
+	 * @exception ClientException
+	 */
+	public abstract void addFile(File file) throws SVNClientException;
+	/**
+	 * Adds a directory to the repository.
+	 * @exception ClientException
+	 */
+	public abstract void addDirectory(File dir, boolean recurse)
+		throws SVNClientException;
+	/**
+	 * Executes a revision checkout.
+	 * @param moduleName name of the module to checkout.
+	 * @param destPath destination directory for checkout.
+	 * @param revision the revision number to checkout. If the number is -1
+	 *                 then it will checkout the latest revision.
+	 * @param recurse whether you want it to checkout files recursively.
+	 * @exception ClientException
+	 */
+	public abstract void checkout(
+		SVNUrl moduleName,
+		File destPath,
+		SVNRevision revision,
+		boolean recurse)
+		throws SVNClientException;
+	/**
+	 * Commits changes to the repository. This usually requires
+	 * authentication, see Auth.
+	 * @return Returns a long representing the revision. It returns a
+	 *         -1 if the revision number is invalid.
+	 * @param path files to commit.
+	 * @param message log message.
+	 * @param recurse whether the operation should be done recursively.
+	 * @exception ClientException
+	 */
+	public abstract long commit(File[] paths, String message, boolean recurse)
+		throws SVNClientException;
+	/**
+	 * List directory entries of a URL
+	 * @param url
+	 * @param revision
+	 * @param recurse
+	 * @return
+	 * @throws ClientException
+	 */
+	public abstract ISVNDirEntry[] getList(
+		SVNUrl url,
+		SVNRevision revision,
+		boolean recurse)
+		throws SVNClientException;
+	/**
+	 * Returns the status of a single file in the path.
+	 *
+	 * @param path File to gather status.
+	 * @return a Status
+	 */
+	public abstract ISVNStatus getSingleStatus(File path)
+		throws SVNClientException;
+	/**
+	 * Returns the status of files and directory recursively
+	 *
+	 * @param path File to gather status.
+	 * @return a Status
+	 */
+	public abstract ISVNStatus[] getStatusRecursively(File path, boolean getAll)
+		throws SVNClientException;
+	/**
+	 * copy and schedule for addition (with history)
+	 * @param srcPath
+	 * @param destPath
+	 * @throws ClientException
+	 */
+	public abstract void copy(File srcPath, File destPath)
+		throws SVNClientException;
+	/**
+	 * immediately commit a copy of WC to URL
+	 * @param srcPath
+	 * @param destUrl
+	 * @throws ClientException
+	 */
+	public abstract void copy(File srcPath, SVNUrl destUrl, String message)
+		throws SVNClientException;
+	/**
+	 * check out URL into WC, schedule for addition
+	 * @param srcUrl
+	 * @param destPath
+	 * @throws ClientException
+	 */
+	public abstract void copy(SVNUrl srcUrl, File destPath, SVNRevision revision)
+		throws SVNClientException;
+	/**
+	 * complete server-side copy;  used to branch & tag
+	 * @param srcUrl
+	 * @param destUrl
+	 * @throws ClientException
+	 */
+	public abstract void copy(
+		SVNUrl srcUrl,
+		SVNUrl destUrl,
+		String message,
+		SVNRevision revision)
+		throws SVNClientException;
+	/**
+	 * item is deleted from the repository via an immediate commit.
+	 * @param url
+	 * @param message
+	 * @throws ClientException
+	 */
+	public abstract void remove(SVNUrl url[], String message)
+		throws SVNClientException;
+	/**
+	 * the item is scheduled for deletion upon the next commit.  
+	 * Files, and directories that have not been committed, are immediately 
+	 * removed from the working copy.  The command will not remove TARGETs 
+	 * that are, or contain, unversioned or modified items; 
+	 * use the force option to override this behaviour.
+	 * @param file
+	 * @param force
+	 * @throws ClientException
+	 */
+	public abstract void remove(File file[], boolean force)
+		throws SVNClientException;
+	/**
+	 * Exports a clean directory tree from the repository specified by
+	 * srcUrl, at revision revision 
+	 * @param srcUrl
+	 * @param destPath
+	 * @param revision
+	 * @throws ClientException
+	 */
+	public abstract void doExport(
+		SVNUrl srcUrl,
+		File destPath,
+		SVNRevision revision,
+		boolean force)
+		throws SVNClientException;
+	/**
+	 * Exports a clean directory tree from the working copy specified by
+	 * PATH1 into PATH2.  all local changes will be preserved, but files
+	 * not under revision control will not be copied.
+	 * @param srcPath
+	 * @param destPath
+	 * @throws ClientException
+	 */
+	public abstract void doExport(File srcPath, File destPath, boolean force)
+		throws SVNClientException;
+	/**
+	 * Import file or directory PATH into repository directory URL at head
+	 * @param path
+	 * @param url
+	 * @param newEntry new directory in which the contents of <i>path</i> are imported.
+	 * 		  if null, copy top-level contents of PATH into URL directly
+	 * @param message
+	 * @param recurse
+	 * @throws ClientException
+	 */
+	public abstract void doImport(
+		File path,
+		SVNUrl url,
+		String message,
+		boolean recurse)
+		throws SVNClientException;
+	/**
+	 * Creates a directory directly in a repository
+	 * @param url
+	 * @param message
+	 * @throws ClientException
+	 */
+	public abstract void mkdir(SVNUrl url, String message)
+		throws SVNClientException;
+	/**
+	 * creates a directory on disk and schedules it for addition.
+	 * @param file
+	 * @throws ClientException
+	 */
+	public abstract void mkdir(File file) throws SVNClientException;
+	/**
+	 * Moves or renames a file.
+	 * @param srcPath
+	 * @param destPath
+	 * @throws ClientException
+	 */
+	public abstract void move(File srcPath, File destPath, boolean force)
+		throws SVNClientException;
+	/**
+	 * Moves or renames a file.
+	 * @param srcPath
+	 * @param destPath
+	 * @throws ClientException
+	 */
+	public abstract void move(
+		SVNUrl srcUrl,
+		SVNUrl destUrl,
+		String message,
+		SVNRevision revision)
+		throws SVNClientException;
+	/**
+	 * Update a file or a directory
+	 * @param path
+	 * @param revision
+	 * @param recurse
+	 * @throws ClientException
+	 */
+	public abstract void update(File path, SVNRevision revision, boolean recurse)
+		throws SVNClientException;
+	/**
+	 * Restore pristine working copy file (undo all local edits)
+	 * @param path
+	 * @param recurse
+	 * @throws ClientException
+	 */
+	public abstract void revert(File path, boolean recurse)
+		throws SVNClientException;
+	/**
+	 * Get the log messages for a set of revision(s) 
+	 * @param url
+	 * @param revisionStart
+	 * @param revisionEnd
+	 * @return
+	 */
+	public abstract ISVNLogMessage[] getLogMessages(
+		SVNUrl url,
+		SVNRevision revisionStart,
+		SVNRevision revisionEnd)
+		throws SVNClientException;
+	/**
+	 * Get the log messages for a set of revision(s)
+	 * @param path
+	 * @param revisionStart
+	 * @param revisionEnd
+	 * @return
+	 */
+	public abstract ISVNLogMessage[] getLogMessages(
+		File path,
+		SVNRevision revisionStart,
+		SVNRevision revisionEnd)
+		throws SVNClientException;
+	/**
+	 * get the content of a file
+	 * @param url
+	 * @param revision
+	 */
+	public abstract InputStream getContent(SVNUrl url, SVNRevision revision)
+		throws SVNClientException;
+	/**
+	 * set a property
+	 * @param path
+	 * @param propertyName
+	 * @param propertyValue
+	 * @param recurse
+	 * @throws ClientException
+	 */
+	public abstract void propertySet(
+		File path,
+		String propertyName,
+		String propertyValue,
+		boolean recurse)
+		throws SVNClientException;
+	/**
+	 * set a property using the content of a file 
+	 */
+	public abstract void propertySet(
+		File path,
+		String propertyName,
+		File propertyFile,
+		boolean recurse)
+		throws SVNClientException, IOException;
+	/**
+	 * get a property
+	 * @param path
+	 * @param propertyName
+	 * @param propertyValue
+	 * @return
+	 * @throws ClientException
+	 */
+	public abstract ISVNProperty propertyGet(File path, String propertyName)
+		throws SVNClientException;
+	/**
+	 * delete a property
+	 * @param path
+	 * @param propertyName
+	 * @param recurse
+	 * @throws ClientException
+	 */
+	public abstract void propertyDel(
+		File path,
+		String propertyName,
+		boolean recurse)
+		throws SVNClientException;
+	/**
+	 * get the ignored patterns for the given directory
+	 * if path is not a directory, returns null 
+	 */
+	public abstract List getIgnoredPatterns(File path)
+		throws SVNClientException;
+	/**
+	 * add a pattern to svn:ignore property 
+	 */
+	public abstract void addToIgnoredPatterns(File path, String pattern)
+		throws SVNClientException;
+	/**
+	 * set the ignored patterns for the given directory 
+	 */
+	public abstract void setIgnoredPatterns(File path, List patterns)
+		throws SVNClientException;
+	/**
+	 * display the differences between two paths. 
+	 */
+	public abstract void diff(
+		File oldPath,
+		SVNRevision oldPathRevision,
+		File newPath,
+		SVNRevision newPathRevision,
+		File outFile,
+		boolean recurse)
+		throws SVNClientException;
+	public abstract void diff(File path, File outFile, boolean recurse)
+		throws SVNClientException;
+	/**
+	 * display the differences between two urls. 
+	 */
+	public abstract void diff(
+		SVNUrl oldUrl,
+		SVNRevision oldUrlRevision,
+		SVNUrl newUrl,
+		SVNRevision newUrlRevision,
+		File outFile,
+		boolean recurse)
+		throws SVNClientException;
+	public abstract void diff(
+		SVNUrl url,
+		SVNRevision oldUrlRevision,
+		SVNRevision newUrlRevision,
+		File outFile,
+		boolean recurse)
+		throws SVNClientException;
+}
\ No newline at end of file

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNDirEntry.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNDirEntry.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,79 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+import java.util.Date;
+
+/**
+ * A general subversion directory entry.
+ * @author Cédric Chabanois 
+ *         <a href="mailto:cchabanois@ifrance.com">cchabanois@ifrance.com</a>
+ *
+ */
+public interface ISVNDirEntry {
+
+	String getPath();
+
+	Date getLastChangedDate();
+
+	SVNRevision.Number getLastChangedRevision();
+
+	boolean getHasProps();
+
+	String getLastCommitAuthor();
+
+	SVNNodeKind getNodeKind();
+
+	long getSize();
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNLogMessage.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNLogMessage.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,73 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+
+import java.util.Date;
+
+
+/**
+ * @author Philip Schatz <a href="mailto:schatzp@purdue.edu">schatzp@purdue.edu</a>
+ * 
+ */
+public interface ISVNLogMessage {
+
+	public abstract SVNRevision.Number getRevision();
+
+	public abstract String getAuthor();
+
+	public abstract Date getDate();
+
+	public abstract String getMessage();
+}
\ No newline at end of file

Modified: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNNotifyListener.java
==============================================================================
--- trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNNotifyListener.java	(original)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNNotifyListener.java	Sun Sep 28 14:21:09 2003
@@ -54,39 +54,46 @@
  */ 
 package org.tigris.subversion.svnclientadapter;
 
-import org.tigris.subversion.javahl.ClientException;
-import org.tigris.subversion.javahl.Notify;
 
 /**
  * 
  * @author Cédric Chabanois 
  *         <a href="mailto:cchabanois@ifrance.com">cchabanois@ifrance.com</a>
  */
-public interface ISVNNotifyListener extends Notify {
-    public static final int COMMAND_UNDEFINED = 0;
-    public static final int COMMAND_ADD = 1;
-    public static final int COMMAND_CHECKOUT = 2;
-    public static final int COMMAND_COMMIT = 3;
-    public static final int COMMAND_UPDATE = 4;
-    public static final int COMMAND_MOVE = 5;
-    public static final int COMMAND_COPY = 6;
-    public static final int COMMAND_REMOVE = 7;
-    public static final int COMMAND_EXPORT = 8;
-    public static final int COMMAND_IMPORT = 9;    
-    public static final int COMMAND_MKDIR = 10;
-    public static final int COMMAND_LS = 11;
-    public static final int COMMAND_STATUS = 12;
-    public static final int COMMAND_LOG = 13;
-    public static final int COMMAND_PROPSET = 14;
-    public static final int COMMAND_PROPDEL = 15;
-    public static final int COMMAND_REVERT = 16;
-    public static final int COMMAND_DIFF = 17;
+public interface ISVNNotifyListener {
     
     
+    public static final class Command {
+        public static final int UNDEFINED = 0;
+        public static final int ADD = 1;
+        public static final int CHECKOUT = 2;
+        public static final int COMMIT = 3;
+        public static final int UPDATE = 4;
+        public static final int MOVE = 5;
+        public static final int COPY = 6;
+        public static final int REMOVE = 7;
+        public static final int EXPORT = 8;
+        public static final int IMPORT = 9;    
+        public static final int MKDIR = 10;
+        public static final int LS = 11;
+        public static final int STATUS = 12;
+        public static final int LOG = 13;
+        public static final int PROPSET = 14;
+        public static final int PROPDEL = 15;
+        public static final int REVERT = 16;
+        public static final int DIFF = 17;
+    }    
+
     public void setCommand(int command);
     
-    public void setCommandLine(String commandLine);
+    public void logCommandLine(String commandLine);
+    
+    public void logMessage(String message);
+    
+    public void logError(String message);
+    
+    public void logCompleted(String message);
     
-    public void setException(ClientException e);
+    public void onNotify(String path, SVNNodeKind kind);
     
 }

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNProperty.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNProperty.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,90 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+
+/**
+ * describes a property (see svn command propget)
+ *
+ * @author Cédric Chabanois 
+ *         <a href="mailto:cchabanois@ifrance.com">cchabanois@ifrance.com</a>
+ */
+public interface ISVNProperty {
+	public static final String MIME_TYPE = "svn:mime-type";
+
+	public static final String IGNORE = "svn:ignore";
+
+	public static final String EOL_STYLE = "svn:eol-style";
+
+	public static final String KEYWORDS = "svn:keywords";
+
+	public static final String EXECUTABLE = "svn:executable";
+
+	public static final String EXECUTABLE_VALUE = "*";
+
+	public static final String EXTERNALS = "svn:externals";
+
+	public static final String REV_AUTHOR = "svn:author";
+
+	public static final String REV_LOG = "svn:log";
+
+	public static final String REV_DATE = "svn:date";
+
+	public static final String REV_ORIGINAL_DATE = "svn:original-date";
+
+	public abstract String getName();
+	public abstract String getValue();
+	public abstract String getPath();
+	public abstract byte[] getData();
+}
\ No newline at end of file

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNStatus.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/ISVNStatus.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,139 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+
+import java.util.Date;
+
+/**
+ * 
+ * @author philip schatz
+ */
+public interface ISVNStatus {
+
+    /**
+     * <p>
+     * Base class for enumerating the possible types for a <code>Status</code>.
+     * </p>
+     */
+    public static class Kind {
+        private final String _Name;
+
+        public static Kind NONE = new Kind("non-svn");
+        public static Kind NORMAL = new Kind("normal");
+        public static Kind ADDED = new Kind("added");
+        public static Kind ABSENT = new Kind("absent");
+        public static Kind DELETED = new Kind("deleted");
+        public static Kind REPLACED = new Kind("replaced");
+        public static Kind MODIFIED = new Kind("modified");
+        public static Kind MERGED = new Kind("merged");
+        public static Kind CONFLICTED = new Kind("conflicted");
+        public static Kind IGNORED = new Kind("ignored");
+        public static Kind INCOMPLETE = new Kind("incomplete");
+        public static Kind UNVERSIONED = new Kind("unversioned");
+        
+        
+        //Constructors
+        /**
+         * <p>
+         * Constructs a <code>Type</code> for the given a type name.</p>
+         *
+         *
+         * @param type Name of the type.
+         * @throws IllegalArgumentException If the parameter is invalid.
+         */
+        private Kind(String name) throws IllegalArgumentException {
+            _Name = name;
+        }
+        
+        public String toString() {
+            return _Name;
+        }
+
+    }
+
+	boolean isIgnored();
+
+	boolean isManaged();
+
+	boolean hasRemote();
+
+	SVNUrl getUrl();
+
+	SVNRevision.Number getLastChangedRevision();
+
+	Date getLastChangedDate();
+
+	String getLastCommitAuthor();
+
+	Kind getTextStatus();
+
+	boolean isMerged();
+
+	boolean isDeleted();
+
+	boolean isModified();
+
+	boolean isAdded();
+
+	SVNRevision.Number getRevision();
+
+	boolean isCopied();
+	
+	String getPath();
+
+	SVNNodeKind getNodeKind();
+
+	String getUrlCopiedFrom();
+}
\ No newline at end of file

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientAdapterFactory.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientAdapterFactory.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,75 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+
+/**
+ * Factory for SVNClientAdapter 
+ *
+ * @author Cédric Chabanois 
+ *         <a href="mailto:cchabanois@ifrance.com">cchabanois@ifrance.com</a>
+ */
+public class SVNClientAdapterFactory {
+
+    public static int JAVAHL_CLIENT = 1;
+    public static int COMMANDLINE_CLIENT = 2;
+
+    public static ISVNClientAdapter createSVNClient(int clientType) {
+        if (clientType == JAVAHL_CLIENT)
+            return new org.tigris.subversion.svnclientadapter.javahl.SVNClientAdapter();
+        else
+            return null;
+    }
+
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientException.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientException.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,109 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * 
+ * @author philip schatz
+ */
+public class SVNClientException extends Exception {
+
+	/**
+	 * 
+	 */
+	public SVNClientException() {
+		super();
+	}
+
+	/**
+	 * @param message
+	 */
+	public SVNClientException(String message) {
+		super(message);
+	}
+
+	/**
+	 * @param message
+	 * @param cause
+	 */
+	public SVNClientException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	/**
+	 * @param cause
+	 */
+	public SVNClientException(Throwable cause) {
+		super(cause);
+	}
+
+	/*
+	 * Static helper methods for creating exceptions
+	 */
+	public static SVNClientException wrapException(Exception e) {
+		Throwable t = e;
+		if (e instanceof InvocationTargetException) {
+			Throwable target = ((InvocationTargetException) e).getTargetException();
+			if (target instanceof SVNClientException) {
+				return (SVNClientException) target;
+			}
+			t = target;
+		}
+		return new SVNClientException(e);
+	}
+
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNNodeKind.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNNodeKind.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,80 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+
+/**
+ * Kind of a node (dir, file) 
+ */
+public class SVNNodeKind
+{
+    private int kind;
+    
+    /* absent */
+    public static final SVNNodeKind NONE = new SVNNodeKind(0);
+
+    /* regular file */
+    public static final SVNNodeKind FILE = new SVNNodeKind(1);
+
+    /* directory */
+    public static final SVNNodeKind DIR = new SVNNodeKind(2);
+
+    /* something's here, but we don't know what */
+    public static final SVNNodeKind UNKNOWN = new SVNNodeKind(3);
+ 
+    private SVNNodeKind(int kind) {
+         this.kind = kind;
+    }
+
+}
\ No newline at end of file

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNRevision.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNRevision.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,255 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+
+/**
+ * Class to specify a revision in a svn command.
+ * This class has been copied directly from javahl and renamed to SVNRevision
+ * the static method getRevision has then been added to the class
+ *
+ */
+public class SVNRevision
+{
+    protected int revKind;
+
+    public SVNRevision(int kind)
+    {
+        revKind = kind;
+    }
+
+    public int getKind()
+    {
+        return revKind;
+    }
+
+    public String toString()
+    {
+        switch(revKind) {
+            case Kind.base : return "BASE";
+            case Kind.committed : return "COMMITTED";
+            case Kind.head : return "HEAD";
+            case Kind.previous : return "PREV";
+            case Kind.working : return "WORKING";
+        }
+        return super.toString();
+    }
+
+    public boolean equals(Object target) {
+        if (this == target)
+            return true;
+        if (!(target instanceof SVNRevision))
+            return false;
+
+        return ((SVNRevision)target).revKind == revKind;        
+    }
+
+    public static final SVNRevision HEAD = new SVNRevision(Kind.head);
+    public static final SVNRevision START = new SVNRevision(Kind.unspecified);
+    public static final SVNRevision COMMITTED = new SVNRevision(Kind.committed);
+    public static final SVNRevision PREVIOUS = new SVNRevision(Kind.previous);
+    public static final SVNRevision BASE = new SVNRevision(Kind.base);
+    public static final SVNRevision WORKING = new SVNRevision(Kind.working);
+    public static final int SVN_INVALID_REVNUM = -1;    
+    public static final SVNRevision.Number INVALID_REVISION = new SVNRevision.Number(SVN_INVALID_REVNUM);
+
+
+    public static class Number extends SVNRevision
+    {
+        protected long revNumber;
+
+        public Number(long number)
+        {
+            super(Kind.number);
+            revNumber = number;
+        }
+
+        public long getNumber()
+        {
+            return revNumber;
+        }
+
+        public String toString() {
+            return Long.toString(revNumber);
+        }
+        
+        public boolean equals(Object target) {
+            if (!super.equals(target))
+                return false;
+
+            return ((SVNRevision.Number)target).revNumber == revNumber;        
+        }
+    }
+
+    public static class DateSpec extends SVNRevision
+    {
+        protected Date revDate;
+        public DateSpec(Date date)
+        {
+            super(Kind.date);
+            revDate = date;
+        }
+        public Date getDate()
+        {
+            return revDate;
+        }
+
+        public String toString() {
+            
+            SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.US); 
+            return '{'+dateFormat.format(revDate)+'}';
+        }
+
+        public boolean equals(Object target) {
+            if (!super.equals(target))
+                return false;
+
+            return ((SVNRevision.DateSpec)target).revDate.equals(revDate);        
+        }
+        
+    }
+
+    /** Various ways of specifying revisions.
+     *
+     * Various ways of specifying revisions.
+     *
+     * Note:
+     * In contexts where local mods are relevant, the `working' kind
+     * refers to the uncommitted "working" revision, which may be modified
+     * with respect to its base revision.  In other contexts, `working'
+     * should behave the same as `committed' or `current'.
+     */
+    public static final class Kind
+    {
+        /** No revision information given. */
+        public static final int unspecified = 0;
+
+        /** revision given as number */
+        public static final int number = 1;
+
+        /** revision given as date */
+        public static final int date = 2;
+
+        /** rev of most recent change */
+        public static final int committed = 3;
+
+        /** (rev of most recent change) - 1 */
+        public static final int previous = 4;
+
+        /** .svn/entries current revision */
+        public static final int base = 5;
+
+        /** current, plus local mods */
+        public static final int working = 6;
+
+        /** repository youngest */
+        public static final int head = 7;
+
+    }
+    
+    /**
+     * get a revision from a string
+     * revision can be :
+     * - a date with the following format : MM/DD/YYYY HH:MM AM_PM
+     * - a revision number
+     * - HEAD, BASE, COMMITED or PREV
+     * 
+     * @param revision
+     * @return Revision
+     */
+    public static SVNRevision getRevision(String revision) throws ParseException {
+        
+        // try special KEYWORDS
+        if (revision.compareToIgnoreCase("HEAD") == 0)
+            return SVNRevision.HEAD; // latest in repository
+        else
+        if (revision.compareToIgnoreCase("BASE") == 0)
+            return new SVNRevision(SVNRevision.Kind.base); // base revision of item's working copy
+        else
+        if (revision.compareToIgnoreCase("COMMITED") == 0)
+            return new SVNRevision(SVNRevision.Kind.committed); // revision of item's last commit
+        else
+        if (revision.compareToIgnoreCase("PREV") == 0) // revision before item's last commit
+            return new SVNRevision(SVNRevision.Kind.previous);
+        
+        // try revision number
+        try
+        {
+            int revisionNumber = Integer.parseInt(revision);
+            if (revisionNumber >= 0)
+                return new SVNRevision.Number(revisionNumber); 
+        } catch (NumberFormatException e)
+        {
+        }
+        
+        // try date
+        DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.US);
+        try
+        {
+            Date revisionDate = df.parse(revision);
+            return new SVNRevision.DateSpec(revisionDate);
+        } catch (ParseException e)
+        {
+        }
+        
+        throw new ParseException("Invalid revision. Revision should be a number, a date in MM/DD/YYYY HH:MM AM_PM format or HEAD, BASE, COMMITED or PREV",0);
+    }    
+    
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlConverter.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlConverter.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,184 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter.javahl;
+
+import org.tigris.subversion.javahl.DirEntry;
+import org.tigris.subversion.javahl.LogMessage;
+import org.tigris.subversion.javahl.NodeKind;
+import org.tigris.subversion.javahl.Revision;
+import org.tigris.subversion.javahl.Status;
+import org.tigris.subversion.svnclientadapter.ISVNLogMessage;
+import org.tigris.subversion.svnclientadapter.ISVNStatus;
+import org.tigris.subversion.svnclientadapter.SVNNodeKind;
+import org.tigris.subversion.svnclientadapter.SVNRevision;
+
+/**
+ * Convert from javahl types to subversion.svnclientadapter.* types 
+ *  
+ * @author philip schatz
+ */
+public class JhlConverter {
+
+	private JhlConverter() {
+		//non-instantiable
+	}
+	
+    public static Revision convert(SVNRevision svnRevision) {
+        switch(svnRevision.getKind()) {
+            case SVNRevision.Kind.base : return Revision.BASE;
+            case SVNRevision.Kind.committed : return Revision.COMMITTED;
+            case SVNRevision.Kind.date : return new Revision.DateSpec(((SVNRevision.DateSpec)svnRevision).getDate());
+            case SVNRevision.Kind.head : return Revision.HEAD;
+            case SVNRevision.Kind.number : return new Revision.Number(((SVNRevision.Number)svnRevision).getNumber());
+            case SVNRevision.Kind.previous : return Revision.PREVIOUS;
+            case SVNRevision.Kind.unspecified : return new Revision(Revision.Kind.unspecified);
+            case SVNRevision.Kind.working : return Revision.WORKING;
+            default: return new Revision(Revision.Kind.unspecified); // should never go here
+        }
+    }
+
+	static SVNRevision convert(Revision rev) {
+		switch (rev.getKind()) {
+			case Revision.Kind.base :
+				return SVNRevision.BASE;
+			case Revision.Kind.committed :
+				return SVNRevision.COMMITTED;
+			case Revision.Kind.number :
+				Revision.Number n = (Revision.Number) rev;
+				return new SVNRevision.Number(n.getNumber());
+			case Revision.Kind.previous :
+				return SVNRevision.PREVIOUS;
+			case Revision.Kind.working :
+				return SVNRevision.WORKING;
+			default :
+				return SVNRevision.HEAD;
+		}
+	}
+
+    public static SVNNodeKind convertNodeKind(int javahlNodeKind) {
+        switch(javahlNodeKind) {
+            case NodeKind.dir  : return SVNNodeKind.DIR; 
+            case NodeKind.file : return SVNNodeKind.FILE; 
+            case NodeKind.none : return SVNNodeKind.NONE; 
+            case NodeKind.unknown : return SVNNodeKind.UNKNOWN;
+            default: return SVNNodeKind.UNKNOWN; // should never go here
+        }
+    }
+
+	public static JhlStatus convert(Status status) {
+		return new JhlStatus(status);
+	}
+
+    public static ISVNStatus.Kind convertStatusKind(int kind) {
+        switch (kind) {
+            case Status.Kind.none :
+                return ISVNStatus.Kind.NONE;
+            case Status.Kind.normal :
+                return ISVNStatus.Kind.NORMAL;                
+            case Status.Kind.added :
+                return ISVNStatus.Kind.ADDED;
+            case Status.Kind.absent :
+                return ISVNStatus.Kind.ABSENT;
+            case Status.Kind.deleted :
+                return ISVNStatus.Kind.DELETED;
+            case Status.Kind.replaced :
+                return ISVNStatus.Kind.REPLACED;                                                
+            case Status.Kind.modified :
+                return ISVNStatus.Kind.MODIFIED;
+            case Status.Kind.merged :
+                return ISVNStatus.Kind.MERGED;                
+            case Status.Kind.conflicted :
+                return ISVNStatus.Kind.CONFLICTED;                
+            case Status.Kind.ignored :
+                return ISVNStatus.Kind.IGNORED;                
+            case Status.Kind.incomplete :
+                return ISVNStatus.Kind.INCOMPLETE;                
+            case Status.Kind.unversioned :
+                return ISVNStatus.Kind.UNVERSIONED;                
+            default :
+                return ISVNStatus.Kind.NONE;
+        }
+    }
+
+	
+	/**
+	 * Wrap everything up.
+	 * @param dirEntry
+	 * @return
+	 */
+	static JhlDirEntry[] convert(DirEntry[] dirEntry) {
+		JhlDirEntry[] entries = new JhlDirEntry[dirEntry.length];
+		for(int i=0; i < dirEntry.length; i++) {
+			entries[i] = new JhlDirEntry(dirEntry[i]);
+		}
+		return entries;
+	}
+
+	static ISVNLogMessage[] convert(LogMessage[] msg) {
+		JhlLogMessage[] messages = new JhlLogMessage[msg.length];
+		for(int i=0; i < msg.length; i++) {
+			messages[i] = new JhlLogMessage(msg[i]);
+		}
+		return messages;
+	}
+    
+    static ISVNStatus[] convert(Status[] status) {
+        JhlStatus[] jhlStatus = new JhlStatus[status.length];
+        for(int i=0; i < status.length; i++) {
+            jhlStatus[i] = new JhlStatus(status[i]);
+        }
+        return jhlStatus;
+    }    
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlDirEntry.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlDirEntry.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,110 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter.javahl;
+
+import java.util.Date;
+
+import org.tigris.subversion.javahl.DirEntry;
+import org.tigris.subversion.svnclientadapter.ISVNDirEntry;
+import org.tigris.subversion.svnclientadapter.SVNNodeKind;
+import org.tigris.subversion.svnclientadapter.SVNRevision;
+
+/**
+ * adapter : convert from DirEntry to ISVNDirEntry 
+ *  
+ * @author philip schatz
+ */
+public class JhlDirEntry implements ISVNDirEntry {
+
+	private DirEntry _d;
+
+	public JhlDirEntry(DirEntry d) {
+		super();
+		_d = d;
+	}
+
+	public SVNNodeKind getNodeKind() {
+        return JhlConverter.convertNodeKind(_d.getNodeKind());
+	}
+
+	public boolean getHasProps() {
+		return _d.getHasProps();
+	}
+
+	public SVNRevision.Number getLastChangedRevision() {
+		return (SVNRevision.Number)JhlConverter.convert(_d.getLastChangedRevision());
+	}
+
+	public Date getLastChangedDate() {
+		return _d.getLastChanged();
+	}
+
+	public String getLastCommitAuthor() {
+		return _d.getLastAuthor();
+	}
+
+	public String getPath() {
+		return _d.getPath();
+	}
+
+    public long getSize() {
+        return _d.getSize();
+    }
+
+    public Date getLastChanged() {
+        return _d.getLastChanged();
+    }
+
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlLogMessage.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlLogMessage.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,108 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter.javahl;
+
+import java.util.Date;
+
+import org.tigris.subversion.javahl.LogMessage;
+import org.tigris.subversion.svnclientadapter.ISVNLogMessage;
+import org.tigris.subversion.svnclientadapter.SVNRevision;
+
+/**
+ * adapter : convert from LogMessage to ISVNLogMessage
+ * 
+ * @author philip schatz
+ */
+public class JhlLogMessage implements ISVNLogMessage {
+
+	private LogMessage _m;
+
+	/**
+	 * 
+	 */
+	public JhlLogMessage(LogMessage msg) {
+		super();
+		_m = msg;
+	}
+
+	/**
+	 * 
+	 */
+	public SVNRevision.Number getRevision() {
+		return (SVNRevision.Number)JhlConverter.convert(_m.getRevision());
+	}
+
+	/**
+	 * 
+	 */
+	public String getAuthor() {
+		return _m.getAuthor();
+	}
+
+	/**
+	 * 
+	 */
+	public Date getDate() {
+		return _m.getDate();
+	}
+
+	/**
+	 * 
+	 */
+	public String getMessage() {
+		return _m.getMessage();
+	}
+
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlNotificationHandler.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlNotificationHandler.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,285 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter.javahl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.tigris.subversion.javahl.ClientException;
+import org.tigris.subversion.javahl.NodeKind;
+import org.tigris.subversion.javahl.Notify;
+import org.tigris.subversion.svnclientadapter.ISVNNotifyListener;
+
+
+
+/**
+ * Notification handler :
+ * It listens to events from javahl jni implementation and handles 
+ * notifications from SVNClientAdapter.
+ * It sends notifications to all listeners 
+ * 
+ * 
+ * @author Cédric Chabanois 
+ *         <a href="mailto:cchabanois@ifrance.com">cchabanois@ifrance.com</a>
+ *
+ */
+public class JhlNotificationHandler implements Notify {
+    private List notifylisteners = new ArrayList();
+    private boolean receivedSomeChange;
+    private boolean sentFirstTxdelta;
+    private int command;    
+    
+    /**
+     * Add a notification listener
+     */
+    public void add(ISVNNotifyListener listener) {
+        notifylisteners.add(listener);
+    }
+
+    /**
+     * Remove a notification listener 
+     */
+    public void remove(ISVNNotifyListener listener) {
+        notifylisteners.remove(listener);
+    }
+    
+    
+    /**
+     * Handler for Subversion notifications.
+     *
+     * Override this function to allow Subversion to send notifications
+     * @param path on which action happen
+     * @param action subversion action, see svn_wc_notify_action_t
+     * @param kind node kind of path after action occurred
+     * @param mimeType mime type of path after action occurred
+     * @param contentState state of content after action occurred
+     * @param propState state of properties after action occurred
+     * @param revision revision number  after action occurred
+     */
+    public void onNotify(
+        String path,
+        int action,
+        int kind,
+        String mimeType,
+        int contentState,
+        int propState,
+        long revision) {
+
+        for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
+            ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
+            listener.onNotify(path, JhlConverter.convertNodeKind(kind));
+        }                        
+
+        switch (action) {
+            case Notify.Action.skip :
+                logMessage("Skipped " + path);
+                break;
+            case Notify.Action.update_delete :
+                logMessage("D  " + path);
+                receivedSomeChange = true;
+                break;
+            case Notify.Action.update_add :
+                logMessage("A  " + path);
+                receivedSomeChange = true;
+                break;
+            case Notify.Action.restore :
+                logMessage("Restored " + path);
+                break;
+            case Notify.Action.revert :
+                logMessage("Reverted " + path);
+                break;
+            case Notify.Action.failed_revert :
+                logError("Failed to revert " + path + " -- try updating instead.");
+                break;
+            case Notify.Action.resolved :
+                logMessage("Resolved conflicted state of " + path);
+                break;
+            case Notify.Action.add :
+                logMessage("A         " + path);
+                break;
+            case Notify.Action.delete :
+                logMessage("D         " + path);
+                receivedSomeChange = true;
+                break;
+            case Notify.Action.update_update :
+                if (!((kind == NodeKind.dir)
+                    && ((propState == Notify.Status.inapplicable)
+                        || (propState == Notify.Status.unknown)
+                        || (propState == Notify.Status.unchanged)))) {
+                    receivedSomeChange = true;
+                    char[] statecharBuf = new char[] { ' ', ' ' };
+                    if (kind == NodeKind.file) {
+                        if (contentState == Notify.Status.conflicted)
+                            statecharBuf[0] = 'C';
+                        else if (contentState == Notify.Status.merged)
+                            statecharBuf[0] = 'G';
+                        else if (contentState == Notify.Status.changed)
+                            statecharBuf[0] = 'U';
+                    }
+                    if (propState == Notify.Status.conflicted)
+                        statecharBuf[1] = 'C';
+                    else if (propState == Notify.Status.merged)
+                        statecharBuf[1] = 'G';
+                    else if (propState == Notify.Status.changed)
+                        statecharBuf[1] = 'U';
+                    logMessage(statecharBuf[0]+statecharBuf[1]+" "+path);                      
+                }
+                break;
+            case Notify.Action.update_completed :
+                if (revision >= 0) {
+                    if (command == ISVNNotifyListener.Command.EXPORT)
+                        logCompleted("Exported revision "+revision+".");
+                    else 
+                    if (command == ISVNNotifyListener.Command.CHECKOUT)
+                        logCompleted("Checked out revision "+revision+".");
+                    else
+                    if (receivedSomeChange)
+                        logCompleted("Updated to revision "+revision+".");
+                    else
+                        logCompleted("At revision "+revision+".");
+                } else
+                {
+                    if (command == ISVNNotifyListener.Command.EXPORT)
+                        logCompleted("Export complete.");
+                    else
+                    if (command == ISVNNotifyListener.Command.CHECKOUT)
+                        logCompleted("Checkout complete.");
+                    else
+                        logCompleted("Update complete."); 
+                }
+                break;
+            case Notify.Action.status_external :
+              logMessage("Performing status on external item at "+path);
+              break;
+            case Notify.Action.status_completed :
+              if (revision >= 0)
+                logMessage("Status against revision: "+ revision);
+              break;                
+            case Notify.Action.commit_modified :
+                logMessage("Sending        "+path);
+                break;
+            case Notify.Action.commit_added :
+                logMessage("Adding         "+path);
+                break;
+            case Notify.Action.commit_deleted :
+                logMessage("Deleting       "+path);
+                break;
+            case Notify.Action.commit_replaced :
+                logMessage("Replacing      "+path);
+                break;
+            case Notify.Action.commit_postfix_txdelta :
+                if (!sentFirstTxdelta) {
+                    logMessage("Transmitting file data ...");
+                    sentFirstTxdelta = true;
+                }
+                break;                              
+        }
+    }
+
+        
+    private void logMessage(String message) {
+        for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
+            ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
+            listener.logMessage(message);
+        }                        
+    }
+
+    private void logError(String message) {
+        for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
+            ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
+            listener.logError(message);
+        }                        
+    }
+
+    private void logCompleted(String message) {
+        for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
+            ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
+            listener.logCompleted(message);
+        }                        
+    }
+
+        
+    public void setCommand(int command) {
+        receivedSomeChange = false;
+        sentFirstTxdelta = false;
+        this.command = command;        
+        for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
+            ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
+            listener.setCommand(command);
+        }            
+    }
+    
+    public void setCommandLine(String commandLine) {
+        for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
+            ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
+            listener.logCommandLine(commandLine);
+        }                        
+    }
+
+    /**
+     * Called when a method of SVNClientAdapter throw an exception
+     */        
+    public void setException(ClientException clientException) {
+        Throwable e = clientException;
+        while (e != null) {
+            logError(e.getMessage());
+            e = e.getCause();                
+        }
+    }
+        
+
+
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlPropertyData.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlPropertyData.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,94 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter.javahl;
+
+import org.tigris.subversion.javahl.PropertyData;
+import org.tigris.subversion.svnclientadapter.ISVNProperty;
+
+/**
+ * adapter : convert from PropertyData to ISVNProperty
+ * 
+ * @author philip schatz
+ */
+public class JhlPropertyData implements ISVNProperty
+{
+    private PropertyData _propertyData;
+    
+    
+    JhlPropertyData(PropertyData propertyData)
+    {
+        _propertyData = propertyData;
+    }
+
+    public String getName()
+    {
+        return _propertyData.getName();
+    }
+
+    public String getValue()
+    {
+        return _propertyData.getValue();
+    }
+
+    public String getPath()
+    {
+        return _propertyData.getPath();
+    }
+    
+    public byte[] getData()
+    {
+        return _propertyData.getData();
+    }
+}

Added: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlStatus.java
==============================================================================
--- (empty file)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/JhlStatus.java	Sun Sep 28 14:21:09 2003
@@ -0,0 +1,153 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */ 
+package org.tigris.subversion.svnclientadapter.javahl;
+
+import java.net.MalformedURLException;
+import java.util.Date;
+
+import org.tigris.subversion.javahl.Status;
+import org.tigris.subversion.svnclientadapter.ISVNStatus;
+import org.tigris.subversion.svnclientadapter.SVNNodeKind;
+import org.tigris.subversion.svnclientadapter.SVNRevision;
+import org.tigris.subversion.svnclientadapter.SVNUrl;
+
+/**
+ * adapter : convert from Status to ISVNStatus
+ *  
+ * @author philip schatz
+ */
+public class JhlStatus implements ISVNStatus {
+
+	private Status _s;
+
+	public JhlStatus(Status status) {
+		super();
+		_s = status;
+	}
+
+	public boolean isIgnored() {
+		return _s.isIgnored();
+	}
+
+	public boolean isManaged() {
+		return _s.isManaged();
+	}
+
+	public boolean hasRemote() {
+		return _s.hasRemote();
+	}
+
+	public SVNUrl getUrl() {
+		try {
+            return new SVNUrl(_s.getUrl());
+        } catch (MalformedURLException e) {
+            //should never happen.
+            return null;
+        }
+	}
+
+	public SVNRevision.Number getLastChangedRevision() {
+		return (SVNRevision.Number)JhlConverter.convert(_s.getLastChangedRevision());
+	}
+
+	public Date getLastChangedDate() {
+		return _s.getLastChangedDate();
+	}
+
+	public String getLastCommitAuthor() {
+		return _s.getLastCommitAuthor();
+	}
+
+	public ISVNStatus.Kind getTextStatus() {
+        return JhlConverter.convertStatusKind(_s.getTextStatus());
+	}
+
+	public boolean isMerged() {
+		return _s.isMerged();
+	}
+
+	public boolean isDeleted() {
+		return _s.isDeleted();
+	}
+
+	public boolean isModified() {
+		return _s.isModified();
+	}
+
+	public boolean isAdded() {
+		return _s.isAdded();
+	}
+
+	public SVNRevision.Number getRevision() {
+		return (SVNRevision.Number)JhlConverter.convert(_s.getRevision());
+	}
+
+	public boolean isCopied() {
+		return _s.isCopied();
+	}
+
+	public String getPath() {
+		return _s.getPath();
+	}
+
+	public SVNNodeKind getNodeKind() {
+        return JhlConverter.convertNodeKind(_s.getNodeKind());
+	}
+
+	public String getUrlCopiedFrom() {
+		return _s.getUrlCopiedFrom();
+	}
+
+}

Copied: trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/SVNClientAdapter.java (from rev 147, trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientAdapter.java)
==============================================================================
--- trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNClientAdapter.java	(original)
+++ trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl/SVNClientAdapter.java	Sun Sep 28 14:21:09 2003
@@ -52,7 +52,7 @@
  * <http://www.apache.org/>.
  *
  */ 
-package org.tigris.subversion.svnclientadapter;
+package org.tigris.subversion.svnclientadapter.javahl;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;
@@ -65,14 +65,21 @@
 import java.util.StringTokenizer;
 
 import org.tigris.subversion.javahl.ClientException;
-import org.tigris.subversion.javahl.DirEntry;
-import org.tigris.subversion.javahl.LogMessage;
 import org.tigris.subversion.javahl.NodeKind;
 import org.tigris.subversion.javahl.PromptUserPassword;
 import org.tigris.subversion.javahl.PropertyData;
 import org.tigris.subversion.javahl.Revision;
 import org.tigris.subversion.javahl.SVNClient;
 import org.tigris.subversion.javahl.Status;
+import org.tigris.subversion.svnclientadapter.ISVNClientAdapter;
+import org.tigris.subversion.svnclientadapter.ISVNDirEntry;
+import org.tigris.subversion.svnclientadapter.ISVNLogMessage;
+import org.tigris.subversion.svnclientadapter.ISVNNotifyListener;
+import org.tigris.subversion.svnclientadapter.ISVNProperty;
+import org.tigris.subversion.svnclientadapter.ISVNStatus;
+import org.tigris.subversion.svnclientadapter.SVNClientException;
+import org.tigris.subversion.svnclientadapter.SVNRevision;
+import org.tigris.subversion.svnclientadapter.SVNUrl;
 
 
 /**
@@ -82,60 +89,22 @@
  *         <a href="mailto:cchabanois@ifrance.com">cchabanois@ifrance.com</a>
  *
  */
-public class SVNClientAdapter {
+public class SVNClientAdapter implements ISVNClientAdapter {
     final private static int SVN_ERR_WC_NOT_DIRECTORY = 155007;
 
     private SVNClient svnClient;
-    private ISVNNotifyListener notificationHandler;
+    private JhlNotificationHandler notificationHandler;
     private PromptUserPassword promptUserPasswordHandler;
-    private List notifylisteners = new ArrayList();
     
 
     public SVNClientAdapter() {
         svnClient = new SVNClient();
-        notificationHandler = new NotificationHandler();
+        notificationHandler = new JhlNotificationHandler();
         svnClient.notification(notificationHandler);        
         svnClient.setPrompt(new DefaultPromptUserPassword());
     }
 
     /**
-     * The notification handler : broadcast to all listeners 
-     */
-    private class NotificationHandler implements ISVNNotifyListener {
-
-        public void onNotify(
-                String path, int action, int kind, String mimeType,
-                int contentState, int propState, long revision) {
-            for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
-                ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
-                listener.onNotify(path,action,kind,mimeType,contentState,propState,revision);
-            }
-        }
-        
-        public void setCommand(int command) {
-            for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
-                ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
-                listener.setCommand(command);
-            }            
-        }
-    
-        public void setCommandLine(String commandLine) {
-            for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
-                ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
-                listener.setCommandLine(commandLine);
-            }                        
-        }
-        
-        public void setException(ClientException e) {
-            for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
-                ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
-                listener.setException(e);
-            }                                    
-        }
-        
-    }
-
-    /**
      * the default prompter : never prompts the user
      */
     private class DefaultPromptUserPassword implements PromptUserPassword {
@@ -165,14 +134,14 @@
      * Add a notification listener
      */
     public void addNotifyListener(ISVNNotifyListener listener) {
-        notifylisteners.add(listener);
+        notificationHandler.add(listener);
     }
 
     /**
      * Remove a notification listener 
      */
     public void removeNotifyListener(ISVNNotifyListener listener) {
-        notifylisteners.remove(listener);
+        notificationHandler.remove(listener);
     }
 
     /**
@@ -186,7 +155,7 @@
      * Sets the password.
      */
     public void setPassword(String password) {
-        notificationHandler.setCommand(ISVNNotifyListener.COMMAND_UNDEFINED);
+        notificationHandler.setCommand(ISVNNotifyListener.Command.UNDEFINED);
         svnClient.password(password);
     }
 
@@ -209,30 +178,18 @@
     	}
     }
     
-/*    
-    private static String urlToSVNUrl(URL url) {
-		// SVN need urls like http://... or file:///, not file:/ 
-    	String urlStr = url.toExternalForm();
-    	if ( (url.getProtocol().equals("file")) && (url.getHost().equals("")) )
-    			urlStr = urlStr.replaceFirst("file:/","file:///");
-    	if (urlStr.endsWith("/"))
-    		urlStr = urlStr.substring(0,urlStr.length()-1);
-    	return urlStr;
-    }
-    */
-
     /**
      * Adds a file (or directory) to the repository.
      * @exception ClientException
      */
-    public void addFile(File file) throws ClientException {
+    public void addFile(File file) throws SVNClientException {
         try{
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_ADD);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.ADD);
             notificationHandler.setCommandLine("add -N "+file.toString());
             svnClient.add(fileToSVNPath(file), false);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }        
     }
 
@@ -241,14 +198,14 @@
      * @exception ClientException
      */
     public void addDirectory(File dir, boolean recurse)
-        throws ClientException {
+        throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_ADD);            
+            notificationHandler.setCommand(ISVNNotifyListener.Command.ADD);            
             notificationHandler.setCommandLine("add -N "+dir.toString());
             svnClient.add(fileToSVNPath(dir), recurse);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }
     }
 
@@ -264,11 +221,11 @@
     public void checkout(
         SVNUrl moduleName,
         File destPath,
-        Revision revision,
+        SVNRevision revision,
         boolean recurse)
-        throws ClientException {
+        throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_CHECKOUT);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.CHECKOUT);
             notificationHandler.setCommandLine(
                 "checkout" +
                 (recurse?"":" -N") + 
@@ -277,11 +234,11 @@
             svnClient.checkout(
 			    moduleName.toString(),
                 fileToSVNPath(destPath),
-                revision,
+                JhlConverter.convert(revision),
                 recurse);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }
     }
 
@@ -296,9 +253,9 @@
      * @exception ClientException
      */
     public long commit(File[] paths, String message, boolean recurse)
-        throws ClientException {
+        throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_COMMIT);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.COMMIT);
             String[] files = new String[paths.length];
             String commandLine = "commit -m \""+message+"\"";
             if (!recurse)
@@ -313,7 +270,7 @@
             return svnClient.commit(files, message, recurse);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }
 
     }
@@ -326,15 +283,16 @@
 	 * @return
 	 * @throws ClientException
 	 */
-	public DirEntry[] getList(SVNUrl url, Revision revision, boolean recurse) throws ClientException {
+	public ISVNDirEntry[] getList(SVNUrl url, SVNRevision revision, boolean recurse) 
+            throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_LS);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.LS);
             String commandLine = "list -r "+revision.toString()+(recurse?"-R":"")+" "+url.toString();
             notificationHandler.setCommandLine(commandLine);		
-            return svnClient.list(url.toString(), revision, recurse);
+            return JhlConverter.convert(svnClient.list(url.toString(), JhlConverter.convert(revision), recurse));
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }
 	}
 
@@ -345,16 +303,17 @@
      * @param path File to gather status.
      * @return a Status
      */
-    public Status getSingleStatus(File path) throws ClientException {
-        notificationHandler.setCommand(ISVNNotifyListener.COMMAND_STATUS);
+    public ISVNStatus getSingleStatus(File path) 
+            throws SVNClientException {
+        notificationHandler.setCommand(ISVNNotifyListener.Command.STATUS);
         String filePathSVN = fileToSVNPath(path);
         notificationHandler.setCommandLine("status -N "+filePathSVN);
         try {
-            return svnClient.singleStatus(filePathSVN, false);
+            return new JhlStatus(svnClient.singleStatus(filePathSVN, false));
         } catch (ClientException e) {
             if (e.getAprError() == SVN_ERR_WC_NOT_DIRECTORY) {
                 // when there is no .svn dir, an exception is thrown ...
-                return new Status(
+                return new JhlStatus(new Status(
                     filePathSVN,
                     null,
                     path.isDirectory()?NodeKind.dir:NodeKind.file,
@@ -373,11 +332,11 @@
                 	"",  // conflictWorking
                     null, // url copied from
                     -1    // revision copied from
-                );
+                ));
             } else
             {
                 notificationHandler.setException(e);
-                throw e;
+                throw new SVNClientException(e);
             }
         }
     }
@@ -388,17 +347,18 @@
      * @param path File to gather status.
      * @return a Status
      */
-    public Status[] getStatusRecursively(File path,boolean getAll) throws ClientException {
-        notificationHandler.setCommand(ISVNNotifyListener.COMMAND_STATUS);
-        String filePathSVN = fileToSVNPath(path);
-        notificationHandler.setCommandLine("status "+filePathSVN);
-        try {
-            return svnClient.status(filePathSVN,true, false, getAll);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }
-    }
+	public ISVNStatus[] getStatusRecursively(File path, boolean getAll)
+		throws SVNClientException {
+		notificationHandler.setCommand(ISVNNotifyListener.Command.STATUS);
+		String filePathSVN = fileToSVNPath(path);
+		notificationHandler.setCommandLine("status " + filePathSVN);
+		try {
+			return JhlConverter.convert(svnClient.status(filePathSVN, true, false, getAll));
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
+	}
 
     /**
      * copy and schedule for addition (with history)
@@ -406,20 +366,20 @@
      * @param destPath
      * @throws ClientException
      */ 
-    public void copy(File srcPath, File destPath) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_COPY);
-        
-            String src = fileToSVNPath(srcPath);
-            String dest = fileToSVNPath(destPath);
-            notificationHandler.setCommandLine(
-                "copy "+src+" "+dest);
-            svnClient.copy(src,dest,"",Revision.HEAD); // last two parameters are not used
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }
-    }
+	public void copy(File srcPath, File destPath) throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.COPY);
+
+			String src = fileToSVNPath(srcPath);
+			String dest = fileToSVNPath(destPath);
+			notificationHandler.setCommandLine("copy " + src + " " + dest);
+			svnClient.copy(src, dest, "", Revision.HEAD);
+			// last two parameters are not used
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
+	}
 
 	/**
 	 * immediately commit a copy of WC to URL
@@ -427,18 +387,19 @@
 	 * @param destUrl
 	 * @throws ClientException
 	 */
-	public void copy(File srcPath, SVNUrl destUrl, String message) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_COPY);
-            String src = fileToSVNPath(srcPath);
-            String dest = destUrl.toString();
-            notificationHandler.setCommandLine(
-                    "copy "+src+" "+dest);
-		    svnClient.copy(src,dest,message,Revision.HEAD); // last parameter is not used
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }
+	public void copy(File srcPath, SVNUrl destUrl, String message)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.COPY);
+			String src = fileToSVNPath(srcPath);
+			String dest = destUrl.toString();
+			notificationHandler.setCommandLine("copy " + src + " " + dest);
+			svnClient.copy(src, dest, message, Revision.HEAD);
+			// last parameter is not used
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
 	}
 
 	/**
@@ -447,18 +408,18 @@
 	 * @param destPath
 	 * @throws ClientException
 	 */
-	public void copy(SVNUrl srcUrl, File destPath, Revision revision) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_COPY);
-            String src = srcUrl.toString();
-            String dest = fileToSVNPath(destPath);
-            notificationHandler.setCommandLine(
-                    "copy "+src+" "+dest);
-            svnClient.copy(src,dest,"",revision);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }
+	public void copy(SVNUrl srcUrl, File destPath, SVNRevision revision)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.COPY);
+			String src = srcUrl.toString();
+			String dest = fileToSVNPath(destPath);
+			notificationHandler.setCommandLine("copy " + src + " " + dest);
+			svnClient.copy(src, dest, "", JhlConverter.convert(revision));
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
 	}
 	
 	/**
@@ -467,19 +428,23 @@
 	 * @param destUrl
 	 * @throws ClientException
 	 */
-	public void copy(SVNUrl srcUrl, SVNUrl destUrl, String message, Revision revision) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_COPY);
-            String src = srcUrl.toString();
-            String dest = destUrl.toString();
-            notificationHandler.setCommandLine(
-                    "copy "+src+" "+dest);
-
-		    svnClient.copy(src,dest,message,revision);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }
+	public void copy(
+		SVNUrl srcUrl,
+		SVNUrl destUrl,
+		String message,
+		SVNRevision revision)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.COPY);
+			String src = srcUrl.toString();
+			String dest = destUrl.toString();
+			notificationHandler.setCommandLine("copy " + src + " " + dest);
+
+			svnClient.copy(src, dest, message, JhlConverter.convert(revision));
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
 	}
 
 	/**
@@ -488,9 +453,9 @@
 	 * @param message
 	 * @throws ClientException
 	 */
-	public void remove(SVNUrl url[], String message) throws ClientException {
+	public void remove(SVNUrl url[], String message) throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_REMOVE);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.REMOVE);
 
             String commandLine = "delete -m \""+message+"\"";
             
@@ -504,7 +469,7 @@
             
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }           
 	}
 
@@ -518,9 +483,9 @@
 	 * @param force
 	 * @throws ClientException
 	 */
-	public void remove(File file[], boolean force) throws ClientException {
+	public void remove(File file[], boolean force) throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_REMOVE);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.REMOVE);
             
             String commandLine = "delete"+(force?" --force":"");
             String targets[] = new String[file.length];
@@ -535,7 +500,7 @@
             svnClient.remove(targets,"",force);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }           
 	}
 
@@ -547,19 +512,24 @@
 	 * @param revision
 	 * @throws ClientException
 	 */
-	public void doExport(SVNUrl srcUrl, File destPath, Revision revision, boolean force) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_EXPORT);
-            String src = srcUrl.toString();
-            String dest = fileToSVNPath(destPath);
-            notificationHandler.setCommandLine(
-                "export -r "+revision.toString()+ ' '+src+' '+dest);
-            
-            svnClient.doExport(src,dest,revision,force);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }
+	public void doExport(
+		SVNUrl srcUrl,
+		File destPath,
+		SVNRevision revision,
+		boolean force)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.EXPORT);
+			String src = srcUrl.toString();
+			String dest = fileToSVNPath(destPath);
+			notificationHandler.setCommandLine(
+				"export -r " + revision.toString() + ' ' + src + ' ' + dest);
+
+			svnClient.doExport(src, dest, JhlConverter.convert(revision), force);
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
 	}
 	
 	/**
@@ -570,19 +540,19 @@
 	 * @param destPath
 	 * @throws ClientException
 	 */
-	public void doExport(File srcPath, File destPath, boolean force) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_EXPORT);
-            String src = fileToSVNPath(srcPath);
-            String dest = fileToSVNPath(destPath);
-            notificationHandler.setCommandLine(
-                 "export "+src+' '+dest);
-            // in this case, revision is not used but must be valid
-		    svnClient.doExport(src,dest,Revision.HEAD, force);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }	
+	public void doExport(File srcPath, File destPath, boolean force)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.EXPORT);
+			String src = fileToSVNPath(srcPath);
+			String dest = fileToSVNPath(destPath);
+			notificationHandler.setCommandLine("export " + src + ' ' + dest);
+			// in this case, revision is not used but must be valid
+			svnClient.doExport(src, dest, Revision.HEAD, force);
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
 	}
 	
 	/**
@@ -595,20 +565,29 @@
 	 * @param recurse
 	 * @throws ClientException
 	 */
-	public void doImport(File path, SVNUrl url, String message, boolean recurse) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_IMPORT);
-            String src = fileToSVNPath(path);
-            String dest = url.toString();
-            notificationHandler.setCommandLine(
-                         "import -m \""+message+"\" "+
-                         (recurse?"":"-N ")+
-                         src+' '+dest);
-            svnClient.doImport(src, dest,message, recurse);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }			
+	public void doImport(
+		File path,
+		SVNUrl url,
+		String message,
+		boolean recurse)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.IMPORT);
+			String src = fileToSVNPath(path);
+			String dest = url.toString();
+			notificationHandler.setCommandLine(
+				"import -m \""
+					+ message
+					+ "\" "
+					+ (recurse ? "" : "-N ")
+					+ src
+					+ ' '
+					+ dest);
+			svnClient.doImport(src, dest, message, recurse);
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
 	}
 
 	/**
@@ -617,16 +596,16 @@
 	 * @param message
 	 * @throws ClientException
 	 */
-	public void mkdir(SVNUrl url, String message) throws ClientException {
+	public void mkdir(SVNUrl url, String message) throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_MKDIR);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.MKDIR);
 		    String target = url.toString();
             notificationHandler.setCommandLine(
                 "mkdir -m \""+message+"\" "+target);
             svnClient.mkdir(new String[] { target },message);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }                   	
 	}
 	
@@ -635,16 +614,16 @@
 	 * @param file
 	 * @throws ClientException
 	 */
-	public void mkdir(File file) throws ClientException {
+	public void mkdir(File file) throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_MKDIR);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.MKDIR);
             String target = fileToSVNPath(file);
             notificationHandler.setCommandLine(
                 "mkdir "+target);
             svnClient.mkdir(new String[] { target },"");
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }           	
 	}
 
@@ -654,10 +633,10 @@
 	 * @param destPath
 	 * @throws ClientException
 	 */	
-	public void move(File srcPath, File destPath, boolean force) throws ClientException {
+	public void move(File srcPath, File destPath, boolean force) throws SVNClientException {
         // use force when you want to move file even if there are local modifications
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_MOVE);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.MOVE);
 		    String src = fileToSVNPath(srcPath);
             String dest = fileToSVNPath(destPath);
             notificationHandler.setCommandLine(
@@ -665,7 +644,7 @@
             svnClient.move(src,dest,"",Revision.HEAD,force);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }                   	
 	}
 
@@ -675,18 +654,30 @@
 	 * @param destPath
 	 * @throws ClientException
 	 */	
-	public void move(SVNUrl srcUrl, SVNUrl destUrl, String message, Revision revision) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_MOVE);
-            String src = srcUrl.toString();
-            String dest = destUrl.toString();
-            notificationHandler.setCommandLine(
-                "move -m \""+message+"\" -r "+revision.toString()+' '+src+' '+dest); 
-            svnClient.move(src,dest,message,revision,false);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }           	
+	public void move(
+		SVNUrl srcUrl,
+		SVNUrl destUrl,
+		String message,
+		SVNRevision revision)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.MOVE);
+			String src = srcUrl.toString();
+			String dest = destUrl.toString();
+			notificationHandler.setCommandLine(
+				"move -m \""
+					+ message
+					+ "\" -r "
+					+ revision.toString()
+					+ ' '
+					+ src
+					+ ' '
+					+ dest);
+			svnClient.move(src, dest, message, JhlConverter.convert(revision), false);
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
 	}	
 
 	/**
@@ -696,19 +687,22 @@
 	 * @param recurse
 	 * @throws ClientException
 	 */
-	public void update(File path, Revision revision, boolean recurse) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_UPDATE);
-		    String target = fileToSVNPath(path);
-            notificationHandler.setCommandLine(
-                "update -r "+revision.toString()+' '+
-                (recurse?"":"-N ")+
-                target); 
-            svnClient.update(target, revision, recurse);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }           	 
+	public void update(File path, SVNRevision revision, boolean recurse)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.UPDATE);
+			String target = fileToSVNPath(path);
+			notificationHandler.setCommandLine(
+				"update -r "
+					+ revision.toString()
+					+ ' '
+					+ (recurse ? "" : "-N ")
+					+ target);
+			svnClient.update(target, JhlConverter.convert(revision), recurse);
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
 	}
 
     /**
@@ -717,9 +711,9 @@
      * @param recurse
      * @throws ClientException
      */
-    public void revert(File path, boolean recurse) throws ClientException {
+    public void revert(File path, boolean recurse) throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_REVERT);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.REVERT);
             String target = fileToSVNPath(path);
             notificationHandler.setCommandLine(
                 "revert "+
@@ -728,7 +722,7 @@
             svnClient.revert(target,recurse);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;
+            throw new SVNClientException(e);
         }         
     }
 
@@ -739,20 +733,28 @@
      * @param revisionEnd
      * @return
      */
-    public LogMessage[] getLogMessages(SVNUrl url, Revision revisionStart, Revision revisionEnd) throws ClientException 
-    {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_LOG);
-            String target = url.toString();
-            notificationHandler.setCommandLine("log -r "+revisionStart.toString()+":"+revisionEnd.toString()+
-                " "+target);
-        
-            return svnClient.logMessages(target, revisionStart, revisionEnd);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }    
-    } 
+	public ISVNLogMessage[] getLogMessages(
+		SVNUrl url,
+		SVNRevision revisionStart,
+		SVNRevision revisionEnd)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.LOG);
+			String target = url.toString();
+			notificationHandler.setCommandLine(
+				"log -r "
+					+ revisionStart.toString()
+					+ ":"
+					+ revisionEnd.toString()
+					+ " "
+					+ target);
+
+			return JhlConverter.convert(svnClient.logMessages(target, JhlConverter.convert(revisionStart), JhlConverter.convert(revisionEnd)));
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
+	} 
     
     /**
      * Get the log messages for a set of revision(s)
@@ -761,19 +763,28 @@
      * @param revisionEnd
      * @return
      */
-    public LogMessage[] getLogMessages(File path, Revision revisionStart, Revision revisionEnd) throws ClientException 
-    {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_UNDEFINED);
-            String target = fileToSVNPath(path);
-            notificationHandler.setCommandLine("log -r "+revisionStart.toString()+":"+revisionEnd.toString()+
-                    " "+target);
-            return svnClient.logMessages(target, revisionStart, revisionEnd);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }    
-    }     
+	public ISVNLogMessage[] getLogMessages(
+		File path,
+		SVNRevision revisionStart,
+		SVNRevision revisionEnd)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(
+				ISVNNotifyListener.Command.UNDEFINED);
+			String target = fileToSVNPath(path);
+			notificationHandler.setCommandLine(
+				"log -r "
+					+ revisionStart.toString()
+					+ ":"
+					+ revisionEnd.toString()
+					+ " "
+					+ target);
+			return JhlConverter.convert(svnClient.logMessages(target, JhlConverter.convert(revisionStart), JhlConverter.convert(revisionEnd)));
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
+	}    
 
 
 	/**
@@ -790,18 +801,19 @@
      * @param url
      * @param revision
      */
-    public InputStream getContent(SVNUrl url, Revision revision) throws ClientException
-    {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_UNDEFINED);
-            byte[] contents = svnClient.fileContent(url.toString(),revision);
-            InputStream input = new ByteArrayInputStream(contents);
-            return input;
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;
-        }           
-    }
+	public InputStream getContent(SVNUrl url, SVNRevision revision)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(
+				ISVNNotifyListener.Command.UNDEFINED);
+			byte[] contents = svnClient.fileContent(url.toString(), JhlConverter.convert(revision));
+			InputStream input = new ByteArrayInputStream(contents);
+			return input;
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
+	}
 
     /**
      * set a property
@@ -811,42 +823,64 @@
      * @param recurse
      * @throws ClientException
      */
-    public void propertySet(File path, String propertyName, String propertyValue, boolean recurse) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_PROPSET);
-            
-            String target = fileToSVNPath(path);
-            notificationHandler.setCommandLine("propset "+propertyName+ " \""+propertyValue+"\" "+target);
-                    
-            svnClient.propertySet(target, propertyName, propertyValue, recurse);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;            
-        }
-    }
+	public void propertySet(
+		File path,
+		String propertyName,
+		String propertyValue,
+		boolean recurse)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.PROPSET);
+
+			String target = fileToSVNPath(path);
+			notificationHandler.setCommandLine(
+				"propset "
+					+ propertyName
+					+ " \""
+					+ propertyValue
+					+ "\" "
+					+ target);
+
+			svnClient.propertySet(target, propertyName, propertyValue, recurse);
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
+	}
     
     /**
      * set a property using the content of a file 
      */
-    public void propertySet(File path, String propertyName, File propertyFile, boolean recurse) throws ClientException, IOException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_PROPSET);
-            
-            String target = fileToSVNPath(path);
-            notificationHandler.setCommandLine("propset "+propertyName+ "-F \""+propertyFile.toString()+"\" "+target);
-
-            byte[] propertyBytes;
-         
-            FileInputStream is = new FileInputStream(propertyFile);
-            propertyBytes = new byte[(int)propertyFile.length()]; 
-            is.read(propertyBytes);
-                    
-            svnClient.propertySet(target, propertyName, propertyBytes, recurse);
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;            
-        }
-    }
+	public void propertySet(
+		File path,
+		String propertyName,
+		File propertyFile,
+		boolean recurse)
+		throws SVNClientException, IOException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.PROPSET);
+
+			String target = fileToSVNPath(path);
+			notificationHandler.setCommandLine(
+				"propset "
+					+ propertyName
+					+ "-F \""
+					+ propertyFile.toString()
+					+ "\" "
+					+ target);
+
+			byte[] propertyBytes;
+
+			FileInputStream is = new FileInputStream(propertyFile);
+			propertyBytes = new byte[(int) propertyFile.length()];
+			is.read(propertyBytes);
+
+			svnClient.propertySet(target, propertyName, propertyBytes, recurse);
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
+	}
     
     /**
      * get a property
@@ -856,21 +890,23 @@
      * @return
      * @throws ClientException
      */
-    public PropertyData propertyGet(File path, String propertyName) throws ClientException {
-        try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_PROPSET);
-                
-            String target = fileToSVNPath(path);
-            notificationHandler.setCommandLine("propget "+propertyName+" "+target);
-                        
-            PropertyData propData = svnClient.propertyGet(target, propertyName);
-            return propData;
-        } catch (ClientException e) {
-            notificationHandler.setException(e);
-            throw e;            
-        }
-    
-    }
+	public ISVNProperty propertyGet(File path, String propertyName)
+		throws SVNClientException {
+		try {
+			notificationHandler.setCommand(ISVNNotifyListener.Command.PROPSET);
+
+			String target = fileToSVNPath(path);
+			notificationHandler.setCommandLine(
+				"propget " + propertyName + " " + target);
+
+			PropertyData propData = svnClient.propertyGet(target, propertyName);
+			return new JhlPropertyData(propData);
+		} catch (ClientException e) {
+			notificationHandler.setException(e);
+			throw new SVNClientException(e);
+		}
+
+	}
 
     /**
      * delete a property
@@ -879,9 +915,9 @@
      * @param recurse
      * @throws ClientException
      */
-    public void propertyDel(File path, String propertyName,boolean recurse) throws ClientException {
+    public void propertyDel(File path, String propertyName,boolean recurse) throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_PROPDEL);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.PROPDEL);
             
             String target = fileToSVNPath(path);
             notificationHandler.setCommandLine("propdel "+propertyName+" "+target);
@@ -889,7 +925,7 @@
             svnClient.propertySet(target, propertyName, (String)null, recurse);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;            
+            throw new SVNClientException(e);            
         }        
     }
     
@@ -897,11 +933,11 @@
      * get the ignored patterns for the given directory
      * if path is not a directory, returns null 
      */
-    public List getIgnoredPatterns(File path) throws ClientException {
+    public List getIgnoredPatterns(File path) throws SVNClientException {
         if (!path.isDirectory())
             return null;
         List list = new ArrayList();
-        PropertyData pd = propertyGet(path, "svn:ignore");
+        ISVNProperty pd = propertyGet(path, "svn:ignore");
         if (pd == null)
             return list;
         String patterns = pd.getValue();
@@ -917,7 +953,7 @@
     /**
      * add a pattern to svn:ignore property 
      */
-    public void addToIgnoredPatterns(File path, String pattern)  throws ClientException {
+    public void addToIgnoredPatterns(File path, String pattern)  throws SVNClientException {
         List patterns = getIgnoredPatterns(path);
         if (patterns == null) // not a directory
             return;
@@ -935,7 +971,7 @@
     /**
      * set the ignored patterns for the given directory 
      */
-    public void setIgnoredPatterns(File path, List patterns) throws ClientException {
+    public void setIgnoredPatterns(File path, List patterns) throws SVNClientException {
         if (!path.isDirectory())
             return;
         String value ="";
@@ -949,20 +985,20 @@
     /**
      * display the differences between two paths. 
      */
-    public void diff(File oldPath, Revision oldPathRevision,
-                     File newPath, Revision newPathRevision,
-                     File outFile, boolean recurse) throws ClientException {
+    public void diff(File oldPath, SVNRevision oldPathRevision,
+                     File newPath, SVNRevision newPathRevision,
+                     File outFile, boolean recurse) throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_DIFF);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.DIFF);
                 
             if (oldPath == null)
                 oldPath = new File(".");
             if (newPath == null)
                 newPath = oldPath;
             if (oldPathRevision == null)
-                oldPathRevision = Revision.BASE;
+                oldPathRevision = SVNRevision.BASE;
             if (newPathRevision == null)
-                newPathRevision = Revision.WORKING;
+                newPathRevision = SVNRevision.WORKING;
             
             String oldTarget = fileToSVNPath(oldPath);
             String newTarget = fileToSVNPath(newPath);
@@ -984,33 +1020,33 @@
             
             notificationHandler.setCommandLine(commandLine);
             
-            svnClient.diff(oldTarget,oldPathRevision,newTarget,newPathRevision, svnOutFile, recurse);
+            svnClient.diff(oldTarget,JhlConverter.convert(oldPathRevision),newTarget,JhlConverter.convert(newPathRevision), svnOutFile, recurse);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;            
+            throw new SVNClientException(e);            
         }
     }
 
 
-     public void diff(File path, File outFile, boolean recurse) throws ClientException {
+     public void diff(File path, File outFile, boolean recurse) throws SVNClientException {
         diff(path, null,null,null,outFile,recurse);
     }
 
     /**
      * display the differences between two urls. 
      */
-    public void diff(SVNUrl oldUrl, Revision oldUrlRevision,
-                     SVNUrl newUrl, Revision newUrlRevision,
-                     File outFile, boolean recurse) throws ClientException {
+    public void diff(SVNUrl oldUrl, SVNRevision oldUrlRevision,
+                     SVNUrl newUrl, SVNRevision newUrlRevision,
+                     File outFile, boolean recurse) throws SVNClientException {
         try {
-            notificationHandler.setCommand(ISVNNotifyListener.COMMAND_DIFF);
+            notificationHandler.setCommand(ISVNNotifyListener.Command.DIFF);
                 
             if (newUrl == null)
                 newUrl = oldUrl;
             if (oldUrlRevision == null)
-                oldUrlRevision = Revision.HEAD;
+                oldUrlRevision = SVNRevision.HEAD;
             if (newUrlRevision == null)
-                newUrlRevision = Revision.HEAD;
+                newUrlRevision = SVNRevision.HEAD;
             
             String svnOutFile = fileToSVNPath(outFile);
             
@@ -1029,15 +1065,15 @@
             
             notificationHandler.setCommandLine(commandLine);
             
-            svnClient.diff(oldUrl.toString(),oldUrlRevision,newUrl.toString(),newUrlRevision, svnOutFile, recurse);
+            svnClient.diff(oldUrl.toString(),JhlConverter.convert(oldUrlRevision),newUrl.toString(),JhlConverter.convert(newUrlRevision), svnOutFile, recurse);
         } catch (ClientException e) {
             notificationHandler.setException(e);
-            throw e;            
+            throw new SVNClientException(e);            
         }
     }
 
-    public void diff(SVNUrl url, Revision oldUrlRevision, Revision newUrlRevision,
-                     File outFile, boolean recurse) throws ClientException {
+    public void diff(SVNUrl url, SVNRevision oldUrlRevision, SVNRevision newUrlRevision,
+                     File outFile, boolean recurse) throws SVNClientException {
         diff(url,oldUrlRevision,url,newUrlRevision,outFile,recurse);                     
     }
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: cvs-help@subclipse.tigris.org



