001    /*
002     * file CcElementType.java
003     *
004     * Licensed Materials - Property of IBM
005     * Restricted Materials of IBM 
006     *
007     * com.ibm.rational.wvcm.stp.cc.CcElementType
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    package com.ibm.rational.wvcm.stp.cc;
014    
015    import static com.ibm.rational.wvcm.stpex.StpExBase.PROPERTY_NAMESPACE;
016    
017    import javax.wvcm.PropertyNameList.PropertyName;
018    import javax.wvcm.WvcmException;
019    
020    import com.ibm.rational.wvcm.stpex.StpExEnumeration;
021    
022    /**
023     * <p>
024     * A proxy for a ClearCase element type.
025     * </p>
026     * <p>
027     * The use of element types lets each class of elements be handled differently. 
028     * An element type is a class of file elements. Predefined element types, such as 
029     * <b>file</b> and <b>text_file</b>, are included. You can define your own element types. 
030     * When you create an element type for use in UCM projects, you can specify a mergetype 
031     * attribute, which determines how deliver and rebase operations handle merging of 
032     * files of that element type.
033     * </p>
034     * <p>
035     * For more information about elements and element types, see the ClearCase "Guide to Managing Software Projects"
036     * manual, and the cleartool man pages "mkeltype" and "mkelem".
037     * </p>
038     *
039     */
040    public interface CcElementType extends CcTypeBase
041    {
042        /**
043         * Merge type of an element type.<p>
044         * The merge type defines the behaviour when a merge is performed 
045         * via deliver, rebase or an explicit findmerge command.
046         * The four merge types are:
047         * <ul>
048         * <li> Auto (default): A findmerge operation attempts to merge elements of this type.
049         * <li> User: A findmerge operation performs trivial merges only. 
050         * Nontrivial merges must be performed manually.
051         * <li> Never: A findmerge operation ignores elements of this type. 
052         * The never attribute is useful for working with files such as 
053         * binary files or bitmap graphics images.
054         * <li> Copy: A findmerge operation attempts to merge elements of this type 
055         * automatically by copying the from-version to the to-version 
056         * (replacing the to-version with the from-version).
057         * </ul>
058         */
059        enum MergeType implements StpExEnumeration {
060            
061            /** Automatically perform merges */
062            AUTO,
063            
064            /** Automatically perform trivial merges, manual for non-trivial */
065            USER,
066            
067            /** Never merge */
068            NEVER,
069            
070            /** Copy version to merge */
071            COPY;
072        }
073        
074        /**
075         * The merge type of this element type.
076         */
077        PropertyName<MergeType> MERGE_TYPE =
078            new PropertyName<MergeType>(PROPERTY_NAMESPACE, "merge-type");
079        
080        /**
081         * Get the value of this proxy's {@link #MERGE_TYPE} property.
082         * @return this element type's merge type
083         * @throws WvcmException 
084         */
085        MergeType getMergeType() throws WvcmException;
086    
087        /**
088         * The type manager of this element type.
089         */
090        PropertyName<String> TYPE_MANAGER =
091            new PropertyName<String>(PROPERTY_NAMESPACE, "type-manager");
092    
093        
094        /**
095         * Get the value of this proxy's {@link #TYPE_MANAGER} property.
096         * @return this element type's type manager
097         * @throws WvcmException 
098         */
099        String getTypeManager() throws WvcmException;
100    
101    }