Class CommentAuthorAvatars

java.lang.Object
com.onec.ui.comments.CommentAuthorAvatars

public class CommentAuthorAvatars extends Object
Resolves comment authors' avatar image URLs, live, from the identity catalog — the one the login links to via UiIdentityLink (e.g. Employee) — using whichever of its attributes is marked with an avatar/image field-hint widget (.widget("avatar")/"image"/ "photo"). Resolution is best-effort and read-only: when there is no identity link, no avatar-hinted attribute, or no stored value, it returns nothing and the comments panel falls back to the author's initials. Resolving live (rather than snapshotting onto the comment row) keeps the feed showing each author's current photo and avoids a column migration on onec_comments.
  • Constructor Details

  • Method Details

    • avatarsFor

      public Map<String,String> avatarsFor(Collection<String> authorIds)
      Author record id → avatar URL, for the given ids that have a non-blank one. Empty when unavailable.
    • avatarFor

      public String avatarFor(String authorId)
      The avatar URL for a single author id, or null.