brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #818: More on adjunct highlights
Date Thu, 14 Sep 2017 07:24:41 GMT
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


---

Mime
View raw message