001 /* 002 * file CcAttributeType.java 003 * 004 * Licensed Materials - Property of IBM 005 * Restricted Materials of IBM 006 * 007 * com.ibm.rational.wvcm.stp.cc.CcAttributeType 008 * 009 * (C) Copyright IBM Corporation 2004, 2013. 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 import com.ibm.rational.wvcm.stpex.StpExEnumeration; 022 023 024 /** 025 * <p>A proxy for a ClearCase attribute type. 026 * </p> 027 * <p>The ClearCase attribute mechanism lets you associate arbitrary 028 * name/value pairs with particular ClearCase versions or elements. 029 * </p> 030 * <p>Attributes are typically used to customize and extend standard 031 * ClearCase functionality. For example, to notify various people in your group 032 * when particular files are modified, you could store those peoples' email 033 * addresses in an "EmailList" attribute associated with each element of interest. 034 * Then associate a checkin "post-op" trigger with those 035 * elements that reads the attribute value and sends the notice. 036 * </p> 037 * <p>You can also use the cleartool "find" command to find elements and 038 * versions based on their attributes. 039 * </p> 040 * <p>For more attribute information, see the ClearCase "Guide to Managing Software Projects" 041 * manual, and the cleartool man pages "mkattype" and "find". 042 * </p> 043 */ 044 public interface CcAttributeType extends CcTypeBase 045 { 046 /** 047 * Value type of a ClearCase attribute type. 048 * The value type determines helps constrain the legal values and format of an 049 * attribute instance. 050 */ 051 enum ValueType implements StpExEnumeration 052 { 053 /** Value is an integer. */ 054 INTEGER, 055 056 /** Value is floating-point. */ 057 REAL, 058 059 /** Value is a string. */ 060 STRING, 061 062 /** Value represents a time. */ 063 TIME, 064 065 /** Value is an opaque arbitrary byte sequences. */ 066 OPAQUE; 067 } 068 069 /** 070 * The default value for this attribute type. It is aways provided in 071 * string form, regardless of its value type. If no default value 072 * has been set, the property will be <code>null</code>. 073 */ 074 PropertyName<String> DEFAULT_VALUE = 075 new PropertyName<String>(PROPERTY_NAMESPACE, "default-value"); 076 077 /** 078 * Get the value of this proxy's {@link #DEFAULT_VALUE} property. 079 * @return this attribute type's default value, or <code>null</code> if not defined 080 */ 081 String getDefaultValue() throws WvcmException; 082 083 /** 084 * The value type of this attribute type 085 */ 086 PropertyName<ValueType> VALUE_TYPE = 087 new PropertyName<ValueType>(PROPERTY_NAMESPACE, "value-type"); 088 089 /** 090 * Get the value of this proxy's {@link #VALUE_TYPE} property. 091 * @return this attribute type's value type 092 * @throws WvcmException if this proxy doesn't define a value for this property. 093 */ 094 ValueType getValueType() throws WvcmException; 095 096 097 }