1 19 20 package org.netbeans.modules.websvc.wsitmodelext.security.proprietary; 21 22 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 23 import org.netbeans.modules.xml.wsdl.model.spi.ElementFactory; 24 import org.w3c.dom.Element ; 25 26 import javax.xml.namespace.QName ; 27 import java.util.Collections ; 28 import java.util.Set ; 29 import org.netbeans.modules.websvc.wsitmodelext.security.proprietary.impl.LifeTimeClientImpl; 30 import org.netbeans.modules.websvc.wsitmodelext.security.proprietary.impl.SCClientConfigurationImpl; 31 32 public class ProprietarySCClientFactories { 33 34 public static class SCClientConfigurationFactory extends ElementFactory { 35 @Override 36 public Set <QName > getElementQNames() { 37 return Collections.singleton(ProprietarySCClientQName.SCCLIENTCONFIGURATION.getQName()); 38 } 39 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 40 return type.cast(new SCClientConfigurationImpl(context.getModel())); 41 } 42 @Override 43 public WSDLComponent create(WSDLComponent context, Element element) { 44 return new SCClientConfigurationImpl(context.getModel(), element); 45 } 46 } 47 48 public static class LifeTimeClientFactory extends ElementFactory { 49 @Override 50 public Set <QName > getElementQNames() { 51 return Collections.singleton(ProprietarySCClientQName.LIFETIME.getQName()); 52 } 53 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 54 return type.cast(new LifeTimeClientImpl(context.getModel())); 55 } 56 @Override 57 public WSDLComponent create(WSDLComponent context, Element element) { 58 return new LifeTimeClientImpl(context.getModel(), element); 59 } 60 } 61 62 } 63 | Popular Tags |