/** * Obtians the attribute value without variable expansion. * * @return * null if the attribute is not found. */ public String rawAttribute(String name) { String value = attributes.get(name); if (value==null && model.attributes.containsKey(name)) { value = model.attributes.get(name).getDefaultValue(); } return value; }
/** * Returns the map of attributes names and values for attributes which * value is neither null or the default value. These attributes are * considered having a non default value and must be written out. * * @return map of attributes indexed by name that must be persisted */ private Map<String, String> attributesToWrite() { Map<String, String> attributesToWrite = new HashMap<String, String>(); Map<String, String> localAttr = new HashMap<String, String>(attributes); for (Map.Entry<String, String> a : localAttr.entrySet()) { ConfigModel.AttributeLeaf am = model.attributes.get(a.getKey()); String dv = am.getDefaultValue(); if (dv==null || !dv.equals(a.getValue())) { attributesToWrite.put(a.getKey(), a.getValue()); } } return attributesToWrite; }
/** * Returns the map of attributes names and values for attributes which * value is neither null or the default value. These attributes are * considered having a non default value and must be written out. * * @return map of attributes indexed by name that must be persisted */ private Map<String, String> attributesToWrite() { Map<String, String> attributesToWrite = new HashMap<String, String>(); Map<String, String> localAttr = new HashMap<String, String>(attributes); for (Map.Entry<String, String> a : localAttr.entrySet()) { ConfigModel.AttributeLeaf am = model.attributes.get(a.getKey()); String dv = am.getDefaultValue(); if (dv==null || !dv.equals(a.getValue())) { attributesToWrite.put(a.getKey(), a.getValue()); } } return attributesToWrite; }
/** * Returns the map of attributes names and values for attributes which * value is neither null or the default value. These attributes are * considered having a non default value and must be written out. * * @return map of attributes indexed by name that must be persisted */ private Map<String, String> attributesToWrite() { Map<String, String> attributesToWrite = new HashMap<String, String>(); Map<String, String> localAttr = new HashMap<String, String>(attributes); for (Map.Entry<String, String> a : localAttr.entrySet()) { ConfigModel.AttributeLeaf am = model.attributes.get(a.getKey()); String dv = am.getDefaultValue(); if (dv==null || !dv.equals(a.getValue())) { attributesToWrite.put(a.getKey(), a.getValue()); } } return attributesToWrite; }
/** * Returns the map of attributes names and values for attributes which * value is neither null or the default value. These attributes are * considered having a non default value and must be written out. * * @return map of attributes indexed by name that must be persisted */ private Map<String, String> attributesToWrite() { Map<String, String> attributesToWrite = new HashMap<String, String>(); Map<String, String> localAttr = new HashMap<String, String>(attributes); for (Map.Entry<String, String> a : localAttr.entrySet()) { ConfigModel.AttributeLeaf am = model.attributes.get(a.getKey()); String dv = am.getDefaultValue(); if (dv==null || !dv.equals(a.getValue())) { attributesToWrite.put(a.getKey(), a.getValue()); } } return attributesToWrite; }
/** * Returns the map of attributes names and values for attributes which * value is neither null or the default value. These attributes are * considered having a non default value and must be written out. * * @return map of attributes indexed by name that must be persisted */ private Map<String, String> attributesToWrite() { Map<String, String> attributesToWrite = new HashMap<String, String>(); Map<String, String> localAttr = new HashMap<String, String>(attributes); for (Map.Entry<String, String> a : localAttr.entrySet()) { ConfigModel.AttributeLeaf am = model.attributes.get(a.getKey()); String dv = am.getDefaultValue(); if (dv==null || !dv.equals(a.getValue())) { attributesToWrite.put(a.getKey(), a.getValue()); } } return attributesToWrite; }
/** * Obtians the attribute value without variable expansion. * * @return * null if the attribute is not found. */ public String rawAttribute(String name) { String value = attributes.get(name); if (value==null && model.attributes.containsKey(name)) { value = model.attributes.get(name).getDefaultValue(); } return value; }
/** * Obtians the attribute value without variable expansion. * * @return * null if the attribute is not found. */ public String rawAttribute(String name) { String value = attributes.get(name); if (value==null && model.attributes.containsKey(name)) { value = model.attributes.get(name).getDefaultValue(); } return value; }
/** * Obtians the attribute value without variable expansion. * * @return * null if the attribute is not found. */ public String rawAttribute(String name) { String value = attributes.get(name); if (value==null && model.attributes.containsKey(name)) { value = model.attributes.get(name).getDefaultValue(); } return value; }
/** * Obtians the attribute value without variable expansion. * * @return * null if the attribute is not found. */ public String rawAttribute(String name) { String value = attributes.get(name); if (value==null && model.attributes.containsKey(name)) { value = model.attributes.get(name).getDefaultValue(); } return value; }