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

    https://github.com/apache/brooklyn-server/pull/338#discussion_r94613348
  
    --- Diff: 
api/src/main/java/org/apache/brooklyn/api/internal/AbstractBrooklynObjectSpec.java
 ---
    @@ -99,23 +102,35 @@ public SpecT displayName(String val) {
         }
         
         public SpecT catalogItemId(String val) {
    -        catalogItemId = val;
    +        catalogItemIdStack.clear();
    +        return nestCatalogItemId(val);
    +    }
    +
    +    public SpecT catalogItemIds(List<String> ids) {
    +        catalogItemIdStack.clear();
    +        catalogItemIdStack.addAll(ids);
             return self();
         }
    -    // TODO in many places (callers to this method) we prefer a wrapper 
item ID;
    -    // that is right, because the wrapper's defn will refer to the wrapped,
    -    // but we might need also to collect the item ID's so that *all* can 
be searched.
    -    // e.g. if R3 references R2 which references R1 any one of these might 
supply config keys 
    -    // referencing resources or types in their local bundles. 
    +
    +    /**
    +     * Adds (stacks) the catalog item id of a wrapping specification.
    +     * Does nothing if the value is null.
    +     *
    +     * Used when we to collect nested item ID's so that *all* can be 
searched.
    +     * e.g. if R3 references R2 which references R1 any one of these might 
supply config keys
    --- End diff --
    
    It's not a mere reference but R3 **extending** R2, etc.


---
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