src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapUtil.java

Print this page
rev 446 : 8029237: Update copyright year to match last edit in jdk8 jaxws repository (2012)
Summary: Fixing Copyrights for year 2012
Reviewed-by: chegar
rev 472 : 8036030: Update JAX-WS RI integration to latest version

*** 1,7 **** /* ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 32,41 **** --- 32,42 ---- import com.sun.xml.internal.ws.policy.subject.WsdlBindingSubject; import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; + import java.util.Map.Entry; import javax.xml.namespace.QName; /** * Utility methods that operate on a PolicyMap. *
*** 100,130 **** } } } final PolicyMapKeyConverter converter = new PolicyMapKeyConverter(serviceName, portName); ! for (WsdlBindingSubject wsdlSubject : subjectToPolicies.keySet()) { ! final PolicySubject newSubject = new PolicySubject(wsdlSubject, subjectToPolicies.get(wsdlSubject)); PolicyMapKey mapKey = converter.getPolicyMapKey(wsdlSubject); if (wsdlSubject.isBindingSubject()) { policyMap.putSubject(ScopeType.ENDPOINT, mapKey, newSubject); ! } ! else if (wsdlSubject.isBindingOperationSubject()) { policyMap.putSubject(ScopeType.OPERATION, mapKey, newSubject); ! } ! else if (wsdlSubject.isBindingMessageSubject()) { switch (wsdlSubject.getMessageType()) { case INPUT: policyMap.putSubject(ScopeType.INPUT_MESSAGE, mapKey, newSubject); break; case OUTPUT: policyMap.putSubject(ScopeType.OUTPUT_MESSAGE, mapKey, newSubject); break; case FAULT: policyMap.putSubject(ScopeType.FAULT_MESSAGE, mapKey, newSubject); break; } } } LOGGER.exiting(); --- 101,133 ---- } } } final PolicyMapKeyConverter converter = new PolicyMapKeyConverter(serviceName, portName); ! for (Entry<WsdlBindingSubject, Collection<Policy>> entry : subjectToPolicies.entrySet()) { ! WsdlBindingSubject wsdlSubject = entry.getKey(); ! Collection<Policy> policySet = entry.getValue(); ! final PolicySubject newSubject = new PolicySubject(wsdlSubject, policySet); PolicyMapKey mapKey = converter.getPolicyMapKey(wsdlSubject); if (wsdlSubject.isBindingSubject()) { policyMap.putSubject(ScopeType.ENDPOINT, mapKey, newSubject); ! } else if (wsdlSubject.isBindingOperationSubject()) { policyMap.putSubject(ScopeType.OPERATION, mapKey, newSubject); ! } else if (wsdlSubject.isBindingMessageSubject()) { switch (wsdlSubject.getMessageType()) { case INPUT: policyMap.putSubject(ScopeType.INPUT_MESSAGE, mapKey, newSubject); break; case OUTPUT: policyMap.putSubject(ScopeType.OUTPUT_MESSAGE, mapKey, newSubject); break; case FAULT: policyMap.putSubject(ScopeType.FAULT_MESSAGE, mapKey, newSubject); break; + default: + break; } } } LOGGER.exiting();