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     * © 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    
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.ResourceList;
019    import javax.wvcm.WvcmException;
020    import javax.wvcm.PropertyNameList.PropertyName;
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        /** Is this VOB a project VOB? */
122        PropertyName<Boolean> IS_PROJECT_VOB =
123            new PropertyName<Boolean>(PROPERTY_NAMESPACE,
124                                      "is-project-vob");
125    
126        /**
127         * Returns the value of this proxy's {@link #IS_PROJECT_VOB} property.
128         * 
129         * @return true if this VOB is a project VOB, else false
130         * @throws WvcmException if this proxy doesn't define a value for this
131         *             property.
132         */
133        boolean getIsProjectVob() throws WvcmException;
134    
135        /** Is this VOB replicated? */
136        PropertyName<Boolean> IS_REPLICATED =
137            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-replicated");
138    
139        /**
140         * Returns the value of this proxy's {@link #IS_REPLICATED} property.
141         * 
142         * @return true if the VOB is replicated, else false
143         * @throws WvcmException
144         *             if this proxy doesn't define a value for this property.
145         */
146        boolean getIsReplicated() throws WvcmException;
147    
148        /** List of label types in this VOB. Includes global types. */
149        PropertyName<ResourceList<CcLabelType>> LABEL_TYPE_LIST =
150            new PropertyName<ResourceList<CcLabelType>>(PROPERTY_NAMESPACE,
151                                                        "label-type-list");
152    
153        /**
154         * Get the value of this proxy's {@link #LABEL_TYPE_LIST} property. Note
155         * that this includes global types higher up the Admin VOB 
156         * hierarchy with no local copy in this VOB.
157         * 
158         * @return list of label types in this VOB as LabelType instances.
159         * @throws WvcmException if this proxy doesn't define a value for this
160         *             property.
161         */
162        public ResourceList<CcLabelType> getLabelTypeList() throws WvcmException;
163    
164        /** 
165         * Ordered list of Admin VOBs for this VOB with the immediate parent first 
166         * and the furthest ancestor last.
167         */
168        PropertyName<ResourceList<CcVob>> ORDERED_ADMIN_VOB_LIST =
169            new PropertyName<ResourceList<CcVob>>(PROPERTY_NAMESPACE,
170                                                          "ordered-admin-vob-list");
171    
172        /**
173         * Get the value of this proxy's {@link #ORDERED_ADMIN_VOB_LIST} property.
174         * 
175         * @return list of Admin VOBs for this VOB
176         * @throws WvcmException if this proxy doesn't define a value for this
177         *             property.
178         */
179        public ResourceList<CcVob> getOrderedAdminVobList() throws WvcmException;
180    
181        /**
182         * This project VOB's root UCM project folder.
183         * This property is only supported on project VOBs.
184         */
185        PropertyName<CcProjectFolder> ROOT_PROJECT_FOLDER =
186            new PropertyName<CcProjectFolder>(PROPERTY_NAMESPACE,
187                                              "root-project-folder");
188    
189        /**
190         * Returns the value of this proxy's {@link #ROOT_PROJECT_FOLDER} property.
191         * 
192         * @return A client proxy for this project VOB's root project folder
193         * @throws WvcmException if this proxy doesn't define a value for this
194         *             property.
195         */
196        public CcProjectFolder getRootProjectFolder() throws WvcmException;
197    
198        /**
199         * This VOB's db schema version.
200         */
201        PropertyName<Long> SCHEMA_VERSION =
202            new PropertyName<Long>(PROPERTY_NAMESPACE, "schema-version");
203        
204        /**
205         * Get the value of this proxy's {@link #SCHEMA_VERSION} property.
206         * @return long indicating VOB's schema version
207         * @throws WvcmException if this proxy doesn't define a value for this
208         *             property.
209         */
210        public long getSchemaVersion() throws WvcmException;
211        
212        /** List of trigger types in this VOB */
213        PropertyName<ResourceList<CcTriggerType>> TRIGGER_TYPE_LIST =
214            new PropertyName<ResourceList<CcTriggerType>>(PROPERTY_NAMESPACE,
215                                                          "trigger-type-list");
216    
217        /**
218         * Get the value of this proxy's {@link #TRIGGER_TYPE_LIST} property.
219         * 
220         * @return list of trigger types in this VOB as TriggerType instances.
221         * @throws WvcmException if this proxy doesn't define a value for this
222         *             property.
223         */
224        public ResourceList<CcTriggerType> getTriggerTypeList()
225            throws WvcmException;
226    
227        /** This VOB's VOB tag as a string in the current registry region. */
228        PropertyName<String> VOB_TAG_STRING = new PropertyName<String>(PROPERTY_NAMESPACE,
229                                                                "vob-tag-string");
230    
231        /**
232         * Returns the value of this proxy's {@link #VOB_TAG_STRING} property.
233         * 
234         * @return this VOB's VOB tag
235         * @throws WvcmException if this proxy doesn't define a value for this
236         *             property.
237         */
238        public String getVobTagString() throws WvcmException;
239        
240        /** 
241         * This VOB's VOB tag as a {@link CcVobTag} resource in the current
242         * registry region. 
243         */
244        PropertyName<CcVobTag> VOB_TAG = 
245            new PropertyName<CcVobTag>(PROPERTY_NAMESPACE, "vob-tag");
246        
247        /**
248         * Returns the value of this proxy's {@link #VOB_TAG} property.
249         * 
250         * @return this VOB's VOB tag
251         * @throws WvcmException if this proxy doesn't define a value for this
252         *             property.
253         */
254        public CcVobTag getVobTag() throws WvcmException;
255    
256        /**
257         * The list of MultiSite replicas of this VOB.
258         * This list may be incomplete; other replicas may exist, but their
259         * creation packets have not yet been imported at the current replica.
260         */
261        PropertyName<ResourceList<CcReplica>> REPLICA_LIST =
262            new PropertyName<ResourceList<CcReplica>>(
263                    PROPERTY_NAMESPACE, "replica-list");
264    
265        /**
266         * Returns the value of this proxy's {@link #REPLICA_LIST} property.
267         * 
268         * @return this VOB's list of replicas as a list of CcReplica instances
269         * @throws WvcmException if this proxy doesn't define a value for this
270         *             property.
271         */
272        public ResourceList<CcReplica> getReplicaList() throws WvcmException;
273    
274        /**
275         * Check to see if a type with the given name is visible in this VOB.
276         * To be visible a type must be an ordinary or local type defined in the VOB
277         * or a global type in the AdminVOB hierarchy above this VOB which has
278         * not yet been instantiated.
279         * @param labelName  Name of the label to look for.
280         * @return  true if a label with that name is visible from this VOB, else false.
281         */
282        public boolean doIsLabelTypeVisible(String labelName) throws WvcmException;
283    }