1 56 package org.objectstyle.cayenne.modeler.dialog.datadomain; 57 58 import org.objectstyle.cayenne.access.DataRowStore; 59 import org.objectstyle.cayenne.event.JMSBridgeFactory; 60 import org.scopemvc.core.Selector; 61 62 65 public class JMSConfigModel extends CacheSyncConfigModel { 66 private static final String [] storedProperties = 67 new String [] { 68 DataRowStore.EVENT_BRIDGE_FACTORY_PROPERTY, 69 JMSBridgeFactory.TOPIC_CONNECTION_FACTORY_PROPERTY }; 70 71 public static final Selector TOPIC_FACTORY_SELECTOR = 72 Selector.fromString("topicFactory"); 73 74 public String [] supportedProperties() { 75 return storedProperties; 76 } 77 78 public Selector selectorForKey(String key) { 79 return (JMSBridgeFactory.TOPIC_CONNECTION_FACTORY_PROPERTY.equals(key)) 80 ? TOPIC_FACTORY_SELECTOR 81 : null; 82 } 83 84 public String defaultForKey(String key) { 85 return (JMSBridgeFactory.TOPIC_CONNECTION_FACTORY_PROPERTY.equals(key)) 86 ? JMSBridgeFactory.TOPIC_CONNECTION_FACTORY_DEFAULT 87 : null; 88 } 89 90 public String getTopicFactory() { 91 return getProperty(JMSBridgeFactory.TOPIC_CONNECTION_FACTORY_PROPERTY); 92 } 93 94 public void setTopicFactory(String topicFactory) { 95 setProperty(JMSBridgeFactory.TOPIC_CONNECTION_FACTORY_PROPERTY, topicFactory); 96 } 97 } 98 | Popular Tags |