001 /*
002 * file CcProject.java
003 *
004 * Licensed Materials - Property of IBM
005 * Restricted Materials of IBM
006 *
007 * com.ibm.rational.wvcm.stp.cc.CcProject
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.Feedback;
019 import javax.wvcm.PropertyNameList.PropertyName;
020 import javax.wvcm.ResourceList;
021 import javax.wvcm.WvcmException;
022
023 import com.ibm.rational.wvcm.stp.cq.CqRecordType;
024 import com.ibm.rational.wvcm.stp.cq.CqUserDb;
025 import com.ibm.rational.wvcm.stpex.StpExEnumeration;
026
027 /**
028 * <p>A proxy for a ClearCase UCM project.
029 * </p>
030 * <p>A UCM project contains the configuration information needed to manage a
031 * significant development effort, such as a product release. A project contains
032 * one main shared <i>integration stream</i> and typically multiple per-user
033 * <i>development streams</i>.
034 * </p>
035 * <p>A UCM project may be <i>ClearQuest-enabled </i> by linking it to a particular
036 * ClearQuest database. In ClearQuest-enabled projects, all UCM activities are
037 * associated with ClearQuest entities in the ClearQuest database. ClearQuest
038 * provides richer activity management functionality than is available from
039 * ClearCase alone.
040 * </p>
041 * <p>
042 * For more project information, see the ClearCase "Guide to Developing Software with UCM"
043 * manual, and the cleartool man page "mkproject".
044 * </p>
045 */
046 public interface CcProject extends CcVobResource {
047
048 /**
049 * A UCM project is "ClearQuest-enabled" if it is bound to a ClearQuest
050 * user database and participates in the ClearQuest/UCM integration.
051 */
052 enum ClearQuestEnabledState implements StpExEnumeration {
053
054 /**
055 * This project is not ClearQuest-enabled.
056 */
057 NOT_ENABLED,
058
059 /**
060 * This project is ClearQuest-enabled.
061 */
062 ENABLED,
063
064 /**
065 * This project is ClearQuest-enabled, but the integration is
066 * temporarily suspended.
067 */
068 SUSPENDED;
069 }
070
071 /**
072 * Defines the baseline name template for a project.
073 * The property specifies the tokens to be used in the baseline name and
074 * it can include any of the following tokens separated by commas:
075 * <ul>
076 * <li>basename
077 * <li>project
078 * <li>stream
079 * <li>component
080 * <li>date
081 * <li>time
082 * <li>user
083 * <li>host
084 * </ul>
085 * When the baseline is created, UCM replaces commas with underscores in the baseline name.
086 */
087 PropertyName<String> BASELINE_NAMING_TEMPLATE =
088 new PropertyName<String>(PROPERTY_NAMESPACE, "baseline-naming-template");
089
090 /**
091 * Get the value of this proxy's {@link #BASELINE_NAMING_TEMPLATE} property.
092 * @return a string containing this projects baseline naming template
093 * @throws WvcmException if this proxy doesn't define a value for this property.
094 */
095 String getBaselineNamingTemplate() throws WvcmException;
096
097 /**
098 * Set the template to be used when naming a newly created baseline.
099 * Specifying an empty string for a template will result in the default
100 * template being set (currently "basename").
101 * @param bl_template A string containing the desired naming template
102 */
103 void setBaselineNamingTemplate(String bl_template);
104
105 /** This UCM project's integration stream. */
106 PropertyName<CcStream> INTEGRATION_STREAM =
107 new PropertyName<CcStream>(PROPERTY_NAMESPACE, "integration-stream");
108
109 /**
110 * Get the value of this proxy's {@link #INTEGRATION_STREAM} property.
111 * @return a client proxy for this project's integration stream,
112 * or null if project doesn't have an integration stream
113 * @throws WvcmException if this proxy doesn't define a value for this property.
114 */
115 CcStream getIntegrationStream() throws WvcmException;
116
117 /** The list of streams in this UCM project. */
118 PropertyName<ResourceList<CcStream>> STREAM_LIST =
119 new PropertyName<ResourceList<CcStream>>(PROPERTY_NAMESPACE, "stream-list");
120
121 /**
122 * Get the value of this proxy's {@link #STREAM_LIST} property.
123 * @return list of project's streams as a ResourceList of UcmStream instances.
124 * @throws WvcmException if this proxy doesn't define a value for this property.
125 */
126 ResourceList<CcStream> getStreamList() throws WvcmException;
127
128
129 /** The list of UCM enabled CQ record types in this UCM project. */
130 PropertyName<ResourceList<CqRecordType>> UCM_ENABLED_CQ_RECORD_TYPE_LIST =
131 new PropertyName<ResourceList<CqRecordType>>(PROPERTY_NAMESPACE, "ucm-enabled-cq-record-type-list");
132
133 /**
134 * Get the value of this proxy's {@link #UCM_ENABLED_CQ_RECORD_TYPE_LIST} property.
135 * @return list of project's ucm enabled cq record types as a ResourceList of CqRecordType instances.
136 * @throws WvcmException if this proxy doesn't define a value for this property.
137 */
138 ResourceList<CqRecordType> getUcmEnabledCqRecordTypeList() throws WvcmException;
139
140 /** The list of UCM components that can be modified in the UCM stream(s)
141 * associated with this UCM project. */
142 PropertyName<ResourceList<CcComponent>> MODIFIABLE_COMPONENT_LIST =
143 new PropertyName<ResourceList<CcComponent>>(PROPERTY_NAMESPACE, "modifiable-component-list");
144
145 /**
146 * Get the value of this proxy's {@link #MODIFIABLE_COMPONENT_LIST} property.
147 * @return list of modifiable components as ResourceList of UcmComponent instances.
148 * @throws WvcmException if this proxy doesn't define a value for this property.
149 */
150 ResourceList<CcComponent> getModifiableComponentList() throws WvcmException;
151
152 /** Is this a single-stream UCM project? */
153 PropertyName<Boolean> IS_SINGLE_STREAM =
154 new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-single-stream");
155
156 /**
157 * Get the value of this proxy's {@link #IS_SINGLE_STREAM} property.
158 * @return true if this is a single-stream UCM project, else false.
159 * @throws WvcmException if this proxy doesn't define a value for this property.
160 */
161 boolean getIsSingleStream() throws WvcmException;
162
163 /**
164 * Set whether the project is single stream or not.
165 * This property can only be set at project creation time.
166 * @param isSingleStream true if the project should be single stream, false otherwise.
167 */
168 void setIsSingleStream(boolean isSingleStream);
169
170 /** Is this a ClearQuest-enabled UCM project? */
171 PropertyName<ClearQuestEnabledState> CLEARQUEST_ENABLED_STATE =
172 new PropertyName<ClearQuestEnabledState>(PROPERTY_NAMESPACE, "clearquest-enabled-state");
173
174 /**
175 * Get the value of this proxy's {@link #CLEARQUEST_ENABLED_STATE} property.
176 * @return ENABLED, NOT_ENABLED, or SUSPENDED depending on this project's state.
177 * @throws WvcmException if this proxy doesn't define a value for this property.
178 */
179 ClearQuestEnabledState getClearQuestEnabledState() throws WvcmException;
180
181 /** The ClearQuest user database this CQ-enabled UCM project is associated with. */
182 PropertyName<CqUserDb> CLEARQUEST_USER_DB =
183 new PropertyName<CqUserDb>(PROPERTY_NAMESPACE, "clearquest-user-db");
184
185 /**
186 * Get the value of this proxy's {@link #CLEARQUEST_USER_DB} property.
187 * @return a proxy for the CqUserDb associated with this CQ-enabled
188 * UCM project, or null if project is not CQ-enabled
189 * @throws WvcmException if this proxy doesn't define a value for this property.
190 */
191 CqUserDb getClearQuestUserDb() throws WvcmException;
192
193 /** The UCM folder in which this UCM project resides */
194 PropertyName<CcProjectFolder> PROJECT_FOLDER =
195 new PropertyName<CcProjectFolder>(PROPERTY_NAMESPACE, "project-folder");
196
197 /**
198 * Get the value of this proxy's {@link #PROJECT_FOLDER} property.
199 * @return A client proxy for the UCM folder that contains this UCM project.
200 * @throws WvcmException if this proxy doesn't define a value for this property.
201 */
202 CcProjectFolder getProjectFolder() throws WvcmException;
203
204 /**
205 * Set the parent folder for this project
206 * @param folder client proxy for the parent project folder.
207 */
208 void setProjectFolder(CcProjectFolder folder);
209
210 /**
211 * A list of all streams in this UCM project that have posted deliveries
212 * in progress. A delivery is posted if the source stream is mastered
213 * at a different replica than the target stream at the time of the delivery.
214 */
215 PropertyName<ResourceList<CcStream>> POSTED_DELIVERY_LIST =
216 new PropertyName<ResourceList<CcStream>>(PROPERTY_NAMESPACE, "ccproject-posted-delivery-list");
217
218 /**
219 * Get the value of this proxy's {@link #POSTED_DELIVERY_LIST} property.
220 * @return A list containing this project's posted deliveries.
221 * @throws WvcmException if this proxy doesn't define a value for this property.
222 */
223 ResourceList<CcStream> getPostedDeliveryList() throws WvcmException;
224
225 /**
226 * Create a new UCM project at the location specified by this proxy. The
227 * location should be an object name selector specifying the project's name
228 * and the repository (project VOB) in which to create it.
229 */
230 CcProject doCreateCcProject(Feedback feedback) throws WvcmException;
231 }