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 * (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 import com.ibm.rational.wvcm.stpex.StpExEnumeration; 022 023 /** 024 * <p> 025 * A proxy for a ClearCase view tag - the handle by which a ClearCase view 026 * is identified and managed. 027 * </p> 028 * <p> 029 * View tags are treated as distinct objects from views in order to allow the 030 * for retrieval of basic view info and passing of handles to views without 031 * incurring the overhead of actually opening a real view connection. 032 * </p> 033 */ 034 035 public interface CcViewTag extends CcResource { 036 037 /** 038 * Type of ClearCase view. 039 * View type is one of 040 * <bl> 041 * <li>Dynamic. 042 * </li> 043 * <li>Snapshot. 044 * </li> 045 * <li>Web. 046 * </li> 047 * </bl> 048 * For more information, see the ClearCase Reference Manual. 049 */ 050 enum ViewType implements StpExEnumeration { 051 /** This is a dynamic view. */ 052 DYNAMIC, 053 054 /** This is a snapshot view */ 055 SNAPSHOT, 056 057 /** This a web view. */ 058 WEB; 059 } 060 061 /** Is this a tag for a UCM view? */ 062 PropertyName<Boolean> IS_UCM_VIEW = 063 new PropertyName<Boolean>(PROPERTY_NAMESPACE, 064 "is-ucm-view"); 065 066 /** 067 * Returns the value of this proxy's {@link #IS_UCM_VIEW} property. 068 * 069 * @return true if the view tag is for a UCM view, else false 070 * @throws WvcmException 071 * if this proxy doesn't define a value for this property. 072 */ 073 boolean getIsUcmView() throws WvcmException; 074 075 /** Is the View represented by this tag started? */ 076 PropertyName<Boolean> IS_ACTIVE = 077 new PropertyName<Boolean>(PROPERTY_NAMESPACE, 078 "is-active"); 079 080 /** 081 * Returns the value of this proxy's {@link #IS_ACTIVE} property. 082 * 083 * @return true if the view tag is for an active view, else false 084 * @throws WvcmException 085 * if this proxy doesn't define a value for this property. 086 */ 087 boolean getIsActive() throws WvcmException; 088 089 /** 090 * Sets the value of this proxy's (@link #IS_ACTIVE) property. 091 * @param true to start the server for this view; false to stop it 092 */ 093 void setIsActive(boolean isActive) throws WvcmException; 094 095 096 /** The view to which this tag refers */ 097 PropertyName<CcView> VIEW = 098 new PropertyName<CcView>(PROPERTY_NAMESPACE, "view"); 099 100 /** 101 * Returns the value of this proxy's {@link #VIEW} property. 102 * 103 * @return the view to which this tag refers, as CcView instance 104 * @throws WvcmException 105 * if this proxy doesn't define a value for this property. 106 */ 107 CcView getView() throws WvcmException; 108 109 /** Kind of view to which this tag refers */ 110 PropertyName<ViewType> VIEW_TYPE = 111 new PropertyName<ViewType>(PROPERTY_NAMESPACE, 112 "view-tag-view-type"); 113 114 /** 115 * Returns the value of this proxy's {@link #VIEW_TYPE} property. 116 * 117 * @return Kind of view this tag refers to. 118 * @throws WvcmException 119 * if this proxy doesn't define a value for this property. 120 */ 121 ViewType getViewType () throws WvcmException; 122 123 /** The registry region this tag resides in */ 124 PropertyName<CcRegistryRegion> REGISTRY_REGION = 125 new PropertyName<CcRegistryRegion>(PROPERTY_NAMESPACE, "viewtag-registry-region"); 126 127 /** 128 * Returns the value of this proxy's {@link #REGISTRY_REGION} property. 129 * 130 * @return The registry region of this view tag. 131 * @throws WvcmException 132 * if this proxy doesn't define a value for this property. 133 */ 134 CcRegistryRegion getRegistryRegion() throws WvcmException; 135 }