001 /* 002 * file CcElement.java 003 * 004 * Licensed Materials - Property of IBM 005 * Restricted Materials of IBM 006 * 007 * com.ibm.rational.wvcm.stp.cc.CcElement 008 * 009 * (C) 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 package com.ibm.rational.wvcm.stp.cc; 015 016 import static com.ibm.rational.wvcm.stpex.StpExBase.PROPERTY_NAMESPACE; 017 018 import javax.wvcm.ResourceList; 019 import javax.wvcm.WvcmException; 020 import javax.wvcm.PropertyNameList.PropertyName; 021 022 import com.ibm.rational.wvcm.stpex.StpExBase; 023 024 /** 025 * A proxy for a ClearCase element. 026 * <p> 027 * Items under Rational ClearCase source control (version control) are 028 * generally referred to as elements. An element can be a design model, 029 * C++ source file, Visual Studio project, or a DLL. Elements are typically 030 * the objects on which you do work. About versions, elements, and VOBs: 031 * each time you revise and check in a file or directory from a view, a new 032 * version of that element is created. Files and directories under Rational 033 * ClearCase control (and all of their constituent versions) are called 034 * elements and are stored in VOBs. 035 * </p> 036 * <p> 037 * For more information about elements, see the ClearCase "Guide to Developing Software" 038 * manual, and the cleartool man page "mkelem". 039 * </p> 040 */ 041 public interface CcElement 042 extends javax.wvcm.VersionHistory, CcVobResource 043 { 044 /** 045 * <p> 046 * The view-relative path for this element. 047 * </p> 048 * <p> 049 * NOTE: This property is only available if it is retrieved 050 * using a method with a view context, such as 051 * Resource.doReadProperties(CcView, PropertyRequest). 052 * ClearCase needs a view context to resolve element paths. 053 * </p> 054 */ 055 PropertyName<String> VIEW_RELATIVE_PATH = 056 new PropertyName<String>(PROPERTY_NAMESPACE, "element-view-relative-path"); 057 058 /** 059 * Get the value of this element's {@link #VIEW_RELATIVE_PATH} property. 060 * 061 * @return view-relative path for the element 062 * @throws WvcmException 063 * if property was not requested, or if the view context 064 * was not provided 065 */ 066 String getViewRelativePath() throws WvcmException; 067 068 /** Get this element's element type. */ 069 PropertyName<CcElementType> ELEMENT_TYPE = 070 new PropertyName<CcElementType>(PROPERTY_NAMESPACE, 071 "element-element-type"); 072 073 /** 074 * Get the value of this element's {@link #ELEMENT_TYPE} property. 075 * 076 * @return element type for the element 077 * @throws WvcmException 078 * if property was not requested 079 */ 080 CcElementType getElementType() throws WvcmException; 081 082 083 }