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 * © Copyright IBM Corporation 2004, 2008. 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 import java.util.List;
018
019 import javax.wvcm.WvcmException;
020
021 /**
022 * <p>
023 * The configuration specification ("config spec") for a ClearCase view.
024 * A view's config spec determines which elements appear in a view,
025 * and which version of each element is selected by the view.
026 * For snapshot and web views, the config spec also determines which
027 * files are loaded in the view.
028 * </p>
029 * <p>
030 * A ConfigSpec has two sections, one containing element rules
031 * and one containing load rules. Methods are provided to manipulate
032 * each of these sections.
033 * </p>
034 * <p>
035 * CcView.getConfigSpec returns a ConfigSpec object.
036 * ConfigSpec objects can be passed into CcView.doSetConfigSpec
037 * to change the configuration specification of a view.
038 * </p>
039 */
040 public interface CcConfigSpec
041 {
042 /**
043 * Returns the "Element Rules" section (everything except the load rules)
044 * of the configuration specification.
045 *
046 * @return the element rules as a single newline-separated string
047 * Returns empty string if none.
048 */
049 public String getElementRules();
050
051 /**
052 * Returns the automatically-generated UCM section of the configuration
053 * specification.
054 *
055 * @return the UCM-generated element rules.
056 * Returns empty string if none (i.e. if not a UCM view.)
057 */
058 public String getUcmElementRules();
059
060 /**
061 * Returns the load-rules section of a configuration specification.
062 *
063 * @return the load-rules, as a single newline-separated string.
064 * Returns empty string if none (i.e. if not a snapshot view or a web view).
065 */
066 public String getLoadRules();
067
068 /**
069 * Sets the "Element Rules" (everything except the load rules) section of a ConfigSpec object.
070 * Note that the ConfigSpec object needs to be passed into
071 * CcView.doSetConfigSpec in order for the altered config spec
072 * to actually be set in a particular view.
073 *
074 * @param elementRules a newline-separated string representing the new element rules
075 */
076 public void setElementRules(String elementRules);
077
078 /**
079 * Sets the load-rules section of a configuration specification.
080 * Note that the ConfigSpec object needs to be passed into
081 * CcView.doSetConfigSpec in order for the altered config spec
082 * to actually be set in a particular view.
083 *
084 * @param loadRules a newline-separated string representing the new load rules
085 */
086 public void setLoadRules(String loadRules);
087
088 /**
089 * @deprecated For internal use only
090 */
091 public String toXml() throws WvcmException;
092
093 }