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, 2015. 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 * Note that it is necessary to set the CONFIG_SPEC property on the
033 * desired view proxy and write that proxy's properties in order for
034 * this change to take effect.
035 * </p>
036 */
037 public interface CcConfigSpec
038 {
039 /**
040 * Returns the "Element Rules" section (everything except the load rules)
041 * of the configuration specification.
042 *
043 * @return the element rules as a single newline-separated string
044 * Returns empty string if none.
045 */
046 public String getElementRules();
047
048 /**
049 * Returns the automatically-generated UCM section of the configuration
050 * specification.
051 *
052 * @return the UCM-generated element rules.
053 * Returns empty string if none (i.e. if not a UCM view.)
054 */
055 public String getUcmElementRules();
056
057 /**
058 * Returns the load-rules section of a configuration specification.
059 *
060 * @return the load-rules, as a single newline-separated string.
061 * Returns empty string if none (i.e. if not a snapshot view or a web view).
062 */
063 public String getLoadRules();
064
065 /**
066 * Sets the "Element Rules" (everything except the load rules) section of a ConfigSpec object.
067 *
068 * Config specs are manipulated through the property mechanism.
069 *
070 * For automatic views, setForceAutomaticViewUpdateFlag must be set to true for
071 * setElementRules to take effect
072 *
073 * @param elementRules a newline-separated string representing the new element rules
074 */
075 public void setElementRules(String elementRules);
076
077 /**
078 * If true (default), element rules and load rules are updated in the config spec.
079 * If false, only load rules are updated in the config spec.
080 *
081 * @param force
082 */
083 public void setForceAutomaticViewUpdateFlag(boolean force);
084
085 /**
086 * Sets the load-rules section of a configuration specification.
087 *
088 * Config specs are manipulated through the property mechanism.
089 *
090 *
091 * @param loadRules a newline-separated string representing the new load rules
092 */
093 public void setLoadRules(String loadRules);
094
095 /**
096 * Returns the configuration specification minus the auto generated UCM section, if any.
097 *
098 * @return the configuration specification, as a single newline-separated string.
099 */
100 public String getCSpec();
101
102 /**
103 * Sets the configuration specification after adding the auto generated UCM
104 * section, if any. Note that it is necessary to set the CONFIG_SPEC
105 * property on the desired view proxy and write that proxy's properties in
106 * order for this change to take effect.
107 *
108 * @param cspec a newline-separated string representing the new load configuration specification
109 */
110 public void setCSpec(String cspec);
111
112 /**
113 * Returns the filtered load-rules section (i.e free from comments, if any)
114 * of a configuration specification.
115 *
116 * @return the filtered load-rules, as a single newline-separated string.
117 * Returns empty string if none (i.e. if not a snapshot view or a web view).
118 */
119 public String getLoadRulesNoComments();
120 }