001 /* 002 * file CcDirectory.java 003 * 004 * Licensed Materials - Property of IBM 005 * Restricted Materials of IBM 006 * 007 * com.ibm.rational.wvcm.stp.cc.CcDirectory 008 * 009 * (C) Copyright IBM Corporation 2004, 2015. 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 static com.ibm.rational.wvcm.stpex.StpExBase.PROPERTY_NAMESPACE; 017 018 import java.util.List; 019 020 import javax.wvcm.ControllableFolder; 021 import javax.wvcm.Feedback; 022 import javax.wvcm.ResourceList; 023 import javax.wvcm.WvcmException; 024 import javax.wvcm.PropertyNameList.PropertyName; 025 026 /** 027 * <p> 028 * A proxy for a directory in a ClearCase view. 029 * This directory is either under version control or could potentially be 030 * put under version control. 031 * </p> 032 */ 033 public interface CcDirectory 034 extends CcFile, ControllableFolder 035 { 036 /** 037 * Create a new view-private directory at the location specified by this 038 * resource. The request will fail if a resource already exists at that 039 * location. 040 * @see javax.wvcm.ControllableResource#doCreateResource(Feedback) 041 */ 042 public CcDirectory createCcDirectory(Feedback feedback) throws WvcmException; 043 044 /** 045 * The list of String objects that identify the names of version-controlled 046 * resources in this CcDirectory that are eclipsed by non-version-controlled resources. 047 * <p> 048 * A 049 * {@link javax.wvcm.Workspace#doUpdate(ResourceList, Feedback) Workspace.doUpdate} 050 * or 051 * {@link javax.wvcm.Workspace#doMerge(ResourceList, javax.wvcm.Workspace.MergeFlag[], Feedback) Workspace.doMerge} 052 * request can give a version-controlled folder a version-controlled bound 053 * member that has the same name as an existing uncontrolled bound member. 054 * In this case, the uncontrolled bound member takes precedence and is said 055 * to "eclipse" the new versioned-controlled bound member. 056 */ 057 PropertyName<List<String>> ECLIPSED_LIST = 058 new PropertyName<List<String>>(PROPERTY_NAMESPACE, "eclipsed-list"); 059 060 /** 061 * Get the {@link #ECLIPSED_LIST} property. 062 * @return String list of the names of the eclipsed version-controlled resources 063 * @throws WvcmException if this ControllableFolder was not created with 064 * {@link #ECLIPSED_LIST} as a wanted property. 065 */ 066 List<String> getEclipsedList() throws WvcmException; 067 068 069 /** 070 * Are there checkouts anywhere in the tree below this directory? 071 */ 072 PropertyName<Boolean> HAS_DESCENDANT_CHECKOUTS = 073 new PropertyName<Boolean>(PROPERTY_NAMESPACE, "has-descendant-checkouts"); 074 075 /** 076 * Get the {@link #HAS_DESCENDANT_CHECKOUTS} property. 077 * @return true if there are checkouts anywhere in the tree rooted by this directory, else false. 078 * @throws WvcmException if this ControllableFolder was not created with 079 * {@link #HAS_DESCENDANT_CHECKOUTS} as a wanted property. 080 * */ 081 boolean getHasDescendantCheckouts() throws WvcmException; 082 083 084 /** 085 * Are there hijacks anywhere in the tree below this directory? 086 * Not supported for Snapshot view resources. 087 */ 088 PropertyName<Boolean> HAS_DESCENDANT_HIJACKS = 089 new PropertyName<Boolean>(PROPERTY_NAMESPACE, "has-descendant-hijacks"); 090 091 /** 092 * Get the {@link #HAS_DESCENDANT_HIJACKS} property. 093 * @return true if there are hijacks anywhere in the tree rooted by this directory, else false. 094 * @throws WvcmException if this ControllableFolder was not created with 095 * {@link #HAS_DESCENDANT_HIJACKS} as a wanted property. 096 * */ 097 public boolean getHasDescendantHijacks() throws WvcmException; 098 099 /** 100 * A list of all checkouts in the tree below this directory. Returns a list of CcFile resources. 101 */ 102 PropertyName<ResourceList<CcFile>> AGGREGATED_CHECKOUT_LIST = 103 new PropertyName<ResourceList<CcFile>>(PROPERTY_NAMESPACE, "aggregated-checkout-list"); 104 105 /** 106 * Get the {@link #AGGREGATED_CHECKOUT_LIST} property. 107 * @return List of CcFile proxies representing all checkouts in the tree rooted by this directory. 108 * @throws WvcmException if this ControllableFolder was not created with 109 * {@link #AGGREGATED_CHECKOUT_LIST} as a wanted property. 110 * */ 111 ResourceList<CcFile> getAggregatedCheckoutList() throws WvcmException; 112 113 114 /** 115 * A list of all hijacks in the tree below this directory. Returns a list of CcFile resources. 116 * Not supported for Snapshot view resources. 117 */ 118 PropertyName<ResourceList<CcFile>> AGGREGATED_HIJACK_LIST = 119 new PropertyName<ResourceList<CcFile>>(PROPERTY_NAMESPACE, "aggregated-hijack-list"); 120 121 /** 122 * Get the {@link #AGGREGATED_HIJACK_LIST} property. 123 * @return List of CcFile proxies representing all hijacks in the tree rooted by this directory. 124 * @throws WvcmException if this ControllableFolder was not created with 125 * {@link #AGGREGATED_HIJACK_LIST} as a wanted property. 126 * */ 127 public ResourceList<CcFile> getAggregatedHijackList() throws WvcmException; 128 129 /** 130 * A list of all the view private files in the tree below this directory. Does not include 131 * checkouts, hijacks or derived objects. Returns a list of CcFile resources. 132 * Only supported for the view root and VOB root directories of automatic views. 133 */ 134 PropertyName<ResourceList<CcFile>> AGGREGATED_VIEW_PRIVATE_LIST = 135 new PropertyName<ResourceList<CcFile>>(PROPERTY_NAMESPACE, "aggregated-view-private-list"); 136 137 /** 138 * Get the {@link #AGGREGATED_VIEW_PRIVATE_LIST} property. 139 * @return List of CcFile proxies representing view private files in the tree rooted by this directory. 140 * @throws WvcmException if this ControllableFolder was not created with 141 * {@link #AGGREGATED_VIEW_PRIVATE_LIST} as a wanted property. 142 * */ 143 public ResourceList<CcFile> getAggregatedViewPrivateList() throws WvcmException; 144 145 /** 146 * Is this directory the root of a ClearCase VOB. 147 */ 148 PropertyName<Boolean> IS_VOB_ROOT = 149 new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-vob-root"); 150 151 /** 152 * Returns the value of this proxy's {@link #IS_VOB_ROOT} property. 153 * @return true if the directory is the root of a VOB, else false 154 * @throws WvcmException 155 * if this proxy doesn't define a value for this property. 156 */ 157 public boolean getIsVobRoot() throws WvcmException; 158 159 } 160