/**
     * Take all values from this object.
     *
     * @param user The user object to take values from.
     */
    protected void setAll(Digest digest) {
      m_id = digest.getId();

      m_properties = new BaseResourcePropertiesEdit();
      m_properties.addAll(digest.getProperties());

      m_ranges = new Hashtable();
      // %%% deep enough? -ggolden
      m_ranges.putAll(((BaseDigest) digest).m_ranges);
    }
Exemplo n.º 2
0
  /**
   * Construct as a copy of another.
   *
   * @param other The other to copy.
   * @param site The site in which this group lives.
   * @param exact If true, we copy id - else we generate a new one.
   */
  protected BaseGroup(BaseSiteService siteService, Group other, Site site, boolean exact) {
    this.siteService = siteService;
    if (site == null) M_log.warn("BaseGroup(other, site...) created with null site");

    BaseGroup bOther = (BaseGroup) other;

    m_site = (Site) site;

    if (exact) {
      m_id = bOther.m_id;
    } else {
      m_id = IdManager.createUuid();
    }

    m_title = bOther.m_title;
    m_description = bOther.m_description;

    m_properties = new BaseResourcePropertiesEdit();
    m_properties.addAll(other.getProperties());
    ((BaseResourcePropertiesEdit) m_properties)
        .setLazy(((BaseResourceProperties) other.getProperties()).isLazy());
  }