Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/595#discussion_r28545867
  
    --- Diff: docs/guide/yaml/yaml-reference.md ---
    @@ -142,11 +145,17 @@ However you can combine locations using `multi`:
     Dependency injection other powerful references and types can be built up 
within the YAML using the
     concise DSL defined here:
      
    -* `$brooklyn:component("ID")` refers to a Brooklyn component with the 
given ID; you can then access the following subfields:
    -  * `.attributeWhenReady("sensor")` will store a future which will be 
blocked when it is accessed,
    -    until the given `sensor` from the component `ID` has a "truthy" (i.e. 
non-trivial, non-empty, non-zero) value
    -  * `.config("key")` will insert the value set against the given key at 
this entity (or nearest ancestor);
    -    can be used to supply config at the root which is used in multiple 
places in the plan
    +* `$brooklyn:attributeWhenReady("sensor")` will store a future which will 
be blocked when it is accessed,
    +  until the given `sensor` from the component `ID` has a "truthy" (i.e. 
non-trivial, non-empty, non-zero) value
    +* `$brooklyn:config("key")` will insert the value set against the given 
key at this entity (or nearest ancestor);
    +  can be used to supply config at the root which is used in multiple 
places in the plan
    +* `$brooklyn:sensor("sensor.name")` returns the given sensor on the 
current entity if found, or an untyped (Object) sensor;
    +  `$brooklyn:sensor("io.brooklyn.ContainingEntityClass", "sensor.name")` 
returns the strongly typed sensor defined in the given class
    +* `$brooklyn:component("ID")` refers to a Brooklyn component with the 
given ID; you can then access the following subfields,
    --- End diff --
    
    Going through the rest of the PR, I see several examples of 
`brooklyn:sensor(...)` from enrichers/policies. I hadn't used those much 
before, so now see that accessing "this" entity is more common than I thought.
    
    However, still happy for it to show the `component("ID")` first in the docs.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to