FileDocCategorySizeDatePackage
SecurityPolicyHolder.javaAPI DocExample5634Tue May 29 16:56:50 BST 2007com.sun.xml.ws.security.impl.policyconv

SecurityPolicyHolder

public class SecurityPolicyHolder extends Object
Cache XWSS Policy i,e MessagePolicy for each message and cache all the Issued and SecureConversation Tokens for quick lookup.
author
K.Venugopal@sun.com

Fields Summary
private com.sun.xml.wss.impl.policy.mls.MessagePolicy
mp
private List
scList
private List
issuedTokenList
private static final List
EMPTY_LIST
private com.sun.xml.ws.security.policy.AlgorithmSuite
suite
private HashMap
faultFPMap
private HashMap
configAssertions
Constructors Summary
public SecurityPolicyHolder()
Creates a new instance of SecurityPolicyHolder

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

        if(configAssertions == null){
            configAssertions = new HashMap<String,Set<PolicyAssertion>>();
        }
        Set<PolicyAssertion> assertions = configAssertions.get(assertion.getName().getNamespaceURI());
        if(assertions == null){
            assertions = new HashSet<com.sun.xml.ws.policy.PolicyAssertion>();
            configAssertions.put(assertion.getName().getNamespaceURI(),assertions);
        }
        assertions.add(assertion);
    
public voidaddFaultPolicy(com.sun.xml.ws.api.model.wsdl.WSDLFault fault, com.sun.xml.ws.security.impl.policyconv.SecurityPolicyHolder policy)

        if(faultFPMap == null){
            faultFPMap =  new HashMap<WSDLFault,SecurityPolicyHolder>();
        }
        faultFPMap.put(fault,policy);
    
public voidaddIssuedToken(com.sun.xml.ws.policy.PolicyAssertion pa)

        if(issuedTokenList == null){
            issuedTokenList = new ArrayList<PolicyAssertion> ();
        }
        issuedTokenList.add(pa);
    
public voidaddIssuedTokens(java.util.List list)

        if(issuedTokenList == null){
            issuedTokenList =  list;
        }else{
            issuedTokenList.addAll(list);
        }
    
public voidaddSecureConversationToken(com.sun.xml.ws.policy.PolicyAssertion pa)

        if(scList == null){
            scList = new ArrayList<PolicyAssertion> ();
        }
        scList.add(pa);
    
public com.sun.xml.ws.security.policy.AlgorithmSuitegetBindingLevelAlgSuite()

        return suite;
    
public java.util.SetgetConfigAssertions(java.lang.String namespaceuri)

        if(configAssertions == null){
            return null;
        }
        return configAssertions.get(namespaceuri);        
    
public com.sun.xml.ws.security.impl.policyconv.SecurityPolicyHoldergetFaultPolicy(com.sun.xml.ws.api.model.wsdl.WSDLFault fault)

        if(faultFPMap == null){
            return null;
        }
        return faultFPMap.get(fault);
    
public java.util.ListgetIssuedTokens()

        return ((issuedTokenList==null)?EMPTY_LIST:issuedTokenList);
    
public com.sun.xml.wss.impl.policy.mls.MessagePolicygetMessagePolicy()

        return this.mp;
    
public java.util.ListgetSecureConversationTokens()

        return ((scList==null)?EMPTY_LIST:scList);
    
public voidsetBindingLevelAlgSuite(com.sun.xml.ws.security.policy.AlgorithmSuite suite)

        this.suite = suite;
    
public voidsetMessagePolicy(com.sun.xml.wss.impl.policy.mls.MessagePolicy mp)

        this.mp= mp;