1 19 20 package org.netbeans.modules.websvc.wsitconf.wsdlmodelext; 21 22 import org.netbeans.modules.websvc.wsitmodelext.security.tokens.ProtectionToken; 23 import org.netbeans.modules.websvc.wsitmodelext.security.tokens.SecureConversationToken; 24 import org.netbeans.modules.xml.wsdl.model.*; 25 26 30 public class RequiredConfigurationHelper { 31 32 39 public static boolean isCallbackHandlerRequired( 40 WSDLComponent c, boolean glassfish, boolean jsr109, String cbHandlerType) { 41 return true; 42 } 43 44 51 public static boolean isValidatorRequired( 52 WSDLComponent c, boolean glassfish, boolean jsr109, String validatorType) { 53 return true; 54 } 55 56 public static boolean isKeystoreRequired( 57 WSDLComponent c, boolean client, boolean glassfish, boolean jsr109) { 58 return true; 59 } 60 61 public static boolean isTruststoreRequired( 62 WSDLComponent c, boolean client, boolean glassfish, boolean jsr109) { 63 return true; 64 } 65 66 public static boolean isSecureConversationParamRequired( 67 WSDLComponent c) { 68 69 boolean secConvEnabled = false; 70 71 if (SecurityPolicyModelHelper.isSecurityEnabled(c)) { 72 WSDLComponent secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(c); 73 WSDLComponent tokenKind = SecurityTokensModelHelper.getTokenElement(secBinding, ProtectionToken.class); 74 WSDLComponent tokenType = SecurityTokensModelHelper.getTokenTypeElement(tokenKind); 75 secConvEnabled = (tokenType instanceof SecureConversationToken); 76 } 77 78 return secConvEnabled; 79 } 80 81 } 82 | Popular Tags |