brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Make YAML more powerful
Date Thu, 16 Apr 2015 17:12:55 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: core/src/main/java/brooklyn/enricher/basic/ ---
    @@ -0,0 +1,128 @@
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package brooklyn.enricher.basic;
    +import java.util.Map;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +import brooklyn.config.ConfigKey;
    +import brooklyn.entity.Entity;
    +import brooklyn.entity.basic.ConfigKeys;
    +import brooklyn.entity.basic.EntityLocal;
    +import brooklyn.event.AttributeSensor;
    +import brooklyn.event.Sensor;
    +import brooklyn.event.SensorEvent;
    +import brooklyn.event.SensorEventListener;
    +import brooklyn.event.basic.BasicSensorEvent;
    +import brooklyn.util.collections.MutableList;
    +import brooklyn.util.flags.SetFromFlag;
    +import brooklyn.util.text.StringEscapes;
    +import brooklyn.util.text.Strings;
    +//@Catalog(name="Transformer", description="Transforms attributes of an entity; see Enrichers.builder().transforming(...)")
    +public class Joiner<T> extends AbstractEnricher implements SensorEventListener<T>
    +    private static final Logger LOG = LoggerFactory.getLogger(Joiner.class);
    +    public static ConfigKey<Entity> PRODUCER = ConfigKeys.newConfigKey(Entity.class,
    +    public static ConfigKey<Sensor<?>> SOURCE_SENSOR = ConfigKeys.newConfigKey(new
TypeToken<Sensor<?>>() {}, "enricher.sourceSensor");
    +    public static ConfigKey<Sensor<?>> TARGET_SENSOR = ConfigKeys.newConfigKey(new
TypeToken<Sensor<?>>() {}, "enricher.targetSensor");
    +    @SetFromFlag("separator")
    +    public static ConfigKey<String> SEPARATOR = ConfigKeys.newStringConfigKey("enricher.joiner.separator",
"Separator string to insert between each argument", ",");
    +    @SetFromFlag("quote")
    +    public static ConfigKey<Boolean> QUOTE = ConfigKeys.newBooleanConfigKey("enricher.joiner.quote",
"Whether to bash-escape each parameter and wrap in double-quotes, defaulting to true", true);
    +    @SetFromFlag("minimum")
    +    public static ConfigKey<Integer> MINIMUM = ConfigKeys.newIntegerConfigKey("enricher.joiner.minimum",
"Minimum number of elements to join; if fewer than this, sets null; default 0 (no minimum)");
    +    @SetFromFlag("maximum")
    +    public static ConfigKey<Integer> MAXIMUM = ConfigKeys.newIntegerConfigKey("enricher.joiner.maximum",
"Maximum number of elements to join; default null means all elements always taken");
    +//    protected Function<? super SensorEvent<T>, ? extends U> transformation;
    --- End diff --
    Delete commented out code, or include a TODO comment to say why it's useful.

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