1 23 package com.sun.enterprise.deployment; 24 25 import java.util.*; 26 import java.util.jar.*; 27 import java.io.*; 28 import java.util.zip.*; 29 import com.sun.enterprise.deployment.EnvironmentProperty; 30 31 38 public class MessageListener extends Descriptor { 39 40 41 private boolean isDirty = false; 42 43 private String msgListenerType; 44 private String activationSpecClass; 45 private Set configProperties; 46 47 public MessageListener() { 49 this.configProperties = new OrderedSet(); 50 } 51 52 53 54 public String getMessageListenerType() { 55 return msgListenerType; 56 } 57 58 public void setMessageListenerType(String msgListenerType) { 59 this.msgListenerType = msgListenerType; 60 } 61 62 public String getActivationSpecClass() { 63 return activationSpecClass; 64 } 65 66 public void setActivationSpecClass(String activationSpecClass) { 67 this.activationSpecClass = activationSpecClass; 68 } 69 70 71 73 public void addConfigProperty(EnvironmentProperty configProperty) { 74 this.configProperties.add(configProperty); 75 this.setDirty(); 76 this.changed(); 77 } 78 79 81 public void removeConfigProperty(EnvironmentProperty configProperty) { 82 this.configProperties.remove(configProperty); 83 this.setDirty(); 84 this.changed(); 85 } 86 87 89 public Set getConfigProperties() { 90 return configProperties; 91 } 92 93 public String getMessageListenerName() { 96 throw new UnsupportedOperationException (); 97 } 98 99 public void setMessageListenerName(String msgListenerName) { 102 throw new UnsupportedOperationException (); 103 } 104 105 public void changed() { 109 super.changed(); 110 } 111 112 115 public boolean isDirty() { 116 return this.isDirty; 117 } 118 119 private void setDirty() { 120 this.isDirty = true; 121 } 122 123 void doneOpening() { 124 this.isDirty = false; 125 this.changed(); 126 } 127 128 void doneSaving() { 129 this.isDirty = false; 130 this.changed(); 131 } 132 133 135 public void setName(String name) { 136 if (!this.getName().equals(name)) { 137 this.setDirty(); 138 super.setName(name); 139 } 140 } 141 142 } 143 | Popular Tags |