|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.ChangeSession
com.starteam.viewcomparemerge.Session
public final class Session
A view compare/merge (VCM) session.
Each VCM session has associated source view and target views. Comparing the two generates a set of differences. For each difference, you can detect conflicts, override default actions, and so on.
Conflicts may be resolved by merging item properties or file content. Alternatively, you can set property values or checkin new file revisions via the merge preview, which shows what the target view would look like were the session to be committed in its current state.
When ready, you can commit the changes, which updates the target view.
For general information on using the VCM APIs, see com.starteam.viewcomparemerge.
| Nested Class Summary | |
|---|---|
static class |
Session.State
The state of the sesion. |
| Constructor Summary | |
|---|---|
Session(MergeType mergeType,
View source,
View target)
Constructs a new VCM session, for comparing and merging changes from a given source view to a given target view. |
|
Session(MergeType mergeType,
View source,
View target,
Options options)
Constructs a new VCM session, for comparing and merging changes from a given source view to a given target view. |
|
Session(View view)
Constructs a new VCM session for comparing and merging changes from the desktop (workspace) to the given view |
|
| Method Summary | |
|---|---|
void |
addListener(CheckinListener listener)
Add a checkin listener to this session when ready to commit a workspace view CheckinManager events fired during the commit will be delegated to this listener Client applications may use these events to perform per-file actions such as requiring different checkin comments |
void |
addListener(CheckoutListener listener)
Add a checkout listener to this session when ready to commit a workspace view CheckoutManager events fired during the commit will be delegated to this listener Client applications may use these events to perform per-file actions such as launching DeltaII to resolve Merge conflicts |
void |
cancel()
Cancels a compare or commit operation that is currently in progress. |
boolean |
canCommit()
Determines whether or not this session can be committed in its current state. |
void |
close()
Close this session, freeing its internal resources. |
void |
commit()
Commits changes to the target view. |
void |
compare()
Compares the source and target views. |
void |
connect(Server server)
Connects a restored session to a server instance. |
static Session |
forPromote(ChangePackage cp)
Creates a new VCM session for replaying the given change package to its parent view. |
static Session |
forPromote(View source)
Creates a new VCM session for promoting the given view to its parent. |
static Session |
forRebase(View target)
Creates a new VCM session for rebasing the given view from its parent. |
static Session |
forReplay(ChangePackage cp,
View target)
Creates a new VCM session for replaying the given change package to a new target view. |
void |
generateDifferenceReport(java.io.File reportFile)
Generates a difference report for this session. |
void |
generateDifferenceReport(java.io.File reportFile,
boolean bListItemsInMovedFolders)
Generates a difference report for this session. |
void |
generateSummary(java.io.File reportFile,
boolean bIncludeHeading)
Generates a summary session report for this session. |
void |
generateUpdateReport(java.io.File reportFile)
Generates an update report for this session. |
java.lang.Object |
getApplicationObject()
Gets an application-specific object associated with this session. |
java.lang.String |
getDefaultComment()
Gets the default comment to use for checkin operations that occur when committing this session. |
java.lang.String |
getDefaultDescription()
Gets the default description for this session. |
java.lang.String |
getDefaultName()
Gets a default name for this session. |
ItemDifference[] |
getDifferences()
Allows an application to iterate over the set of differences detected when comparing the source and target views. |
ItemDifference |
getDifferencesForMergedItem(Item item)
Gets the ItemDifference that corresponds to a given merge item. |
ItemDifference |
getDifferencesForSourceItem(Item item)
Gets the ItemDifference that corresponds to a given source item. |
ItemDifference |
getDifferencesForTargetItem(Item item)
Gets the ItemDifference that corresponds to a given target item. |
TypeCollection |
getItemTypes()
Gets the item types that are to be included in the view compare/merge operation. |
int |
getLockCount()
Gets the number of source or target items that are currently locked on behalf of this session. |
static Item |
getMatchHint(Item source,
View target)
Determines whether or not a match hint is available that indicates which item in the given target view should be matched to the specified source item. |
View |
getMergePreview()
Gets a preview of the merge results for this session. |
MergeType |
getMergeType()
Gets the merge type of this session. |
Options |
getOptions()
Gets the current set of options that influence the behavior of compare or merge operations. |
java.lang.String |
getPostCommitRevisionLabelName()
Gets the name of the post-commit revision label. |
java.lang.String |
getPostCommitViewLabelName()
Gets the name of the post-commit view label. |
java.lang.String |
getPreCommitRevisionLabelName()
Gets the name of the pre-commit revision label. |
java.lang.String |
getPreCommitViewLabelName()
Gets the name of the pre-commit view label. |
Progress |
getProgress()
Gets a snapshot of the state of the current compare or commit operation. |
java.lang.String |
getRootDirectory()
Gets the path to the temporary folder on disk used by this session. |
Scope |
getScope()
Gets the current scope of this view compare/merge session. |
Server |
getServer()
Gets the server from which this session was constructed. |
ServerInfo |
getServerInfo()
Gets the ServerInfo associated with this session. |
Session.State |
getSessionState()
Gets the current state of this session. |
ChangePackage.SessionType |
getSessionType()
Gets the SessionType of this session. |
ViewMemberCollection |
getSourceMatchesForTargetItems(ViewMemberCollection targetItems)
Finds the source items that are the best matches for the given target items. |
Item |
getSourceMatchForTargetItem(Item targetItem)
Finds the source item that is the best match for the given target item. |
View |
getSourceView()
Gets the source view associated with this session. |
View |
getSourceViewForCompare()
Gets the version of the source view used for comparison. |
View |
getTargetView()
Gets the target view associated with this session. |
View |
getTargetViewForCompare()
Gets the version of the target view used for comparison. |
boolean |
hasDifferences()
Determines whether or not there were any differences detected when comparing the source and target views. |
boolean |
hasLocks()
Determines whether any source or target items are currently locked on behalf of this session. |
boolean |
isActive()
Returns true if this session is in an active state. |
boolean |
isCommitted()
Returns true if this session is in a committed state. |
boolean |
isDirty()
Determines whether or not this session has been changed since it was last saved or restored. |
boolean |
isFullScope(Item.Type type)
Determines whether or not this session will perform a full-scope compare on the items of the given type. |
boolean |
isIncluded(Item.Type type)
Determines whether or not the given item type is included in this view compare/merge session. |
boolean |
isIncluded(Item item)
Determines whether or not the given item is in scope for the current view compare/merge operation. |
boolean |
isPostCommitRevisionLabelEnabled()
Determines whether or not the post-commit revision label will be created. |
boolean |
isPostCommitViewLabelEnabled()
Determines whether or not the post-commit view label will be created. |
boolean |
isPreCommitRevisionLabelEnabled()
Determines whether or not the pre-commit revision label will be created. |
boolean |
isPreCommitViewLabelEnabled()
Determines whether or not the pre-commit view label will be created. |
boolean |
isReadOnly()
Determines whether this is a read-only session. |
boolean |
isVerbosePreview()
Determines whether or not verbose preview mode is enabled. |
void |
remove()
Removes this session and any associated temporary files on disk. |
static void |
remove(java.io.File theSession)
Remove the temporary folder tree associated with the specified session file. |
void |
removeLocks()
Unlocks any source or target items that were locked on behalf of this session. |
static ViewMemberCollection |
resolve(View target,
java.io.File file)
Resolve a saved session file for a committed session (such as you'd find attached to a process task in the target view), to return a list of all the relevant target item revisions from the ItemDifferences that resulted in changes (i.e., everything except Ignore). |
void |
restart(Server server)
Restart a restored session. |
static Session |
restoreFrom(java.io.File file)
Restores a saved session from a file. |
static Session |
restoreFrom(java.io.File file,
boolean willPersist)
Restores a saved session from a file. |
void |
saveTo(java.io.File file,
boolean copyContent)
Save this session to a file. |
void |
setApplicationObject(java.lang.Object applicationObject)
Sets the application-specific object associated with this session. |
void |
setDefaultComment(java.lang.String comment)
Sets the default comment to use for checkin operations that occur when committing this session. |
void |
setMatch(Item source,
Item target)
Tells the VCM engine to match a specific source item to a specific target item. |
static void |
setMatchHint(Item source,
Item target)
Saves a match hint, indicating that the given source item corresponds to the given target item, even though the two might otherwise be unrelated. |
void |
setOptions(Options options)
Sets options that influence the behavior of compare or merge operations. |
void |
setPostCommitRevisionLabelEnabled(boolean isEnabled)
Determines whether or not the post-commit revision label will be created. |
void |
setPostCommitRevisionLabelName(java.lang.String name)
Sets the name of the post-commit revision label. |
void |
setPostCommitViewLabelEnabled(boolean isEnabled)
Determines whether or not the post-commit view label will be created. |
void |
setPostCommitViewLabelName(java.lang.String name)
Sets the name of the post-commit view label. |
void |
setPreCommitRevisionLabelEnabled(boolean isEnabled)
Determines whether or not the pre-commit revision label will be created. |
void |
setPreCommitRevisionLabelName(java.lang.String name)
Sets the name of the pre-commit revision label. |
void |
setPreCommitViewLabelEnabled(boolean isEnabled)
Determines whether or not the pre-commit view label will be created. |
void |
setPreCommitViewLabelName(java.lang.String name)
Sets the name of the pre-commit view label. |
void |
setScope(Scope s)
Sets the scope of this view compare/merge session. |
void |
setVerbosePreview(boolean verbose)
Enables or disables verbose preview mode. |
| Methods inherited from class com.starteam.ChangeSession |
|---|
close, getChangePackage, getDescription, getName, save, setDescription, setName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Session(View view)
view - the target view
public Session(MergeType mergeType,
View source,
View target)
mergeType - The type of compare/merge to be performed.source - The source view.target - The target view.Session.Session(MergeType,View,View,Options),
Session.getMergeType(),
Session.getSourceView(),
Session.getTargetView()
public Session(MergeType mergeType,
View source,
View target,
Options options)
mergeType - The type of compare/merge to be performed.source - The source view.target - The target view.options - Options that influence the behavior of the compare or merge
operations.Session.Session(MergeType,com.starteam.View,com.starteam.View),
Session.getMergeType(),
Session.getSourceView(),
Session.getTargetView(),
Session.getOptions()| Method Detail |
|---|
public static Session forPromote(View source)
source - The view to be promoted.
MergeType.PROMOTEpublic static Session forRebase(View target)
target - The view to be rebased.
MergeType.REBASE
public static Session forReplay(ChangePackage cp,
View target)
cp - The change package to be replayed.target - The new target view.
public static Session forPromote(ChangePackage cp)
cp - The change package to be replayed.
public Server getServer()
public ServerInfo getServerInfo()
Session.getSessionState(),
Session.restoreFrom(java.io.File)public Session.State getSessionState()
public boolean isActive()
isActive in class ChangeSessionpublic boolean isCommitted()
isCommitted in class ChangeSessionpublic boolean isDirty()
Session.saveTo(java.io.File, boolean),
Session.restoreFrom(java.io.File)public java.lang.Object getApplicationObject()
public void setApplicationObject(java.lang.Object applicationObject)
applicationObject - The application-specific object to be associated with this
session.Session.saveTo(java.io.File, boolean),
Session.restoreFrom(java.io.File)public java.lang.String getDefaultName()
getDefaultName in class ChangeSessionpublic MergeType getMergeType()
public ChangePackage.SessionType getSessionType()
ChangePackage.SessionTypepublic java.lang.String getRootDirectory()
Session.remove()public View getSourceView()
getSourceView in class ChangeSessionSession.getTargetView(),
Session.getSourceViewForCompare()public View getSourceViewForCompare()
Session.getSourceView(),
Session.getTargetViewForCompare()public View getTargetViewForCompare()
Session.getTargetView(),
Session.getSourceViewForCompare()public View getTargetView()
getTargetView in class ChangeSessionSession.getSourceView(),
Session.getTargetViewForCompare()public void remove()
Session.remove(java.io.File),
Session.getRootDirectory()public static void remove(java.io.File theSession)
theSession - A saved session file.Session.remove(),
Session.getRootDirectory()public boolean hasLocks()
hasLocks in class ChangeSessionSession.getLockCount(),
Session.removeLocks(),
Options.getLockSourceForDifference(),
Options.getLockTargetForDifference()public int getLockCount()
getLockCount in class ChangeSessionSession.hasLocks(),
Session.removeLocks(),
Options.getLockSourceForDifference(),
Options.getLockTargetForDifference()public void removeLocks()
removeLocks in class ChangeSessionSession.hasLocks(),
Session.getLockCount(),
Session.getSourceView(),
Session.getTargetView(),
Options.getLockSourceForDifference(),
Options.getLockTargetForDifference()public void compare()
Note that this method returns when the compare is complete. An application that wants to monitor progress or cancel the operation must do so from a separate thread.
java.lang.IllegalStateException - if the views have already been compared or if the session was
closed/disconnectedSession.getProgress(),
Session.cancel()public boolean canCommit()
Note that a session cannot be committed if there are unresolved conflicts, or if there are no changes to be merged.
Also, a compare-only session or any other read-only session cannot be committed.
MergeType.COMPARE,
ItemDifference.isUnresolved(),
Session.isReadOnly(),
Session.commit()public void addListener(CheckinListener listener)
listener - a checkin listener or NULLpublic void addListener(CheckoutListener listener)
listener - a checkin listener or NULLpublic void commit()
Note that this method returns when the commit is complete. An application that wants to monitor progress or cancel the operation must do so from a separate thread.
java.lang.IllegalStateException - if the views cannot be committed in its current state.Session.canCommit(),
Session.getProgress(),
Session.cancel()public java.lang.String getDefaultDescription()
public java.lang.String getPreCommitViewLabelName()
Creation of the pre-commit view label is optional, and is disabled by
default. To enable creation of the label, use
setPreCommitViewLabelEnabled.
public void setPreCommitViewLabelName(java.lang.String name)
Creation of the pre-commit view label is optional, and is disabled by
default. To enable creation of the label, use
setPreCommitViewLabelEnabled.
name - The name of the pre-commit view label, or null to reset the
label name to its default value.Session.setPreCommitViewLabelEnabled(boolean)public java.lang.String getPostCommitViewLabelName()
Creation of the post-commit view label is optional, and is enabled by
default. To disable creation of the label, use
setPostCommitViewLabelEnabled.
public void setPostCommitViewLabelName(java.lang.String name)
Creation of the post-commit view label is optional, and is enabled by
default. To disable creation of the label, use
setPostCommitViewLabelEnabled.
name - The name of the post-commit view label, or null to reset the
label name to its default value.Session.setPostCommitViewLabelEnabled(boolean)public java.lang.String getPreCommitRevisionLabelName()
Creation of the pre-commit revision label is optional, and is disabled by
default. To enable creation of the label, use
setPreCommitRevisionLabelEnabled.
public void setPreCommitRevisionLabelName(java.lang.String name)
Creation of the pre-commit revision label is optional, and is disabled by
default. To enable creation of the label, use
setPreCommitRevisionLabelEnabled.
name - The name of the pre-commit revision label, or null to reset
the label name to its default value.Session.setPreCommitRevisionLabelEnabled(boolean)public java.lang.String getPostCommitRevisionLabelName()
Creation of the post-commit revision label is optional, and is disabled
by default. To enable creation of the label, use
setPostCommitRevisionLabelEnabled.
public void setPostCommitRevisionLabelName(java.lang.String name)
Creation of the post-commit revision label is optional, and is disabled
by default. To enable creation of the label, use
setPostCommitRevisionLabelEnabled.
name - The name of the post-commit revision label, or null to reset
the label name to its default value.Session.setPostCommitRevisionLabelEnabled(boolean)public boolean isPreCommitViewLabelEnabled()
public void setPreCommitViewLabelEnabled(boolean isEnabled)
isEnabled - true if the pre-commit view label will be created, and false
otherwise.Session.setPreCommitViewLabelName(java.lang.String),
Session.setPostCommitViewLabelEnabled(boolean),
Session.setPreCommitRevisionLabelEnabled(boolean),
Session.setPostCommitRevisionLabelEnabled(boolean)public boolean isPostCommitViewLabelEnabled()
public void setPostCommitViewLabelEnabled(boolean isEnabled)
isEnabled - true if the post-commit view label will be created, and false
otherwise.Session.setPostCommitViewLabelName(java.lang.String),
Session.setPreCommitViewLabelEnabled(boolean),
Session.setPreCommitRevisionLabelEnabled(boolean),
Session.setPostCommitRevisionLabelEnabled(boolean)public boolean isPreCommitRevisionLabelEnabled()
public void setPreCommitRevisionLabelEnabled(boolean isEnabled)
isEnabled - true if the pre-commit revision label will be created, and
false otherwise.Session.setPreCommitRevisionLabelName(java.lang.String),
Session.setPreCommitViewLabelEnabled(boolean),
Session.setPostCommitViewLabelEnabled(boolean),
Session.setPostCommitRevisionLabelEnabled(boolean)public boolean isPostCommitRevisionLabelEnabled()
public void setPostCommitRevisionLabelEnabled(boolean isEnabled)
isEnabled - true if the post-commit revision label will be created, and
false otherwise.Session.setPostCommitRevisionLabelName(java.lang.String),
Session.setPreCommitViewLabelEnabled(boolean),
Session.setPostCommitViewLabelEnabled(boolean),
Session.setPreCommitRevisionLabelEnabled(boolean)public void setDefaultComment(java.lang.String comment)
comment - The default checkin comment.public java.lang.String getDefaultComment()
public boolean hasDifferences()
Session.getDifferences(),
ItemDifferencepublic ItemDifference[] getDifferences()
java.lang.IllegalStateException - if the source and target have not yet been compared.Session.compare(),
Session.hasDifferences(),
ItemDifferencepublic Progress getProgress()
Session.compare(),
Session.commit(),
Session.cancel()
public void saveTo(java.io.File file,
boolean copyContent)
throws java.io.IOException
If copyContent is false, then merged file content is stored in a session-specific temporary file on disk. This results in smaller session files, but means that they are generally useful only from the computer where they were generated.
If copyContent is true, then merged file content is copied into the session file. This may result in very large session files, but allows them to be used from any computer, attached to email messages, and so on.
file - The output file.copyContent - True to copy merged file content into the session file; false
to reference files stored on the local disk.
java.io.IOExceptionSession.restoreFrom(java.io.File),
Session.getRootDirectory()
public static Session restoreFrom(java.io.File file)
throws java.io.IOException
When a session is first restored, it is in a disconnected state. It is
not fully functional until it is connected to a server instance that
references the correct repository. To determine which server is required,
use getServerInfo.
For example:
Session session = Session.restoreFrom("MySession.vcmx");
Server server = new Server(session.getServerInfo());
server.logOn(user, password);
session.connect(server);
. . .
file - The session file. The file must have been previously saved
using saveTo.
java.io.IOExceptionSession.restoreFrom(java.io.File,boolean),
Session.saveTo(java.io.File, boolean),
Session.getSessionState(),
Session.connect(com.starteam.Server),
Session.restart(com.starteam.Server),
Session.State.DISCONNECTED
public static Session restoreFrom(java.io.File file,
boolean willPersist)
throws java.io.IOException
When a session is first restored, it is in a disconnected state. It is
not fully functional until it is connected to a server instance that
references the correct repository. To determine which server is required,
use getServerInfo.
For example:
Session session = Session.restoreFrom("MySession.vcmx");
Server server = new Server(session.getServerInfo());
server.logOn(user, password);
session.connect(server);
. . .
file - The session file. The file must have been previously saved
using saveTo.willPersist - True if the session will remain persisted on disk; false if it
is a temporary session that will be removed. When a temporary
session is closed, its working files on disk are automatically
removed.
java.io.IOExceptionSession.restoreFrom(java.io.File),
Session.saveTo(java.io.File, boolean),
Session.getSessionState(),
Session.connect(com.starteam.Server),
Session.close(),
Session.State.DISCONNECTED
public static ViewMemberCollection resolve(View target,
java.io.File file)
throws java.io.IOException
target - View the target view to resolve tofile - File the java.io.File containing the saved session
java.io.IOExceptionpublic void restart(Server server)
Session.connect(Server)
and Session.restart(Server) are mututally exclusive
restart in class ChangeSessionserver - the server instance on which this session will runSession.connect(Server),
Session.restoreFrom(java.io.File)public void connect(Server server)
When a session is first restored, it is in a disconnected state. It is
not fully functional until it is connected to a server instance that
references the correct repository. To determine which server is required,
use getServerInfo.
For example:
Session session = Session.restoreFrom("MySession.vcmx");
Server server = new Server(session.getServerInfo());
server.logOn(user, password);
session.connect(server);
. . .
connect in class ChangeSessionserver - The server instance to be connected. The server must refer to
the same StarTeam repository with which the session was
created.Session.restoreFrom(java.io.File)public void setOptions(Options options)
An application may also call getOptions, and change
individual settings in the Options instance that is returned.
options - Options that influence the behavior of compare or merge
operations.public Options getOptions()
An application may change individual settings in the Options object, and they will affect this session.
public void cancel()
The compare and commit methods return
when complete. An application that wants to monitor progress or cancel
the operation must do so from a separate thread.
If a commit that is being executed as an atomic transaction is canceled before it is completed, then the transaction is rolled back. The source and target views are left in the state they were in prior to the start of the commit.
Session.compare(),
Session.commit(),
Session.getProgress()public void setVerbosePreview(boolean verbose)
In verbose preview mode, every ItemDifference has a corresponding item in the MergePreview. In cases where the item will not actually appear in the target view after the merge, the preview item is marked deleted.
For example, in the case of an ItemDifference where the default action is "Delete", the item will be removed from the target view when the merge is committed. Thus, the merged item for this ItemDifference would normally be null. However, in verbose mode, the merged item for this ItemDifference would be a deleted item, and the deleted item would appear in the merge preview.
verbose - true to enable verbose preview mode; false to disable it.Session.isVerbosePreview,
Session.getMergePreview(),
ItemDifference.getMergedItem(),
ViewMember.isDeleted()public boolean isVerbosePreview()
In verbose preview mode, every ItemDifference has a corresponding item in the MergePreview. In cases where the item will not actually appear in the target view after the merge, the preview item is marked deleted.
For example, in the case of an ItemDifference where the default action is "Delete", the item will be removed from the target view when the merge is committed. Thus, the merged item for this ItemDifference would normally be null. However, in verbose mode, the merged item for this ItemDifference would be a deleted item, and the deleted item would appear in the merge preview.
Session.setVerbosePreview(boolean)public View getMergePreview()
The preview is a close approximation of what the target view would look like if the session were to be committed in its current state.
Since the preview is itself a view, it provides applications with a familiar way to browse and manipulate the difference information. For example, in order to manually resolve a file merge conflict, an application may use the ItemDifference directly:
// Manually resolve a file merge conflict // through the ItemDifference. diff.setMergedFileContent(path);Alternatively, the application may choose to checkin the new content through the merge preview:
// The merged item is accessible through the ItemDifference // and through the merge preview; they are physically the same. Item item = diff.getMergedItem(); // Checking in a new file revision also resolves the conflict. View preview = session.getMergePreview(); CheckinManager mgr = preview.createCheckinManager(); mgr.checkin((File) item, path);
public ItemDifference getDifferencesForMergedItem(Item item)
The merged item may have been obtained through
getMergeItem, or it may have been
obtained via the merge preview.
item - A merged item.
ItemDifference.getMergedItem(),
Session.getMergePreview()public ItemDifference getDifferencesForSourceItem(Item item)
item - A source item.
ItemDifference.getSourceItem()public ItemDifference getDifferencesForTargetItem(Item item)
item - A target item.
ItemDifference.getTargetItem()public void close()
Closing a session that has not been persisted also deletes the associated temporary files on disk.
close in class ChangeSessionSession.remove(),
Session.saveTo(java.io.File, boolean)public TypeCollection getItemTypes()
public boolean isIncluded(Item.Type type)
type - The type to be tested.
public void setScope(Scope s)
By default, all files and folders in the source view are compared against the corresponding target items. An application can change the scope so that specific items or types are included.
s - A scope specifier, indicating which source items are compared
against the target in this view compare/merge session, or null
for a full-scope compare of files and folders.ItemTypeScope,
FolderScope,
ItemListScope,
RevisionLabelScope,
ProcessItemScope,
AnyScope,
EveryScope,
Options.setVerboseDifferences(com.starteam.Item.Type, boolean)public Scope getScope()
public boolean isIncluded(Item item)
item - The item to be tested.
Session.setScope(com.starteam.viewcomparemerge.Scope)public boolean isReadOnly()
Compare-only sessions are read-only, as are sessions that are still disconnected or have already been committed.
isReadOnly in class ChangeSessionSession.State.COMMITTED,
Session.State.DISCONNECTED,
MergeType.COMPAREpublic boolean isFullScope(Item.Type type)
type - An item type.
public Item getSourceMatchForTargetItem(Item targetItem)
The scope of the view compare/merge operation is always defined in terms of the source. getSourceMatchForTargetItem() may be used by an application that wants to define the scope starting with a target item.
To find source matches for multiple target items, use getSourceMatchesForTargetItems(), which will result in better performance.
targetItem - Item
public ViewMemberCollection getSourceMatchesForTargetItems(ViewMemberCollection targetItems)
The scope of the view compare/merge operation is always defined in terms of the source. getSourceMatchesForTargetItems() may be used by an application that wants to define the scope starting with a set of target items.
To find source matches for multiple target items, use getSourceMatchesForTargetItems(), which will result in better performance.
targetItems - Item collection
public void generateDifferenceReport(java.io.File reportFile)
throws java.io.IOException
reportFile - The report output file.
java.io.IOException
public void generateDifferenceReport(java.io.File reportFile,
boolean bListItemsInMovedFolders)
throws java.io.IOException
reportFile - The report output file.bListItemsInMovedFolders - true to list items whose parent folder has moved in either the
source or target, even if the items themselves have no true
differences.
java.io.IOException
public void generateSummary(java.io.File reportFile,
boolean bIncludeHeading)
throws java.io.IOException
reportFile - The report output file.bIncludeHeading - false to suppress the generation of the heading.
java.io.IOException
public void generateUpdateReport(java.io.File reportFile)
throws java.io.IOException
reportFile - The report output file.
java.io.IOException
public void setMatch(Item source,
Item target)
A client application can call setMatch() before calling compare() to avoid an AmbiguousMatchException.
source - An item from the source view.target - The corresponding item from the target view.Session.compare(),
AmbiguousMatchException
public static void setMatchHint(Item source,
Item target)
Internally, the match hint is represented by a StarTeam link.
source - A source item.target - The matching target item.
public static Item getMatchHint(Item source,
View target)
source - A source item.target - The desired target view.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||