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