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 * (C) Copyright IBM Corporation 2008, 2011. 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 /** 019 * Interface to let the GUI deal with merge operations on checkin. 020 */ 021 public interface CcMergeHandlingCallback { 022 023 /** 024 * Enumeration to specify how to deal with the checkin 025 * after a merge. 026 */ 027 enum CheckinMergeHandling { 028 029 /** Don't do anything else */ 030 LEAVE_CHECKED_OUT("leave-checked-out"), 031 032 /** Retry the checkin */ 033 RETRY_CHECKIN("retry-checkin"), 034 035 /** Fail remaining checkins */ 036 CANCEL_REMAINING_CHECKINS("cancel-remaining-checkins"); 037 038 private String m_name; 039 040 private CheckinMergeHandling(String name) { m_name = name; } 041 042 /* (non-Javadoc) 043 * @see java.lang.Object#toString() 044 */ 045 public String toString() { return m_name; } 046 } 047 048 049 /** 050 * This method is called when a manual merge from LATEST is needed. 051 * @param file the file we're merging 052 * @param fromVersion the base version 053 * @param toVersion the version we're merging with 054 * @return CheckinMergeHandling enumeration specifying how the checkin 055 * is to be handled after the merge 056 */ 057 CheckinMergeHandling performManualMerge( 058 CcFile file, 059 CcVersion fromVersion, 060 CcVersion toVersion) throws WvcmException; 061 062 }