001    /*
002     * file CcVob.java
003     *
004     * Licensed Materials - Property of IBM
005     * Restricted Materials of IBM 
006     *
007     * com.ibm.rational.wvcm.stp.cc.CcVob
008     *
009     * (C) Copyright IBM Corporation 2004, 2012.  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.ResourceList;
020    import javax.wvcm.WvcmException;
021    
022    import com.ibm.rational.wvcm.stp.StpRepository;
023    
024    /**
025     * <p>
026     * A proxy for a ClearCase versioned object base (VOB) - the repository for all
027     * server-side ClearCase resources.
028     * </p>
029     * <p>
030     * A VOB can either be a regular VOB or project VOB. A project VOB is a
031     * partcular type of VOB that may contain UCM project metadata - projects,
032     * streams, activities, components, and baselines.
033     * </p>
034     */
035    public interface CcVob extends StpRepository, CcVobResource
036    {
037        /** List of attribute types in this VOB. Includes global types. */
038        PropertyName<ResourceList<CcAttributeType>> ATTRIBUTE_TYPE_LIST =
039            new PropertyName<ResourceList<CcAttributeType>>(PROPERTY_NAMESPACE,
040                                                            "attribute-type-list");
041    
042        /**
043         * Get the value of this proxy's {@link #ATTRIBUTE_TYPE_LIST} property. Note
044         * that this includes global types higher up the Admin VOB 
045         * hierarchy with no local copy in this VOB.
046         * 
047         * @return list of attribute types in this VOB as AttributeType instances.
048         * @throws WvcmException if this proxy doesn't define a value for this
049         *             property.
050         */
051        public ResourceList<CcAttributeType> getAttributeTypeList()
052            throws WvcmException;
053    
054        /** List of branch types in this VOB. Includes global types. */
055        PropertyName<ResourceList<CcBranchType>> BRANCH_TYPE_LIST =
056            new PropertyName<ResourceList<CcBranchType>>(PROPERTY_NAMESPACE,
057                                                         "branch-type-list");
058    
059        /**
060         * Get the value of this proxy's {@link #BRANCH_TYPE_LIST} property. Note
061         * that this includes global types higher up the Admin VOB 
062         * hierarchy with no local copy in this VOB.
063         * 
064         * @return list of branch types in this VOB as BranchType instances.
065         * @throws WvcmException if this proxy doesn't define a value for this
066         *             property.
067         */
068        public ResourceList<CcBranchType> getBranchTypeList() throws WvcmException;
069    
070        /**
071         * List of UCM components in this project VOB.
072         * This property is only supported on project VOBs.
073         */
074        PropertyName<ResourceList<CcComponent>> COMPONENT_LIST =
075            new PropertyName<ResourceList<CcComponent>>(PROPERTY_NAMESPACE,
076                                                        "component-list");
077    
078        /**
079         * Get the value of this proxy's {@link #COMPONENT_LIST} property.
080         * 
081         * @return list of components in this VOB as UcmComponent instances.
082         * @throws WvcmException if this proxy doesn't define a value for this
083         *             property.
084         */
085        public ResourceList<CcComponent> getComponentList() throws WvcmException;
086    
087        /** List of element types in this VOB. Includes global types. */
088        PropertyName<ResourceList<CcElementType>> ELEMENT_TYPE_LIST =
089            new PropertyName<ResourceList<CcElementType>>(PROPERTY_NAMESPACE,
090                                                          "element-type-list");
091    
092        /**
093         * Get the value of this proxy's {@link #ELEMENT_TYPE_LIST} property. Note
094         * that this includes global types higher up the Admin VOB 
095         * hierarchy with no local copy in this VOB.
096         * 
097         * @return list of element types in this VOB as ElementType instances.
098         * @throws WvcmException if this proxy doesn't define a value for this
099         *             property.
100         */
101        public ResourceList<CcElementType> getElementTypeList()
102            throws WvcmException;
103    
104        /** List of hyperlink types in this VOB. Includes global types. */
105        PropertyName<ResourceList<CcHyperlinkType>> HYPERLINK_TYPE_LIST =
106            new PropertyName<ResourceList<CcHyperlinkType>>(PROPERTY_NAMESPACE,
107                                                            "hyperlink-type-list");
108    
109        /**
110         * Get the value of this proxy's {@link #HYPERLINK_TYPE_LIST} property. Note
111         * that this includes global types higher up the Admin VOB 
112         * hierarchy with no local copy in this VOB.
113         * 
114         * @return list of hyperlink types in this VOB as HyperlinkType instances.
115         * @throws WvcmException if this proxy doesn't define a value for this
116         *             property.
117         */
118        public ResourceList<CcHyperlinkType> getHyperlinkTypeList()
119            throws WvcmException;
120    
121        /** Does this VOB have ACLs enforced? */
122        PropertyName<Boolean> IS_ACL_ENFORCED = 
123                new PropertyName<Boolean>(PROPERTY_NAMESPACE,
124                        "is-acl-enforced");
125    
126        /**
127         * Returns the value of this proxy's {@link #IS_ACL_ENFORCED} property.
128         * 
129         * @return true if this VOB has ACL enforcement turned on, else false
130         * @throws WvcmException if this proxy doesn't define a value for this
131         *             property.
132         */
133        boolean getIsAclEnforced() throws WvcmException;
134    
135        /** Is this VOB a project VOB? */
136        PropertyName<Boolean> IS_PROJECT_VOB =
137            new PropertyName<Boolean>(PROPERTY_NAMESPACE,
138                                      "is-project-vob");
139    
140        /**
141         * Returns the value of this proxy's {@link #IS_PROJECT_VOB} property.
142         * 
143         * @return true if this VOB is a project VOB, else false
144         * @throws WvcmException if this proxy doesn't define a value for this
145         *             property.
146         */
147        boolean getIsProjectVob() throws WvcmException;
148    
149        /** Is this VOB replicated? */
150        PropertyName<Boolean> IS_REPLICATED =
151            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-replicated");
152    
153        /**
154         * Returns the value of this proxy's {@link #IS_REPLICATED} property.
155         * 
156         * @return true if the VOB is replicated, else false
157         * @throws WvcmException
158         *             if this proxy doesn't define a value for this property.
159         */
160        boolean getIsReplicated() throws WvcmException;
161    
162        /** List of label types in this VOB. Includes global types. */
163        PropertyName<ResourceList<CcLabelType>> LABEL_TYPE_LIST =
164            new PropertyName<ResourceList<CcLabelType>>(PROPERTY_NAMESPACE,
165                                                        "label-type-list");
166    
167        /**
168         * Get the value of this proxy's {@link #LABEL_TYPE_LIST} property. Note
169         * that this includes global types higher up the Admin VOB 
170         * hierarchy with no local copy in this VOB.
171         * 
172         * @return list of label types in this VOB as LabelType instances.
173         * @throws WvcmException if this proxy doesn't define a value for this
174         *             property.
175         */
176        public ResourceList<CcLabelType> getLabelTypeList() throws WvcmException;
177    
178        /** 
179         * Ordered list of Admin VOBs for this VOB with the immediate parent first 
180         * and the furthest ancestor last.
181         */
182        PropertyName<ResourceList<CcVob>> ORDERED_ADMIN_VOB_LIST =
183            new PropertyName<ResourceList<CcVob>>(PROPERTY_NAMESPACE,
184                                                          "ordered-admin-vob-list");
185    
186        /**
187         * Get the value of this proxy's {@link #ORDERED_ADMIN_VOB_LIST} property.
188         * 
189         * @return list of Admin VOBs for this VOB
190         * @throws WvcmException if this proxy doesn't define a value for this
191         *             property.
192         */
193        public ResourceList<CcVob> getOrderedAdminVobList() throws WvcmException;
194    
195        /** List of policies in this VOB */
196        PropertyName<ResourceList<CcPolicy>> POLICY_LIST =
197            new PropertyName<ResourceList<CcPolicy>>(PROPERTY_NAMESPACE,
198                                                          "policy-list");
199    
200        /**
201         * Get the value of this proxy's {@link #POLICY_LIST} property.
202         * 
203         * @return list of policies in this VOB as CcPolicy instances.
204         * @throws WvcmException if this proxy doesn't define a value for this
205         *             property.
206         */
207        public ResourceList<CcPolicy> getPolicyList() throws WvcmException;
208    
209        /** List of rolemaps in this VOB */
210        PropertyName<ResourceList<CcRolemap>> ROLEMAP_LIST =
211            new PropertyName<ResourceList<CcRolemap>>(PROPERTY_NAMESPACE,
212                                                          "rolemap-list");
213    
214        /**
215         * Get the value of this proxy's {@link #ROLEMAP_LIST} property.
216         * 
217         * @return list of rolemaps in this VOB as CcRolemap instances.
218         * @throws WvcmException if this proxy doesn't define a value for this
219         *             property.
220         */
221        public ResourceList<CcRolemap> getRolemapList() throws WvcmException;
222    
223        /**
224         * This project VOB's root UCM project folder.
225         * This property is only supported on project VOBs.
226         */
227        PropertyName<CcProjectFolder> ROOT_PROJECT_FOLDER =
228            new PropertyName<CcProjectFolder>(PROPERTY_NAMESPACE,
229                                              "root-project-folder");
230    
231        /**
232         * Returns the value of this proxy's {@link #ROOT_PROJECT_FOLDER} property.
233         * 
234         * @return A client proxy for this project VOB's root project folder
235         * @throws WvcmException if this proxy doesn't define a value for this
236         *             property.
237         */
238        public CcProjectFolder getRootProjectFolder() throws WvcmException;
239    
240        /**
241         * This VOB's db schema version.
242         */
243        PropertyName<Long> SCHEMA_VERSION =
244            new PropertyName<Long>(PROPERTY_NAMESPACE, "schema-version");
245        
246        /**
247         * Get the value of this proxy's {@link #SCHEMA_VERSION} property.
248         * @return long indicating VOB's schema version
249         * @throws WvcmException if this proxy doesn't define a value for this
250         *             property.
251         */
252        public long getSchemaVersion() throws WvcmException;
253        
254        /** List of trigger types in this VOB */
255        PropertyName<ResourceList<CcTriggerType>> TRIGGER_TYPE_LIST =
256            new PropertyName<ResourceList<CcTriggerType>>(PROPERTY_NAMESPACE,
257                                                          "trigger-type-list");
258    
259        /**
260         * Get the value of this proxy's {@link #TRIGGER_TYPE_LIST} property.
261         * 
262         * @return list of trigger types in this VOB as TriggerType instances.
263         * @throws WvcmException if this proxy doesn't define a value for this
264         *             property.
265         */
266        public ResourceList<CcTriggerType> getTriggerTypeList()
267            throws WvcmException;
268    
269        /** This VOB's VOB tag as a string in the current registry region. */
270        PropertyName<String> VOB_TAG_STRING = new PropertyName<String>(PROPERTY_NAMESPACE,
271                                                                "vob-tag-string");
272    
273        /**
274         * Returns the value of this proxy's {@link #VOB_TAG_STRING} property.
275         * 
276         * @return this VOB's VOB tag
277         * @throws WvcmException if this proxy doesn't define a value for this
278         *             property.
279         */
280        public String getVobTagString() throws WvcmException;
281        
282        /** 
283         * This VOB's VOB tag as a {@link CcVobTag} resource in the current
284         * registry region. 
285         */
286        PropertyName<CcVobTag> VOB_TAG = 
287            new PropertyName<CcVobTag>(PROPERTY_NAMESPACE, "vob-tag");
288        
289        /**
290         * Returns the value of this proxy's {@link #VOB_TAG} property.
291         * 
292         * @return this VOB's VOB tag
293         * @throws WvcmException if this proxy doesn't define a value for this
294         *             property.
295         */
296        public CcVobTag getVobTag() throws WvcmException;
297    
298        /**
299         * The list of MultiSite replicas of this VOB.
300         * This list may be incomplete; other replicas may exist, but their
301         * creation packets have not yet been imported at the current replica.
302         */
303        PropertyName<ResourceList<CcReplica>> REPLICA_LIST =
304            new PropertyName<ResourceList<CcReplica>>(
305                    PROPERTY_NAMESPACE, "replica-list");
306    
307        /**
308         * Returns the value of this proxy's {@link #REPLICA_LIST} property.
309         * 
310         * @return this VOB's list of replicas as a list of CcReplica instances
311         * @throws WvcmException if this proxy doesn't define a value for this
312         *             property.
313         */
314        public ResourceList<CcReplica> getReplicaList() throws WvcmException;
315    
316        /**
317         * Check to see if a type with the given name is visible in this VOB.
318         * To be visible a type must be an ordinary or local type defined in the VOB
319         * or a global type in the AdminVOB hierarchy above this VOB which has
320         * not yet been instantiated.
321         * @param labelName  Name of the label to look for.
322         * @return  true if a label with that name is visible from this VOB, else false.
323         */
324        public boolean doIsLabelTypeVisible(String labelName) throws WvcmException;
325        
326        /** Is atomic checkin enabled in this VOB? */
327        PropertyName<Boolean> IS_ATOMIC_CHECKIN_ENABLED =
328            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-atomic-checkin-enabled");
329        
330        /**
331         * Returns the value of this proxy's {@link #IS_ATOMIC_CHECKIN_ENABLED} property.
332         * 
333         * @return true if atomic checkin is enabled in this VOB; false otherwise
334         * @throws WvcmException if this proxy doesn't define a value for this
335         *             property.
336         */
337        public boolean getIsAtomicCheckinEnabled() throws WvcmException;
338                
339    }