001    /*
002     * file CcVobTag.java
003     * 
004     * Licensed Materials - Property of IBM
005     * Restricted Materials of IBM 
006     *
007     * com.ibm.rational.wvcm.stp.cc.CcVobTag
008     *
009     * (C) Copyright IBM Corporation 2008, 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.PropertyNameList.PropertyName;
019    import javax.wvcm.WvcmException;
020    
021    /**
022     * <p>
023     * A proxy for a ClearCase VOB tag - the handle by which a ClearCase VOB
024     * is identified and managed.
025     * </p>
026     * <p>
027     * VOB tags are treated as distinct objects from VOBs in order to allow for 
028     * the retrieval of basic VOB info and passing of handles to VOBs without
029     * incurring the overhead of actually opening a real VOB connection.
030     * </p>
031     */
032    
033    public interface CcVobTag extends CcResource {
034    
035        /** Global path for this VOB's storage */
036        PropertyName<String> GLOBAL_PATH =
037            new PropertyName<String>(PROPERTY_NAMESPACE, "global-path");
038        
039        /**
040         * Returns the value of this proxy's {@link #GLOBAL_PATH} property.
041         * 
042         * @return global pathname for this VOB's storage 
043         * @throws WvcmException
044         *             if this proxy doesn't define a value for this property.
045         */
046        public String getGlobalPath() throws WvcmException;
047    
048        /** Name of host on which the VOB resides */
049        PropertyName<String> HOST_NAME =
050            new PropertyName<String>(PROPERTY_NAMESPACE, "host-name");
051        
052        /**
053         * Returns the value of this proxy's {@link #HOST_NAME} property.
054         * 
055         * @return host name for this VOB
056         * @throws WvcmException
057         *             if this proxy doesn't define a value for this property.
058         */
059        public String getHostName() throws WvcmException;
060    
061        /** Host specific path for this VOB's storage */
062        PropertyName<String> HOST_PATH =
063            new PropertyName<String>(PROPERTY_NAMESPACE, "host-path");
064    
065        /**
066         * Returns the value of this proxy's {@link #HOST_PATH} property.
067         * 
068         * @return host specific pathname for this VOB's storage 
069         * @throws WvcmException
070         *             if this proxy doesn't define a value for this property.
071         */
072        public String getHostPath() throws WvcmException;
073    
074        /** Is the VOB represented by this tag mounted? */
075        PropertyName<Boolean> IS_MOUNTED =
076            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-mounted");
077    
078        /**
079         * Returns the value of this proxy's {@link #IS_MOUNTED} property.
080         * 
081         * @return true if the VOB tag is for a VOB that is mounted, else false
082         * @throws WvcmException
083         *             if this proxy doesn't define a value for this property.
084         */
085        boolean getIsMounted() throws WvcmException;
086        
087        /**
088         * Sets the value of this proxy's (@link #IS_MOUNTED) property.
089         * @param mount true to mount this VOB, else false to unmount it
090         */
091        void setIsMounted(boolean mount) throws WvcmException;
092    
093        /** Is this a tag for a project VOB? */
094        PropertyName<Boolean> IS_PROJECT_VOB =
095            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-project-vob");
096    
097        /**
098         * Returns the value of this proxy's {@link #IS_PROJECT_VOB} property.
099         * 
100         * @return true if the VOB tag is for a project VOB, else false
101         * @throws WvcmException
102         *             if this proxy doesn't define a value for this property.
103         */
104        boolean getIsProjectVob() throws WvcmException;
105    
106        /** Is this a tag for a public VOB? */
107        PropertyName<Boolean> IS_PUBLIC =
108            new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-public");
109    
110        /**
111         * Returns the value of this proxy's {@link #IS_PUBLIC} property.
112         * 
113         * @return true if the VOB tag is for a publicVOB, else false
114         * @throws WvcmException
115         *             if this proxy doesn't define a value for this property.
116         */
117        boolean getIsPublic() throws WvcmException;
118    
119        /** 
120         * Mount options specified for this VOB tag in the registry.
121         */
122        PropertyName<String> MOUNT_OPTIONS =
123            new PropertyName<String>(PROPERTY_NAMESPACE, "mount-options");
124    
125        /**
126         * Returns the value of this proxy's {@link #MOUNT_OPTIONS} property.
127         * 
128         * @return string of mount options, null if none were specified.
129         * @throws WvcmException
130         *             if this proxy doesn't define a value for this property.
131         */
132        String getMountOptions() throws WvcmException;
133    
134        /** The VOB to which this tag refers */
135        PropertyName<CcVob> VOB =
136            new PropertyName<CcVob>(PROPERTY_NAMESPACE, "vob");
137    
138        /**
139         * Returns the value of this proxy's {@link #VOB} property.
140         * 
141         * @return the VOB to which this tag refers, as a CcVob instance
142         * @throws WvcmException
143         *             if this proxy doesn't define a value for this property.
144         */
145        CcVob getVob() throws WvcmException;
146        
147        /** The registry region this tag resides in */
148        PropertyName<CcRegistryRegion> REGISTRY_REGION =
149            new PropertyName<CcRegistryRegion>(PROPERTY_NAMESPACE, "vobtag-registry-region");
150        
151        /**
152         * Returns the value of this proxy's {@link #REGISTRY_REGION} property.
153         * 
154         * @return A proxy for the registry region of this VOB tag.
155         * @throws WvcmException 
156         *             if this proxy doesn't define a value for this property.
157         */
158        CcRegistryRegion getRegistryRegion() throws WvcmException;
159    }