Пример #1
0
  private List<Attribute> createAttributesForShare(Share share) {
    List<Attribute> attributes = new ArrayList<Attribute>();

    attributes.add(new Attribute("id", share.getId()));
    attributes.add(new Attribute("url", shareService.getShareUrl(share)));
    attributes.add(new Attribute("username", share.getUsername()));
    attributes.add(new Attribute("created", StringUtil.toISO8601(share.getCreated())));
    attributes.add(new Attribute("visitCount", share.getVisitCount()));
    attributes.add(new Attribute("description", share.getDescription()));
    attributes.add(new Attribute("expires", StringUtil.toISO8601(share.getExpires())));
    attributes.add(new Attribute("lastVisited", StringUtil.toISO8601(share.getLastVisited())));

    return attributes;
  }