1 19 20 package org.netbeans.modules.websvc.wsitmodelext.security.algosuite; 21 22 import org.netbeans.modules.websvc.wsitmodelext.security.algosuite.impl.*; 23 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 24 import org.netbeans.modules.xml.wsdl.model.spi.ElementFactory; 25 import org.w3c.dom.Element ; 26 27 import javax.xml.namespace.QName ; 28 import java.util.Collections ; 29 import java.util.Set ; 30 31 public class AlgorithmSuiteFactories { 32 33 public static class AlgorithmSuiteFactory extends ElementFactory { 34 @Override 35 public Set <QName > getElementQNames() { 36 return Collections.singleton(AlgorithmSuiteQName.ALGORITHMSUITE.getQName()); 37 } 38 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 39 return type.cast(new AlgorithmSuiteImpl(context.getModel())); 40 } 41 @Override 42 public WSDLComponent create(WSDLComponent context, Element element) { 43 return new AlgorithmSuiteImpl(context.getModel(), element); 44 } 45 } 46 47 public static class Basic128Factory extends ElementFactory { 48 @Override 49 public Set <QName > getElementQNames() { 50 return Collections.singleton(AlgorithmSuiteQName.BASIC128.getQName()); 51 } 52 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 53 return type.cast(new Basic128Impl(context.getModel())); 54 } 55 @Override 56 public WSDLComponent create(WSDLComponent context, Element element) { 57 return new Basic128Impl(context.getModel(), element); 58 } 59 } 60 61 public static class Basic192Factory extends ElementFactory { 62 @Override 63 public Set <QName > getElementQNames() { 64 return Collections.singleton(AlgorithmSuiteQName.BASIC192.getQName()); 65 } 66 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 67 return type.cast(new Basic192Impl(context.getModel())); 68 } 69 @Override 70 public WSDLComponent create(WSDLComponent context, Element element) { 71 return new Basic192Impl(context.getModel(), element); 72 } 73 } 74 75 public static class Basic256Factory extends ElementFactory { 76 @Override 77 public Set <QName > getElementQNames() { 78 return Collections.singleton(AlgorithmSuiteQName.BASIC256.getQName()); 79 } 80 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 81 return type.cast(new Basic256Impl(context.getModel())); 82 } 83 @Override 84 public WSDLComponent create(WSDLComponent context, Element element) { 85 return new Basic256Impl(context.getModel(), element); 86 } 87 } 88 89 public static class TripleDesFactory extends ElementFactory { 90 @Override 91 public Set <QName > getElementQNames() { 92 return Collections.singleton(AlgorithmSuiteQName.TRIPLEDES.getQName()); 93 } 94 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 95 return type.cast(new TripleDesImpl(context.getModel())); 96 } 97 @Override 98 public WSDLComponent create(WSDLComponent context, Element element) { 99 return new TripleDesImpl(context.getModel(), element); 100 } 101 } 102 103 104 public static class Basic128Rsa15Factory extends ElementFactory { 105 @Override 106 public Set <QName > getElementQNames() { 107 return Collections.singleton(AlgorithmSuiteQName.BASIC128RSA15.getQName()); 108 } 109 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 110 return type.cast(new Basic128Rsa15Impl(context.getModel())); 111 } 112 @Override 113 public WSDLComponent create(WSDLComponent context, Element element) { 114 return new Basic128Rsa15Impl(context.getModel(), element); 115 } 116 } 117 118 public static class Basic192Rsa15Factory extends ElementFactory { 119 @Override 120 public Set <QName > getElementQNames() { 121 return Collections.singleton(AlgorithmSuiteQName.BASIC192RSA15.getQName()); 122 } 123 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 124 return type.cast(new Basic192Rsa15Impl(context.getModel())); 125 } 126 @Override 127 public WSDLComponent create(WSDLComponent context, Element element) { 128 return new Basic192Rsa15Impl(context.getModel(), element); 129 } 130 } 131 132 public static class Basic256Rsa15Factory extends ElementFactory { 133 @Override 134 public Set <QName > getElementQNames() { 135 return Collections.singleton(AlgorithmSuiteQName.BASIC256RSA15.getQName()); 136 } 137 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 138 return type.cast(new Basic256Rsa15Impl(context.getModel())); 139 } 140 @Override 141 public WSDLComponent create(WSDLComponent context, Element element) { 142 return new Basic256Rsa15Impl(context.getModel(), element); 143 } 144 } 145 146 public static class TripleDesRsa15Factory extends ElementFactory { 147 @Override 148 public Set <QName > getElementQNames() { 149 return Collections.singleton(AlgorithmSuiteQName.TRIPLEDESRSA15.getQName()); 150 } 151 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 152 return type.cast(new TripleDesRsa15Impl(context.getModel())); 153 } 154 @Override 155 public WSDLComponent create(WSDLComponent context, Element element) { 156 return new TripleDesRsa15Impl(context.getModel(), element); 157 } 158 } 159 160 161 public static class Basic128Sha256Factory extends ElementFactory { 162 @Override 163 public Set <QName > getElementQNames() { 164 return Collections.singleton(AlgorithmSuiteQName.BASIC128SHA256.getQName()); 165 } 166 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 167 return type.cast(new Basic128Sha256Impl(context.getModel())); 168 } 169 @Override 170 public WSDLComponent create(WSDLComponent context, Element element) { 171 return new Basic128Sha256Impl(context.getModel(), element); 172 } 173 } 174 175 public static class Basic192Sha256Factory extends ElementFactory { 176 @Override 177 public Set <QName > getElementQNames() { 178 return Collections.singleton(AlgorithmSuiteQName.BASIC192SHA256.getQName()); 179 } 180 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 181 return type.cast(new Basic192Sha256Impl(context.getModel())); 182 } 183 @Override 184 public WSDLComponent create(WSDLComponent context, Element element) { 185 return new Basic192Sha256Impl(context.getModel(), element); 186 } 187 } 188 189 public static class Basic256Sha256Factory extends ElementFactory { 190 @Override 191 public Set <QName > getElementQNames() { 192 return Collections.singleton(AlgorithmSuiteQName.BASIC256SHA256.getQName()); 193 } 194 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 195 return type.cast(new Basic256Sha256Impl(context.getModel())); 196 } 197 @Override 198 public WSDLComponent create(WSDLComponent context, Element element) { 199 return new Basic256Sha256Impl(context.getModel(), element); 200 } 201 } 202 203 public static class TripleDesSha256Factory extends ElementFactory { 204 @Override 205 public Set <QName > getElementQNames() { 206 return Collections.singleton(AlgorithmSuiteQName.TRIPLEDESSHA256.getQName()); 207 } 208 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 209 return type.cast(new TripleDesSha256Impl(context.getModel())); 210 } 211 @Override 212 public WSDLComponent create(WSDLComponent context, Element element) { 213 return new TripleDesSha256Impl(context.getModel(), element); 214 } 215 } 216 217 218 public static class Basic128Sha256Rsa15Factory extends ElementFactory { 219 @Override 220 public Set <QName > getElementQNames() { 221 return Collections.singleton(AlgorithmSuiteQName.BASIC128SHA256RSA15.getQName()); 222 } 223 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 224 return type.cast(new Basic128Sha256Rsa15Impl(context.getModel())); 225 } 226 @Override 227 public WSDLComponent create(WSDLComponent context, Element element) { 228 return new Basic128Sha256Rsa15Impl(context.getModel(), element); 229 } 230 } 231 232 public static class Basic192Sha256Rsa15Factory extends ElementFactory { 233 @Override 234 public Set <QName > getElementQNames() { 235 return Collections.singleton(AlgorithmSuiteQName.BASIC192SHA256RSA15.getQName()); 236 } 237 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 238 return type.cast(new Basic192Sha256Rsa15Impl(context.getModel())); 239 } 240 @Override 241 public WSDLComponent create(WSDLComponent context, Element element) { 242 return new Basic192Sha256Rsa15Impl(context.getModel(), element); 243 } 244 } 245 246 public static class Basic256Sha256Rsa15Factory extends ElementFactory { 247 @Override 248 public Set <QName > getElementQNames() { 249 return Collections.singleton(AlgorithmSuiteQName.BASIC256SHA256RSA15.getQName()); 250 } 251 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 252 return type.cast(new Basic256Sha256Rsa15Impl(context.getModel())); 253 } 254 @Override 255 public WSDLComponent create(WSDLComponent context, Element element) { 256 return new Basic256Sha256Rsa15Impl(context.getModel(), element); 257 } 258 } 259 260 public static class TripleDesSha256Rsa15Factory extends ElementFactory { 261 @Override 262 public Set <QName > getElementQNames() { 263 return Collections.singleton(AlgorithmSuiteQName.TRIPLEDESSHA256RSA15.getQName()); 264 } 265 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 266 return type.cast(new TripleDesSha256Rsa15Impl(context.getModel())); 267 } 268 @Override 269 public WSDLComponent create(WSDLComponent context, Element element) { 270 return new TripleDesSha256Rsa15Impl(context.getModel(), element); 271 } 272 } 273 } 274 | Popular Tags |