001 /*
002 * file CcMergeHandlingCallback.java
003 *
004 * Licensed Materials - Property of IBM
005 * Restricted Materials of IBM
006 *
007 * com.ibm.rational.wvcm.stp.cc.CcMergeHandlingCallback
008 *
009 * © Copyright IBM Corporation 2008. All Rights Reserved.
010 * Note to U.S. Government Users Restricted Rights: Use, duplication or
011 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
012 */
013
014 package com.ibm.rational.wvcm.stp.cc;
015
016 import javax.wvcm.WvcmException;
017
018 import com.ibm.rational.wvcm.stpex.StpExEnumeration;
019 import com.ibm.rational.wvcm.stpex.StpExEnumerationBase;
020
021 /**
022 * Interface to let the GUI deal with merge operations on checkin.
023 */
024 public interface CcMergeHandlingCallback {
025
026 /**
027 * Enumeration to specify how to deal with the checkin
028 * after a merge.
029 */
030 enum CheckinMergeHandling {
031
032 /** Don't do anything else */
033 LEAVE_CHECKED_OUT("leave-checked-out"),
034
035 /** Retry the checkin */
036 RETRY_CHECKIN("retry-checkin"),
037
038 /** Fail remaining checkins */
039 CANCEL_REMAINING_CHECKINS("cancel-remaining-checkins");
040
041 private String m_name;
042
043 private CheckinMergeHandling(String name) { m_name = name; }
044
045 /* (non-Javadoc)
046 * @see java.lang.Object#toString()
047 */
048 public String toString() { return m_name; }
049 }
050
051
052 /**
053 * This method is called when a manual merge from LATEST is needed.
054 * @param file the file we're merging
055 * @param fromVersion the base version
056 * @param toVersion the version we're merging with
057 * @return CheckinMergeHandling enumeration specifying how the checkin
058 * is to be handled after the merge
059 */
060 CheckinMergeHandling performManualMerge(
061 CcFile file,
062 CcVersion fromVersion,
063 CcVersion toVersion) throws WvcmException;
064
065 }