summaryrefslogtreecommitdiffstats
path: root/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/type/ConfigurationUpdate.java
blob: 9cfc9803997cfeffd63086c91c2217267b866773 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package org.openecomp.config.type;

public class ConfigurationUpdate extends ConfigurationQuery {
  private String value;
  private boolean nodeOverride;

  public ConfigurationUpdate value(String val) {
    value = val;
    return this;
  }

  public ConfigurationUpdate nodeOverride(boolean val) {
    nodeOverride = val;
    return this;
  }

  /**
   * Gets value.
   *
   * @return the value
   */
  public String getValue() {
    if (value != null && value.split(",").length > 1 && !value.matches("^\\[.*\\]$")) {
      return "[" + value + "]";
    }
    return value;
  }

  public boolean isNodeOverride() {
    return nodeOverride;
  }

}