1 24 package org.riotfamily.components.property; 25 26 import java.util.Enumeration ; 27 import java.util.Map ; 28 import java.util.Properties ; 29 30 34 public class DefaultValuePropertyProcessor extends PropertyProcessorAdapter { 35 36 private Properties values; 37 38 public void setValues(Properties values) { 39 this.values = values; 40 } 41 42 47 public void resolveStrings(Map map) { 48 if (values != null) { 49 Enumeration en = values.propertyNames(); 50 while (en.hasMoreElements()) { 51 String prop = (String ) en.nextElement(); 52 if (!map.containsKey(prop)) { 53 map.put(prop, values.getProperty(prop)); 54 } 55 } 56 } 57 } 58 59 } 60 | Popular Tags |