org.apache.maven.scm.provider.jazz.command.status
Class JazzStatusConsumer

java.lang.Object
  extended by org.apache.maven.scm.util.AbstractConsumer
      extended by org.apache.maven.scm.provider.jazz.command.consumer.AbstractRepositoryConsumer
          extended by org.apache.maven.scm.provider.jazz.command.status.JazzStatusConsumer
All Implemented Interfaces:
StreamConsumer

public class JazzStatusConsumer
extends AbstractRepositoryConsumer

Consume the output of the scm command for the "status" operation.

It is normally just used to build up a list of ScmFile objects that have their ScmFileStatus set. This class has been expanded so that the Workspace, Component and Baseline are also collected and set back in the JazzScmProviderRepository. The Workspace and Component names are needed for some other commands (list, for example), so we can easily get this information here.

Author:
Chris Graham

Field Summary
static String STATUS_CMD_ADD_FLAG
          The "Status" command status flag for a resource that has been added.
static String STATUS_CMD_BASELINE
          The "Status" command output line that contains the "Workspace" name.
static String STATUS_CMD_CHANGE_FLAG
          The "Status" command status flag for when the content or properties of a file have been modified, or the properties of a directory have changed.
static String STATUS_CMD_COMPONENT
          The "Status" command output line that contains the "Component" name.
static String STATUS_CMD_DELETE_FLAG
          The "Status" command status flag for a resource that has been deleted.
static String STATUS_CMD_MOVED_FLAG
          The "Status" command status flag for a resource that has been renamed or moved.
static String STATUS_CMD_WORKSPACE
          The "Status" command output line that contains the "Workspace" name.
 
Fields inherited from class org.apache.maven.scm.provider.jazz.command.consumer.AbstractRepositoryConsumer
fed
 
Constructor Summary
JazzStatusConsumer(ScmProviderRepository repo, ScmLogger logger)
          Constructor for our "scm status" consumer.
 
Method Summary
 void consumeLine(String line)
          Process one line of output from the execution of the "scm status" command.
 List<ScmFile> getChangedFiles()
           
 
Methods inherited from class org.apache.maven.scm.provider.jazz.command.consumer.AbstractRepositoryConsumer
getRepository, isFed, setFed, setRepository
 
Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
getLogger, parseDate, parseDate, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_CMD_WORKSPACE

public static final String STATUS_CMD_WORKSPACE
The "Status" command output line that contains the "Workspace" name.

See Also:
Constant Field Values

STATUS_CMD_COMPONENT

public static final String STATUS_CMD_COMPONENT
The "Status" command output line that contains the "Component" name.

See Also:
Constant Field Values

STATUS_CMD_BASELINE

public static final String STATUS_CMD_BASELINE
The "Status" command output line that contains the "Workspace" name.

See Also:
Constant Field Values

STATUS_CMD_ADD_FLAG

public static final String STATUS_CMD_ADD_FLAG
The "Status" command status flag for a resource that has been added.

See Also:
Constant Field Values

STATUS_CMD_CHANGE_FLAG

public static final String STATUS_CMD_CHANGE_FLAG
The "Status" command status flag for when the content or properties of a file have been modified, or the properties of a directory have changed.

See Also:
Constant Field Values

STATUS_CMD_DELETE_FLAG

public static final String STATUS_CMD_DELETE_FLAG
The "Status" command status flag for a resource that has been deleted.

See Also:
Constant Field Values

STATUS_CMD_MOVED_FLAG

public static final String STATUS_CMD_MOVED_FLAG
The "Status" command status flag for a resource that has been renamed or moved.

See Also:
Constant Field Values
Constructor Detail

JazzStatusConsumer

public JazzStatusConsumer(ScmProviderRepository repo,
                          ScmLogger logger)
Constructor for our "scm status" consumer.

Parameters:
repo - The JazzScmProviderRepository being used.
logger - The ScmLogger to use.
Method Detail

consumeLine

public void consumeLine(String line)
Process one line of output from the execution of the "scm status" command.

Specified by:
consumeLine in interface StreamConsumer
Overrides:
consumeLine in class AbstractRepositoryConsumer
Parameters:
line - The line of output from the external command that has been pumped to us.
See Also:
StreamConsumer.consumeLine(java.lang.String)

getChangedFiles

public List<ScmFile> getChangedFiles()


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.