001    /*
002     * Licensed Materials - Property of IBM
003     * Restricted Materials of IBM
004     *
005     * com.ibm.rational.wvcm.stp.cc.CcFindmergeListener
006     *
007     * (C) Copyright IBM Corporation 2012, 2014.  All Rights Reserved.
008     * Note to U.S. Government Users Restricted Rights:  Use, duplication or 
009     * disclosure restricted by GSA ADP  Schedule Contract with IBM Corp.
010     */
011    package com.ibm.rational.wvcm.stp.cc;
012    
013    import java.io.File;
014    
015    
016    /**
017     * Interface that extends the basic CcListener class. This is used for specific
018     * CCRC CLI related callbacks for Update operations.
019     */
020    public interface CcUpdateListener extends CcListener {
021    
022        /**
023         * Callback from response handler to notify that a file or directory is 
024         * updated and update type is associated with it.
025         * 
026         * Note that a client cannot count on any notify method in the CcUpdateListener 
027         * interface being invoked, so a resource might be changed or work might have 
028         * been completed without notifyUpdate or notifyLogFile ever being invoked.
029         * 
030         * @param updateType update type for this file or directory @see UpdateType
031         * @param file The CcFile is representing the updated file or directory.
032         */
033        public void notifyUpdate (UpdateType updateType, CcFile file);    
034    
035        /** Values for file or directory update type */
036        public enum UpdateType {
037            /**
038             * Update found for this file or directory 
039             */
040            CANDIDATE_FOUND,
041            
042            /**
043             * Checkout found for this file or direcotry
044             */
045            CHECKOUT_FOUND,
046            
047            /**
048             * Kept hijack this file or direcotry
049             */
050            KEPT_HIJACK,
051            
052            /**
053             * Loaded this file or directory
054             */
055            LOADED,
056            
057            /**
058             * Reloaded this file or directory
059             */
060            RELOADED,
061            
062            /**
063             * Restored this file or directory
064             */
065            RESTORED,
066            
067            /**
068             * Unloaded this file or directory
069             */
070            UNLOADED,
071            
072            /**
073             * Cancelled hijack for this file or directory
074             */
075            UNDID_HIJACK,
076            
077            /**
078             * Updated this file or directory
079             */
080            UPDATED;
081        }
082        
083        /**
084         * Callback used when doing a refresh of an automatic view.
085         * Provides the update log file (which may still be in the process
086         * of being written).
087         * @param logFile File containing the update log.
088         */
089        public void notifyLogFile(File logFile);
090    }
091