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, 2014. 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 * <p>
076 * NOTE: When this property is read/written using a
077 * method with a view context which is a proxy for an
078 * automatic view, it will get/set the state of a
079 * client-side mount for that view. Without a view
080 * context, it gets/sets the per-system, server-side mount.
081 * Specifying a view context that is not a proxy for an
082 * automatic view will result in an error.
083 * </p>
084 */
085 PropertyName<Boolean> IS_MOUNTED =
086 new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-mounted");
087
088 /**
089 * Returns the value of this proxy's {@link #IS_MOUNTED} property.
090 *
091 * @return true if the VOB tag is for a VOB that is mounted, else false
092 * @throws WvcmException
093 * if this proxy doesn't define a value for this property.
094 */
095 boolean getIsMounted() throws WvcmException;
096
097 /**
098 * Sets the value of this proxy's (@link #IS_MOUNTED) property.
099 * @param mount true to mount this VOB, else false to unmount it
100 */
101 void setIsMounted(boolean mount) throws WvcmException;
102
103 /** Is this a tag for a project VOB? */
104 PropertyName<Boolean> IS_PROJECT_VOB =
105 new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-project-vob");
106
107 /**
108 * Returns the value of this proxy's {@link #IS_PROJECT_VOB} property.
109 *
110 * @return true if the VOB tag is for a project VOB, else false
111 * @throws WvcmException
112 * if this proxy doesn't define a value for this property.
113 */
114 boolean getIsProjectVob() throws WvcmException;
115
116 /** Is this a tag for a public VOB? */
117 PropertyName<Boolean> IS_PUBLIC =
118 new PropertyName<Boolean>(PROPERTY_NAMESPACE, "is-public");
119
120 /**
121 * Returns the value of this proxy's {@link #IS_PUBLIC} property.
122 *
123 * @return true if the VOB tag is for a publicVOB, else false
124 * @throws WvcmException
125 * if this proxy doesn't define a value for this property.
126 */
127 boolean getIsPublic() throws WvcmException;
128
129 /**
130 * Mount options specified for this VOB tag in the registry.
131 */
132 PropertyName<String> MOUNT_OPTIONS =
133 new PropertyName<String>(PROPERTY_NAMESPACE, "mount-options");
134
135 /**
136 * Returns the value of this proxy's {@link #MOUNT_OPTIONS} property.
137 *
138 * @return string of mount options, null if none were specified.
139 * @throws WvcmException
140 * if this proxy doesn't define a value for this property.
141 */
142 String getMountOptions() throws WvcmException;
143
144 /** The VOB to which this tag refers */
145 PropertyName<CcVob> VOB =
146 new PropertyName<CcVob>(PROPERTY_NAMESPACE, "vob");
147
148 /**
149 * Returns the value of this proxy's {@link #VOB} property.
150 *
151 * @return the VOB to which this tag refers, as a CcVob instance
152 * @throws WvcmException
153 * if this proxy doesn't define a value for this property.
154 */
155 CcVob getVob() throws WvcmException;
156
157 /** The registry region this tag resides in */
158 PropertyName<CcRegistryRegion> REGISTRY_REGION =
159 new PropertyName<CcRegistryRegion>(PROPERTY_NAMESPACE, "vobtag-registry-region");
160
161 /**
162 * Returns the value of this proxy's {@link #REGISTRY_REGION} property.
163 *
164 * @return A proxy for the registry region of this VOB tag.
165 * @throws WvcmException
166 * if this proxy doesn't define a value for this property.
167 */
168 CcRegistryRegion getRegistryRegion() throws WvcmException;
169 }