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 * (C) Copyright IBM Corporation 2004, 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 015 package com.ibm.rational.wvcm.stp.cc; 016 017 import javax.wvcm.PropertyRequestItem; 018 import javax.wvcm.WvcmException; 019 020 import com.ibm.rational.wvcm.stp.StpResource; 021 022 /** 023 * <p>A proxy for a resource in a ClearCase VOB or view. 024 * </p> 025 */ 026 public interface CcResource extends StpResource { 027 028 /** 029 * Construct a new proxy for this resource. 030 * This new proxy will be of the most correct, most derived class for this 031 * resource, based on currently available information in the resource's 032 * location, on the local client machine, and/or on the ClearCase server. 033 * In addition, this new proxy will have its identity 034 * correctly set so that its equals() and hashMap() methods will work 035 * correctly. 036 * <p>Unresolved resource proxies should not be used in situations where 037 * equality matters, especially in maps, lists, sets, and other collection 038 * classes. 039 * </p> 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 * Get the ClearCase provider associated with this resource proxy. 053 * This is normally the network provider for the CCRC WAN server on which 054 * this remote resource resides, or a local provider if this is a local 055 * ClearCase resource. 056 */ 057 CcProvider ccProvider(); 058 059 /** 060 * Checks if this proxy contains valid values for the provided properties, if 061 * and only if, they are supported. Properties which are unsupported by the 062 * server are ignored. 063 * 064 * @param wantedProp A PropertyRequestItem, possibly with multiple nested 065 * properties, to check the value for. Cannot be 066 * <code>null</code>. 067 * 068 * @return <code>true</code> if there is an entry in this proxy for all 069 * server supported properties of the PropertyRequestItem, 070 * and those entries contain a valid value; <code>false</code> otherwise. 071 */ 072 public boolean hasSupportedProperties(PropertyRequestItem wantedProp); 073 }