01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the License). You may not use this file except in
05: * compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
09: * See the License for the specific language governing
10: * permissions and limitations under the License.
11: *
12: * When distributing Covered Code, include this CDDL
13: * Header Notice in each file and include the License file
14: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
15: * If applicable, add the following below the CDDL Header,
16: * with the fields enclosed by brackets [] replaced by
17: * you own identifying information:
18: * "Portions Copyrighted [year] [name of copyright owner]"
19: *
20: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
21: */
22:
23: /**
24: * Base class for all KeyBindings
25: *
26: */package com.sun.xml.wss.impl.policy.mls;
27:
28: public abstract class KeyBindingBase extends WSSPolicy {
29: //added for policy integration
30: public static final String INCLUDE_ONCE = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Once"
31: .intern();
32: public static final String INCLUDE_NEVER = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"
33: .intern();
34: public static final String INCLUDE_ALWAYS_TO_RECIPIENT = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
35: .intern();
36: public static final String INCLUDE_ALWAYS = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"
37: .intern();
38:
39: //protected com.sun.xml.ws.security.policy.Token policyToken;
40: protected boolean policyToken = false;
41: protected String includeToken = INCLUDE_ALWAYS;
42:
43: /*public void setPolicyToken(com.sun.xml.ws.security.policy.Token tok) {
44: // policyToken = tok;
45: }*/
46:
47: public boolean policyTokenWasSet() {
48: return policyToken;
49: }
50:
51: public void setPolicyTokenFlag(boolean flag) {
52: policyToken = flag;
53: }
54:
55: public void setIncludeToken(String include) {
56: if (INCLUDE_ONCE.equals(include)) {
57: throw new UnsupportedOperationException(
58: "IncludeToken Policy ONCE is not yet Supported");
59: }
60: this .includeToken = include;
61: policyToken = true;
62: }
63:
64: public String getIncludeToken() {
65: return includeToken;
66: }
67: }
|