001 /* 002 * file CcResource.java 003 * 004 * Licensed Materials - Property of IBM 005 * Restricted Materials of IBM 006 * 007 * com.ibm.rational.wvcm.stp.cc.CcResource 008 * 009 * © Copyright IBM Corporation 2004, 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 015 package com.ibm.rational.wvcm.stp.cc; 016 017 import javax.wvcm.WvcmException; 018 019 import com.ibm.rational.wvcm.stp.StpResource; 020 021 /** 022 * <p>A proxy for a resource in a ClearCase VOB or view. 023 * </p> 024 */ 025 public interface CcResource extends StpResource { 026 027 /** 028 * Construct a new proxy for this resource. 029 * This new proxy will be of the most correct, most derived class for this 030 * resource, based on currently available information in the resource's 031 * location, on the local client machine, and/or on the ClearCase server. 032 * In addition, this new proxy will have its RESOURCE_IDENTIFIER property 033 * correctly set so that its equals() and hashMap() methods will work 034 * correctly. 035 * <p>Unresolved resource proxies should not be used in situations where 036 * equality matters, especially in maps, lists, sets, and other collection 037 * classes. 038 * </p> 039 * @see com.ibm.rational.wvcm.stp.StpResource#equals(Object) 040 * @return a new proxy of the correct, most specific resource type 041 */ 042 public CcResource doResolve() throws WvcmException; 043 044 /** 045 * Has this proxy already been resolved? 046 * @return true if this proxy has been resolved; else false 047 * @see #doResolve() 048 */ 049 public boolean isResolved() throws WvcmException; 050 051 /** 052 * Fetches an instance of a ClearCase provider which can be used for 053 * or instantiating proxies for various ClearCase-specific resources. 054 * @return An instance of a ClearCase provider 055 */ 056 CcProvider ccProvider(); 057 }