Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/818#discussion_r138815073
--- Diff:
core/src/main/java/org/apache/brooklyn/core/objs/AbstractEntityAdjunct.java ---
@@ -568,6 +570,98 @@ public void setUniqueTag(String uniqueTag) {
return highlightsToReturn;
}
+ /** Records a named highlight against this object, for persistence and
API access.
+ * See common highlights including {@link #HIGHLIGHT_NAME_LAST_ACTION}
and
+ * {@link #HIGHLIGHT_NAME_LAST_CONFIRMATION}.
+ * Also see convenience methods eg {@link #highlightOngoing(String,
String)} and {@link #highlight(String, String, Task)}
+ * and {@link HighlightTuple}.
+ */
+ protected void setHighlight(String name, HighlightTuple tuple) {
+ highlights.put(name, tuple);
+ }
+
+ /** As {@link #setHighlight(String, HighlightTuple)}, convenience for
recording an item which is intended to be ongoing. */
+ protected void highlightOngoing(String name, String description) {
+ highlights.put(name, new HighlightTuple(description, 0, null));
--- End diff --
agree
---