brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Adds support for interfaces tag o...
Date Thu, 19 Nov 2015 14:32:43 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1039#discussion_r45346905
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
---
    @@ -859,6 +869,34 @@ private String makeAsIndentedObject(String yaml) {
             log.debug("Adding manual catalog item to "+mgmt+": "+yaml);
             checkNotNull(yaml, "yaml");
             List<CatalogItemDtoAbstract<?, ?>> result = collectCatalogItems(yaml);
    +
    +        // Iterate over the results to add the interfaces tag. We are doing this here
to be able to get the backward-types.
    +        for (final CatalogItemDtoAbstract<?, ?> item : result) {
    +            if (item.getCatalogItemType().equals(CatalogItemType.ENTITY) || item.getCatalogItemType().equals(CatalogItemType.TEMPLATE))
{
    +                Class<?> type = CatalogUtils.newClassLoadingContext(mgmt, item).tryLoadClass(item.getReferenceType()).orNull();
    --- End diff --
    
    I think it would be easier to create a spec out of the catalog item and get the type from
there. What if referenceType is another catalog item.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message