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