FileDocCategorySizeDatePackage
PolicyUtil.javaAPI DocExample46577Thu Jul 19 02:00:08 BST 2007com.sun.xml.ws.security.impl.policy

PolicyUtil

public class PolicyUtil extends Object
author
K.Venugopal@sun.com Abhijit.Das@Sun.COM

Fields Summary
Constructors Summary
public PolicyUtil()
Creates a new instance of PolicyUtil

    
Methods Summary
public static booleanhasPassword(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isSecurityPolicyNS(assertion)){
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(NoPassword)){
            return true;
        }
        return false;
    
public static booleanisAddress(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isAddressingNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(Address)) {
            return true;
        }
        
        return false;
    
public static booleanisAddressingNS(com.sun.xml.ws.policy.PolicyAssertion pa)

        if ( AddressingVersion.MEMBER.getNsUri().equals(pa.getName().getNamespaceURI()) ) {
            return true;
        }
        if ( AddressingVersion.W3C.getNsUri().equals(pa.getName().getNamespaceURI()) ) {
            return true;
        }
        return false;
    
public static booleanisAlgorithmAssertion(com.sun.xml.ws.policy.PolicyAssertion pa)

        if ( isSecurityPolicyNS(pa) ) {
            if(pa.getName().getLocalPart().equals(AlgorithmSuite)) {
                return true;
            }
        }
        return false;
    
public static booleanisAsymmetricBinding(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(AsymmetricBinding)) {
            return true;
        }
        return false;
    
public static booleanisAsymmetricBinding(javax.xml.namespace.QName assertion)

        if ( assertion.getLocalPart().equals(Constants.AsymmetricBinding) &&
                assertion.getNamespaceURI().equals(Constants.SECURITY_POLICY_NS)) {
            return true;
        }
        return false;
    
public static booleanisAuthenticationType(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(AuthenticationType.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisBinding(com.sun.xml.ws.policy.PolicyAssertion policyAssertion)

        
        if ( !isSecurityPolicyNS(policyAssertion )) {
            return false;
        }
        
        String name = policyAssertion.getName().getLocalPart();
        if(name.equals(SymmetricBinding) ||
                name.equals(AsymmetricBinding) ||
                name.equals(TransportBinding)) {
            
            return true;
        }
        return false;
    
public static booleanisBody(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(Constants.Body)){
            return true;
        }
        return false;
    
public static booleanisBootstrapPolicy(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion) ) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(BootstrapPolicy)) {
            return true;
        }
        return false;
    
public static booleanisCanonicalizationAlgorithm(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(CanonicalizationAlgorithm.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisClaimsElement(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(Claims.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisComputedKeyAlgorithm(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(ComputedKeyAlgorithm.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisConfigPolicyAssertion(com.sun.xml.ws.policy.PolicyAssertion assertion)

        String uri = assertion.getName().getNamespaceURI();
        if(SUN_SECURE_CLIENT_CONVERSATION_POLICY_NS.equals(uri) || SUN_TRUST_CLIENT_SECURITY_POLICY_NS.equals(uri) ||
                SUN_SECURE_SERVER_CONVERSATION_POLICY_NS.equals(uri) || SUN_TRUST_SERVER_SECURITY_POLICY_NS.equals(uri) ||
                SUN_WSS_SECURITY_CLIENT_POLICY_NS.equals(uri) ||SUN_WSS_SECURITY_SERVER_POLICY_NS.equals(uri) ){
            return true;
        }
        return false;
    
public static booleanisContentOnlyAssertion(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(OnlySignEntireHeadersAndBody)) {
            return true;
        }
        return false;
    
public static booleanisCreated(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isUtilityNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(Created)) {
            return true;
        }
        return false;
    
public static booleanisEncryptBeforeSign(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(EncryptBeforeSigning)) {
            return true;
        }
        return false;
    
public static booleanisEncryptParts(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(EncryptedParts)) {
            return true;
        }
        return false;
    
public static booleanisEncryptSignature(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(EncryptSignature)) {
            return true;
        }
        return false;
    
public static booleanisEncryptedElements(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(EncryptedElements)) {
            return true;
        }
        return false;
    
public static booleanisEncryption(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isTrustNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(Encryption)) {
            return true;
        }
        return false;
    
public static booleanisEncryptionAlgorithm(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(EncryptionAlgorithm.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisEncryptionToken(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(EncryptionToken)) {
            return true;
        }
        return false;
    
public static booleanisEndorsedSupportingToken(com.sun.xml.ws.policy.PolicyAssertion policyAssertion)

        if ( !isSecurityPolicyNS(policyAssertion )) {
            return false;
        }
        
        if(policyAssertion.getName().getLocalPart().equals(EndorsingSupportingTokens)) {
            return true;
        }
        return false;
    
public static booleanisEndpointReference(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isAddressingNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(EndpointReference)) {
            return true;
        }
        return false;
    
public static booleanisEntropyElement(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(Entropy.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisExclusiveC14NWithComments(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isSunPolicyNS(assertion)){
            return false;
        }
        if ( assertion.getName().getLocalPart().equals(ExclusiveC14NWithComments)) {
            return true;
        }
        return false;
    
public static booleanisExclusiveC14NWithCommentsForCm(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isSunPolicyNS(assertion)){
            return false;
        }
        if ( assertion.getName().getLocalPart().equals(ExclusiveC14NWithComments)) {
            if("true".equals(assertion.getAttributeValue(new QName(SUN_WSS_SECURITY_SERVER_POLICY_NS, "forCm"))))
                return true;
        }
        return false;
    
public static booleanisExclusiveC14NWithCommentsForTransforms(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isSunPolicyNS(assertion)){
            return false;
        }
        if ( assertion.getName().getLocalPart().equals(ExclusiveC14NWithComments)) {
            if("true".equals(assertion.getAttributeValue(new QName(SUN_WSS_SECURITY_SERVER_POLICY_NS, "forTransforms"))))
                return true;
        }
        return false;
    
public static booleanisExpires(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if (!isUtilityNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(Expires)) {
            return true;
        }
        return false;
    
public static booleanisHeader(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        if ( assertion.getName().getLocalPart().equals(HEADER)) {
            return true;
        }
        return false;
    
public static booleanisHttpsToken(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(Constants.HttpsToken)) {
            return true;
        }
        return false;
    
public static booleanisIncludeTimestamp(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(IncludeTimestamp)) {
            return true;
        }
        return false;
    
public static booleanisInclusiveC14N(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(InclusiveC14N)) {
            return true;
        }
        return false;
        
    
public static booleanisInclusiveC14NWithComments(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isSunPolicyNS(assertion)){
            return false;
        }
        if ( assertion.getName().getLocalPart().equals(InclusiveC14NWithComments)) {
            return true;
        }
        return false;
    
public static booleanisInclusiveC14NWithCommentsForCm(com.sun.xml.ws.policy.PolicyAssertion assertion)

        
        if(!isSunPolicyNS(assertion)){
            return false;
        }
        if ( assertion.getName().getLocalPart().equals(InclusiveC14NWithComments)) {
            if("true".equals(assertion.getAttributeValue(new QName(SUN_WSS_SECURITY_SERVER_POLICY_NS, "forCm"))))
                return true;
        }
        return false;
    
public static booleanisInclusiveC14NWithCommentsForTransforms(com.sun.xml.ws.policy.PolicyAssertion assertion)

        
        if(!isSunPolicyNS(assertion)){
            return false;
        }
        if ( assertion.getName().getLocalPart().equals(InclusiveC14NWithComments)) {
            if("true".equals(assertion.getAttributeValue(new QName(SUN_WSS_SECURITY_SERVER_POLICY_NS, "forTransforms"))))
                return true;
        }
        return false;
    
public static booleanisInitiatorToken(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(InitiatorToken)) {
            return true;
        }
        return false;
    
public static booleanisIssuedToken(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        
        if(token.getName().getLocalPart().equals(IssuedToken)) {
            return true;
        }
        return false;
    
public static booleanisIssuer(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(Issuer)) {
            return true;
        }
        return false;
    
public static booleanisKerberosToken(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        
        if(token.getName().getLocalPart().equals(Constants.KerberosToken)) {
            return true;
        }
        return false;
    
public static booleanisKerberosTokenType(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        String localPart = token.getName().getLocalPart();
        if(localPart.equals(WssKerberosV5ApReqToken11)) {
            return true;
        }else if(localPart.equals(WssGssKerberosV5ApReqToken11)){
            return true;
        }
        return false;
    
public static booleanisKeySize(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isTrustNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(KeySize)) {
            return true;
        }
        
        return false;
    
public static booleanisKeyType(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isTrustNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(KeyType)) {
            return true;
        }
        
        return false;
    
public static booleanisLax(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(Lax)) {
            return true;
        }
        return false;
    
public static booleanisLaxTsFirst(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(LaxTsFirst)) {
            return true;
        }
        return false;
    
public static booleanisLaxTsLast(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(LaxTsLast)) {
            return true;
        }
        return false;
    
public static booleanisLifeTime(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isTrustNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(Lifetime)) {
            return true;
        }
        return false;
    
public static booleanisMessageLayout(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(Layout)) {
            return true;
        }
        return false;
    
public static booleanisPortType(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isAddressingNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(PortType)) {
            return true;
        }
        return false;
    
public static booleanisProofEncryption(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isTrustNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(ProofEncryption)) {
            return true;
        }
        return false;
    
public static booleanisProtectTokens(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(ProtectTokens)) {
            return true;
        }
        return false;
    
public static booleanisProtectionToken(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(ProtectionToken)) {
            return true;
        }
        return false;
    
public static booleanisRecipientToken(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(RecipientToken)) {
            return true;
        }
        return false;
    
public static booleanisReferenceParameters(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isAddressingNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(ReferenceParameters)) {
            return true;
        }
        return false;
    
public static booleanisReferenceProperties(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isAddressingNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(ReferenceProperties)) {
            return true;
        }
        return false;
    
public static booleanisRelToken(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        
        if(token.getName().getLocalPart().equals(Constants.RelToken)) {
            return true;
        }
        return false;
    
public static booleanisRelTokenType(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        String localPart = token.getName().getLocalPart();
        if(localPart.equals(WssRelV10Token10)) {
            return true;
        }else if(localPart.equals(WssRelV10Token11)){
            return true;
        }else if(localPart.equals(WssRelV20Token10)){
            return true;
        }else if(localPart.equals(WssRelV20Token11)){
            return true;
        }
        return false;
    
public static booleanisRequestSecurityTokenTemplate(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(RequestSecurityTokenTemplate)) {
            return true;
        }
        return false;
    
public static booleanisRequestType(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(RequestType.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisRequireClientEntropy(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(RequireClientEntropy)) {
            return true;
        }
        return false;
    
public static booleanisRequireDerivedKeys(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( RequireDerivedKeys.toString().equals(assertion.getName().getLocalPart().toString())) {
            return true;
        }
        return false;
    
public static booleanisRequireExternalReference(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(RequireExternalReference)) {
            return true;
        }
        
        return false;
    
public static booleanisRequireExternalUriReference(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(RequireExternalUriReference)) {
            return true;
        }
        
        return false;
    
public static booleanisRequireInternalReference(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(RequireInternalReference)) {
            return true;
        }
        
        return false;
    
public static booleanisRequireKeyIR(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if (!isSecurityPolicyNS(assertion)) {
            return false;
        }
        if ( assertion.getName().getLocalPart().equals(RequireKeyIdentifierReference)) {
            return true;
        }
        return false;
    
public static booleanisRequireServerEntropy(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(RequireServerEntropy)) {
            return true;
        }
        return false;
    
public static booleanisRequiredElements(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(isSecurityPolicyNS(assertion)){
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(RequiredElements)){
            return true;
        }
        return false;
    
public static booleanisRequiredKey(com.sun.xml.ws.policy.PolicyAssertion assertion)

        return false;
    
public static booleanisSC10SecurityContextToken(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(Constants.SC10SecurityContextToken)) {
            return true;
        }
        return false;
    
public static booleanisSTRTransform10(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(STRTransform10)) {
            return true;
        }
        return false;
    
public static booleanisSamlToken(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        
        if(token.getName().getLocalPart().equals(SamlToken)) {
            return true;
        }
        return false;
    
public static booleanisSamlTokenType(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        String localPart = token.getName().getLocalPart();
        if(localPart.equals(WssSamlV10Token10)) {
            return true;
        }else if(localPart.equals(WssSamlV10Token11)){
            return true;
        }else if(localPart.equals(WssSamlV11Token10)){
            return true;
        }else if(localPart.equals(WssSamlV20Token11)){
            return true;
        }else if(localPart.equals(WssSamlV11Token11)){
            return true;
        }
        return false;
    
public static booleanisSecureConversationToken(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        
        if(token.getName().getLocalPart().equals(SecureConversationToken)) {
            return true;
        }
        return false;
    
public static booleanisSecurityContextToken(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        
        if(token.getName().getLocalPart().equals(Constants.SecurityContextToken)) {
            return true;
        }
        return false;
    
public static booleanisSecurityContextTokenType(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        String localPart = token.getName().getLocalPart();
        if(localPart.equals(SC10SecurityContextToken)) {
            return true;
        }
        return false;
    
public static booleanisSecurityPolicyNS(com.sun.xml.ws.policy.PolicyAssertion pa)

        if ( Constants.SECURITY_POLICY_NS.equals(pa.getName().getNamespaceURI()) ) {
            return true;
        }
        return false;
    
public static booleanisServiceName(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isAddressingNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(ServiceName)) {
            return true;
        }
        return false;
    
public static booleanisSignBeforeEncrypt(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(SignBeforeEncrypting)) {
            return true;
        }
        return false;
    
public static booleanisSignWith(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(SignWith.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisSignatureAlgorithm(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(SignatureAlgorithm.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisSignatureToken(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(SignatureToken)) {
            return true;
        }
        
        return false;
    
public static booleanisSignedElements(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(SignedElements)) {
            return true;
        }
        return false;
    
public static booleanisSignedEndorsingSupportingToken(com.sun.xml.ws.policy.PolicyAssertion policyAssertion)

        if ( !isSecurityPolicyNS(policyAssertion )) {
            return false;
        }
        
        if(policyAssertion.getName().getLocalPart().equals(SignedEndorsingSupportingTokens)) {
            return true;
        }
        return false;
    
public static booleanisSignedParts(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(SignedParts)) {
            return true;
        }
        return false;
    
public static booleanisSignedSupportingToken(com.sun.xml.ws.policy.PolicyAssertion policyAssertion)

        if ( !isSecurityPolicyNS(policyAssertion )) {
            return false;
        }
        
        if(policyAssertion.getName().getLocalPart().equals(SignedSupportingTokens)) {
            return true;
        }
        return false;
    
public static booleanisStrict(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(Strict)) {
            return true;
        }
        return false;
    
public static booleanisSunPolicyNS(com.sun.xml.ws.policy.PolicyAssertion pa)

        if ( Constants.SUN_WSS_SECURITY_SERVER_POLICY_NS.equals(pa.getName().getNamespaceURI()) ||
                Constants.SUN_WSS_SECURITY_CLIENT_POLICY_NS.equals(pa.getName().getNamespaceURI())) {
            return true;
        }
        return false;
    
public static booleanisSupportClientChallenge(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(MustSupportClientChallenge)) {
            return true;
        }
        return false;
    
public static booleanisSupportIssuedTokens(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(MustSupportIssuedTokens)) {
            return true;
        }
        return false;
    
public static booleanisSupportServerChallenge(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(MustSupportServerChallenge)) {
            return true;
        }
        return false;
    
public static booleanisSupportingToken(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(SupportingTokens)){
            return true;
        }
        return false;
    
public static booleanisSupportingTokens(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(isSignedSupportingToken(assertion) || isEndorsedSupportingToken(assertion)||
                isSignedEndorsingSupportingToken(assertion) || isSupportingToken(assertion)){
            return true;
        }
        return false;
    
public static booleanisSymmetricBinding(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(SymmetricBinding)) {
            return true;
        }
        return false;
    
public static booleanisSymmetricBinding(javax.xml.namespace.QName assertion)

        if ( assertion.getLocalPart().equals(Constants.SymmetricBinding) &&
                assertion.getNamespaceURI().equals(Constants.SECURITY_POLICY_NS)) {
            return true;
        }
        return false;
    
public static booleanisTarget(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion) ) {
            return false;
        }
        
        String name = assertion.getName().getLocalPart();
        if(name.equals(EncryptedParts) ||
                name.equals(SignedParts) ||
                name.equals(SignedElements) ||
                name.equals(EncryptedElements)) {
            return true;
        }
        return false;
    
public static booleanisToken(com.sun.xml.ws.policy.PolicyAssertion pa)

        if ( !isSecurityPolicyNS(pa) ) {
            return false;
        }
        
        if(pa.getName().getLocalPart().equals(EncryptionToken) ) {
            return true;
        }else if(pa.getName().getLocalPart().equals(SignatureToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(InitiatorToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(HttpsToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(IssuedToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(KerberosToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(ProtectionToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(RecipientToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(SupportingTokens)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(SC10SecurityContextToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(SamlToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(UsernameToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(X509Token)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(SecureConversationToken)) {
            return true;
        }else if(pa.getName().getLocalPart().equals(TransportToken)) {
            return true;
        }
        return false;
    
public static booleanisTokenReferenceType(com.sun.xml.ws.policy.PolicyAssertion assertion)

        
        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(RequireKeyIdentifierReference)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(RequireThumbprintReference)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(RequireEmbeddedTokenReference)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(RequireIssuerSerialReference)) {
            return true;
        }
        return false;
    
public static booleanisTokenType(com.sun.xml.ws.policy.PolicyAssertion assertion)

        
        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(WssX509V1Token10)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(WssX509V3Token10)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(WssX509Pkcs7Token10)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(WssX509PkiPathV1Token10)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(WssX509V1Token11)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(WssX509V3Token11)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(WssX509Pkcs7Token11)) {
            return true;
        } else if ( assertion.getName().getLocalPart().equals(WssX509PkiPathV1Token11)) {
            return true;
        }
        return false;
    
public static booleanisTransportBinding(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(TransportBinding)) {
            return true;
        }
        return false;
    
public static booleanisTransportBinding(javax.xml.namespace.QName assertion)

        if ( assertion.getLocalPart().equals(Constants.TransportBinding) &&
                assertion.getNamespaceURI().equals(Constants.SECURITY_POLICY_NS)) {
            return true;
        }
        return false;
    
public static booleanisTrust10(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(Trust10)) {
            return true;
        }
        return false;
    
public static booleanisTrustNS(com.sun.xml.ws.policy.PolicyAssertion pa)

        if ( Constants.TRUST_NS.equals(pa.getName().getNamespaceURI()) ) {
            return true;
        }
        return false;
    
public static booleanisTrustTokenType(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if(!isTrustNS(assertion)){
            return false;
        }
        if(TokenType.equals(assertion.getName().getLocalPart())){
            return true;
        }
        return false;
    
public static booleanisUseKey(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isTrustNS(assertion)) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(UseKey)) {
            return true;
        }
        
        return false;
    
public static booleanisUsernameToken(com.sun.xml.ws.policy.PolicyAssertion token)

        if ( !isSecurityPolicyNS(token )) {
            return false;
        }
        
        if(token.getName().getLocalPart().equals(UsernameToken)) {
            return true;
        }
        return false;
    
public static booleanisUsernameTokenType(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(WssUsernameToken10) ||
                assertion.getName().getLocalPart().equals(WssUsernameToken11)) {
            return true;
        }
        return false;
    
public static booleanisUtilityNS(com.sun.xml.ws.policy.PolicyAssertion pa)

        if ( Constants.UTILITY_NS.equals(pa.getName().getNamespaceURI()) ) {
            return true;
        }
        return false;
    
public static com.sun.xml.ws.security.policy.AlgorithmSuiteValueisValidAlgorithmSuiteValue(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return null;
        }
        
        if ( assertion.getName().getLocalPart().equals(Basic256) ) {
            return AlgorithmSuiteValue.Basic256;
        } else if ( assertion.getName().getLocalPart().equals(Basic192)) {
            return AlgorithmSuiteValue.Basic192;
        } else if ( assertion.getName().getLocalPart().equals(Basic128)) {
            return AlgorithmSuiteValue.Basic128;
        } else if ( assertion.getName().getLocalPart().equals(TripleDes )) {
            return AlgorithmSuiteValue.TripleDes;
        } else if ( assertion.getName().getLocalPart().equals(Basic256Rsa15)) {
            return AlgorithmSuiteValue.Basic256Rsa15;
        } else if ( assertion.getName().getLocalPart().equals(Basic192Rsa15)) {
            return AlgorithmSuiteValue.Basic192Rsa15;
        } else if ( assertion.getName().getLocalPart().equals(Basic128Rsa15)) {
            return AlgorithmSuiteValue.Basic128Rsa15;
        } else if ( assertion.getName().getLocalPart().equals(TripleDesRsa15)) {
            return AlgorithmSuiteValue.TripleDesRsa15;
        } else if ( assertion.getName().getLocalPart().equals(Basic256Sha256)) {
            return AlgorithmSuiteValue.Basic256Sha256;
        } else if ( assertion.getName().getLocalPart().equals(Basic192Sha256)) {
            return AlgorithmSuiteValue.Basic192Sha256;
        } else if ( assertion.getName().getLocalPart().equals(Basic128Sha256)) {
            return AlgorithmSuiteValue.Basic128Sha256;
        } else if ( assertion.getName().getLocalPart().equals(TripleDesSha256)) {
            return AlgorithmSuiteValue.TripleDesSha256;
        } else if ( assertion.getName().getLocalPart().equals(Basic256Sha256Rsa15)) {
            return AlgorithmSuiteValue.Basic256Sha256Rsa15;
        } else if ( assertion.getName().getLocalPart().equals(Basic192Sha256Rsa15)) {
            return AlgorithmSuiteValue.Basic192Sha256Rsa15;
        } else if ( assertion.getName().getLocalPart().equals(Basic128Sha256Rsa15)) {
            return AlgorithmSuiteValue.Basic128Sha256Rsa15;
        } else if ( assertion.getName().getLocalPart().equals(TripleDesSha256Rsa15)) {
            return AlgorithmSuiteValue.TripleDesSha256Rsa15;
        }
        return null;
    
public static booleanisWSS10(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        if(assertion.getName().getLocalPart().equals(Wss10)) {
            return true;
        }
        return false;
    
public static booleanisWSS10PolicyContent(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(MustSupportRefKeyIdentifier)) {
            return true;
        }else if( assertion.getName().getLocalPart().equals(MustSupportRefIssuerSerial)) {
            return true;
        }else if(assertion.getName().getLocalPart().equals(RequireExternalUriReference)) {
            return true;
        }else if(assertion.getName().getLocalPart().equals(RequireEmbeddedTokenReference)) {
            return true;
        }
        return false;
    
public static booleanisWSS11(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion)) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(Wss11)) {
            return true;
        }
        return false;
    
public static booleanisWSS11PolicyContent(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion )) {
            return false;
        }
        
        if(assertion.getName().getLocalPart().equals(MustSupportRefKeyIdentifier)) {
            return true;
        }else if( assertion.getName().getLocalPart().equals(MustSupportRefIssuerSerial)) {
            return true;
        }else if(assertion.getName().getLocalPart().equals(MustSupportRefThumbprint)) {
            return true;
        }else if(assertion.getName().getLocalPart().equals(MustSupportRefEncryptedKey)) {
            return true;
        }else if(assertion.getName().getLocalPart().equals(RequireSignatureConfirmation)) {
            return true;
        }else if(assertion.getName().getLocalPart().equals(RequireExternalUriReference)) {
            return true;
        }else if(assertion.getName().getLocalPart().equals(RequireEmbeddedTokenReference)) {
            return true;
        }
        return false;
    
public static booleanisX509Token(com.sun.xml.ws.policy.PolicyAssertion policyAssertion)

        if ( !isSecurityPolicyNS(policyAssertion )) {
            return false;
        }
        
        if(policyAssertion.getName().getLocalPart().equals(X509Token)) {
            return true;
        }
        return false;
    
public static booleanisXPath(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isSecurityPolicyNS(assertion) ) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(XPath) ) {
            return true;
        }
        return false;
    
public static booleanisXPathFilter20(com.sun.xml.ws.policy.PolicyAssertion assertion)

        if ( !isXpathNS(assertion) ) {
            return false;
        }
        
        if ( assertion.getName().getLocalPart().equals(XPathFilter20) ) {
            return true;
        }
        return false;
    
public static booleanisXpathNS(com.sun.xml.ws.policy.PolicyAssertion pa)

        if ( Constants.XPATH_NS.equals(pa.getName().getNamespaceURI()) ) {
            return true;
        }
        return false;