Class SynergyTaskManager

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

public class SynergyTaskManager extends 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
  • Field Details

    • TASK_STATE_NONE

      private static final short TASK_STATE_NONE
      No Synergy-Task was created yet.
      See Also:
    • TASK_STATE_CREATED

      private static final short TASK_STATE_CREATED
      The current Synergy-Task is created but not yet completed.
      See Also:
    • TASK_STATE_COMPLETED

      private static final short TASK_STATE_COMPLETED
      The current Synergy-Task is completed.
      See Also:
    • INSTANCE

      private static final SynergyTaskManager INSTANCE
      singleton instance.
    • currentTaskNumber

      private int currentTaskNumber
      The number of the current Synergy-Task.
    • currentTaskState

      private short currentTaskState
      The state of the current Synergy-Task.
  • Constructor Details

    • SynergyTaskManager

      public SynergyTaskManager()
  • Method Details

    • getInstance

      public static SynergyTaskManager getInstance()
      Returns:
      singleton instance.
    • createTask

      public int createTask(ScmLogger logger, String synopsis, String release, boolean defaultTask, 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, String comment, 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