org.apache.maven.scm.provider.starteam.command.diff
Class StarteamDiffConsumer

java.lang.Object
  extended byorg.apache.maven.scm.provider.starteam.command.diff.StarteamDiffConsumer
All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer

public class StarteamDiffConsumer
extends java.lang.Object
implements org.codehaus.plexus.util.cli.StreamConsumer

Version:
$Id: StarteamDiffConsumer.java 264806 2005-08-30 16:26:17Z evenisse $
Author:
Dan T. Tran

Field Summary
private static java.lang.String ADDED_LINE_TOKEN
           
private  java.util.List changedFiles
           
private  java.lang.StringBuffer currentDifference
           
private  java.lang.String currentDir
           
private  java.lang.String currentFile
           
private  boolean diffBlockProcessingStarted
           
private  java.util.Map differences
           
private static java.lang.String FOLDER_TOKEN
           
private  org.apache.maven.scm.log.ScmLogger logger
           
private static java.lang.String ONDISK_TOKEN
           
private  java.lang.StringBuffer patch
           
private static java.lang.String PATCH_SEPARATOR_TOKEN
           
private static java.lang.String REMOVED_LINE_TOKEN
           
private static java.lang.String REVISION_TOKEN
           
private  boolean revisionBlockStarted
           
private static java.lang.String UNCHANGED_LINE_TOKEN
           
private static java.lang.String WORKING_DIR_TOKEN
           
private  java.io.File workingDirectory
           
 
Constructor Summary
StarteamDiffConsumer(org.apache.maven.scm.log.ScmLogger logger, java.io.File workingDirectory)
           
 
Method Summary
 void consumeLine(java.lang.String line)
           
private  void extractCurrentFile(java.lang.String line, int pos)
           
 java.util.List getChangedFiles()
           
 java.util.Map getDifferences()
           
 java.lang.String getPatch()
           
private  void processGetDir(java.lang.String line, int pos)
          Process the current input line in the Get Directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOLDER_TOKEN

private static final java.lang.String FOLDER_TOKEN
See Also:
Constant Field Values

WORKING_DIR_TOKEN

private static final java.lang.String WORKING_DIR_TOKEN
See Also:
Constant Field Values

PATCH_SEPARATOR_TOKEN

private static final java.lang.String PATCH_SEPARATOR_TOKEN
See Also:
Constant Field Values

REVISION_TOKEN

private static final java.lang.String REVISION_TOKEN
See Also:
Constant Field Values

ONDISK_TOKEN

private static final java.lang.String ONDISK_TOKEN
See Also:
Constant Field Values

ADDED_LINE_TOKEN

private static final java.lang.String ADDED_LINE_TOKEN
See Also:
Constant Field Values

REMOVED_LINE_TOKEN

private static final java.lang.String REMOVED_LINE_TOKEN
See Also:
Constant Field Values

UNCHANGED_LINE_TOKEN

private static final java.lang.String UNCHANGED_LINE_TOKEN
See Also:
Constant Field Values

logger

private org.apache.maven.scm.log.ScmLogger logger

currentDir

private java.lang.String currentDir

diffBlockProcessingStarted

private boolean diffBlockProcessingStarted

revisionBlockStarted

private boolean revisionBlockStarted

workingDirectory

private java.io.File workingDirectory

currentFile

private java.lang.String currentFile

currentDifference

private java.lang.StringBuffer currentDifference

changedFiles

private java.util.List changedFiles

differences

private java.util.Map differences

patch

private java.lang.StringBuffer patch
Constructor Detail

StarteamDiffConsumer

public StarteamDiffConsumer(org.apache.maven.scm.log.ScmLogger logger,
                            java.io.File workingDirectory)
Method Detail

consumeLine

public void consumeLine(java.lang.String line)
Specified by:
consumeLine in interface org.codehaus.plexus.util.cli.StreamConsumer

processGetDir

private void processGetDir(java.lang.String line,
                           int pos)
Process the current input line in the Get Directory

Parameters:
line - a line of text from the Starteam log output

extractCurrentFile

private void extractCurrentFile(java.lang.String line,
                                int pos)

getChangedFiles

public java.util.List getChangedFiles()

getDifferences

public java.util.Map getDifferences()

getPatch

public java.lang.String getPatch()