Esempio n. 1
0
  @Override
  protected PropertySheet clone() throws CloneNotSupportedException {
    PropertySheet ps = (PropertySheet) super.clone();

    ps.registeredProperties = new HashMap<String, S4PropWrapper>(this.registeredProperties);
    ps.propValues = new HashMap<String, Object>(this.propValues);

    ps.rawProps = new HashMap<String, Object>(this.rawProps);

    // make deep copy of raw-lists
    for (String regProp : ps.getRegisteredProperties()) {
      if (getType(regProp) == PropertyType.COMPONENT_LIST) {
        ps.rawProps.put(regProp, ConfigurationManagerUtils.toStringList(rawProps.get(regProp)));
        ps.propValues.put(regProp, null);
      }
    }

    ps.cm = cm;
    ps.owner = null;
    ps.instanceName = this.instanceName;

    return ps;
  }