Class JazzListChangesetConsumer

All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer

public class JazzListChangesetConsumer extends AbstractRepositoryConsumer
Consume the output of the scm command for the "list changesets" operation.

This parses the contents of the output and uses it to fill in the remaining information in the entries list.

  • Field Details

  • Constructor Details

    • JazzListChangesetConsumer

      public JazzListChangesetConsumer(ScmProviderRepository repo, ScmLogger logger, List<ChangeSet> entries, String userDateFormat)
      Constructor for our "scm list changeset" consumer.
      Parameters:
      repo - The JazzScmProviderRepository being used.
      logger - The ScmLogger to use.
      entries - The List of ChangeSet entries that we will populate.
  • Method Details

    • consumeLine

      public void consumeLine(String line)
      Process one line of output from the execution of the "scm list changeset" command.
      Specified by:
      consumeLine in interface org.codehaus.plexus.util.cli.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)
    • processChangeSetLine

      private void processChangeSetLine(String line)
    • processModifiedLine

      private void processModifiedLine(String line)
    • processChangesLine

      private void processChangesLine(String line)
    • stripDelimiters

      protected String stripDelimiters(String text)
      String the leading/trailing ", < and > from the text.
      Parameters:
      text - The text to process.
      Returns:
      The striped text.
    • parseChangeSetChangeState

      private ScmFileStatus parseChangeSetChangeState(String state)
      Parse the change state file flags from Jazz and map them to the maven SCM ones.

      "----" Character positions 0-3.

      [0] is '*' or '-' Indicates that this is the current change set ('*') or not ('-'). STATE_CHANGESET_CURRENT [1] is '!' or '-' Indicates a Potential Conflict ('!') or not ('-'). STATE_POTENTIAL_CONFLICT [2] is '#' or '-' Indicates a Conflict ('#') or not ('-'). STATE_CONFLICT [3] is '@' or '$' Indicates whether the changeset is active ('@') or not ('$'). STATE_CHANGESET_ACTIVE

      Parameters:
      state - The 5 character long state string
      Returns:
      The ScmFileStatus value.
    • parseFileChangeState

      private ScmFileStatus parseFileChangeState(String state)
      Parse the change state file flags from Jazz and map them to the maven SCM ones.

      "-----" Character positions 0-4. The default is '-'.

      [0] is '-' or '!' Indicates a Potential Conflict. STATE_POTENTIAL_CONFLICT [1] is '-' or '#' Indicates a Conflict. STATE_CONFLICT [2] is '-' or 'a' Indicates an addition. STATE_ADD or 'd' Indicates a deletion. STATE_DELETE or 'm' Indicates a move. STATE_MOVE [3] is '-' or 'c' Indicates a content change. STATE_CONTENT_CHANGE [4] is '-' or 'p' Indicates a property change. STATE_PROPERTY_CHANGE

      NOTE: [3] and [4] can only be set it [2] is NOT 'a' or 'd'.

      Parameters:
      state - The 5 character long state string
      Returns:
      The SCMxxx value.