brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <>
Subject [GitHub] incubator-brooklyn pull request: BROOKLYN-49: Catalogue persistenc...
Date Fri, 19 Sep 2014 17:44:00 GMT
Github user sjcorbett commented on a diff in the pull request:
    --- Diff: core/src/main/java/brooklyn/catalog/internal/ ---
    @@ -18,67 +18,92 @@
     package brooklyn.catalog.internal;
    +import java.util.Map;
    +import java.util.Set;
     import javax.annotation.Nonnull;
     import javax.annotation.Nullable;
    +import brooklyn.basic.AbstractBrooklynObject;
     import brooklyn.catalog.CatalogItem;
     import brooklyn.catalog.internal.BasicBrooklynCatalog.BrooklynLoaderTracker;
    +import brooklyn.entity.rebind.BasicCatalogItemRebindSupport;
    +import brooklyn.entity.rebind.RebindSupport;
    +import brooklyn.mementos.CatalogItemMemento;
    +import brooklyn.util.flags.FlagUtils;
    +import brooklyn.util.flags.SetFromFlag;
    -public abstract class CatalogItemDtoAbstract<T,SpecT> implements CatalogItem<T,SpecT>
    +public abstract class CatalogItemDtoAbstract<T, SpecT> extends AbstractBrooklynObject
implements CatalogItem<T, SpecT> {
         // TODO are ID and registeredType the same?
    -    String id;
    -    String registeredType;
    -    String javaType;
    -    String name;
    -    String description;
    -    String iconUrl;
    -    String version;
    -    CatalogLibrariesDto libraries;
    -    String planYaml;
    +    @SetFromFlag Set<Object> tags = Sets.newLinkedHashSet();
    --- End diff --
    Regarding comment 1, I made all of the fields flags so that `BasicCatalogItemRebindSupport`
could set them when `reconstruct` was called. Would you recommend any other method?
    Regarding comments 2, 3 and 4, I would really like the catalogue domain objects to be
reworked. They were quite a pain to work with! I came to the same conclusion as you regarding
`CatalogItemDtoAbstract` and `CatalogItemMemento`. I didn't consider whether `CatalogItemDto`
needed to extends `CatalogItem`.

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

View raw message