1 26 27 package com.bull.eclipse.jonas.utils.xml; 28 29 import java.util.Hashtable ; 30 import java.util.List ; 31 import java.util.Map ; 32 import java.util.Vector ; 33 34 39 40 51 public class HandlerDesc { 52 53 54 private String name; 55 56 57 private String className; 58 59 60 private Class clazz; 61 62 63 private Map params = new Hashtable (); 64 65 66 private List headers = new Vector (); 67 68 69 private List roles = new Vector (); 70 71 72 private List portNames = new Vector (); 73 74 83 142 147 public String getName() { 148 return name; 149 } 150 151 152 157 public String getHandlerClassName() { 158 return className; 159 } 160 161 166 public Class getHandlerClass() { 167 return clazz; 168 } 169 170 175 public Map getInitParams() { 176 return params; 177 } 178 179 186 public String getInitParam(String pname) { 187 return (String ) params.get(pname); 188 } 189 190 195 public List getSOAPHeaders() { 196 return headers; 197 } 198 199 205 public List getSOAPRoles() { 206 return roles; 207 } 208 209 215 public List getPortNames() { 216 return portNames; 217 } 218 219 226 public boolean equals(Object other) { 227 if (other == null) { 228 return false; 229 } 230 if (!(other instanceof HandlerDesc)) { 231 return false; 232 } 233 HandlerDesc ref = (HandlerDesc) other; 234 if (!name.equals(ref.getName())) { 235 return false; 236 } 237 if (!clazz.getName().equals(ref.getHandlerClass().getName())) { 238 return false; 239 } 240 if (!params.equals(ref.getInitParams())) { 241 return false; 242 } 243 if (!headers.equals(ref.getSOAPHeaders())) { 244 return false; 245 } 246 if (!roles.equals(ref.getSOAPRoles())) { 247 return false; 248 } 249 if (!portNames.equals(ref.getPortNames())) { 250 return false; 251 } 252 return true; 254 } 255 256 public String toString() { 257 StringBuffer sb = new StringBuffer (); 258 sb.append("\n" + getClass().getName()); 259 sb.append("\ngetName()=" + getName()); 260 sb.append("\ngetClassname()=" + getHandlerClassName()); 261 sb.append("\ngetSOAPRoles()=" + getSOAPRoles()); 262 sb.append("\ngetSOAPHeaders()=" + getSOAPHeaders()); 263 sb.append("\ngetInitParams()=" + getInitParams()); 264 sb.append("\ngetPortNames()=" + getPortNames()); 265 return sb.toString(); 266 } 267 268 } 269 | Popular Tags |