author | mkos |
Sun, 30 Dec 2012 00:00:00 +0100 | |
changeset 22678 | ac1ea46be942 |
parent 12009 | 4abb694f273a |
permissions | -rw-r--r-- |
12009 | 1 |
/* |
22678
ac1ea46be942
8029237: Update copyright year to match last edit in jaxws repository for 2012
mkos
parents:
12009
diff
changeset
|
2 |
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
12009 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
package com.sun.xml.internal.ws.policy; |
|
27 |
||
28 |
/** |
|
29 |
* The class serves as a policy map mutator that allows for replacement of current effective policies |
|
30 |
* stored in the policy map with new effective policy provided by the mutator user. |
|
31 |
* |
|
32 |
* @author Marek Potociar (marek.potociar@sun.com) |
|
33 |
*/ |
|
34 |
public final class EffectivePolicyModifier extends PolicyMapMutator { |
|
35 |
public static EffectivePolicyModifier createEffectivePolicyModifier() { |
|
36 |
return new EffectivePolicyModifier(); |
|
37 |
} |
|
38 |
||
39 |
/** |
|
40 |
* Ensures that direct instantiation is not possible from outside of the class |
|
41 |
*/ |
|
42 |
private EffectivePolicyModifier() { |
|
43 |
// no initialization required |
|
44 |
} |
|
45 |
||
46 |
/** |
|
47 |
* Replaces current effective policy on the service scope (identified by a {@code key} parameter) with the new efective |
|
48 |
* policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply |
|
49 |
* stored with the key. |
|
50 |
* |
|
51 |
* @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}. |
|
52 |
* @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}. |
|
53 |
* |
|
54 |
* @throws IllegalArgumentException in case any of the input parameters is {@code null} |
|
55 |
*/ |
|
56 |
public void setNewEffectivePolicyForServiceScope( |
|
57 |
final PolicyMapKey key, final Policy newEffectivePolicy) { |
|
58 |
getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.SERVICE, key, newEffectivePolicy); |
|
59 |
} |
|
60 |
||
61 |
/** |
|
62 |
* Replaces current effective policy on the endpoint scope (identified by a {@code key} parameter) with the new efective |
|
63 |
* policy provided as a second input parameter. |
|
64 |
* |
|
65 |
* @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}. |
|
66 |
* @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}. |
|
67 |
* |
|
68 |
* @throws IllegalArgumentException in case any of the input parameters is {@code null} |
|
69 |
*/ |
|
70 |
public void setNewEffectivePolicyForEndpointScope( |
|
71 |
final PolicyMapKey key, final Policy newEffectivePolicy) { |
|
72 |
getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.ENDPOINT, key, newEffectivePolicy); |
|
73 |
} |
|
74 |
||
75 |
/** |
|
76 |
* Replaces current effective policy on the operation scope (identified by a {@code key} parameter) with the new efective |
|
77 |
* policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply |
|
78 |
* stored with the key. |
|
79 |
* |
|
80 |
* @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}. |
|
81 |
* @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}. |
|
82 |
* |
|
83 |
* @throws IllegalArgumentException in case any of the input parameters is {@code null} |
|
84 |
*/ |
|
85 |
public void setNewEffectivePolicyForOperationScope( |
|
86 |
final PolicyMapKey key, final Policy newEffectivePolicy) { |
|
87 |
getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.OPERATION, key, newEffectivePolicy); |
|
88 |
} |
|
89 |
||
90 |
/** |
|
91 |
* Replaces current effective policy on the input message scope (identified by a {@code key} parameter) with the new efective |
|
92 |
* policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply |
|
93 |
* stored with the key. |
|
94 |
* |
|
95 |
* @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}. |
|
96 |
* @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}. |
|
97 |
* |
|
98 |
* @throws IllegalArgumentException in case any of the input parameters is {@code null} |
|
99 |
*/ |
|
100 |
public void setNewEffectivePolicyForInputMessageScope( |
|
101 |
final PolicyMapKey key, final Policy newEffectivePolicy) { |
|
102 |
getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.INPUT_MESSAGE, key, newEffectivePolicy); |
|
103 |
} |
|
104 |
||
105 |
/** |
|
106 |
* Replaces current effective policy on the output message scope (identified by a {@code key} parameter) with the new efective |
|
107 |
* policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply |
|
108 |
* stored with the key. |
|
109 |
* |
|
110 |
* @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}. |
|
111 |
* @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}. |
|
112 |
* |
|
113 |
* @throws IllegalArgumentException in case any of the input parameters is {@code null} |
|
114 |
*/ |
|
115 |
public void setNewEffectivePolicyForOutputMessageScope( |
|
116 |
final PolicyMapKey key, final Policy newEffectivePolicy) { |
|
117 |
getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.OUTPUT_MESSAGE, key, newEffectivePolicy); |
|
118 |
} |
|
119 |
||
120 |
/** |
|
121 |
* Replaces current effective policy on the fault message scope (identified by a {@code key} parameter) with the new efective |
|
122 |
* policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply |
|
123 |
* stored with the key. |
|
124 |
* |
|
125 |
* @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}. |
|
126 |
* @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}. |
|
127 |
* |
|
128 |
* @throws IllegalArgumentException in case any of the input parameters is {@code null} |
|
129 |
*/ |
|
130 |
public void setNewEffectivePolicyForFaultMessageScope( |
|
131 |
final PolicyMapKey key, final Policy newEffectivePolicy) { |
|
132 |
getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.FAULT_MESSAGE, key, newEffectivePolicy); |
|
133 |
} |
|
134 |
} |