001 /*
002 * file CcViewTag.java
003 *
004 * Licensed Materials - Property of IBM
005 * Restricted Materials of IBM
006 *
007 * com.ibm.rational.wvcm.stp.cc.CcViewTag
008 *
009 * © Copyright IBM Corporation 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.WvcmException;
019 import javax.wvcm.PropertyNameList.PropertyName;
020
021 import com.ibm.rational.wvcm.stpex.StpExBase;
022 import com.ibm.rational.wvcm.stpex.StpExEnumeration;
023 import com.ibm.rational.wvcm.stpex.StpExEnumerationBase;
024
025 /**
026 * <p>
027 * A proxy for a ClearCase view tag - the handle by which a ClearCase view
028 * is identified and managed.
029 * </p>
030 * <p>
031 * View tags are treated as distinct objects from views in order to allow the
032 * for retrieval of basic view info and passing of handles to views without
033 * incurring the overhead of actually opening a real view connection.
034 * </p>
035 */
036
037 public interface CcViewTag extends CcResource {
038
039 /**
040 * Type of ClearCase view.
041 * View type is one of
042 * <bl>
043 * <li>Dynamic.
044 * </li>
045 * <li>Snapshot.
046 * </li>
047 * <li>Web.
048 * </li>
049 * </bl>
050 * For more information, see the ClearCase Reference Manual.
051 */
052 enum ViewType implements StpExEnumeration {
053 /** This is a dynamic view. */
054 DYNAMIC,
055
056 /** This is a snapshot view */
057 SNAPSHOT,
058
059 /** This a web view. */
060 WEB;
061 }
062
063 /** Is this a tag for a UCM view? */
064 PropertyName<Boolean> IS_UCM_VIEW =
065 new PropertyName<Boolean>(PROPERTY_NAMESPACE,
066 "is-ucm-view");
067
068 /**
069 * Returns the value of this proxy's {@link #IS_UCM_VIEW} property.
070 *
071 * @return true if the view tag is for a UCM view, else false
072 * @throws WvcmException
073 * if this proxy doesn't define a value for this property.
074 */
075 boolean getIsUcmView() throws WvcmException;
076
077 /** The view to which this tag refers */
078 PropertyName<CcView> VIEW =
079 new PropertyName<CcView>(PROPERTY_NAMESPACE, "view");
080
081 /**
082 * Returns the value of this proxy's {@link #VIEW} property.
083 *
084 * @return the view to which this tag refers, as CcView instance
085 * @throws WvcmException
086 * if this proxy doesn't define a value for this property.
087 */
088 CcView getView() throws WvcmException;
089
090 /** Kind of view to which this tag refers */
091 PropertyName<ViewType> VIEW_TYPE =
092 new PropertyName<ViewType>(PROPERTY_NAMESPACE,
093 "view-tag-view-type");
094
095 /**
096 * Returns the value of this proxy's {@link #VIEW_TYPE} property.
097 *
098 * @return Kind of view this tag refers to.
099 * @throws WvcmException
100 * if this proxy doesn't define a value for this property.
101 */
102 ViewType getViewType () throws WvcmException;
103
104 /** The registry region this tag resides in */
105 PropertyName<CcRegistryRegion> REGISTRY_REGION =
106 new PropertyName<CcRegistryRegion>(PROPERTY_NAMESPACE, "viewtag-registry-region");
107
108 /**
109 * Returns the value of this proxy's {@link #REGISTRY_REGION} property.
110 *
111 * @return The registry region of this view tag.
112 * @throws WvcmException
113 * if this proxy doesn't define a value for this property.
114 */
115 CcRegistryRegion getRegistryRegion() throws WvcmException;
116 }