brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Camp parsing cleanup and fixes
Date Wed, 14 Oct 2015 20:49:46 GMT
Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/955#discussion_r42051005
  
    --- Diff: usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
---
    @@ -350,35 +226,19 @@ protected String getJavaType() {
             if (childLocations != null)
                 spec.locations(childLocations);
     
    -        typeResolver.decorateSpec(this, spec);
    -        configureEntityConfig(spec);
    +        decoreateSpec(spec);
         }
     
    -    /** returns new *uninitialised* entity, with just a few of the pieces from the spec;
    -     * initialisation occurs soon after, in {@link #initEntity(ManagementContext, Entity,
EntitySpec)},
    -     * inside an execution context and after entity ID's are recognised
    -     */
    -    protected <T extends Entity> T newEntity(EntitySpec<T> spec) {
    -        Class<? extends T> entityImpl = (spec.getImplementation() != null) ? spec.getImplementation()
: mgmt.getEntityManager().getEntityTypeRegistry().getImplementedBy(spec.getType());
    -        InternalEntityFactory entityFactory = ((ManagementContextInternal)mgmt).getEntityFactory();
    -        T entity = entityFactory.constructEntity(entityImpl, spec);
    -
    -        String planId = (String)spec.getConfig().get(BrooklynCampConstants.PLAN_ID);
    -        if (planId != null) {
    -            entity.config().set(BrooklynCampConstants.PLAN_ID, planId);
    -        }
    -
    -        if (spec.getLocations().size() > 0) {
    -            ((AbstractEntity)entity).addLocations(spec.getLocations());
    -        }
    -
    -        if (spec.getParent() != null) entity.setParent(spec.getParent());
    +    private <T extends Entity> void decoreateSpec(EntitySpec<T> spec) {
    --- End diff --
    
    Typo in method name: `decoreate`.


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