001 /* 002 * file ListVobsDemo.java 003 * 004 * Licensed Materials - Property of IBM 005 * Restricted Materials of IBM - you are allowed to copy, modify and 006 * redistribute this file as part of any program that interfaces with 007 * IBM Rational CM API. 008 * 009 * com.ibm.rational.stp.client.samples.cc.ListVobsDemo 010 * 011 * © Copyright IBM Corporation 2008. All Rights Reserved. 012 * Note to U.S. Government Users Restricted Rights: Use, duplication or 013 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 014 */ 015 016 package com.ibm.rational.stp.client.samples.cc; 017 018 import javax.wvcm.Resource; 019 import javax.wvcm.PropertyRequestItem.PropertyRequest; 020 021 import com.ibm.rational.wvcm.stp.cc.CcProvider; 022 import com.ibm.rational.wvcm.stp.cc.CcRegistryRegion; 023 import com.ibm.rational.wvcm.stp.cc.CcVobTag; 024 025 /** 026 * TODO 027 */ 028 public class ListVobsDemo extends CcDemoBase { 029 030 private CcProvider m_provider; 031 032 /* (non-Javadoc) 033 * @see junit.framework.TestCase#setUp() 034 */ 035 protected void setUp() throws Exception { 036 super.setUp(); 037 m_provider = getClearCaseProvider(); 038 } 039 040 /* (non-Javadoc) 041 * @see junit.framework.TestCase#tearDown() 042 */ 043 protected void tearDown() throws Exception { 044 super.tearDown(); 045 } 046 047 /** 048 * List the VOBs (actually VOB tags) in the CM Server's default ClearCase 049 * registry region. 050 */ 051 public void testListVobs() throws Exception { 052 PropertyRequest wantedProps = new PropertyRequest( 053 CcRegistryRegion.VOB_TAG_LIST.nest( 054 Resource.DISPLAY_NAME)); 055 CcRegistryRegion region = m_provider.doGetDefaultCcRegistryRegion(wantedProps); 056 057 for (CcVobTag vobTag : region.getVobTagList()) { 058 trace(vobTag.getDisplayName()); 059 } 060 } 061 }