1 2 27 28 package org.netbeans.modules.websvc.api.jaxws.project.config; 29 30 import java.beans.PropertyChangeListener ; 31 import java.io.OutputStream ; 32 import org.netbeans.modules.schema2beans.BaseBean; 33 37 public class HandlerChains { 38 private org.netbeans.modules.websvc.jaxwsmodel.handler_config1_0.HandlerChains handlerChains; 39 40 public HandlerChains(org.netbeans.modules.websvc.jaxwsmodel.handler_config1_0.HandlerChains handlerChains) { 41 this.handlerChains = handlerChains; 42 } 43 44 public HandlerChain[] getHandlerChains() { 45 org.netbeans.modules.websvc.jaxwsmodel.handler_config1_0.HandlerChain[] chains = handlerChains.getHandlerChain(); 46 HandlerChain[] newChains = new HandlerChain[chains.length]; 47 for (int i=0;i<chains.length;i++) { 48 newChains[i]=new HandlerChain(chains[i]); 49 } 50 return newChains; 51 } 52 53 public HandlerChain newChain() { 54 org.netbeans.modules.websvc.jaxwsmodel.handler_config1_0.HandlerChain chain = handlerChains.newHandlerChain(); 55 return new HandlerChain(chain); 56 } 57 58 public void addHandlerChain(String handlerName, HandlerChain chain) { 59 handlerChains.addHandlerChain((org.netbeans.modules.websvc.jaxwsmodel.handler_config1_0.HandlerChain)chain.getOriginal()); 60 } 61 62 public void removeHandlerChain(HandlerChain chain) { 63 handlerChains.removeHandlerChain((org.netbeans.modules.websvc.jaxwsmodel.handler_config1_0.HandlerChain)chain.getOriginal()); 64 } 65 66 public HandlerChain findHandlerChainByName(String handlerChainName) { 67 HandlerChain[] chains = getHandlerChains(); 68 for (int i=0;i<chains.length;i++) { 69 if (handlerChainName.equals(chains[i].getHandlerChainName())) return chains[i]; 70 } 71 return null; 72 } 73 74 public void addPropertyChangeListener(PropertyChangeListener l) { 75 handlerChains.addPropertyChangeListener(l); 76 } 77 78 public void removePropertyChangeListener(PropertyChangeListener l) { 79 handlerChains.removePropertyChangeListener(l); 80 } 81 82 public void merge(HandlerChains newChains) { 83 if (newChains.handlerChains!=null) 84 handlerChains.merge(newChains.handlerChains,BaseBean.MERGE_UPDATE); 85 } 86 87 public void write(OutputStream os) throws java.io.IOException { 88 handlerChains.write(os); 89 } 90 91 } 92 | Popular Tags |