Package com.onec.ui.comments
Class CommentAuthorAvatars
java.lang.Object
com.onec.ui.comments.CommentAuthorAvatars
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 Summary
ConstructorsConstructorDescriptionCommentAuthorAvatars(UiLayout layout, MetadataRegistry registry, FieldHintResolver fieldHints, org.jdbi.v3.core.Jdbi jdbi) -
Method Summary
Modifier and TypeMethodDescriptionThe avatar URL for a single author id, or null.avatarsFor(Collection<String> authorIds) Author record id → avatar URL, for the given ids that have a non-blank one.
-
Constructor Details
-
CommentAuthorAvatars
public CommentAuthorAvatars(UiLayout layout, MetadataRegistry registry, FieldHintResolver fieldHints, org.jdbi.v3.core.Jdbi jdbi)
-
-
Method Details
-
avatarsFor
Author record id → avatar URL, for the given ids that have a non-blank one. Empty when unavailable. -
avatarFor
The avatar URL for a single author id, or null.
-