1 2 57 package org.objectstyle.cayenne.modeler.dialog.datadomain; 58 59 import org.objectstyle.cayenne.util.Util; 60 import org.scopemvc.core.Selector; 61 import org.scopemvc.model.basic.BasicModel; 62 63 66 public class CacheSyncTypesModel extends BasicModel { 67 public static final String JGROUPS_FACTORY_LABEL = "JavaGroups Multicast (Default)"; 68 public static final String JMS_FACTORY_LABEL = "JMS Transport"; 69 public static final String CUSTOM_FACTORY_LABEL = "Custom Transport"; 70 71 public static final Object [] NOTIFICATION_TYPES = 72 new Object [] { JGROUPS_FACTORY_LABEL, JMS_FACTORY_LABEL, CUSTOM_FACTORY_LABEL }; 73 74 public static final Selector NOTIFICATION_TYPES_SELECTOR = 75 Selector.fromString("notificationTypes"); 76 public static final Selector FACTORY_LABEL_SELECTOR = 77 Selector.fromString("factoryLabel"); 78 79 protected String factoryLabel; 80 81 public Object [] getNotificationTypes() { 82 return NOTIFICATION_TYPES; 83 } 84 85 public String getFactoryLabel() { 86 return factoryLabel; 87 } 88 89 public void setFactoryLabel(String factoryLabel) { 90 if (!Util.nullSafeEquals(this.factoryLabel, factoryLabel)) { 91 this.factoryLabel = factoryLabel; 92 fireModelChange(VALUE_CHANGED, FACTORY_LABEL_SELECTOR); 93 } 94 } 95 } 96 | Popular Tags |