Class StateReporter

java.lang.Object
org.apache.subversion.javahl.JNIObject
org.apache.subversion.javahl.remote.StateReporter
All Implemented Interfaces:
ISVNReporter

public class StateReporter
extends JNIObject
implements ISVNReporter
Implementation of ISVNReporter.
Since:
1.9
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected RemoteSession session
    Stores a reference to the session that created this reporter.

    Fields inherited from class org.apache.subversion.javahl.JNIObject

    cppAddr
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected StateReporter​(long cppAddr, RemoteSession session)
    This constructor is called from the factory method.
  • Method Summary

    Modifier and Type Method Description
    void abortReport()
    If an error occurs during a report, this routine should cause the filesystem transaction to be aborted and cleaned up.
    void deletePath​(String path)
    Describe a working copy path as missing.
    void dispose()
    Release the native peer (should not depend on finalize), and abort the report if it has not been completed yet.
    void finalize()  
    long finishReport()
    The report driver calls this when the state report is finished.
    void linkPath​(String url, String path, long revision, Depth depth, boolean startEmpty, String lockToken)
    Like setPath(), but differs in that path in the working copy (relative to the root of the report driver) isn't a reflection of path in the repository (relative to the URL specified when opening the remote session), but is instead a reflection of a different repository url at revision, and has depth depth.
    void setPath​(String path, long revision, Depth depth, boolean startEmpty, String lockToken)
    Describe a working copy path as being at a particular revision and having the given depth.

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • session

      protected RemoteSession session
      Stores a reference to the session that created this reporter.
  • Constructor Details

    • StateReporter

      protected StateReporter​(long cppAddr, RemoteSession session)
      This constructor is called from the factory method.
  • Method Details

    • dispose

      public void dispose()
      Description copied from interface: ISVNReporter
      Release the native peer (should not depend on finalize), and abort the report if it has not been completed yet.
      Specified by:
      dispose in interface ISVNReporter
    • setPath

      public void setPath​(String path, long revision, Depth depth, boolean startEmpty, String lockToken) throws ClientException
      Description copied from interface: ISVNReporter
      Describe a working copy path as being at a particular revision and having the given depth.

      revision may be Revision.SVN_INVALID_REVNUM if (for example) path represents a locally-added path with no revision number, or depth is Depth.exclude.

      path may not be underneath a path on which setPath() was previously called with Depth.exclude in this report.

      If startEmpty is set and path is a directory, the implementor should assume the directory has no entries or properties.

      This will override any previous setPath() calls made on parent paths. path is relative to the URL of the remote session that created this reporter instance.

      If lockToken is not null, it is the lock token for path in the working copy.

      Specified by:
      setPath in interface ISVNReporter
      Throws:
      ClientException
    • deletePath

      public void deletePath​(String path) throws ClientException
      Description copied from interface: ISVNReporter
      Describe a working copy path as missing.

      path may not be underneath a path on which setPath() was previously called with Depth.exclude in this report.

      Specified by:
      deletePath in interface ISVNReporter
      Throws:
      ClientException
    • linkPath

      public void linkPath​(String url, String path, long revision, Depth depth, boolean startEmpty, String lockToken) throws ClientException
      Description copied from interface: ISVNReporter
      Like setPath(), but differs in that path in the working copy (relative to the root of the report driver) isn't a reflection of path in the repository (relative to the URL specified when opening the remote session), but is instead a reflection of a different repository url at revision, and has depth depth.

      path may not be underneath a path on which setPath() was previously called with Depth.exclude in this report.

      If startEmpty is set and path is a directory, the implementor should assume the directory has no entries or properties.

      If lockToken is not null, it is the lock token for path in the working copy.

      Specified by:
      linkPath in interface ISVNReporter
      Throws:
      ClientException
    • finishReport

      public long finishReport() throws ClientException
      Description copied from interface: ISVNReporter
      The report driver calls this when the state report is finished. Any directories or files not explicitly "set" are assumed to be at the baseline revision originally passed into do_update(). No other reporting functions, including ISVNReporter.abortReport(), should be called after calling this function.
      Specified by:
      finishReport in interface ISVNReporter
      Returns:
      The target revision of the resulting editor drive. In the case of ISVNRemote.status(java.lang.String, long, org.apache.subversion.javahl.types.Depth, org.apache.subversion.javahl.callback.RemoteStatus), this is the revision against which the status call was performed; in the case of ISVNRemote#update, it is the revision updated to.
      Throws:
      ClientException
    • abortReport

      public void abortReport() throws ClientException
      Description copied from interface: ISVNReporter
      If an error occurs during a report, this routine should cause the filesystem transaction to be aborted and cleaned up. No other reporting functions should be called after calling this function.
      Specified by:
      abortReport in interface ISVNReporter
      Throws:
      ClientException
    • finalize

      public void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable