001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common Development
008: * and Distribution License("CDDL") (collectively, the "License"). You
009: * may not use this file except in compliance with the License. You can obtain
010: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
011: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
012: * language governing permissions and limitations under the License.
013: *
014: * When distributing the software, include this License Header Notice in each
015: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
016: * Sun designates this particular file as subject to the "Classpath" exception
017: * as provided by Sun in the GPL Version 2 section of the License file that
018: * accompanied this code. If applicable, add the following below the License
019: * Header, with the fields enclosed by brackets [] replaced by your own
020: * identifying information: "Portions Copyrighted [year]
021: * [name of copyright owner]"
022: *
023: * Contributor(s):
024: *
025: * If you wish your version of this file to be governed by only the CDDL or
026: * only the GPL Version 2, indicate your decision by adding "[Contributor]
027: * elects to include this software in this distribution under the [CDDL or GPL
028: * Version 2] license." If you don't indicate a single choice of license, a
029: * recipient has the option to distribute your version of this file under
030: * either the CDDL, the GPL Version 2 or to extend the choice of license to
031: * its licensees as provided above. However, if you add GPL Version 2 code
032: * and therefore, elected the GPL Version 2 license, then the option applies
033: * only if the new code is made subject to such option by the copyright
034: * holder.
035: */
036:
037: package com.sun.xml.ws.policy;
038:
039: import javax.xml.namespace.QName;
040:
041: /**
042: * Commonly used constants by the policy implementations
043: */
044: public final class PolicyConstants {
045:
046: /**
047: * Standard WS-Policy namespace URI
048: */
049: public static final String POLICY_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/09/policy";
050:
051: /**
052: * Sun proprietary policy namespace URI
053: */
054: public static final String SUN_POLICY_NAMESPACE_URI = "http://java.sun.com/xml/ns/wsit/policy";
055:
056: /**
057: * Default WS-Policy namespace prefix
058: */
059: public static final String POLICY_NAMESPACE_PREFIX = "wsp";
060:
061: /**
062: * Sun proprietary policy namespace prefix
063: */
064: public static final String SUN_POLICY_NAMESPACE_PREFIX = "sunwsp";
065:
066: /**
067: * Standard WS-Security Utility namespace URI, used in Policy Id
068: */
069: public static final String WSU_NAMESPACE_URI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
070:
071: /**
072: * Standard WS-Security Utility namespace prefix, used in Policy Id
073: */
074: public static final String WSU_NAMESPACE_PREFIX = "wsu";
075:
076: /**
077: * Standard XML namespace URI
078: */
079: public static final String XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
080:
081: /**
082: * Fully qualified name of the SUN's proprietary policy assertion visibility attribute
083: */
084: public static final QName VISIBILITY_ATTRIBUTE = new QName(
085: SUN_POLICY_NAMESPACE_URI, "visibility");
086:
087: /**
088: * Recognized value of the SUN's proprietary policy assertion visibility attribute
089: */
090: public static final String VISIBILITY_VALUE_PRIVATE = "private";
091:
092: /**
093: * Fully qualified name of the WS-Policy Policy XML element
094: */
095: public static final QName POLICY = new QName(POLICY_NAMESPACE_URI,
096: "Policy");
097:
098: /**
099: * Fully qualified name of the Policy wsu:Id XML attribute
100: */
101: public static final QName WSU_ID = new QName(WSU_NAMESPACE_URI,
102: "Id");
103:
104: /**
105: * Fully qualified name of the xml:id policy attribute
106: */
107: public static final QName XML_ID = new QName(XML_NAMESPACE_URI,
108: "id");
109:
110: /**
111: * Fully qualified name of the WS-Policy Policy Id XML attribute
112: */
113: public static final QName POLICY_NAME = new QName(
114: POLICY_NAMESPACE_URI, "Name");
115:
116: /**
117: * Fully qualified name of the WS-Policy Policy XML element
118: */
119: public static final QName POLICY_REFERENCE = new QName(
120: POLICY_NAMESPACE_URI, "PolicyReference");
121:
122: /**
123: * Fully qualified name of the WS-Policy ExactlyOne XML element
124: */
125: public static final QName EXACTLY_ONE = new QName(
126: POLICY_NAMESPACE_URI, "ExactlyOne");
127:
128: /**
129: * Fully qualified name of the WS-Policy All XML element
130: */
131: public static final QName ALL = new QName(POLICY_NAMESPACE_URI,
132: "All");
133:
134: /**
135: * Fully qualified name of the WS-PolicyAttachment UsingPolicy XML element
136: */
137: public static final QName USING_POLICY = new QName(
138: POLICY_NAMESPACE_URI, "UsingPolicy");
139:
140: /**
141: * Fully qualified name of the WS-Policy Optional XML attribute
142: */
143: public static final QName OPTIONAL = new QName(
144: POLICY_NAMESPACE_URI, "Optional");
145:
146: /**
147: * Fully qualified name of the WS-Policy Optional XML attribute
148: */
149: public static final QName IGNORABLE = new QName(
150: POLICY_NAMESPACE_URI, "Ignorable");
151:
152: /**
153: * Fully qualified name of the WS-Policy URI XML attribute
154: */
155: public static final QName POLICY_URI = new QName(null, "URI");
156:
157: /**
158: * Fully qualified name of the WS-Policy PolicyURIs XML attribute
159: */
160: public static final QName POLICY_URIs = new QName(
161: POLICY_NAMESPACE_URI, "PolicyURIs");
162:
163: /**
164: * Name under which we look up a default factory implementation
165: */
166: public static final String POLICY_FACTORY_PROPERTY = "com.sun.xml.ws.policy.PolicyFactory";
167:
168: /**
169: * Class name of the default factory implementation
170: */
171: public static final String DEFAULT_POLICY_FACTORY_IMPLEMENTATION = "com.sun.xml.ws.policy.wspol.WSPolicyFactory";
172:
173: /**
174: * Identifier of the client-side configuration file
175: */
176: public static final String CLIENT_CONFIGURATION_IDENTIFIER = "client";
177:
178: /**
179: * Prevent instantiation of this class.
180: */
181: private PolicyConstants() {
182: // nothing to initialize
183: }
184: }
|