public static Map<String, Properties> getModulePropertiesMap( Application me) { Map<String, Properties> modulePropertiesMap = new HashMap<String, Properties>(); for (Module module: me.getModule()) { if (module.getProperty() != null) { Properties moduleProps = new Properties(); for (Property property : module.getProperty()) { moduleProps.put(property.getName(), property.getValue()); } modulePropertiesMap.put(module.getName(), moduleProps); } } return modulePropertiesMap; }
public static Map<String, Properties> getModulePropertiesMap( Application me) { Map<String, Properties> modulePropertiesMap = new HashMap<String, Properties>(); for (Module module : me.getModule()) { if (module.getProperty() != null) { Properties moduleProps = new Properties(); for (Property property : module.getProperty()) { if (property.getValue() != null) { moduleProps.put(property.getName(), property.getValue()); } } modulePropertiesMap.put(module.getName(), moduleProps); } } return modulePropertiesMap; }
/** * Saves its state to the configuration. this method must be called within a transaction * to the configured module instance. * * @param module the module being persisted */ public void save(Module module) throws TransactionFailure, PropertyVetoException { // write out the module properties only for composite app if (Boolean.valueOf(moduleProps.getProperty( ServerTags.IS_COMPOSITE))) { moduleProps.remove(ServerTags.IS_COMPOSITE); for (Iterator itr = moduleProps.keySet().iterator(); itr.hasNext();) { String propName = (String) itr.next(); Property prop = module.createChild(Property.class); module.getProperty().add(prop); prop.setName(propName); prop.setValue(moduleProps.getProperty(propName)); } } for (EngineRef ref : _getEngineRefs()) { Engine engine = module.createChild(Engine.class); module.getEngines().add(engine); ref.save(engine); } } }
/** * Saves its state to the configuration. this method must be called within a transaction * to the configured module instance. * * @param module the module being persisted */ public void save(Module module) throws TransactionFailure, PropertyVetoException { // write out the module properties only for composite app if (Boolean.valueOf(moduleProps.getProperty( ServerTags.IS_COMPOSITE))) { moduleProps.remove(ServerTags.IS_COMPOSITE); for (Iterator itr = moduleProps.keySet().iterator(); itr.hasNext();) { String propName = (String) itr.next(); Property prop = module.createChild(Property.class); module.getProperty().add(prop); prop.setName(propName); prop.setValue(moduleProps.getProperty(propName)); } } for (EngineRef ref : _getEngineRefs()) { Engine engine = module.createChild(Engine.class); module.getEngines().add(engine); ref.save(engine); } } }
oldSetting = mod.getProperty(V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME); if (oldSetting != null) { logger.log(Level.INFO, "For application {0}/module {1} converting property {2} to {3}", oldSetting.getValue(), mod_w); mod_w.getProperty().remove(oldSetting);
oldSetting = mod.getProperty(V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME); if (oldSetting != null) { logger.log(Level.INFO, "For application {0}/module {1} converting property {2} to {3}", oldSetting.getValue(), mod_w); mod_w.getProperty().remove(oldSetting);