Overview | Package | Class | Tree | Deprecated | Index | Help
| SVNKit Home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.tmatesoft.svn.core.wc
Interface ISVNAnnotateHandler

All Known Implementing Classes:
  SVNXMLAnnotateHandler

public interface ISVNAnnotateHandler

The ISVNAnnotateHandler interface should be implemented to be further provided to SVNLogClient's doAnnotate() methods for processing annotation information per each text line.

Here's an example code snippet:

     import org.tmatesoft.svn.core.wc.ISVNAnnotateHandler;
     import org.tmatesoft.svn.core.wc.SVNLogClient;
     ...

         SVNLogClient logClient;
         ...

         logClient.doAnnotate(new File("path/to/WC/file"), SVNRevision.HEAD, SVNRevision.create(0),
                              SVNRevision.HEAD, new ISVNAnnotateHandler(){
                                  public void handleLine(Date date, long revision,
                                                                String author, String line){
                                      //implement this method as you wish, for example:
                                      System.out.println(revision +
                                                         "  " +
                                                         author +
                                                         "  " +
                                                         date +
                                                         "  " +
                                                         line);
                                  }
                              });
         ...

Since:
  1.2
Version:
  1.3
Author:
  TMate Software Ltd.
See Also:
  `SVNLogClient`

Method Summary
`void` | `handleEOF()` Handles the EOF met after the document contents.
`void` | `handleLine(Date date, long revision, String author, String line)` Deprecated. use `handleLine(Date, long, String, String, Date, long, String, String, int)` instead
`void` | `handleLine(Date date, long revision, String author, String line, Date mergedDate, long mergedRevision, String mergedAuthor, String mergedPath, int lineNumber)` Handles per line annotation information - that is information about who last committed (changed) this line, the revision and timestamp when it was last committed.
`boolean` | `handleRevision(Date date, long revision, String author, File contents)` Handles file information for a next revision.

Method Detail

### handleLine

    public void handleLine(Date date,
                           long revision,
                           String author,
                           String line)
                    throws SVNException

  Deprecated. use `handleLine(Date, long, String, String, Date, long, String, String, int)` instead

  Parameters:
    `date` -
    `revision` -
    `author` -
    `line` -
  Throws:
    `SVNException`

### handleLine

    public void handleLine(Date date,
                           long revision,
                           String author,
                           String line,
                           Date mergedDate,
                           long mergedRevision,
                           String mergedAuthor,
                           String mergedPath,
                           int lineNumber)
                    throws SVNException

  Handles per line annotation information - that is information about who last committed (changed) this line, the revision and timestamp when it was last committed.

  Parameters `mergedDate`, `mergedRevision`, `mergedAuthor` and `mergedPath` will be set only if the corresponding method `doAnnotate` of `SVNLogClient` was called with `includeMergedRevisions` set to true. Otherwise they are irrelevant.

  Note: if there is no blame information for this line, `revision` will be invalid and `author` and `date` will be null.

  Parameters:
    `date` - the time moment when changes to `line` were commited to the repository
    `revision` - the revision the changes were commited to
    `author` - the person who did those changes
    `line` - a text line of the target file (on which `doAnnotate()` was invoked)
    `mergedDate` - date when merge changes occurred
    `mergedRevision` - revision in which merge changes occurred
    `mergedAuthor` - author of merge
    `mergedPath` - absolute repository path of the merged file
    `lineNumber` - number of the file line for which this information is annotated
  Throws:
    `SVNException`

### handleRevision

    public boolean handleRevision(Date date,
                                  long revision,
                                  String author,
                                  File contents)
                           throws SVNException

  Handles file information for a next revision. If this method returns true then file contents will be annotated for `revision` as well.

  Parameters:
    `date` - the time moment when changes to `line` were commited to the repository
    `revision` - the revision the changes were commited to
    `author` - the person who did those changes
    `contents` - temporary file with contents. This file shouldn't be used as persistent reference as it will be overwritten after this method exits and eventually deleted.
  Returns:
    true to annotate the file for `revision`
  Throws:
    `SVNException`

### handleEOF

    public void handleEOF()

  Handles the EOF met after the document contents.

  Since:
    1.2.0

Overview | Package | Class | Tree | Deprecated | Index | Help
| SVNKit Home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2009 TMate Software Ltd. All Rights Reserved.