private void addProperty()

in priam/src/main/java/com/netflix/priam/configSource/SimpleDBConfigSource.java [98:114]


    private void addProperty(Item item) {
        Iterator<Attribute> attrs = item.getAttributes().iterator();
        String prop = "";
        String value = "";
        String dc = "";
        while (attrs.hasNext()) {
            Attribute att = attrs.next();
            if (att.getName().equals(Attributes.PROPERTY)) prop = att.getValue();
            else if (att.getName().equals(Attributes.PROPERTY_VALUE)) value = att.getValue();
            else if (att.getName().equals(Attributes.REGION)) dc = att.getValue();
        }
        // Ignore, if not this region
        if (StringUtils.isNotBlank(dc) && !dc.equals(getRegion())) return;
        // Override only if region is specified
        if (data.containsKey(prop) && StringUtils.isBlank(dc)) return;
        data.put(prop, value);
    }