public void readFrom(UserGroupRestRep userGroupRep) {
      this.id = stringId(userGroupRep);
      this.name = userGroupRep.getName();
      this.domain = userGroupRep.getDomain();

      if (!CollectionUtils.isEmpty(userGroupRep.getAttributes())) {
        for (UserAttributeParam userAttributeMapping : userGroupRep.getAttributes()) {
          if (userAttributeMapping != null) {
            AttributeMapping mapping = new AttributeMapping();
            mapping.key = userAttributeMapping.getKey();
            mapping.values = StringUtils.join(userAttributeMapping.getValues(), "\n");
            this.attributes.add(mapping);
          }
        }
      }
    }