1 17 package org.apache.servicemix.jbi.util; 18 19 import java.util.Iterator ; 20 import java.util.Map ; 21 import org.springframework.beans.factory.InitializingBean; 22 23 29 public class SystemProperties implements InitializingBean { 30 31 private Map properties; 32 33 public Map getProperties() { 34 return this.properties; 35 } 36 37 public void setProperties(Map properties) { 38 this.properties = properties; 39 } 40 41 public void afterPropertiesSet() { 42 if (this.properties != null) { 43 for (Iterator it = this.properties.entrySet().iterator(); it.hasNext();) { 44 Map.Entry entry = (Map.Entry ) it.next(); 45 System.setProperty(entry.getKey().toString(), entry.getValue().toString()); 46 } 47 } 48 } 49 50 } 51 | Popular Tags |