001    /*  
002     * file CcDirectory.java
003     *
004     * Licensed Materials - Property of IBM
005     * Restricted Materials of IBM 
006     *
007     * com.ibm.rational.wvcm.stp.cc.CcDirectory
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    
014    package com.ibm.rational.wvcm.stp.cc;
015    
016    import static com.ibm.rational.wvcm.stpex.StpExBase.PROPERTY_NAMESPACE;
017    
018    import java.util.List;
019    
020    import javax.wvcm.ControllableFolder;
021    import javax.wvcm.Feedback;
022    import javax.wvcm.ResourceList;
023    import javax.wvcm.WvcmException;
024    import javax.wvcm.PropertyNameList.PropertyName;
025    
026    /**
027     * <p>
028     * A proxy for a directory in a ClearCase view.
029     * This directory is either under version control or could potentially be
030     * put under version control.
031     * </p>
032     */
033    public interface CcDirectory
034        extends CcFile, ControllableFolder 
035    {
036        /**
037         * Create a new view-private directory at the location specified by this
038         * resource.  The request will fail if a resource already exists at that
039         * location.
040         * @see javax.wvcm.ControllableResource#doCreateResource(Feedback)
041         */
042        public CcDirectory createCcDirectory(Feedback feedback) throws WvcmException;
043        
044        /**
045         * The list of String objects that identify the names of version-controlled
046         * resources in this CcDirectory that are eclipsed by non-version-controlled resources.
047         * <p>
048         * A
049         * {@link javax.wvcm.Workspace#doUpdate(ResourceList, Feedback) Workspace.doUpdate}
050         * or
051         * {@link javax.wvcm.Workspace#doMerge(ResourceList, javax.wvcm.Workspace.MergeFlag[], Feedback) Workspace.doMerge}
052         * request can give a version-controlled folder a version-controlled bound
053         * member that has the same name as an existing uncontrolled bound member.
054         * In this case, the uncontrolled bound member takes precedence and is said
055         * to &quot;eclipse&quot; the new versioned-controlled bound member.
056         */
057        PropertyName<List<String>> ECLIPSED_LIST =
058          new PropertyName<List<String>>(PROPERTY_NAMESPACE, "eclipsed-list");
059    
060        /**
061         * Get the {@link #ECLIPSED_LIST} property.
062         * @return String list of the names of the eclipsed version-controlled resources
063         * @throws WvcmException if this ControllableFolder was not created with
064         * {@link #ECLIPSED_LIST} as a wanted property.
065         */
066        List<String> getEclipsedList() throws WvcmException;
067    
068    
069        /**
070         * Are there checkouts anywhere in the tree below this directory?
071         */
072        PropertyName<Boolean> HAS_DESCENDANT_CHECKOUTS =
073            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "has-descendant-checkouts");
074        
075        /**
076         * Get the {@link #HAS_DESCENDANT_CHECKOUTS} property.
077         * @return true if there are checkouts anywhere in the tree rooted by this directory, else false.
078         * @throws WvcmException if this ControllableFolder was not created with
079         * {@link #HAS_DESCENDANT_CHECKOUTS} as a wanted property.
080         * */
081        boolean getHasDescendantCheckouts() throws WvcmException;
082    
083        
084        /**
085         * Are there hijacks anywhere in the tree below this directory?
086         */
087        PropertyName<Boolean> HAS_DESCENDANT_HIJACKS =
088            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "has-descendant-hijacks");
089        
090        /**
091         * Get the {@link #HAS_DESCENDANT_HIJACKS} property.
092         * @return true if there are hijacks anywhere in the tree rooted by this directory, else false.
093         * @throws WvcmException if this ControllableFolder was not created with
094         * {@link #HAS_DESCENDANT_HIJACKS} as a wanted property.
095         * */
096        public boolean getHasDescendantHijacks() throws WvcmException;
097    
098        /**
099         * A list of all checkouts in the tree below this directory. Returns a list of CcFile resources.
100         */
101        PropertyName<ResourceList<CcFile>> AGGREGATED_CHECKOUT_LIST =
102            new PropertyName<ResourceList<CcFile>>(PROPERTY_NAMESPACE, "aggregated-checkout-list");
103    
104        /**
105         * Get the {@link #AGGREGATED_CHECKOUT_LIST} property.
106         * @return List of CcFile proxies representing all checkouts in the tree rooted by this directory.
107         * @throws WvcmException if this ControllableFolder was not created with
108         * {@link #AGGREGATED_CHECKOUT_LIST} as a wanted property.
109         * */
110        ResourceList<CcFile> getAggregatedCheckoutList() throws WvcmException;
111        
112        
113        /**
114         * A list of all hijacks in the tree below this directory. Returns a list of CcFile resources.
115         */
116        PropertyName<ResourceList<CcFile>> AGGREGATED_HIJACK_LIST =
117            new PropertyName<ResourceList<CcFile>>(PROPERTY_NAMESPACE, "aggregated-hijack-list");
118        
119        /**
120         * Get the {@link #AGGREGATED_HIJACK_LIST} property.
121         * @return List of CcFile proxies representing all hijacks in the tree rooted by this directory.
122         * @throws WvcmException if this ControllableFolder was not created with
123         * {@link #AGGREGATED_HIJACK_LIST} as a wanted property.
124         * */
125        public ResourceList<CcFile> getAggregatedHijackList() throws WvcmException;
126        
127        /**
128         * Is this directory the root of a ClearCase VOB.
129         */
130        PropertyName<Boolean> IS_VOB_ROOT =
131            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-vob-root");
132        
133        /**
134         * Returns the value of this proxy's {@link #IS_VOB_ROOT} property. 
135         * @return true if the directory is the root of a VOB, else false
136         * @throws WvcmException
137         *             if this proxy doesn't define a value for this property.
138         */
139        public boolean getIsVobRoot() throws WvcmException;
140        
141    }
142