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, 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 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 * <li>Automatic. 048 * </bl> 049 * <br> 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 /** This is an automatic view. */ 063 AUTOMATIC; 064 } 065 066 /** Is this a tag for a UCM view? */ 067 PropertyName<Boolean> IS_UCM_VIEW = 068 new PropertyName<Boolean>(PROPERTY_NAMESPACE, 069 "is-ucm-view"); 070 071 /** 072 * Returns the value of this proxy's {@link #IS_UCM_VIEW} property. 073 * 074 * @return true if the view tag is for a UCM view, else false 075 * @throws WvcmException 076 * if this proxy doesn't define a value for this property. 077 */ 078 boolean getIsUcmView() throws WvcmException; 079 080 /** Is the View represented by this tag started? */ 081 PropertyName<Boolean> IS_ACTIVE = 082 new PropertyName<Boolean>(PROPERTY_NAMESPACE, 083 "is-active"); 084 085 /** 086 * Returns the value of this proxy's {@link #IS_ACTIVE} property. 087 * 088 * @return true if the view tag is for an active view, else false 089 * @throws WvcmException 090 * if this proxy doesn't define a value for this property. 091 */ 092 boolean getIsActive() throws WvcmException; 093 094 /** 095 * Sets the value of this proxy's (@link #IS_ACTIVE) property. 096 * @param isActive true to start the server for this view; false to stop it 097 */ 098 void setIsActive(boolean isActive) throws WvcmException; 099 100 101 /** The view to which this tag refers */ 102 PropertyName<CcView> VIEW = 103 new PropertyName<CcView>(PROPERTY_NAMESPACE, "view"); 104 105 /** 106 * Returns the value of this proxy's {@link #VIEW} property. 107 * 108 * @return the view to which this tag refers, as CcView instance 109 * @throws WvcmException 110 * if this proxy doesn't define a value for this property. 111 */ 112 CcView getView() throws WvcmException; 113 114 /** Kind of view to which this tag refers */ 115 PropertyName<ViewType> VIEW_TYPE = 116 new PropertyName<ViewType>(PROPERTY_NAMESPACE, 117 "view-tag-view-type"); 118 119 /** 120 * Returns the value of this proxy's {@link #VIEW_TYPE} property. 121 * 122 * @return Kind of view this tag refers to. 123 * @throws WvcmException 124 * if this proxy doesn't define a value for this property. 125 */ 126 ViewType getViewType () throws WvcmException; 127 128 /** The registry region this tag resides in */ 129 PropertyName<CcRegistryRegion> REGISTRY_REGION = 130 new PropertyName<CcRegistryRegion>(PROPERTY_NAMESPACE, "viewtag-registry-region"); 131 132 /** 133 * Returns the value of this proxy's {@link #REGISTRY_REGION} property. 134 * 135 * @return The registry region of this view tag. 136 * @throws WvcmException 137 * if this proxy doesn't define a value for this property. 138 */ 139 CcRegistryRegion getRegistryRegion() throws WvcmException; 140 }