001 /* 002 * file CcConfigSpec.java 003 * 004 * 005 * Licensed Materials - Property of IBM 006 * Restricted Materials of IBM 007 * 008 * com.ibm.rational.wvcm.stp.cc.CcConfigSpec 009 * 010 * (C) Copyright IBM Corporation 2004, 2014. All Rights Reserved. 011 * Note to U.S. Government Users Restricted Rights: Use, duplication or 012 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 013 */ 014 015 package com.ibm.rational.wvcm.stp.cc; 016 017 /** 018 * <p> 019 * The configuration specification ("config spec") for a ClearCase view. 020 * A view's config spec determines which elements appear in a view, 021 * and which version of each element is selected by the view. 022 * For snapshot and web views, the config spec also determines which 023 * files are loaded in the view. 024 * </p> 025 * <p> 026 * A ConfigSpec has two sections, one containing element rules 027 * and one containing load rules. Methods are provided to manipulate 028 * each of these sections. 029 * </p> 030 * <p> 031 * CcView.getConfigSpec returns a ConfigSpec object. 032 * ConfigSpec objects can be passed into CcView.doSetConfigSpec 033 * to change the configuration specification of a view. 034 * </p> 035 */ 036 public interface CcConfigSpec 037 { 038 /** 039 * Returns the "Element Rules" section (everything except the load rules) 040 * of the configuration specification. 041 * 042 * @return the element rules as a single newline-separated string 043 * Returns empty string if none. 044 */ 045 public String getElementRules(); 046 047 /** 048 * Returns the automatically-generated UCM section of the configuration 049 * specification. 050 * 051 * @return the UCM-generated element rules. 052 * Returns empty string if none (i.e. if not a UCM view.) 053 */ 054 public String getUcmElementRules(); 055 056 /** 057 * Returns the load-rules section of a configuration specification. 058 * 059 * @return the load-rules, as a single newline-separated string. 060 * Returns empty string if none (i.e. if not a snapshot view or a web view). 061 */ 062 public String getLoadRules(); 063 064 /** 065 * Sets the "Element Rules" (everything except the load rules) section of a ConfigSpec object. 066 * Note that the ConfigSpec object needs to be passed into 067 * CcView.doSetConfigSpec in order for the altered config spec 068 * to actually be set in a particular view. 069 * 070 * @param elementRules a newline-separated string representing the new element rules 071 */ 072 public void setElementRules(String elementRules); 073 074 /** 075 * Sets the flag in in order to force an automatic view update to begin on 076 * load rule changes - If true, force a load to start... if false do not. 077 * The default behavior for automatic views is to NOT start an update. This 078 * method must be explicitly called by clients to initiate an update on load 079 * rule changes. 080 * 081 * @param force 082 */ 083 public void setForceAutomaticViewUpdateFlag(boolean force); 084 085 /** 086 * Sets the load-rules section of a configuration specification. 087 * Note that the ConfigSpec object needs to be passed into 088 * CcView.doSetConfigSpec in order for the altered config spec 089 * to actually be set in a particular view. 090 * 091 * @param loadRules a newline-separated string representing the new load rules 092 */ 093 public void setLoadRules(String loadRules); 094 }