1 19 package org.netbeans.modules.websvc.wsitconf.ui.service; 20 21 import javax.swing.JPanel ; 22 import org.netbeans.modules.websvc.wsitconf.ui.ComboConstants; 23 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.EndorsingCertificate; 24 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.Generic; 25 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.KerberosAuthentication; 26 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.MessageAuthentication; 27 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.MutualCertificates; 28 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.SAMLAuthorizationOverSSL; 29 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.SAMLHolderOfKey; 30 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.STSIssued; 31 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.STSIssuedCert; 32 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.STSIssuedEndorsing; 33 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.SenderVouches; 34 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.TransportSecurity; 35 import org.netbeans.modules.websvc.wsitconf.ui.service.profiles.UsernameAuthentication; 36 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 37 38 42 public class ProfileUtil { 43 44 45 public ProfileUtil() { 46 } 47 48 public static JPanel getProfilePanel(String profile, WSDLComponent comp) { 49 if (ComboConstants.PROF_GENERIC.equals(profile)) return new Generic(comp); 50 if (ComboConstants.PROF_TRANSPORT.equals(profile)) return new TransportSecurity(comp); 51 if (ComboConstants.PROF_MSGAUTHSSL.equals(profile)) return new MessageAuthentication(comp); 52 if (ComboConstants.PROF_SAMLSSL.equals(profile)) return new SAMLAuthorizationOverSSL(comp); 53 if (ComboConstants.PROF_USERNAME.equals(profile)) return new UsernameAuthentication(comp); 54 if (ComboConstants.PROF_MUTUALCERT.equals(profile)) return new MutualCertificates(comp); 55 if (ComboConstants.PROF_ENDORSCERT.equals(profile)) return new EndorsingCertificate(comp); 56 if (ComboConstants.PROF_SAMLSENDER.equals(profile)) return new SenderVouches(comp); 57 if (ComboConstants.PROF_SAMLHOLDER.equals(profile)) return new SAMLHolderOfKey(comp); 58 if (ComboConstants.PROF_KERBEROS.equals(profile)) return new KerberosAuthentication(comp); 59 if (ComboConstants.PROF_STSISSUED.equals(profile)) return new STSIssued(comp); 60 if (ComboConstants.PROF_STSISSUEDCERT.equals(profile)) return new STSIssuedCert(comp); 61 if (ComboConstants.PROF_STSISSUEDENDORSE.equals(profile)) return new STSIssuedEndorsing(comp); 62 return null; 63 } 64 65 public static String getProfileInfo(String profile) { 66 if (ComboConstants.PROF_GENERIC.equals(profile)) return ComboConstants.PROF_GENERIC_INFO; 67 if (ComboConstants.PROF_TRANSPORT.equals(profile)) return ComboConstants.PROF_TRANSPORT_INFO; 68 if (ComboConstants.PROF_MSGAUTHSSL.equals(profile)) return ComboConstants.PROF_MSGAUTHSSL_INFO; 69 if (ComboConstants.PROF_SAMLSSL.equals(profile)) return ComboConstants.PROF_SAMLSSL_INFO; 70 if (ComboConstants.PROF_USERNAME.equals(profile)) return ComboConstants.PROF_USERNAME_INFO; 71 if (ComboConstants.PROF_MUTUALCERT.equals(profile)) return ComboConstants.PROF_MUTUALCERT_INFO; 72 if (ComboConstants.PROF_ENDORSCERT.equals(profile)) return ComboConstants.PROF_ENDORSCERT_INFO; 73 if (ComboConstants.PROF_SAMLSENDER.equals(profile)) return ComboConstants.PROF_SAMLSENDER_INFO; 74 if (ComboConstants.PROF_SAMLHOLDER.equals(profile)) return ComboConstants.PROF_SAMLHOLDER_INFO; 75 if (ComboConstants.PROF_KERBEROS.equals(profile)) return ComboConstants.PROF_KERBEROS_INFO; 76 if (ComboConstants.PROF_STSISSUED.equals(profile)) return ComboConstants.PROF_STSISSUED_INFO; 77 if (ComboConstants.PROF_STSISSUEDCERT.equals(profile)) return ComboConstants.PROF_STSISSUEDCERT_INFO; 78 if (ComboConstants.PROF_STSISSUEDENDORSE.equals(profile)) return ComboConstants.PROF_STSISSUEDENDORSE_INFO; 79 return null; 80 } 81 } 82 | Popular Tags |