You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/06/27 15:57:16 UTC

svn commit: r1497358 - in /subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl: ISVNReporter.java remote/UpdateReporter.java

Author: brane
Date: Thu Jun 27 13:57:15 2013
New Revision: 1497358

URL: http://svn.apache.org/r1497358
Log:
Add a bit of reporter boilerplate to JavaHL.

[in subversion/bindings/javahl/src/org/apache/subversion/javahl]
* ISVNReporter.java (ISVNReporter.dispose): New method.
* UpdateReporter.java: New; implementation of ISVNReporter.

Added:
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/UpdateReporter.java
Modified:
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java?rev=1497358&r1=1497357&r2=1497358&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java Thu Jun 27 13:57:15 2013
@@ -53,6 +53,12 @@ import org.apache.subversion.javahl.call
 public interface ISVNReporter
 {
     /**
+     * Release the native peer (should not depend on finalize),
+     * and abort the report if it has not been completed yet.
+     */
+    void dispose();
+
+    /**
      * Describe a working copy <code>path</code> as being at a
      * particular <code>revision</code> and having the given
      * <code>depth</code>.

Added: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/UpdateReporter.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/UpdateReporter.java?rev=1497358&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/UpdateReporter.java (added)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/UpdateReporter.java Thu Jun 27 13:57:15 2013
@@ -0,0 +1,89 @@
+/**
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+package org.apache.subversion.javahl.remote;
+
+import org.apache.subversion.javahl.types.*;
+import org.apache.subversion.javahl.callback.*;
+
+import org.apache.subversion.javahl.JNIObject;
+import org.apache.subversion.javahl.ISVNReporter;
+import org.apache.subversion.javahl.ClientException;
+
+/**
+ * Implementation of ISVNReporter.
+ * @since 1.9
+ */
+public class UpdateReporter extends JNIObject implements ISVNReporter
+{
+    public void dispose() {/* TODO: */}
+
+    public void setPath(String path,
+                        long revision,
+                        Depth depth,
+                        boolean startEmpty,
+                        String lockToken)
+            throws ClientException
+    {
+        throw new RuntimeException("Not implemented: setPath");
+    }
+
+    public void deletePath(String path) throws ClientException
+    {
+        throw new RuntimeException("Not implemented: deletePath");
+    }
+
+    public void linkPath(String url,
+                         String path,
+                         long revision,
+                         Depth depth,
+                         boolean startEmpty,
+                         String lockToken)
+            throws ClientException
+    {
+        throw new RuntimeException("Not implemented: linkPath");
+    }
+
+    public void finishReport() throws ClientException
+    {
+        throw new RuntimeException("Not implemented: finishReport");
+    }
+
+    public void abortReport() throws ClientException
+    {
+        throw new RuntimeException("Not implemented: abortReport");
+    }
+
+    /**
+     * This constructor is called from the factory to get an instance.
+     */
+    protected UpdateReporter(long cppAddr, RemoteSession session)
+    {
+        super(cppAddr);
+        this.session = session;
+    }
+
+    /** Stores a reference to the session that created this reporter. */
+    protected RemoteSession session;
+}
+