Class JazzListChangesetConsumer
- All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer
This parses the contents of the output and uses it to fill in the remaining
information in the entries list.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate static final Patternprivate intprivate intprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate final StringFields inherited from class org.apache.maven.scm.provider.jazz.command.consumer.AbstractRepositoryConsumer
fed -
Constructor Summary
ConstructorsConstructorDescriptionJazzListChangesetConsumer(ScmProviderRepository repo, ScmLogger logger, List<ChangeSet> entries, String userDateFormat) Constructor for our "scm list changeset" consumer. -
Method Summary
Modifier and TypeMethodDescriptionvoidconsumeLine(String line) Process one line of output from the execution of the "scm list changeset" command.private ScmFileStatusparseChangeSetChangeState(String state) Parse the change state file flags from Jazz and map them to the maven SCM ones.private ScmFileStatusparseFileChangeState(String state) Parse the change state file flags from Jazz and map them to the maven SCM ones.private voidprocessChangeSetLine(String line) private voidprocessChangesLine(String line) private voidprocessModifiedLine(String line) protected StringstripDelimiters(String text) String the leading/trailing ", < and > from the text.Methods inherited from class org.apache.maven.scm.provider.jazz.command.consumer.AbstractRepositoryConsumer
getRepository, isFed, setFed, setRepositoryMethods inherited from class org.apache.maven.scm.util.AbstractConsumer
getLogger, parseDate, parseDate, setLogger
-
Field Details
-
STATE_CHANGE_SETS
private static final int STATE_CHANGE_SETS- See Also:
-
STATE_CHANGE_SET
private static final int STATE_CHANGE_SET- See Also:
-
STATE_COMPONENT
private static final int STATE_COMPONENT- See Also:
-
STATE_MODIFIED
private static final int STATE_MODIFIED- See Also:
-
STATE_CHANGES
private static final int STATE_CHANGES- See Also:
-
HEADER_CHANGE_SETS
- See Also:
-
HEADER_CHANGE_SET
- See Also:
-
HEADER_COMPONENT
- See Also:
-
HEADER_MODIFIED
- See Also:
-
HEADER_CHANGES
- See Also:
-
JAZZ_TIMESTAMP_PATTERN
- See Also:
-
JAZZ_TIMESTAMP_PATTERN_TIME
- See Also:
-
CHANGESET_PATTERN
-
CHANGES_PATTERN
-
entries
-
userDateFormat
-
currentChangeSetIndex
private int currentChangeSetIndex -
currentState
private int currentState
-
-
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
Process one line of output from the execution of the "scm list changeset" command.- Specified by:
consumeLinein interfaceorg.codehaus.plexus.util.cli.StreamConsumer- Overrides:
consumeLinein classAbstractRepositoryConsumer- Parameters:
line- The line of output from the external command that has been pumped to us.- See Also:
-
processChangeSetLine
-
processModifiedLine
-
processChangesLine
-
stripDelimiters
String the leading/trailing ", < and > from the text.- Parameters:
text- The text to process.- Returns:
- The striped text.
-
parseChangeSetChangeState
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
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.
-