Package org.apache.maven.scm.provider.synergy.util

## Class SynergyTaskManager

- java.lang.Object
- - org.apache.maven.scm.provider.synergy.util.SynergyTaskManager

    public class SynergyTaskManager
    extends java.lang.Object

In some Synergy versions (ie. 6.5) closing a session results in de-selecting the current (default) task. Therefore, the maven release-plugin fails, as the Synergy commands, as implemented in the Synergy-SCM-Provider, always close their session after being executed.
This manager circumvents this problem by storing the last created task which causes all check outs to be associated with it. Then, when this task gets checked in, all associated files get checked in as well.

Since:
  1.5
Author:
  Jan Malcomess

### Constructor Summary

Constructors
`SynergyTaskManager()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `checkinDefaultTask​(ScmLogger logger, java.lang.String comment, java.lang.String ccmAddr)` Check in (that is: complete) the default task.
`int` `createTask​(ScmLogger logger, java.lang.String synopsis, java.lang.String release, boolean defaultTask, java.lang.String ccmAddr)` If necessary create a new task.
`static SynergyTaskManager` `getInstance()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SynergyTaskManager

    public SynergyTaskManager()

### Method Detail

#### getInstance

    public static SynergyTaskManager getInstance()

Returns:
  singleton instance.

#### createTask

    public int createTask​(ScmLogger logger,
                          java.lang.String synopsis,
                          java.lang.String release,
                          boolean defaultTask,
                          java.lang.String ccmAddr)
                   throws ScmException

If necessary create a new task. Otherwise return the current task.

Parameters:
  `logger` - a logger.
  `synopsis` - short description of task.
  `release` - release.
  `defaultTask` - should this task become the default task?
  `ccmAddr` - current Synergy session ID. Used to run in multi-session.
Returns:
  Task number
Throws:
  `ScmException`

#### checkinDefaultTask

    public void checkinDefaultTask​(ScmLogger logger,
                                   java.lang.String comment,
                                   java.lang.String ccmAddr)
                            throws ScmException

Check in (that is: complete) the default task. This is either the current task managed by `SynergyTaskManager` or, if none is managed, the default task.
In case no task has yet been created by `SynergyTaskManager` AND no default task is set, then this is an error.
However, if the task that was created by `SynergyTaskManager` has already been checked in AND no default task is set, then it is assumed that all files that were checked out are already checked in because checking in a task checks in all files associated with it.

Parameters:
  `logger` - a logger.
  `comment` - a comment for checkin.
  `ccmAddr` - current Synergy session ID. Used to run in multi-session.
Throws:
  `ScmException`