com.starteam
Class RollbackSession

java.lang.Object
  extended by com.starteam.RollbackSession

public final class RollbackSession
extends java.lang.Object

A RollbackSession is created and returned as the output of a ChangePackage rollback. The session contains a set of changes, each change representing a starteam file and a set of content objects, the source (the revision whose delta is to be rolled back) the target (or tip) from which the rollback will occur the common ancestor (the file revision content preceding the revision to be rolled back) and the (rolled back) merged content - the tip after the rollback has been applied. The algorithm runs a first diff between the common ancestor and the rollback revision a second diff between the common ancestor and the tip and rolls back (reverses the changes associated with) each matching Edit between the two diffs.


Nested Class Summary
static class RollbackSession.Change
           
static class RollbackSession.MergeAction
          The action used to resolve each change
 
Method Summary
 boolean canCommit()
          returns true if this rollback session can be committed, false otherwise will return true when all contained changes indicate no conflict
 void checkout()
          checkout (copy over) all the merged (rolled back) files to the working folders mapped via the view path.
 ChangePackage commit()
          commit this rollback session to the repository, create a committed checkin (workspace) change package as a result (internally use a checkin manager primed with the StarTeam files and the merged files from the session)
 RollbackSession.Change[] getChanges()
          returns the entire set of changes constituting this rollback
 java.lang.String getCommitReason()
          Returns the reason for the commit
 Item getProcessItem()
          return the process item to be used on commit
 void setCommitReason(java.lang.String reason)
          Provide a reason for the commit
 void setProcessItem(Item pi)
          set the process item to be used on commit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getChanges

public RollbackSession.Change[] getChanges()
returns the entire set of changes constituting this rollback


canCommit

public boolean canCommit()
returns true if this rollback session can be committed, false otherwise will return true when all contained changes indicate no conflict


getCommitReason

public java.lang.String getCommitReason()
Returns the reason for the commit

Returns:
the reason for the commit

setCommitReason

public void setCommitReason(java.lang.String reason)
Provide a reason for the commit

Parameters:
reason - a reason for the commit

getProcessItem

public Item getProcessItem()
return the process item to be used on commit

Returns:
the process item to be used on commit

setProcessItem

public void setProcessItem(Item pi)
set the process item to be used on commit

Parameters:
pi - the process item to be used on commit

commit

public ChangePackage commit()
commit this rollback session to the repository, create a committed checkin (workspace) change package as a result (internally use a checkin manager primed with the StarTeam files and the merged files from the session)

Returns:
the ChangePackage resulting from the checkin

checkout

public void checkout()
              throws java.io.IOException
checkout (copy over) all the merged (rolled back) files to the working folders mapped via the view path. meant to build, test and validate the rollback prior to committing

Throws:
java.io.IOException


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.